waldur-api-client 7.7.7__py3-none-any.whl → 7.7.9__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/customer_permissions_reviews/customer_permissions_reviews_count.py +19 -0
- waldur_api_client/api/customer_permissions_reviews/customer_permissions_reviews_list.py +19 -0
- waldur_api_client/api/customers/customers_users_list.py +141 -53
- waldur_api_client/api/invoices/invoices_items_retrieve.py +20 -0
- waldur_api_client/api/managed_rancher_cluster_resources/__init__.py +1 -0
- waldur_api_client/api/managed_rancher_cluster_resources/managed_rancher_cluster_resources_add_node.py +162 -0
- waldur_api_client/api/managed_rancher_cluster_resources/managed_rancher_cluster_resources_count.py +172 -0
- waldur_api_client/api/managed_rancher_cluster_resources/managed_rancher_cluster_resources_list.py +196 -0
- waldur_api_client/api/managed_rancher_cluster_resources/managed_rancher_cluster_resources_retrieve.py +171 -0
- waldur_api_client/api/marketplace_course_accounts/__init__.py +1 -0
- waldur_api_client/api/marketplace_course_accounts/marketplace_course_accounts_count.py +244 -0
- waldur_api_client/api/marketplace_course_accounts/marketplace_course_accounts_create.py +148 -0
- waldur_api_client/api/marketplace_course_accounts/marketplace_course_accounts_create_bulk.py +152 -0
- waldur_api_client/api/marketplace_course_accounts/marketplace_course_accounts_destroy.py +89 -0
- waldur_api_client/api/marketplace_course_accounts/marketplace_course_accounts_list.py +245 -0
- waldur_api_client/api/marketplace_course_accounts/marketplace_course_accounts_retrieve.py +140 -0
- waldur_api_client/api/marketplace_customer_service_accounts/marketplace_customer_service_accounts_count.py +25 -0
- waldur_api_client/api/marketplace_customer_service_accounts/marketplace_customer_service_accounts_list.py +25 -0
- waldur_api_client/api/marketplace_project_service_accounts/marketplace_project_service_accounts_count.py +25 -0
- waldur_api_client/api/marketplace_project_service_accounts/marketplace_project_service_accounts_list.py +25 -0
- waldur_api_client/api/marketplace_provider_offerings/marketplace_provider_offerings_component_stats_list.py +30 -0
- waldur_api_client/api/marketplace_provider_offerings/marketplace_provider_offerings_costs_list.py +30 -0
- waldur_api_client/api/marketplace_provider_offerings/marketplace_provider_offerings_count.py +30 -0
- waldur_api_client/api/marketplace_provider_offerings/marketplace_provider_offerings_customers_list.py +30 -0
- waldur_api_client/api/marketplace_provider_offerings/marketplace_provider_offerings_groups_count.py +30 -0
- waldur_api_client/api/marketplace_provider_offerings/marketplace_provider_offerings_groups_list.py +30 -0
- waldur_api_client/api/marketplace_provider_offerings/marketplace_provider_offerings_list.py +30 -0
- waldur_api_client/api/marketplace_public_offerings/marketplace_public_offerings_count.py +30 -0
- waldur_api_client/api/marketplace_public_offerings/marketplace_public_offerings_list.py +30 -0
- waldur_api_client/api/marketplace_service_providers/marketplace_service_providers_course_accounts_list.py +284 -0
- waldur_api_client/api/marketplace_service_providers/marketplace_service_providers_offerings_list.py +30 -0
- waldur_api_client/api/marketplace_service_providers/marketplace_service_providers_project_service_accounts_list.py +29 -0
- waldur_api_client/api/project_permissions_reviews/__init__.py +1 -0
- waldur_api_client/api/project_permissions_reviews/project_permissions_reviews_close.py +91 -0
- waldur_api_client/api/project_permissions_reviews/project_permissions_reviews_count.py +266 -0
- waldur_api_client/api/project_permissions_reviews/project_permissions_reviews_list.py +269 -0
- waldur_api_client/api/project_permissions_reviews/project_permissions_reviews_retrieve.py +142 -0
- waldur_api_client/api/projects/projects_other_users_list.py +98 -23
- waldur_api_client/api/projects/projects_sync_user_roles.py +10 -9
- waldur_api_client/api/support_issue_statuses/__init__.py +1 -0
- waldur_api_client/api/support_issue_statuses/support_issue_statuses_count.py +172 -0
- waldur_api_client/api/support_issue_statuses/support_issue_statuses_create.py +148 -0
- waldur_api_client/api/support_issue_statuses/support_issue_statuses_destroy.py +89 -0
- waldur_api_client/api/support_issue_statuses/support_issue_statuses_list.py +173 -0
- waldur_api_client/api/support_issue_statuses/support_issue_statuses_partial_update.py +162 -0
- waldur_api_client/api/support_issue_statuses/support_issue_statuses_retrieve.py +140 -0
- waldur_api_client/api/support_issue_statuses/support_issue_statuses_update.py +162 -0
- waldur_api_client/api/user_group_invitations/user_group_invitations_submit_request.py +12 -12
- waldur_api_client/api/user_invitations/user_invitations_count.py +30 -0
- waldur_api_client/api/user_invitations/user_invitations_list.py +30 -0
- waldur_api_client/api/user_permission_requests/user_permission_requests_cancel_request.py +146 -0
- waldur_api_client/models/__init__.py +76 -2
- waldur_api_client/models/cancel_request_response.py +75 -0
- waldur_api_client/models/constance_settings.py +18 -0
- waldur_api_client/models/constance_settings_request.py +18 -0
- waldur_api_client/models/course_account.py +187 -0
- waldur_api_client/models/course_account_create_nested.py +68 -0
- waldur_api_client/models/course_account_create_nested_request.py +68 -0
- waldur_api_client/models/course_account_request.py +80 -0
- waldur_api_client/models/course_accounts_bulk_create.py +82 -0
- waldur_api_client/models/course_accounts_bulk_create_request.py +82 -0
- waldur_api_client/models/customer.py +9 -0
- waldur_api_client/models/customer_permission_review.py +16 -16
- waldur_api_client/models/customer_request.py +9 -0
- waldur_api_client/models/customer_service_account.py +9 -0
- waldur_api_client/models/customers_list_field_item.py +1 -0
- waldur_api_client/models/customers_retrieve_field_item.py +1 -0
- waldur_api_client/models/customers_users_list_o.py +9 -0
- waldur_api_client/models/customers_users_list_organization_role_item_type_0.py +10 -0
- waldur_api_client/models/customers_users_list_project_role_item_type_0.py +10 -0
- waldur_api_client/models/dependency_logic_operator_enum.py +9 -0
- waldur_api_client/models/event_subscription.py +1 -1
- waldur_api_client/models/event_types_enum.py +4 -0
- waldur_api_client/models/group_invitation.py +9 -0
- waldur_api_client/models/invitation.py +9 -0
- waldur_api_client/models/invoices_items_retrieve_o.py +15 -0
- waldur_api_client/models/issue_status.py +103 -0
- waldur_api_client/models/issue_status_request.py +78 -0
- waldur_api_client/models/issue_status_type_enum.py +9 -0
- waldur_api_client/models/kind_enum.py +10 -0
- waldur_api_client/models/managed_rancher_cluster_resources_list_field_item.py +82 -0
- waldur_api_client/models/managed_rancher_cluster_resources_retrieve_field_item.py +82 -0
- waldur_api_client/models/managed_rancher_create_node_request.py +186 -0
- waldur_api_client/models/marketplace_course_accounts_count_state_item.py +10 -0
- waldur_api_client/models/marketplace_course_accounts_list_state_item.py +10 -0
- waldur_api_client/models/marketplace_customer_service_accounts_count_state_item.py +10 -0
- waldur_api_client/models/marketplace_customer_service_accounts_list_state_item.py +10 -0
- waldur_api_client/models/marketplace_project_service_accounts_count_state_item.py +10 -0
- waldur_api_client/models/marketplace_project_service_accounts_list_state_item.py +10 -0
- waldur_api_client/models/marketplace_service_providers_course_accounts_list_state_item.py +10 -0
- waldur_api_client/models/marketplace_service_providers_project_service_accounts_list_state_item.py +10 -0
- waldur_api_client/models/marketplace_service_providers_projects_list_field_item.py +1 -0
- waldur_api_client/models/nested_security_group_rule.py +223 -0
- waldur_api_client/models/{open_stack_nested_security_group_rules_item.py → nested_security_group_rule_request.py} +67 -76
- waldur_api_client/models/open_stack_backup_restoration_request.py +0 -22
- waldur_api_client/models/open_stack_fixed_ip.py +13 -3
- waldur_api_client/models/open_stack_fixed_ip_request.py +7 -2
- waldur_api_client/models/open_stack_instance_create_order_attributes.py +20 -20
- waldur_api_client/models/open_stack_nested_security_group.py +16 -16
- waldur_api_client/models/open_stack_port_ip_update_request.py +6 -2
- waldur_api_client/models/open_stack_static_route.py +13 -4
- waldur_api_client/models/open_stack_static_route_request.py +7 -3
- waldur_api_client/models/open_stack_sub_net.py +15 -2
- waldur_api_client/models/open_stack_sub_net_allocation_pool.py +27 -8
- waldur_api_client/models/open_stack_sub_net_allocation_pool_request.py +14 -5
- waldur_api_client/models/open_stack_sub_net_request.py +15 -2
- waldur_api_client/models/patched_customer_request.py +9 -0
- waldur_api_client/models/patched_issue_status_request.py +76 -0
- waldur_api_client/models/patched_open_stack_sub_net_request.py +15 -2
- waldur_api_client/models/patched_project_request.py +17 -0
- waldur_api_client/models/patched_question_admin_request.py +17 -0
- waldur_api_client/models/patched_rancher_service_request.py +1 -1
- waldur_api_client/models/permission_request.py +16 -0
- waldur_api_client/models/project.py +17 -0
- waldur_api_client/models/project_permission_review.py +166 -0
- waldur_api_client/models/project_permissions_reviews_count_o_item.py +11 -0
- waldur_api_client/models/project_permissions_reviews_list_o_item.py +11 -0
- waldur_api_client/models/project_request.py +17 -0
- waldur_api_client/models/project_service_account.py +9 -0
- waldur_api_client/models/projects_list_field_item.py +1 -0
- waldur_api_client/models/projects_other_users_list_o.py +9 -0
- waldur_api_client/models/projects_retrieve_field_item.py +1 -0
- waldur_api_client/models/proposal.py +8 -0
- waldur_api_client/models/proposal_review.py +8 -0
- waldur_api_client/models/question_admin.py +17 -0
- waldur_api_client/models/question_admin_request.py +17 -0
- waldur_api_client/models/rancher_nested_public_ip.py +25 -7
- waldur_api_client/models/rancher_service.py +1 -1
- waldur_api_client/models/rancher_service_request.py +1 -1
- waldur_api_client/models/rmq_connection.py +8 -3
- waldur_api_client/models/rmq_subscription.py +7 -3
- waldur_api_client/models/robot_account.py +16 -16
- waldur_api_client/models/robot_account_details.py +16 -16
- waldur_api_client/models/service_account_state.py +10 -0
- waldur_api_client/models/submit_request_response.py +75 -0
- waldur_api_client/models/visible_invitation_details.py +9 -0
- {waldur_api_client-7.7.7.dist-info → waldur_api_client-7.7.9.dist-info}/METADATA +1 -1
- {waldur_api_client-7.7.7.dist-info → waldur_api_client-7.7.9.dist-info}/RECORD +140 -78
- {waldur_api_client-7.7.7.dist-info → waldur_api_client-7.7.9.dist-info}/LICENSE +0 -0
- {waldur_api_client-7.7.7.dist-info → waldur_api_client-7.7.9.dist-info}/WHEEL +0 -0
|
@@ -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-course-accounts/{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)
|
|
@@ -0,0 +1,245 @@
|
|
|
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.course_account import CourseAccount
|
|
10
|
+
from ...models.marketplace_course_accounts_list_state_item import MarketplaceCourseAccountsListStateItem
|
|
11
|
+
from ...types import UNSET, Response, Unset
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
def _get_kwargs(
|
|
15
|
+
*,
|
|
16
|
+
email: Union[Unset, str] = UNSET,
|
|
17
|
+
page: Union[Unset, int] = UNSET,
|
|
18
|
+
page_size: Union[Unset, int] = UNSET,
|
|
19
|
+
project_uuid: Union[Unset, UUID] = UNSET,
|
|
20
|
+
state: Union[Unset, list[MarketplaceCourseAccountsListStateItem]] = UNSET,
|
|
21
|
+
username: Union[Unset, str] = UNSET,
|
|
22
|
+
) -> dict[str, Any]:
|
|
23
|
+
params: dict[str, Any] = {}
|
|
24
|
+
|
|
25
|
+
params["email"] = email
|
|
26
|
+
|
|
27
|
+
params["page"] = page
|
|
28
|
+
|
|
29
|
+
params["page_size"] = page_size
|
|
30
|
+
|
|
31
|
+
json_project_uuid: Union[Unset, str] = UNSET
|
|
32
|
+
if not isinstance(project_uuid, Unset):
|
|
33
|
+
json_project_uuid = str(project_uuid)
|
|
34
|
+
params["project_uuid"] = json_project_uuid
|
|
35
|
+
|
|
36
|
+
json_state: Union[Unset, list[str]] = UNSET
|
|
37
|
+
if not isinstance(state, Unset):
|
|
38
|
+
json_state = []
|
|
39
|
+
for state_item_data in state:
|
|
40
|
+
state_item = state_item_data.value
|
|
41
|
+
json_state.append(state_item)
|
|
42
|
+
|
|
43
|
+
params["state"] = json_state
|
|
44
|
+
|
|
45
|
+
params["username"] = username
|
|
46
|
+
|
|
47
|
+
params = {k: v for k, v in params.items() if v is not UNSET and v is not None}
|
|
48
|
+
|
|
49
|
+
_kwargs: dict[str, Any] = {
|
|
50
|
+
"method": "get",
|
|
51
|
+
"url": "/api/marketplace-course-accounts/",
|
|
52
|
+
"params": params,
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
return _kwargs
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
def _parse_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> list["CourseAccount"]:
|
|
59
|
+
if response.status_code == 200:
|
|
60
|
+
response_200 = []
|
|
61
|
+
_response_200 = response.json()
|
|
62
|
+
for response_200_item_data in _response_200:
|
|
63
|
+
response_200_item = CourseAccount.from_dict(response_200_item_data)
|
|
64
|
+
|
|
65
|
+
response_200.append(response_200_item)
|
|
66
|
+
|
|
67
|
+
return response_200
|
|
68
|
+
raise errors.UnexpectedStatus(response.status_code, response.content)
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
def _build_response(
|
|
72
|
+
*, client: Union[AuthenticatedClient, Client], response: httpx.Response
|
|
73
|
+
) -> Response[list["CourseAccount"]]:
|
|
74
|
+
return Response(
|
|
75
|
+
status_code=HTTPStatus(response.status_code),
|
|
76
|
+
content=response.content,
|
|
77
|
+
headers=response.headers,
|
|
78
|
+
parsed=_parse_response(client=client, response=response),
|
|
79
|
+
)
|
|
80
|
+
|
|
81
|
+
|
|
82
|
+
def sync_detailed(
|
|
83
|
+
*,
|
|
84
|
+
client: AuthenticatedClient,
|
|
85
|
+
email: Union[Unset, str] = UNSET,
|
|
86
|
+
page: Union[Unset, int] = UNSET,
|
|
87
|
+
page_size: Union[Unset, int] = UNSET,
|
|
88
|
+
project_uuid: Union[Unset, UUID] = UNSET,
|
|
89
|
+
state: Union[Unset, list[MarketplaceCourseAccountsListStateItem]] = UNSET,
|
|
90
|
+
username: Union[Unset, str] = UNSET,
|
|
91
|
+
) -> Response[list["CourseAccount"]]:
|
|
92
|
+
"""Mixin to optimize HEAD requests for DRF views bypassing serializer processing
|
|
93
|
+
|
|
94
|
+
Args:
|
|
95
|
+
email (Union[Unset, str]):
|
|
96
|
+
page (Union[Unset, int]):
|
|
97
|
+
page_size (Union[Unset, int]):
|
|
98
|
+
project_uuid (Union[Unset, UUID]):
|
|
99
|
+
state (Union[Unset, list[MarketplaceCourseAccountsListStateItem]]):
|
|
100
|
+
username (Union[Unset, str]):
|
|
101
|
+
|
|
102
|
+
Raises:
|
|
103
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code.
|
|
104
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
105
|
+
|
|
106
|
+
Returns:
|
|
107
|
+
Response[list['CourseAccount']]
|
|
108
|
+
"""
|
|
109
|
+
|
|
110
|
+
kwargs = _get_kwargs(
|
|
111
|
+
email=email,
|
|
112
|
+
page=page,
|
|
113
|
+
page_size=page_size,
|
|
114
|
+
project_uuid=project_uuid,
|
|
115
|
+
state=state,
|
|
116
|
+
username=username,
|
|
117
|
+
)
|
|
118
|
+
|
|
119
|
+
response = client.get_httpx_client().request(
|
|
120
|
+
**kwargs,
|
|
121
|
+
)
|
|
122
|
+
|
|
123
|
+
return _build_response(client=client, response=response)
|
|
124
|
+
|
|
125
|
+
|
|
126
|
+
def sync(
|
|
127
|
+
*,
|
|
128
|
+
client: AuthenticatedClient,
|
|
129
|
+
email: Union[Unset, str] = UNSET,
|
|
130
|
+
page: Union[Unset, int] = UNSET,
|
|
131
|
+
page_size: Union[Unset, int] = UNSET,
|
|
132
|
+
project_uuid: Union[Unset, UUID] = UNSET,
|
|
133
|
+
state: Union[Unset, list[MarketplaceCourseAccountsListStateItem]] = UNSET,
|
|
134
|
+
username: Union[Unset, str] = UNSET,
|
|
135
|
+
) -> list["CourseAccount"]:
|
|
136
|
+
"""Mixin to optimize HEAD requests for DRF views bypassing serializer processing
|
|
137
|
+
|
|
138
|
+
Args:
|
|
139
|
+
email (Union[Unset, str]):
|
|
140
|
+
page (Union[Unset, int]):
|
|
141
|
+
page_size (Union[Unset, int]):
|
|
142
|
+
project_uuid (Union[Unset, UUID]):
|
|
143
|
+
state (Union[Unset, list[MarketplaceCourseAccountsListStateItem]]):
|
|
144
|
+
username (Union[Unset, str]):
|
|
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
|
+
list['CourseAccount']
|
|
152
|
+
"""
|
|
153
|
+
|
|
154
|
+
return sync_detailed(
|
|
155
|
+
client=client,
|
|
156
|
+
email=email,
|
|
157
|
+
page=page,
|
|
158
|
+
page_size=page_size,
|
|
159
|
+
project_uuid=project_uuid,
|
|
160
|
+
state=state,
|
|
161
|
+
username=username,
|
|
162
|
+
).parsed
|
|
163
|
+
|
|
164
|
+
|
|
165
|
+
async def asyncio_detailed(
|
|
166
|
+
*,
|
|
167
|
+
client: AuthenticatedClient,
|
|
168
|
+
email: Union[Unset, str] = UNSET,
|
|
169
|
+
page: Union[Unset, int] = UNSET,
|
|
170
|
+
page_size: Union[Unset, int] = UNSET,
|
|
171
|
+
project_uuid: Union[Unset, UUID] = UNSET,
|
|
172
|
+
state: Union[Unset, list[MarketplaceCourseAccountsListStateItem]] = UNSET,
|
|
173
|
+
username: Union[Unset, str] = UNSET,
|
|
174
|
+
) -> Response[list["CourseAccount"]]:
|
|
175
|
+
"""Mixin to optimize HEAD requests for DRF views bypassing serializer processing
|
|
176
|
+
|
|
177
|
+
Args:
|
|
178
|
+
email (Union[Unset, str]):
|
|
179
|
+
page (Union[Unset, int]):
|
|
180
|
+
page_size (Union[Unset, int]):
|
|
181
|
+
project_uuid (Union[Unset, UUID]):
|
|
182
|
+
state (Union[Unset, list[MarketplaceCourseAccountsListStateItem]]):
|
|
183
|
+
username (Union[Unset, str]):
|
|
184
|
+
|
|
185
|
+
Raises:
|
|
186
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code.
|
|
187
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
188
|
+
|
|
189
|
+
Returns:
|
|
190
|
+
Response[list['CourseAccount']]
|
|
191
|
+
"""
|
|
192
|
+
|
|
193
|
+
kwargs = _get_kwargs(
|
|
194
|
+
email=email,
|
|
195
|
+
page=page,
|
|
196
|
+
page_size=page_size,
|
|
197
|
+
project_uuid=project_uuid,
|
|
198
|
+
state=state,
|
|
199
|
+
username=username,
|
|
200
|
+
)
|
|
201
|
+
|
|
202
|
+
response = await client.get_async_httpx_client().request(**kwargs)
|
|
203
|
+
|
|
204
|
+
return _build_response(client=client, response=response)
|
|
205
|
+
|
|
206
|
+
|
|
207
|
+
async def asyncio(
|
|
208
|
+
*,
|
|
209
|
+
client: AuthenticatedClient,
|
|
210
|
+
email: Union[Unset, str] = UNSET,
|
|
211
|
+
page: Union[Unset, int] = UNSET,
|
|
212
|
+
page_size: Union[Unset, int] = UNSET,
|
|
213
|
+
project_uuid: Union[Unset, UUID] = UNSET,
|
|
214
|
+
state: Union[Unset, list[MarketplaceCourseAccountsListStateItem]] = UNSET,
|
|
215
|
+
username: Union[Unset, str] = UNSET,
|
|
216
|
+
) -> list["CourseAccount"]:
|
|
217
|
+
"""Mixin to optimize HEAD requests for DRF views bypassing serializer processing
|
|
218
|
+
|
|
219
|
+
Args:
|
|
220
|
+
email (Union[Unset, str]):
|
|
221
|
+
page (Union[Unset, int]):
|
|
222
|
+
page_size (Union[Unset, int]):
|
|
223
|
+
project_uuid (Union[Unset, UUID]):
|
|
224
|
+
state (Union[Unset, list[MarketplaceCourseAccountsListStateItem]]):
|
|
225
|
+
username (Union[Unset, str]):
|
|
226
|
+
|
|
227
|
+
Raises:
|
|
228
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code.
|
|
229
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
230
|
+
|
|
231
|
+
Returns:
|
|
232
|
+
list['CourseAccount']
|
|
233
|
+
"""
|
|
234
|
+
|
|
235
|
+
return (
|
|
236
|
+
await asyncio_detailed(
|
|
237
|
+
client=client,
|
|
238
|
+
email=email,
|
|
239
|
+
page=page,
|
|
240
|
+
page_size=page_size,
|
|
241
|
+
project_uuid=project_uuid,
|
|
242
|
+
state=state,
|
|
243
|
+
username=username,
|
|
244
|
+
)
|
|
245
|
+
).parsed
|
|
@@ -0,0 +1,140 @@
|
|
|
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.course_account import CourseAccount
|
|
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-course-accounts/{uuid}/",
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
return _kwargs
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
def _parse_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> CourseAccount:
|
|
25
|
+
if response.status_code == 200:
|
|
26
|
+
response_200 = CourseAccount.from_dict(response.json())
|
|
27
|
+
|
|
28
|
+
return response_200
|
|
29
|
+
raise errors.UnexpectedStatus(response.status_code, response.content)
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
def _build_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Response[CourseAccount]:
|
|
33
|
+
return Response(
|
|
34
|
+
status_code=HTTPStatus(response.status_code),
|
|
35
|
+
content=response.content,
|
|
36
|
+
headers=response.headers,
|
|
37
|
+
parsed=_parse_response(client=client, response=response),
|
|
38
|
+
)
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
def sync_detailed(
|
|
42
|
+
uuid: UUID,
|
|
43
|
+
*,
|
|
44
|
+
client: AuthenticatedClient,
|
|
45
|
+
) -> Response[CourseAccount]:
|
|
46
|
+
"""
|
|
47
|
+
Args:
|
|
48
|
+
uuid (UUID):
|
|
49
|
+
|
|
50
|
+
Raises:
|
|
51
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code.
|
|
52
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
53
|
+
|
|
54
|
+
Returns:
|
|
55
|
+
Response[CourseAccount]
|
|
56
|
+
"""
|
|
57
|
+
|
|
58
|
+
kwargs = _get_kwargs(
|
|
59
|
+
uuid=uuid,
|
|
60
|
+
)
|
|
61
|
+
|
|
62
|
+
response = client.get_httpx_client().request(
|
|
63
|
+
**kwargs,
|
|
64
|
+
)
|
|
65
|
+
|
|
66
|
+
return _build_response(client=client, response=response)
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
def sync(
|
|
70
|
+
uuid: UUID,
|
|
71
|
+
*,
|
|
72
|
+
client: AuthenticatedClient,
|
|
73
|
+
) -> CourseAccount:
|
|
74
|
+
"""
|
|
75
|
+
Args:
|
|
76
|
+
uuid (UUID):
|
|
77
|
+
|
|
78
|
+
Raises:
|
|
79
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code.
|
|
80
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
81
|
+
|
|
82
|
+
Returns:
|
|
83
|
+
CourseAccount
|
|
84
|
+
"""
|
|
85
|
+
|
|
86
|
+
return sync_detailed(
|
|
87
|
+
uuid=uuid,
|
|
88
|
+
client=client,
|
|
89
|
+
).parsed
|
|
90
|
+
|
|
91
|
+
|
|
92
|
+
async def asyncio_detailed(
|
|
93
|
+
uuid: UUID,
|
|
94
|
+
*,
|
|
95
|
+
client: AuthenticatedClient,
|
|
96
|
+
) -> Response[CourseAccount]:
|
|
97
|
+
"""
|
|
98
|
+
Args:
|
|
99
|
+
uuid (UUID):
|
|
100
|
+
|
|
101
|
+
Raises:
|
|
102
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code.
|
|
103
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
104
|
+
|
|
105
|
+
Returns:
|
|
106
|
+
Response[CourseAccount]
|
|
107
|
+
"""
|
|
108
|
+
|
|
109
|
+
kwargs = _get_kwargs(
|
|
110
|
+
uuid=uuid,
|
|
111
|
+
)
|
|
112
|
+
|
|
113
|
+
response = await client.get_async_httpx_client().request(**kwargs)
|
|
114
|
+
|
|
115
|
+
return _build_response(client=client, response=response)
|
|
116
|
+
|
|
117
|
+
|
|
118
|
+
async def asyncio(
|
|
119
|
+
uuid: UUID,
|
|
120
|
+
*,
|
|
121
|
+
client: AuthenticatedClient,
|
|
122
|
+
) -> CourseAccount:
|
|
123
|
+
"""
|
|
124
|
+
Args:
|
|
125
|
+
uuid (UUID):
|
|
126
|
+
|
|
127
|
+
Raises:
|
|
128
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code.
|
|
129
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
130
|
+
|
|
131
|
+
Returns:
|
|
132
|
+
CourseAccount
|
|
133
|
+
"""
|
|
134
|
+
|
|
135
|
+
return (
|
|
136
|
+
await asyncio_detailed(
|
|
137
|
+
uuid=uuid,
|
|
138
|
+
client=client,
|
|
139
|
+
)
|
|
140
|
+
).parsed
|
|
@@ -6,6 +6,9 @@ import httpx
|
|
|
6
6
|
|
|
7
7
|
from ... import errors
|
|
8
8
|
from ...client import AuthenticatedClient, Client
|
|
9
|
+
from ...models.marketplace_customer_service_accounts_count_state_item import (
|
|
10
|
+
MarketplaceCustomerServiceAccountsCountStateItem,
|
|
11
|
+
)
|
|
9
12
|
from ...types import UNSET, Response, Unset
|
|
10
13
|
|
|
11
14
|
|
|
@@ -16,6 +19,7 @@ def _get_kwargs(
|
|
|
16
19
|
email: Union[Unset, str] = UNSET,
|
|
17
20
|
page: Union[Unset, int] = UNSET,
|
|
18
21
|
page_size: Union[Unset, int] = UNSET,
|
|
22
|
+
state: Union[Unset, list[MarketplaceCustomerServiceAccountsCountStateItem]] = UNSET,
|
|
19
23
|
username: Union[Unset, str] = UNSET,
|
|
20
24
|
) -> dict[str, Any]:
|
|
21
25
|
params: dict[str, Any] = {}
|
|
@@ -33,6 +37,15 @@ def _get_kwargs(
|
|
|
33
37
|
|
|
34
38
|
params["page_size"] = page_size
|
|
35
39
|
|
|
40
|
+
json_state: Union[Unset, list[str]] = UNSET
|
|
41
|
+
if not isinstance(state, Unset):
|
|
42
|
+
json_state = []
|
|
43
|
+
for state_item_data in state:
|
|
44
|
+
state_item = state_item_data.value
|
|
45
|
+
json_state.append(state_item)
|
|
46
|
+
|
|
47
|
+
params["state"] = json_state
|
|
48
|
+
|
|
36
49
|
params["username"] = username
|
|
37
50
|
|
|
38
51
|
params = {k: v for k, v in params.items() if v is not UNSET and v is not None}
|
|
@@ -78,6 +91,7 @@ def sync_detailed(
|
|
|
78
91
|
email: Union[Unset, str] = UNSET,
|
|
79
92
|
page: Union[Unset, int] = UNSET,
|
|
80
93
|
page_size: Union[Unset, int] = UNSET,
|
|
94
|
+
state: Union[Unset, list[MarketplaceCustomerServiceAccountsCountStateItem]] = UNSET,
|
|
81
95
|
username: Union[Unset, str] = UNSET,
|
|
82
96
|
) -> Response[int]:
|
|
83
97
|
"""Get number of items in the collection matching the request parameters.
|
|
@@ -88,6 +102,7 @@ def sync_detailed(
|
|
|
88
102
|
email (Union[Unset, str]):
|
|
89
103
|
page (Union[Unset, int]):
|
|
90
104
|
page_size (Union[Unset, int]):
|
|
105
|
+
state (Union[Unset, list[MarketplaceCustomerServiceAccountsCountStateItem]]):
|
|
91
106
|
username (Union[Unset, str]):
|
|
92
107
|
|
|
93
108
|
Raises:
|
|
@@ -104,6 +119,7 @@ def sync_detailed(
|
|
|
104
119
|
email=email,
|
|
105
120
|
page=page,
|
|
106
121
|
page_size=page_size,
|
|
122
|
+
state=state,
|
|
107
123
|
username=username,
|
|
108
124
|
)
|
|
109
125
|
|
|
@@ -122,6 +138,7 @@ def sync(
|
|
|
122
138
|
email: Union[Unset, str] = UNSET,
|
|
123
139
|
page: Union[Unset, int] = UNSET,
|
|
124
140
|
page_size: Union[Unset, int] = UNSET,
|
|
141
|
+
state: Union[Unset, list[MarketplaceCustomerServiceAccountsCountStateItem]] = UNSET,
|
|
125
142
|
username: Union[Unset, str] = UNSET,
|
|
126
143
|
) -> int:
|
|
127
144
|
"""Get number of items in the collection matching the request parameters.
|
|
@@ -132,6 +149,7 @@ def sync(
|
|
|
132
149
|
email (Union[Unset, str]):
|
|
133
150
|
page (Union[Unset, int]):
|
|
134
151
|
page_size (Union[Unset, int]):
|
|
152
|
+
state (Union[Unset, list[MarketplaceCustomerServiceAccountsCountStateItem]]):
|
|
135
153
|
username (Union[Unset, str]):
|
|
136
154
|
|
|
137
155
|
Raises:
|
|
@@ -149,6 +167,7 @@ def sync(
|
|
|
149
167
|
email=email,
|
|
150
168
|
page=page,
|
|
151
169
|
page_size=page_size,
|
|
170
|
+
state=state,
|
|
152
171
|
username=username,
|
|
153
172
|
).parsed
|
|
154
173
|
|
|
@@ -161,6 +180,7 @@ async def asyncio_detailed(
|
|
|
161
180
|
email: Union[Unset, str] = UNSET,
|
|
162
181
|
page: Union[Unset, int] = UNSET,
|
|
163
182
|
page_size: Union[Unset, int] = UNSET,
|
|
183
|
+
state: Union[Unset, list[MarketplaceCustomerServiceAccountsCountStateItem]] = UNSET,
|
|
164
184
|
username: Union[Unset, str] = UNSET,
|
|
165
185
|
) -> Response[int]:
|
|
166
186
|
"""Get number of items in the collection matching the request parameters.
|
|
@@ -171,6 +191,7 @@ async def asyncio_detailed(
|
|
|
171
191
|
email (Union[Unset, str]):
|
|
172
192
|
page (Union[Unset, int]):
|
|
173
193
|
page_size (Union[Unset, int]):
|
|
194
|
+
state (Union[Unset, list[MarketplaceCustomerServiceAccountsCountStateItem]]):
|
|
174
195
|
username (Union[Unset, str]):
|
|
175
196
|
|
|
176
197
|
Raises:
|
|
@@ -187,6 +208,7 @@ async def asyncio_detailed(
|
|
|
187
208
|
email=email,
|
|
188
209
|
page=page,
|
|
189
210
|
page_size=page_size,
|
|
211
|
+
state=state,
|
|
190
212
|
username=username,
|
|
191
213
|
)
|
|
192
214
|
|
|
@@ -203,6 +225,7 @@ async def asyncio(
|
|
|
203
225
|
email: Union[Unset, str] = UNSET,
|
|
204
226
|
page: Union[Unset, int] = UNSET,
|
|
205
227
|
page_size: Union[Unset, int] = UNSET,
|
|
228
|
+
state: Union[Unset, list[MarketplaceCustomerServiceAccountsCountStateItem]] = UNSET,
|
|
206
229
|
username: Union[Unset, str] = UNSET,
|
|
207
230
|
) -> int:
|
|
208
231
|
"""Get number of items in the collection matching the request parameters.
|
|
@@ -213,6 +236,7 @@ async def asyncio(
|
|
|
213
236
|
email (Union[Unset, str]):
|
|
214
237
|
page (Union[Unset, int]):
|
|
215
238
|
page_size (Union[Unset, int]):
|
|
239
|
+
state (Union[Unset, list[MarketplaceCustomerServiceAccountsCountStateItem]]):
|
|
216
240
|
username (Union[Unset, str]):
|
|
217
241
|
|
|
218
242
|
Raises:
|
|
@@ -231,6 +255,7 @@ async def asyncio(
|
|
|
231
255
|
email=email,
|
|
232
256
|
page=page,
|
|
233
257
|
page_size=page_size,
|
|
258
|
+
state=state,
|
|
234
259
|
username=username,
|
|
235
260
|
)
|
|
236
261
|
).parsed
|