waldur-api-client 7.7.5__py3-none-any.whl → 7.7.6__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_offering_users/marketplace_offering_users_checklist_retrieve.py +154 -0
- waldur_api_client/api/marketplace_offering_users/marketplace_offering_users_checklist_review_retrieve.py +154 -0
- waldur_api_client/api/marketplace_offering_users/marketplace_offering_users_completion_review_status_retrieve.py +154 -0
- waldur_api_client/api/marketplace_offering_users/marketplace_offering_users_completion_status_retrieve.py +154 -0
- waldur_api_client/api/marketplace_offering_users/marketplace_offering_users_submit_answers.py +179 -0
- waldur_api_client/api/marketplace_robot_accounts/marketplace_robot_accounts_list.py +23 -0
- waldur_api_client/api/marketplace_robot_accounts/marketplace_robot_accounts_retrieve.py +30 -1
- waldur_api_client/api/marketplace_service_providers/marketplace_service_providers_project_service_accounts_list.py +276 -0
- waldur_api_client/api/marketplace_service_providers/service_provider_compliance_overview.py +189 -0
- waldur_api_client/api/marketplace_service_providers/service_provider_offering_users_compliance.py +222 -0
- waldur_api_client/api/public_maintenance_announcements/__init__.py +1 -0
- waldur_api_client/api/public_maintenance_announcements/public_maintenance_announcements_count.py +325 -0
- waldur_api_client/api/public_maintenance_announcements/public_maintenance_announcements_list.py +328 -0
- waldur_api_client/api/public_maintenance_announcements/public_maintenance_announcements_retrieve.py +144 -0
- waldur_api_client/models/__init__.py +56 -4
- waldur_api_client/models/admin_announcement.py +109 -1
- waldur_api_client/models/admin_announcement_maintenance_affected_offerings_item.py +103 -0
- waldur_api_client/models/admin_announcements_list_field_item.py +8 -0
- waldur_api_client/models/admin_announcements_retrieve_field_item.py +8 -0
- waldur_api_client/models/azure_sql_server_create_order_attributes.py +80 -0
- waldur_api_client/models/azure_virtual_machine_create_order_attributes.py +96 -0
- waldur_api_client/models/basic_user.py +30 -21
- waldur_api_client/models/booking_offerings_list_field_item.py +1 -0
- waldur_api_client/models/booking_offerings_retrieve_field_item.py +1 -0
- waldur_api_client/models/create_router.py +1 -1
- waldur_api_client/models/create_router_request.py +1 -1
- waldur_api_client/models/customer.py +0 -30
- waldur_api_client/models/customers_list_field_item.py +0 -2
- waldur_api_client/models/customers_retrieve_field_item.py +0 -2
- waldur_api_client/models/fingerprint.py +19 -17
- waldur_api_client/models/instance_flavor_change_request.py +1 -1
- waldur_api_client/models/marketplace_managed_rancher_create_order_attributes.py +144 -0
- waldur_api_client/models/marketplace_provider_offerings_list_customer_service_accounts_retrieve_field_item.py +1 -0
- waldur_api_client/models/marketplace_provider_offerings_list_field_item.py +1 -0
- waldur_api_client/models/marketplace_provider_offerings_list_project_service_accounts_retrieve_field_item.py +1 -0
- waldur_api_client/models/marketplace_provider_offerings_retrieve_field_item.py +1 -0
- waldur_api_client/models/marketplace_provider_offerings_stats_retrieve_field_item.py +1 -0
- waldur_api_client/models/marketplace_provider_offerings_user_has_resource_access_retrieve_field_item.py +1 -0
- waldur_api_client/models/marketplace_public_offerings_list_field_item.py +1 -0
- waldur_api_client/models/marketplace_public_offerings_retrieve_field_item.py +1 -0
- waldur_api_client/models/marketplace_rancher_create_order_attributes.py +142 -0
- waldur_api_client/models/marketplace_robot_accounts_list_field_item.py +32 -0
- waldur_api_client/models/marketplace_robot_accounts_retrieve_field_item.py +32 -0
- waldur_api_client/models/offering.py +9 -0
- waldur_api_client/models/offering_create.py +8 -0
- waldur_api_client/models/open_stack_backend_instance.py +2 -2
- waldur_api_client/models/open_stack_backend_volumes.py +3 -3
- waldur_api_client/models/open_stack_backup.py +1 -1
- waldur_api_client/models/open_stack_backup_restoration.py +8 -5
- waldur_api_client/models/open_stack_backup_restoration_request.py +28 -3
- waldur_api_client/models/open_stack_fixed_ip.py +2 -2
- waldur_api_client/models/open_stack_fixed_ip_request.py +2 -2
- waldur_api_client/models/open_stack_floating_ip.py +5 -4
- waldur_api_client/models/open_stack_instance.py +17 -15
- waldur_api_client/models/open_stack_instance_allowed_address_pairs_update_request.py +3 -2
- waldur_api_client/models/open_stack_instance_availability_zone.py +1 -1
- waldur_api_client/models/open_stack_instance_create_order_attributes.py +280 -0
- waldur_api_client/models/open_stack_instance_request.py +4 -3
- waldur_api_client/models/open_stack_instance_security_groups_update_request.py +1 -1
- waldur_api_client/models/open_stack_nested_floating_ip.py +3 -3
- waldur_api_client/models/open_stack_nested_instance.py +1 -1
- waldur_api_client/models/open_stack_nested_port.py +5 -5
- waldur_api_client/models/open_stack_nested_port_request.py +1 -1
- waldur_api_client/models/open_stack_nested_security_group.py +1 -53
- waldur_api_client/models/open_stack_nested_security_group_request.py +59 -0
- waldur_api_client/models/open_stack_nested_sub_net.py +4 -4
- waldur_api_client/models/open_stack_nested_sub_net_request.py +4 -4
- waldur_api_client/models/open_stack_nested_volume.py +3 -3
- waldur_api_client/models/open_stack_nested_volume_request.py +3 -3
- waldur_api_client/models/open_stack_network.py +3 -3
- waldur_api_client/models/open_stack_port.py +10 -9
- waldur_api_client/models/open_stack_port_ip_update_request.py +2 -2
- waldur_api_client/models/open_stack_port_request.py +3 -3
- waldur_api_client/models/open_stack_router.py +2 -2
- waldur_api_client/models/open_stack_router_interface_request.py +4 -2
- waldur_api_client/models/open_stack_security_group_rule_create.py +6 -5
- waldur_api_client/models/open_stack_security_group_rule_create_request.py +6 -5
- waldur_api_client/models/open_stack_security_group_rule_update_request.py +6 -5
- waldur_api_client/models/open_stack_server_group.py +2 -1
- waldur_api_client/models/open_stack_server_group_request.py +2 -1
- waldur_api_client/models/open_stack_snapshot.py +2 -2
- waldur_api_client/models/open_stack_snapshot_restoration.py +1 -1
- waldur_api_client/models/open_stack_sub_net.py +5 -5
- waldur_api_client/models/open_stack_sub_net_request.py +2 -2
- waldur_api_client/models/open_stack_tenant.py +3 -3
- waldur_api_client/models/open_stack_tenant_create_order_attributes.py +109 -0
- waldur_api_client/models/open_stack_volume.py +9 -9
- waldur_api_client/models/open_stack_volume_create_order_attributes.py +152 -0
- waldur_api_client/models/open_stack_volume_request.py +1 -1
- waldur_api_client/models/order_create_request.py +165 -4
- waldur_api_client/models/patched_open_stack_instance_request.py +4 -3
- waldur_api_client/models/patched_open_stack_server_group_request.py +2 -1
- waldur_api_client/models/patched_open_stack_sub_net_request.py +2 -2
- waldur_api_client/models/patched_open_stack_volume_request.py +1 -1
- waldur_api_client/models/permission_request.py +2 -2
- waldur_api_client/models/provider_offering_details.py +9 -0
- waldur_api_client/models/public_maintenance_announcement.py +217 -0
- waldur_api_client/models/public_maintenance_announcement_state_enum.py +10 -0
- waldur_api_client/models/public_maintenance_announcements_count_o_item.py +15 -0
- waldur_api_client/models/public_maintenance_announcements_count_state_item.py +12 -0
- waldur_api_client/models/public_maintenance_announcements_list_o_item.py +15 -0
- waldur_api_client/models/public_maintenance_announcements_list_state_item.py +12 -0
- waldur_api_client/models/public_offering_details.py +9 -0
- waldur_api_client/models/rancher_cluster_security_group_rule.py +5 -4
- waldur_api_client/models/rancher_cluster_security_group_rule_request.py +5 -4
- waldur_api_client/models/remote_project_update_request.py +2 -2
- waldur_api_client/models/robot_account_details.py +226 -144
- waldur_api_client/models/service_provider_compliance_overview.py +122 -0
- waldur_api_client/models/service_provider_offering_user_compliance.py +179 -0
- waldur_api_client/models/service_provider_offering_user_compliance_state_enum.py +17 -0
- waldur_api_client/models/slurm_invoices_slurm_package_create_order_attributes.py +72 -0
- waldur_api_client/models/v_mware_virtual_machine_create_order_attributes.py +225 -0
- waldur_api_client/models/v_mware_virtual_machine_create_order_attributes_guest_os_type_1.py +155 -0
- waldur_api_client/models/v_mware_virtual_machine_create_order_attributes_guest_os_type_2_type_1.py +155 -0
- waldur_api_client/models/v_mware_virtual_machine_create_order_attributes_guest_os_type_3_type_1.py +155 -0
- waldur_api_client/models/volume_attach_request.py +1 -1
- {waldur_api_client-7.7.5.dist-info → waldur_api_client-7.7.6.dist-info}/METADATA +1 -1
- {waldur_api_client-7.7.5.dist-info → waldur_api_client-7.7.6.dist-info}/RECORD +120 -85
- waldur_api_client/models/nested_security_group_rule.py +0 -222
- waldur_api_client/models/nested_security_group_rule_request.py +0 -187
- {waldur_api_client-7.7.5.dist-info → waldur_api_client-7.7.6.dist-info}/LICENSE +0 -0
- {waldur_api_client-7.7.5.dist-info → waldur_api_client-7.7.6.dist-info}/WHEEL +0 -0
waldur_api_client/api/marketplace_offering_users/marketplace_offering_users_checklist_retrieve.py
ADDED
|
@@ -0,0 +1,154 @@
|
|
|
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_response import ChecklistResponse
|
|
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-offering-users/{uuid}/checklist/",
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
return _kwargs
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
def _parse_response(
|
|
25
|
+
*, client: Union[AuthenticatedClient, Client], response: httpx.Response
|
|
26
|
+
) -> Union[Any, ChecklistResponse]:
|
|
27
|
+
if response.status_code == 200:
|
|
28
|
+
response_200 = ChecklistResponse.from_dict(response.json())
|
|
29
|
+
|
|
30
|
+
return response_200
|
|
31
|
+
if response.status_code == 400:
|
|
32
|
+
response_400 = response.json()
|
|
33
|
+
return response_400
|
|
34
|
+
if response.status_code == 404:
|
|
35
|
+
response_404 = response.json()
|
|
36
|
+
return response_404
|
|
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[Union[Any, ChecklistResponse]]:
|
|
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
|
+
uuid: UUID,
|
|
53
|
+
*,
|
|
54
|
+
client: AuthenticatedClient,
|
|
55
|
+
) -> Response[Union[Any, ChecklistResponse]]:
|
|
56
|
+
"""Get checklist with questions and existing answers.
|
|
57
|
+
|
|
58
|
+
Args:
|
|
59
|
+
uuid (UUID):
|
|
60
|
+
|
|
61
|
+
Raises:
|
|
62
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code.
|
|
63
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
64
|
+
|
|
65
|
+
Returns:
|
|
66
|
+
Response[Union[Any, ChecklistResponse]]
|
|
67
|
+
"""
|
|
68
|
+
|
|
69
|
+
kwargs = _get_kwargs(
|
|
70
|
+
uuid=uuid,
|
|
71
|
+
)
|
|
72
|
+
|
|
73
|
+
response = client.get_httpx_client().request(
|
|
74
|
+
**kwargs,
|
|
75
|
+
)
|
|
76
|
+
|
|
77
|
+
return _build_response(client=client, response=response)
|
|
78
|
+
|
|
79
|
+
|
|
80
|
+
def sync(
|
|
81
|
+
uuid: UUID,
|
|
82
|
+
*,
|
|
83
|
+
client: AuthenticatedClient,
|
|
84
|
+
) -> Union[Any, ChecklistResponse]:
|
|
85
|
+
"""Get checklist with questions and existing answers.
|
|
86
|
+
|
|
87
|
+
Args:
|
|
88
|
+
uuid (UUID):
|
|
89
|
+
|
|
90
|
+
Raises:
|
|
91
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code.
|
|
92
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
93
|
+
|
|
94
|
+
Returns:
|
|
95
|
+
Union[Any, ChecklistResponse]
|
|
96
|
+
"""
|
|
97
|
+
|
|
98
|
+
return sync_detailed(
|
|
99
|
+
uuid=uuid,
|
|
100
|
+
client=client,
|
|
101
|
+
).parsed
|
|
102
|
+
|
|
103
|
+
|
|
104
|
+
async def asyncio_detailed(
|
|
105
|
+
uuid: UUID,
|
|
106
|
+
*,
|
|
107
|
+
client: AuthenticatedClient,
|
|
108
|
+
) -> Response[Union[Any, ChecklistResponse]]:
|
|
109
|
+
"""Get checklist with questions and existing answers.
|
|
110
|
+
|
|
111
|
+
Args:
|
|
112
|
+
uuid (UUID):
|
|
113
|
+
|
|
114
|
+
Raises:
|
|
115
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code.
|
|
116
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
117
|
+
|
|
118
|
+
Returns:
|
|
119
|
+
Response[Union[Any, ChecklistResponse]]
|
|
120
|
+
"""
|
|
121
|
+
|
|
122
|
+
kwargs = _get_kwargs(
|
|
123
|
+
uuid=uuid,
|
|
124
|
+
)
|
|
125
|
+
|
|
126
|
+
response = await client.get_async_httpx_client().request(**kwargs)
|
|
127
|
+
|
|
128
|
+
return _build_response(client=client, response=response)
|
|
129
|
+
|
|
130
|
+
|
|
131
|
+
async def asyncio(
|
|
132
|
+
uuid: UUID,
|
|
133
|
+
*,
|
|
134
|
+
client: AuthenticatedClient,
|
|
135
|
+
) -> Union[Any, ChecklistResponse]:
|
|
136
|
+
"""Get checklist with questions and existing answers.
|
|
137
|
+
|
|
138
|
+
Args:
|
|
139
|
+
uuid (UUID):
|
|
140
|
+
|
|
141
|
+
Raises:
|
|
142
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code.
|
|
143
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
144
|
+
|
|
145
|
+
Returns:
|
|
146
|
+
Union[Any, ChecklistResponse]
|
|
147
|
+
"""
|
|
148
|
+
|
|
149
|
+
return (
|
|
150
|
+
await asyncio_detailed(
|
|
151
|
+
uuid=uuid,
|
|
152
|
+
client=client,
|
|
153
|
+
)
|
|
154
|
+
).parsed
|
|
@@ -0,0 +1,154 @@
|
|
|
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_reviewer_response import ChecklistReviewerResponse
|
|
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-offering-users/{uuid}/checklist_review/",
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
return _kwargs
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
def _parse_response(
|
|
25
|
+
*, client: Union[AuthenticatedClient, Client], response: httpx.Response
|
|
26
|
+
) -> Union[Any, ChecklistReviewerResponse]:
|
|
27
|
+
if response.status_code == 200:
|
|
28
|
+
response_200 = ChecklistReviewerResponse.from_dict(response.json())
|
|
29
|
+
|
|
30
|
+
return response_200
|
|
31
|
+
if response.status_code == 400:
|
|
32
|
+
response_400 = response.json()
|
|
33
|
+
return response_400
|
|
34
|
+
if response.status_code == 404:
|
|
35
|
+
response_404 = response.json()
|
|
36
|
+
return response_404
|
|
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[Union[Any, ChecklistReviewerResponse]]:
|
|
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
|
+
uuid: UUID,
|
|
53
|
+
*,
|
|
54
|
+
client: AuthenticatedClient,
|
|
55
|
+
) -> Response[Union[Any, ChecklistReviewerResponse]]:
|
|
56
|
+
"""Get checklist with questions and existing answers including review logic (reviewers only).
|
|
57
|
+
|
|
58
|
+
Args:
|
|
59
|
+
uuid (UUID):
|
|
60
|
+
|
|
61
|
+
Raises:
|
|
62
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code.
|
|
63
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
64
|
+
|
|
65
|
+
Returns:
|
|
66
|
+
Response[Union[Any, ChecklistReviewerResponse]]
|
|
67
|
+
"""
|
|
68
|
+
|
|
69
|
+
kwargs = _get_kwargs(
|
|
70
|
+
uuid=uuid,
|
|
71
|
+
)
|
|
72
|
+
|
|
73
|
+
response = client.get_httpx_client().request(
|
|
74
|
+
**kwargs,
|
|
75
|
+
)
|
|
76
|
+
|
|
77
|
+
return _build_response(client=client, response=response)
|
|
78
|
+
|
|
79
|
+
|
|
80
|
+
def sync(
|
|
81
|
+
uuid: UUID,
|
|
82
|
+
*,
|
|
83
|
+
client: AuthenticatedClient,
|
|
84
|
+
) -> Union[Any, ChecklistReviewerResponse]:
|
|
85
|
+
"""Get checklist with questions and existing answers including review logic (reviewers only).
|
|
86
|
+
|
|
87
|
+
Args:
|
|
88
|
+
uuid (UUID):
|
|
89
|
+
|
|
90
|
+
Raises:
|
|
91
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code.
|
|
92
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
93
|
+
|
|
94
|
+
Returns:
|
|
95
|
+
Union[Any, ChecklistReviewerResponse]
|
|
96
|
+
"""
|
|
97
|
+
|
|
98
|
+
return sync_detailed(
|
|
99
|
+
uuid=uuid,
|
|
100
|
+
client=client,
|
|
101
|
+
).parsed
|
|
102
|
+
|
|
103
|
+
|
|
104
|
+
async def asyncio_detailed(
|
|
105
|
+
uuid: UUID,
|
|
106
|
+
*,
|
|
107
|
+
client: AuthenticatedClient,
|
|
108
|
+
) -> Response[Union[Any, ChecklistReviewerResponse]]:
|
|
109
|
+
"""Get checklist with questions and existing answers including review logic (reviewers only).
|
|
110
|
+
|
|
111
|
+
Args:
|
|
112
|
+
uuid (UUID):
|
|
113
|
+
|
|
114
|
+
Raises:
|
|
115
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code.
|
|
116
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
117
|
+
|
|
118
|
+
Returns:
|
|
119
|
+
Response[Union[Any, ChecklistReviewerResponse]]
|
|
120
|
+
"""
|
|
121
|
+
|
|
122
|
+
kwargs = _get_kwargs(
|
|
123
|
+
uuid=uuid,
|
|
124
|
+
)
|
|
125
|
+
|
|
126
|
+
response = await client.get_async_httpx_client().request(**kwargs)
|
|
127
|
+
|
|
128
|
+
return _build_response(client=client, response=response)
|
|
129
|
+
|
|
130
|
+
|
|
131
|
+
async def asyncio(
|
|
132
|
+
uuid: UUID,
|
|
133
|
+
*,
|
|
134
|
+
client: AuthenticatedClient,
|
|
135
|
+
) -> Union[Any, ChecklistReviewerResponse]:
|
|
136
|
+
"""Get checklist with questions and existing answers including review logic (reviewers only).
|
|
137
|
+
|
|
138
|
+
Args:
|
|
139
|
+
uuid (UUID):
|
|
140
|
+
|
|
141
|
+
Raises:
|
|
142
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code.
|
|
143
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
144
|
+
|
|
145
|
+
Returns:
|
|
146
|
+
Union[Any, ChecklistReviewerResponse]
|
|
147
|
+
"""
|
|
148
|
+
|
|
149
|
+
return (
|
|
150
|
+
await asyncio_detailed(
|
|
151
|
+
uuid=uuid,
|
|
152
|
+
client=client,
|
|
153
|
+
)
|
|
154
|
+
).parsed
|
|
@@ -0,0 +1,154 @@
|
|
|
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_completion_reviewer import ChecklistCompletionReviewer
|
|
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-offering-users/{uuid}/completion_review_status/",
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
return _kwargs
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
def _parse_response(
|
|
25
|
+
*, client: Union[AuthenticatedClient, Client], response: httpx.Response
|
|
26
|
+
) -> Union[Any, ChecklistCompletionReviewer]:
|
|
27
|
+
if response.status_code == 200:
|
|
28
|
+
response_200 = ChecklistCompletionReviewer.from_dict(response.json())
|
|
29
|
+
|
|
30
|
+
return response_200
|
|
31
|
+
if response.status_code == 400:
|
|
32
|
+
response_400 = response.json()
|
|
33
|
+
return response_400
|
|
34
|
+
if response.status_code == 404:
|
|
35
|
+
response_404 = response.json()
|
|
36
|
+
return response_404
|
|
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[Union[Any, ChecklistCompletionReviewer]]:
|
|
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
|
+
uuid: UUID,
|
|
53
|
+
*,
|
|
54
|
+
client: AuthenticatedClient,
|
|
55
|
+
) -> Response[Union[Any, ChecklistCompletionReviewer]]:
|
|
56
|
+
"""Get checklist completion status with review triggers (reviewers only).
|
|
57
|
+
|
|
58
|
+
Args:
|
|
59
|
+
uuid (UUID):
|
|
60
|
+
|
|
61
|
+
Raises:
|
|
62
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code.
|
|
63
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
64
|
+
|
|
65
|
+
Returns:
|
|
66
|
+
Response[Union[Any, ChecklistCompletionReviewer]]
|
|
67
|
+
"""
|
|
68
|
+
|
|
69
|
+
kwargs = _get_kwargs(
|
|
70
|
+
uuid=uuid,
|
|
71
|
+
)
|
|
72
|
+
|
|
73
|
+
response = client.get_httpx_client().request(
|
|
74
|
+
**kwargs,
|
|
75
|
+
)
|
|
76
|
+
|
|
77
|
+
return _build_response(client=client, response=response)
|
|
78
|
+
|
|
79
|
+
|
|
80
|
+
def sync(
|
|
81
|
+
uuid: UUID,
|
|
82
|
+
*,
|
|
83
|
+
client: AuthenticatedClient,
|
|
84
|
+
) -> Union[Any, ChecklistCompletionReviewer]:
|
|
85
|
+
"""Get checklist completion status with review triggers (reviewers only).
|
|
86
|
+
|
|
87
|
+
Args:
|
|
88
|
+
uuid (UUID):
|
|
89
|
+
|
|
90
|
+
Raises:
|
|
91
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code.
|
|
92
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
93
|
+
|
|
94
|
+
Returns:
|
|
95
|
+
Union[Any, ChecklistCompletionReviewer]
|
|
96
|
+
"""
|
|
97
|
+
|
|
98
|
+
return sync_detailed(
|
|
99
|
+
uuid=uuid,
|
|
100
|
+
client=client,
|
|
101
|
+
).parsed
|
|
102
|
+
|
|
103
|
+
|
|
104
|
+
async def asyncio_detailed(
|
|
105
|
+
uuid: UUID,
|
|
106
|
+
*,
|
|
107
|
+
client: AuthenticatedClient,
|
|
108
|
+
) -> Response[Union[Any, ChecklistCompletionReviewer]]:
|
|
109
|
+
"""Get checklist completion status with review triggers (reviewers only).
|
|
110
|
+
|
|
111
|
+
Args:
|
|
112
|
+
uuid (UUID):
|
|
113
|
+
|
|
114
|
+
Raises:
|
|
115
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code.
|
|
116
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
117
|
+
|
|
118
|
+
Returns:
|
|
119
|
+
Response[Union[Any, ChecklistCompletionReviewer]]
|
|
120
|
+
"""
|
|
121
|
+
|
|
122
|
+
kwargs = _get_kwargs(
|
|
123
|
+
uuid=uuid,
|
|
124
|
+
)
|
|
125
|
+
|
|
126
|
+
response = await client.get_async_httpx_client().request(**kwargs)
|
|
127
|
+
|
|
128
|
+
return _build_response(client=client, response=response)
|
|
129
|
+
|
|
130
|
+
|
|
131
|
+
async def asyncio(
|
|
132
|
+
uuid: UUID,
|
|
133
|
+
*,
|
|
134
|
+
client: AuthenticatedClient,
|
|
135
|
+
) -> Union[Any, ChecklistCompletionReviewer]:
|
|
136
|
+
"""Get checklist completion status with review triggers (reviewers only).
|
|
137
|
+
|
|
138
|
+
Args:
|
|
139
|
+
uuid (UUID):
|
|
140
|
+
|
|
141
|
+
Raises:
|
|
142
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code.
|
|
143
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
144
|
+
|
|
145
|
+
Returns:
|
|
146
|
+
Union[Any, ChecklistCompletionReviewer]
|
|
147
|
+
"""
|
|
148
|
+
|
|
149
|
+
return (
|
|
150
|
+
await asyncio_detailed(
|
|
151
|
+
uuid=uuid,
|
|
152
|
+
client=client,
|
|
153
|
+
)
|
|
154
|
+
).parsed
|
|
@@ -0,0 +1,154 @@
|
|
|
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_completion import ChecklistCompletion
|
|
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-offering-users/{uuid}/completion_status/",
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
return _kwargs
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
def _parse_response(
|
|
25
|
+
*, client: Union[AuthenticatedClient, Client], response: httpx.Response
|
|
26
|
+
) -> Union[Any, ChecklistCompletion]:
|
|
27
|
+
if response.status_code == 200:
|
|
28
|
+
response_200 = ChecklistCompletion.from_dict(response.json())
|
|
29
|
+
|
|
30
|
+
return response_200
|
|
31
|
+
if response.status_code == 400:
|
|
32
|
+
response_400 = response.json()
|
|
33
|
+
return response_400
|
|
34
|
+
if response.status_code == 404:
|
|
35
|
+
response_404 = response.json()
|
|
36
|
+
return response_404
|
|
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[Union[Any, ChecklistCompletion]]:
|
|
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
|
+
uuid: UUID,
|
|
53
|
+
*,
|
|
54
|
+
client: AuthenticatedClient,
|
|
55
|
+
) -> Response[Union[Any, ChecklistCompletion]]:
|
|
56
|
+
"""Get checklist completion status.
|
|
57
|
+
|
|
58
|
+
Args:
|
|
59
|
+
uuid (UUID):
|
|
60
|
+
|
|
61
|
+
Raises:
|
|
62
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code.
|
|
63
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
64
|
+
|
|
65
|
+
Returns:
|
|
66
|
+
Response[Union[Any, ChecklistCompletion]]
|
|
67
|
+
"""
|
|
68
|
+
|
|
69
|
+
kwargs = _get_kwargs(
|
|
70
|
+
uuid=uuid,
|
|
71
|
+
)
|
|
72
|
+
|
|
73
|
+
response = client.get_httpx_client().request(
|
|
74
|
+
**kwargs,
|
|
75
|
+
)
|
|
76
|
+
|
|
77
|
+
return _build_response(client=client, response=response)
|
|
78
|
+
|
|
79
|
+
|
|
80
|
+
def sync(
|
|
81
|
+
uuid: UUID,
|
|
82
|
+
*,
|
|
83
|
+
client: AuthenticatedClient,
|
|
84
|
+
) -> Union[Any, ChecklistCompletion]:
|
|
85
|
+
"""Get checklist completion status.
|
|
86
|
+
|
|
87
|
+
Args:
|
|
88
|
+
uuid (UUID):
|
|
89
|
+
|
|
90
|
+
Raises:
|
|
91
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code.
|
|
92
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
93
|
+
|
|
94
|
+
Returns:
|
|
95
|
+
Union[Any, ChecklistCompletion]
|
|
96
|
+
"""
|
|
97
|
+
|
|
98
|
+
return sync_detailed(
|
|
99
|
+
uuid=uuid,
|
|
100
|
+
client=client,
|
|
101
|
+
).parsed
|
|
102
|
+
|
|
103
|
+
|
|
104
|
+
async def asyncio_detailed(
|
|
105
|
+
uuid: UUID,
|
|
106
|
+
*,
|
|
107
|
+
client: AuthenticatedClient,
|
|
108
|
+
) -> Response[Union[Any, ChecklistCompletion]]:
|
|
109
|
+
"""Get checklist completion status.
|
|
110
|
+
|
|
111
|
+
Args:
|
|
112
|
+
uuid (UUID):
|
|
113
|
+
|
|
114
|
+
Raises:
|
|
115
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code.
|
|
116
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
117
|
+
|
|
118
|
+
Returns:
|
|
119
|
+
Response[Union[Any, ChecklistCompletion]]
|
|
120
|
+
"""
|
|
121
|
+
|
|
122
|
+
kwargs = _get_kwargs(
|
|
123
|
+
uuid=uuid,
|
|
124
|
+
)
|
|
125
|
+
|
|
126
|
+
response = await client.get_async_httpx_client().request(**kwargs)
|
|
127
|
+
|
|
128
|
+
return _build_response(client=client, response=response)
|
|
129
|
+
|
|
130
|
+
|
|
131
|
+
async def asyncio(
|
|
132
|
+
uuid: UUID,
|
|
133
|
+
*,
|
|
134
|
+
client: AuthenticatedClient,
|
|
135
|
+
) -> Union[Any, ChecklistCompletion]:
|
|
136
|
+
"""Get checklist completion status.
|
|
137
|
+
|
|
138
|
+
Args:
|
|
139
|
+
uuid (UUID):
|
|
140
|
+
|
|
141
|
+
Raises:
|
|
142
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code.
|
|
143
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
144
|
+
|
|
145
|
+
Returns:
|
|
146
|
+
Union[Any, ChecklistCompletion]
|
|
147
|
+
"""
|
|
148
|
+
|
|
149
|
+
return (
|
|
150
|
+
await asyncio_detailed(
|
|
151
|
+
uuid=uuid,
|
|
152
|
+
client=client,
|
|
153
|
+
)
|
|
154
|
+
).parsed
|