waldur-api-client 7.7.6__py3-none-any.whl → 7.7.7__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/booking_resources/booking_resources_count.py +34 -11
- waldur_api_client/api/booking_resources/booking_resources_list.py +34 -11
- waldur_api_client/api/customers/customers_project_metadata_compliance_details_list.py +189 -0
- waldur_api_client/api/customers/customers_project_metadata_compliance_overview_list.py +189 -0
- waldur_api_client/api/customers/customers_project_metadata_compliance_projects_list.py +187 -0
- waldur_api_client/api/customers/customers_project_metadata_question_answers_list.py +187 -0
- waldur_api_client/api/marketplace_integration_statuses/marketplace_integration_statuses_count.py +34 -11
- waldur_api_client/api/marketplace_integration_statuses/marketplace_integration_statuses_list.py +34 -11
- waldur_api_client/api/marketplace_offering_files/marketplace_offering_files_count.py +34 -11
- waldur_api_client/api/marketplace_offering_files/marketplace_offering_files_list.py +34 -11
- waldur_api_client/api/marketplace_offering_terms_of_service/__init__.py +1 -0
- waldur_api_client/api/marketplace_offering_terms_of_service/marketplace_offering_terms_of_service_count.py +274 -0
- waldur_api_client/api/marketplace_offering_terms_of_service/marketplace_offering_terms_of_service_create.py +152 -0
- waldur_api_client/api/marketplace_offering_terms_of_service/marketplace_offering_terms_of_service_destroy.py +89 -0
- waldur_api_client/api/marketplace_offering_terms_of_service/marketplace_offering_terms_of_service_list.py +277 -0
- waldur_api_client/api/marketplace_offering_terms_of_service/marketplace_offering_terms_of_service_partial_update.py +164 -0
- waldur_api_client/api/marketplace_offering_terms_of_service/marketplace_offering_terms_of_service_retrieve.py +142 -0
- waldur_api_client/api/marketplace_offering_terms_of_service/marketplace_offering_terms_of_service_update.py +164 -0
- waldur_api_client/api/marketplace_offering_user_roles/marketplace_offering_user_roles_count.py +34 -11
- waldur_api_client/api/marketplace_offering_user_roles/marketplace_offering_user_roles_list.py +34 -11
- waldur_api_client/api/marketplace_offering_users/marketplace_offering_users_count.py +34 -11
- waldur_api_client/api/marketplace_offering_users/marketplace_offering_users_list.py +34 -11
- waldur_api_client/api/marketplace_orders/marketplace_orders_count.py +19 -0
- waldur_api_client/api/marketplace_orders/marketplace_orders_list.py +19 -0
- waldur_api_client/api/marketplace_plans/marketplace_plans_count.py +19 -0
- waldur_api_client/api/marketplace_plans/marketplace_plans_list.py +19 -0
- waldur_api_client/api/marketplace_plans/marketplace_plans_usage_stats_count.py +19 -0
- waldur_api_client/api/marketplace_plans/marketplace_plans_usage_stats_list.py +19 -0
- waldur_api_client/api/marketplace_provider_resources/marketplace_provider_resources_count.py +34 -11
- waldur_api_client/api/marketplace_provider_resources/marketplace_provider_resources_list.py +34 -11
- waldur_api_client/api/marketplace_resources/marketplace_resources_count.py +34 -11
- waldur_api_client/api/marketplace_resources/marketplace_resources_list.py +34 -11
- waldur_api_client/api/marketplace_screenshots/marketplace_screenshots_count.py +34 -11
- waldur_api_client/api/marketplace_screenshots/marketplace_screenshots_list.py +34 -11
- waldur_api_client/api/marketplace_user_offering_consents/__init__.py +1 -0
- waldur_api_client/api/marketplace_user_offering_consents/marketplace_user_offering_consents_count.py +307 -0
- waldur_api_client/api/marketplace_user_offering_consents/marketplace_user_offering_consents_create.py +152 -0
- waldur_api_client/api/marketplace_user_offering_consents/marketplace_user_offering_consents_destroy.py +89 -0
- waldur_api_client/api/marketplace_user_offering_consents/marketplace_user_offering_consents_list.py +310 -0
- waldur_api_client/api/marketplace_user_offering_consents/marketplace_user_offering_consents_partial_update.py +164 -0
- waldur_api_client/api/marketplace_user_offering_consents/marketplace_user_offering_consents_retrieve.py +142 -0
- waldur_api_client/api/marketplace_user_offering_consents/marketplace_user_offering_consents_revoke.py +146 -0
- waldur_api_client/api/marketplace_user_offering_consents/marketplace_user_offering_consents_update.py +164 -0
- waldur_api_client/api/remote_waldur_api/remote_waldur_api_remote_resource_order_status_retrieve.py +145 -0
- waldur_api_client/api/remote_waldur_api/remote_waldur_api_remote_resource_status_retrieve.py +147 -0
- waldur_api_client/api/remote_waldur_api/remote_waldur_api_remote_resource_team_status_list.py +188 -0
- waldur_api_client/models/__init__.py +62 -0
- waldur_api_client/models/azure_sql_server_create_order_attributes.py +3 -0
- waldur_api_client/models/azure_virtual_machine_create_order_attributes.py +3 -0
- waldur_api_client/models/booking_offerings_list_field_item.py +0 -2
- waldur_api_client/models/booking_offerings_retrieve_field_item.py +0 -2
- waldur_api_client/models/booking_resource.py +10 -9
- waldur_api_client/models/booking_resources_list_field_item.py +1 -1
- waldur_api_client/models/booking_resources_retrieve_field_item.py +1 -1
- waldur_api_client/models/checklist_info.py +76 -0
- waldur_api_client/models/compliance_overview.py +91 -0
- waldur_api_client/models/customer.py +81 -0
- waldur_api_client/models/customers_list_field_item.py +4 -0
- waldur_api_client/models/customers_retrieve_field_item.py +4 -0
- waldur_api_client/models/generic_order_attributes.py +69 -0
- waldur_api_client/models/google_auth_authorize_retrieve_field_item.py +1 -0
- waldur_api_client/models/google_auth_list_field_item.py +1 -0
- waldur_api_client/models/google_auth_retrieve_field_item.py +1 -0
- waldur_api_client/models/google_credentials.py +9 -0
- waldur_api_client/models/group_invitation.py +24 -0
- waldur_api_client/models/group_invitation_request.py +10 -0
- waldur_api_client/models/maintenance_announcement.py +8 -0
- waldur_api_client/models/marketplace_offering_terms_of_service_count_o_item.py +13 -0
- waldur_api_client/models/marketplace_offering_terms_of_service_list_o_item.py +13 -0
- waldur_api_client/models/marketplace_orders_list_field_item.py +1 -1
- waldur_api_client/models/marketplace_orders_retrieve_field_item.py +1 -1
- waldur_api_client/models/marketplace_provider_offerings_list_customer_service_accounts_retrieve_field_item.py +0 -2
- waldur_api_client/models/marketplace_provider_offerings_list_field_item.py +0 -2
- waldur_api_client/models/marketplace_provider_offerings_list_project_service_accounts_retrieve_field_item.py +0 -2
- waldur_api_client/models/marketplace_provider_offerings_retrieve_field_item.py +0 -2
- waldur_api_client/models/marketplace_provider_offerings_stats_retrieve_field_item.py +0 -2
- waldur_api_client/models/marketplace_provider_offerings_user_has_resource_access_retrieve_field_item.py +0 -2
- waldur_api_client/models/marketplace_provider_resources_details_retrieve_field_item.py +1 -1
- waldur_api_client/models/marketplace_provider_resources_list_field_item.py +1 -1
- waldur_api_client/models/marketplace_provider_resources_retrieve_field_item.py +1 -1
- waldur_api_client/models/marketplace_public_offerings_list_field_item.py +0 -2
- waldur_api_client/models/marketplace_public_offerings_retrieve_field_item.py +0 -2
- waldur_api_client/models/marketplace_rancher_create_order_attributes.py +3 -0
- waldur_api_client/models/marketplace_resources_details_retrieve_field_item.py +1 -1
- waldur_api_client/models/marketplace_resources_list_field_item.py +1 -1
- waldur_api_client/models/marketplace_resources_retrieve_field_item.py +1 -1
- waldur_api_client/models/marketplace_service_providers_list_field_item.py +1 -0
- waldur_api_client/models/marketplace_service_providers_retrieve_field_item.py +1 -0
- waldur_api_client/models/marketplace_user_offering_consents_count_o_item.py +15 -0
- waldur_api_client/models/marketplace_user_offering_consents_list_o_item.py +15 -0
- waldur_api_client/models/offering.py +0 -18
- waldur_api_client/models/offering_create.py +0 -18
- waldur_api_client/models/offering_create_request.py +0 -18
- waldur_api_client/models/offering_overview_update_request.py +0 -18
- waldur_api_client/models/offering_terms_of_service.py +142 -0
- waldur_api_client/models/offering_terms_of_service_create.py +107 -0
- waldur_api_client/models/offering_terms_of_service_create_request.py +107 -0
- waldur_api_client/models/offering_terms_of_service_request.py +96 -0
- waldur_api_client/models/open_stack_instance_create_order_attributes.py +3 -0
- waldur_api_client/models/open_stack_nested_security_group.py +53 -1
- waldur_api_client/models/open_stack_nested_security_group_rules_item.py +197 -0
- waldur_api_client/models/open_stack_network.py +20 -0
- waldur_api_client/models/open_stack_security_group_rule_update_request.py +4 -4
- waldur_api_client/models/open_stack_tenant.py +38 -0
- waldur_api_client/models/open_stack_tenant_create_order_attributes.py +21 -0
- waldur_api_client/models/open_stack_volume_create_order_attributes.py +3 -0
- waldur_api_client/models/openstack_networks_list_field_item.py +1 -0
- waldur_api_client/models/openstack_networks_retrieve_field_item.py +1 -0
- waldur_api_client/models/openstack_tenants_list_field_item.py +3 -0
- waldur_api_client/models/openstack_tenants_retrieve_field_item.py +3 -0
- waldur_api_client/models/order_create.py +0 -8
- waldur_api_client/models/order_create_request.py +23 -7
- waldur_api_client/models/order_details.py +0 -9
- waldur_api_client/models/patched_offering_terms_of_service_request.py +96 -0
- waldur_api_client/models/patched_user_offering_consent_request.py +59 -0
- waldur_api_client/models/permission_project.py +147 -0
- waldur_api_client/models/project_answer.py +122 -0
- waldur_api_client/models/project_detail.py +133 -0
- waldur_api_client/models/project_details_response.py +115 -0
- waldur_api_client/models/provider_offering_details.py +0 -18
- waldur_api_client/models/provider_offering_details_request.py +0 -18
- waldur_api_client/models/public_offering_details.py +0 -18
- waldur_api_client/models/question_answer.py +176 -0
- waldur_api_client/models/question_answer_project_answers_item.py +44 -0
- waldur_api_client/models/question_answer_question_options_item.py +44 -0
- waldur_api_client/models/remote_resource_order.py +88 -0
- waldur_api_client/models/remote_resource_order_remote_state_enum.py +15 -0
- waldur_api_client/models/remote_resource_sync_status.py +123 -0
- waldur_api_client/models/remote_resource_sync_status_remote_state_enum.py +13 -0
- waldur_api_client/models/remote_resource_team_member.py +85 -0
- waldur_api_client/models/resource.py +10 -9
- waldur_api_client/models/service_provider.py +9 -0
- waldur_api_client/models/slurm_invoices_slurm_package_create_order_attributes.py +3 -0
- waldur_api_client/models/sync_status_enum.py +10 -0
- waldur_api_client/models/user_offering_consent.py +202 -0
- waldur_api_client/models/user_offering_consent_create.py +60 -0
- waldur_api_client/models/user_offering_consent_create_request.py +60 -0
- waldur_api_client/models/user_offering_consent_request.py +59 -0
- waldur_api_client/models/v_mware_virtual_machine_create_order_attributes.py +3 -0
- {waldur_api_client-7.7.6.dist-info → waldur_api_client-7.7.7.dist-info}/METADATA +1 -1
- {waldur_api_client-7.7.6.dist-info → waldur_api_client-7.7.7.dist-info}/RECORD +143 -88
- {waldur_api_client-7.7.6.dist-info → waldur_api_client-7.7.7.dist-info}/LICENSE +0 -0
- {waldur_api_client-7.7.6.dist-info → waldur_api_client-7.7.7.dist-info}/WHEEL +0 -0
|
@@ -0,0 +1,146 @@
|
|
|
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.user_offering_consent import UserOfferingConsent
|
|
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": "post",
|
|
18
|
+
"url": f"/api/marketplace-user-offering-consents/{uuid}/revoke/",
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
return _kwargs
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
def _parse_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> UserOfferingConsent:
|
|
25
|
+
if response.status_code == 200:
|
|
26
|
+
response_200 = UserOfferingConsent.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[UserOfferingConsent]:
|
|
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[UserOfferingConsent]:
|
|
48
|
+
"""Revoke consent to Terms of Service for an offering.
|
|
49
|
+
|
|
50
|
+
Args:
|
|
51
|
+
uuid (UUID):
|
|
52
|
+
|
|
53
|
+
Raises:
|
|
54
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code.
|
|
55
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
56
|
+
|
|
57
|
+
Returns:
|
|
58
|
+
Response[UserOfferingConsent]
|
|
59
|
+
"""
|
|
60
|
+
|
|
61
|
+
kwargs = _get_kwargs(
|
|
62
|
+
uuid=uuid,
|
|
63
|
+
)
|
|
64
|
+
|
|
65
|
+
response = client.get_httpx_client().request(
|
|
66
|
+
**kwargs,
|
|
67
|
+
)
|
|
68
|
+
|
|
69
|
+
return _build_response(client=client, response=response)
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
def sync(
|
|
73
|
+
uuid: UUID,
|
|
74
|
+
*,
|
|
75
|
+
client: AuthenticatedClient,
|
|
76
|
+
) -> UserOfferingConsent:
|
|
77
|
+
"""Revoke consent to Terms of Service for an offering.
|
|
78
|
+
|
|
79
|
+
Args:
|
|
80
|
+
uuid (UUID):
|
|
81
|
+
|
|
82
|
+
Raises:
|
|
83
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code.
|
|
84
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
85
|
+
|
|
86
|
+
Returns:
|
|
87
|
+
UserOfferingConsent
|
|
88
|
+
"""
|
|
89
|
+
|
|
90
|
+
return sync_detailed(
|
|
91
|
+
uuid=uuid,
|
|
92
|
+
client=client,
|
|
93
|
+
).parsed
|
|
94
|
+
|
|
95
|
+
|
|
96
|
+
async def asyncio_detailed(
|
|
97
|
+
uuid: UUID,
|
|
98
|
+
*,
|
|
99
|
+
client: AuthenticatedClient,
|
|
100
|
+
) -> Response[UserOfferingConsent]:
|
|
101
|
+
"""Revoke consent to Terms of Service for an offering.
|
|
102
|
+
|
|
103
|
+
Args:
|
|
104
|
+
uuid (UUID):
|
|
105
|
+
|
|
106
|
+
Raises:
|
|
107
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code.
|
|
108
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
109
|
+
|
|
110
|
+
Returns:
|
|
111
|
+
Response[UserOfferingConsent]
|
|
112
|
+
"""
|
|
113
|
+
|
|
114
|
+
kwargs = _get_kwargs(
|
|
115
|
+
uuid=uuid,
|
|
116
|
+
)
|
|
117
|
+
|
|
118
|
+
response = await client.get_async_httpx_client().request(**kwargs)
|
|
119
|
+
|
|
120
|
+
return _build_response(client=client, response=response)
|
|
121
|
+
|
|
122
|
+
|
|
123
|
+
async def asyncio(
|
|
124
|
+
uuid: UUID,
|
|
125
|
+
*,
|
|
126
|
+
client: AuthenticatedClient,
|
|
127
|
+
) -> UserOfferingConsent:
|
|
128
|
+
"""Revoke consent to Terms of Service for an offering.
|
|
129
|
+
|
|
130
|
+
Args:
|
|
131
|
+
uuid (UUID):
|
|
132
|
+
|
|
133
|
+
Raises:
|
|
134
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code.
|
|
135
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
136
|
+
|
|
137
|
+
Returns:
|
|
138
|
+
UserOfferingConsent
|
|
139
|
+
"""
|
|
140
|
+
|
|
141
|
+
return (
|
|
142
|
+
await asyncio_detailed(
|
|
143
|
+
uuid=uuid,
|
|
144
|
+
client=client,
|
|
145
|
+
)
|
|
146
|
+
).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.user_offering_consent import UserOfferingConsent
|
|
10
|
+
from ...models.user_offering_consent_request import UserOfferingConsentRequest
|
|
11
|
+
from ...types import Response
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
def _get_kwargs(
|
|
15
|
+
uuid: UUID,
|
|
16
|
+
*,
|
|
17
|
+
body: UserOfferingConsentRequest,
|
|
18
|
+
) -> dict[str, Any]:
|
|
19
|
+
headers: dict[str, Any] = {}
|
|
20
|
+
|
|
21
|
+
_kwargs: dict[str, Any] = {
|
|
22
|
+
"method": "put",
|
|
23
|
+
"url": f"/api/marketplace-user-offering-consents/{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) -> UserOfferingConsent:
|
|
35
|
+
if response.status_code == 200:
|
|
36
|
+
response_200 = UserOfferingConsent.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[UserOfferingConsent]:
|
|
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: UserOfferingConsentRequest,
|
|
58
|
+
) -> Response[UserOfferingConsent]:
|
|
59
|
+
"""
|
|
60
|
+
Args:
|
|
61
|
+
uuid (UUID):
|
|
62
|
+
body (UserOfferingConsentRequest):
|
|
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[UserOfferingConsent]
|
|
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: UserOfferingConsentRequest,
|
|
89
|
+
) -> UserOfferingConsent:
|
|
90
|
+
"""
|
|
91
|
+
Args:
|
|
92
|
+
uuid (UUID):
|
|
93
|
+
body (UserOfferingConsentRequest):
|
|
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
|
+
UserOfferingConsent
|
|
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: UserOfferingConsentRequest,
|
|
115
|
+
) -> Response[UserOfferingConsent]:
|
|
116
|
+
"""
|
|
117
|
+
Args:
|
|
118
|
+
uuid (UUID):
|
|
119
|
+
body (UserOfferingConsentRequest):
|
|
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[UserOfferingConsent]
|
|
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: UserOfferingConsentRequest,
|
|
144
|
+
) -> UserOfferingConsent:
|
|
145
|
+
"""
|
|
146
|
+
Args:
|
|
147
|
+
uuid (UUID):
|
|
148
|
+
body (UserOfferingConsentRequest):
|
|
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
|
+
UserOfferingConsent
|
|
156
|
+
"""
|
|
157
|
+
|
|
158
|
+
return (
|
|
159
|
+
await asyncio_detailed(
|
|
160
|
+
uuid=uuid,
|
|
161
|
+
client=client,
|
|
162
|
+
body=body,
|
|
163
|
+
)
|
|
164
|
+
).parsed
|
waldur_api_client/api/remote_waldur_api/remote_waldur_api_remote_resource_order_status_retrieve.py
ADDED
|
@@ -0,0 +1,145 @@
|
|
|
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.remote_resource_order import RemoteResourceOrder
|
|
9
|
+
from ...types import Response
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
def _get_kwargs(
|
|
13
|
+
resource_uuid: str,
|
|
14
|
+
) -> dict[str, Any]:
|
|
15
|
+
_kwargs: dict[str, Any] = {
|
|
16
|
+
"method": "get",
|
|
17
|
+
"url": f"/api/remote-waldur-api/remote_resource_order_status/{resource_uuid}/",
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
return _kwargs
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
def _parse_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> RemoteResourceOrder:
|
|
24
|
+
if response.status_code == 200:
|
|
25
|
+
response_200 = RemoteResourceOrder.from_dict(response.json())
|
|
26
|
+
|
|
27
|
+
return response_200
|
|
28
|
+
raise errors.UnexpectedStatus(response.status_code, response.content)
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
def _build_response(
|
|
32
|
+
*, client: Union[AuthenticatedClient, Client], response: httpx.Response
|
|
33
|
+
) -> Response[RemoteResourceOrder]:
|
|
34
|
+
return Response(
|
|
35
|
+
status_code=HTTPStatus(response.status_code),
|
|
36
|
+
content=response.content,
|
|
37
|
+
headers=response.headers,
|
|
38
|
+
parsed=_parse_response(client=client, response=response),
|
|
39
|
+
)
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
def sync_detailed(
|
|
43
|
+
resource_uuid: str,
|
|
44
|
+
*,
|
|
45
|
+
client: AuthenticatedClient,
|
|
46
|
+
) -> Response[RemoteResourceOrder]:
|
|
47
|
+
"""Get remote order details
|
|
48
|
+
|
|
49
|
+
Args:
|
|
50
|
+
resource_uuid (str):
|
|
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[RemoteResourceOrder]
|
|
58
|
+
"""
|
|
59
|
+
|
|
60
|
+
kwargs = _get_kwargs(
|
|
61
|
+
resource_uuid=resource_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
|
+
resource_uuid: str,
|
|
73
|
+
*,
|
|
74
|
+
client: AuthenticatedClient,
|
|
75
|
+
) -> RemoteResourceOrder:
|
|
76
|
+
"""Get remote order details
|
|
77
|
+
|
|
78
|
+
Args:
|
|
79
|
+
resource_uuid (str):
|
|
80
|
+
|
|
81
|
+
Raises:
|
|
82
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code.
|
|
83
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
84
|
+
|
|
85
|
+
Returns:
|
|
86
|
+
RemoteResourceOrder
|
|
87
|
+
"""
|
|
88
|
+
|
|
89
|
+
return sync_detailed(
|
|
90
|
+
resource_uuid=resource_uuid,
|
|
91
|
+
client=client,
|
|
92
|
+
).parsed
|
|
93
|
+
|
|
94
|
+
|
|
95
|
+
async def asyncio_detailed(
|
|
96
|
+
resource_uuid: str,
|
|
97
|
+
*,
|
|
98
|
+
client: AuthenticatedClient,
|
|
99
|
+
) -> Response[RemoteResourceOrder]:
|
|
100
|
+
"""Get remote order details
|
|
101
|
+
|
|
102
|
+
Args:
|
|
103
|
+
resource_uuid (str):
|
|
104
|
+
|
|
105
|
+
Raises:
|
|
106
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code.
|
|
107
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
108
|
+
|
|
109
|
+
Returns:
|
|
110
|
+
Response[RemoteResourceOrder]
|
|
111
|
+
"""
|
|
112
|
+
|
|
113
|
+
kwargs = _get_kwargs(
|
|
114
|
+
resource_uuid=resource_uuid,
|
|
115
|
+
)
|
|
116
|
+
|
|
117
|
+
response = await client.get_async_httpx_client().request(**kwargs)
|
|
118
|
+
|
|
119
|
+
return _build_response(client=client, response=response)
|
|
120
|
+
|
|
121
|
+
|
|
122
|
+
async def asyncio(
|
|
123
|
+
resource_uuid: str,
|
|
124
|
+
*,
|
|
125
|
+
client: AuthenticatedClient,
|
|
126
|
+
) -> RemoteResourceOrder:
|
|
127
|
+
"""Get remote order details
|
|
128
|
+
|
|
129
|
+
Args:
|
|
130
|
+
resource_uuid (str):
|
|
131
|
+
|
|
132
|
+
Raises:
|
|
133
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code.
|
|
134
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
135
|
+
|
|
136
|
+
Returns:
|
|
137
|
+
RemoteResourceOrder
|
|
138
|
+
"""
|
|
139
|
+
|
|
140
|
+
return (
|
|
141
|
+
await asyncio_detailed(
|
|
142
|
+
resource_uuid=resource_uuid,
|
|
143
|
+
client=client,
|
|
144
|
+
)
|
|
145
|
+
).parsed
|
|
@@ -0,0 +1,147 @@
|
|
|
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.remote_resource_sync_status import RemoteResourceSyncStatus
|
|
9
|
+
from ...types import Response
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
def _get_kwargs(
|
|
13
|
+
resource_uuid: str,
|
|
14
|
+
) -> dict[str, Any]:
|
|
15
|
+
_kwargs: dict[str, Any] = {
|
|
16
|
+
"method": "get",
|
|
17
|
+
"url": f"/api/remote-waldur-api/remote_resource_status/{resource_uuid}/",
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
return _kwargs
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
def _parse_response(
|
|
24
|
+
*, client: Union[AuthenticatedClient, Client], response: httpx.Response
|
|
25
|
+
) -> RemoteResourceSyncStatus:
|
|
26
|
+
if response.status_code == 200:
|
|
27
|
+
response_200 = RemoteResourceSyncStatus.from_dict(response.json())
|
|
28
|
+
|
|
29
|
+
return response_200
|
|
30
|
+
raise errors.UnexpectedStatus(response.status_code, response.content)
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
def _build_response(
|
|
34
|
+
*, client: Union[AuthenticatedClient, Client], response: httpx.Response
|
|
35
|
+
) -> Response[RemoteResourceSyncStatus]:
|
|
36
|
+
return Response(
|
|
37
|
+
status_code=HTTPStatus(response.status_code),
|
|
38
|
+
content=response.content,
|
|
39
|
+
headers=response.headers,
|
|
40
|
+
parsed=_parse_response(client=client, response=response),
|
|
41
|
+
)
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
def sync_detailed(
|
|
45
|
+
resource_uuid: str,
|
|
46
|
+
*,
|
|
47
|
+
client: AuthenticatedClient,
|
|
48
|
+
) -> Response[RemoteResourceSyncStatus]:
|
|
49
|
+
"""Get remote resource sync status
|
|
50
|
+
|
|
51
|
+
Args:
|
|
52
|
+
resource_uuid (str):
|
|
53
|
+
|
|
54
|
+
Raises:
|
|
55
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code.
|
|
56
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
57
|
+
|
|
58
|
+
Returns:
|
|
59
|
+
Response[RemoteResourceSyncStatus]
|
|
60
|
+
"""
|
|
61
|
+
|
|
62
|
+
kwargs = _get_kwargs(
|
|
63
|
+
resource_uuid=resource_uuid,
|
|
64
|
+
)
|
|
65
|
+
|
|
66
|
+
response = client.get_httpx_client().request(
|
|
67
|
+
**kwargs,
|
|
68
|
+
)
|
|
69
|
+
|
|
70
|
+
return _build_response(client=client, response=response)
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
def sync(
|
|
74
|
+
resource_uuid: str,
|
|
75
|
+
*,
|
|
76
|
+
client: AuthenticatedClient,
|
|
77
|
+
) -> RemoteResourceSyncStatus:
|
|
78
|
+
"""Get remote resource sync status
|
|
79
|
+
|
|
80
|
+
Args:
|
|
81
|
+
resource_uuid (str):
|
|
82
|
+
|
|
83
|
+
Raises:
|
|
84
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code.
|
|
85
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
86
|
+
|
|
87
|
+
Returns:
|
|
88
|
+
RemoteResourceSyncStatus
|
|
89
|
+
"""
|
|
90
|
+
|
|
91
|
+
return sync_detailed(
|
|
92
|
+
resource_uuid=resource_uuid,
|
|
93
|
+
client=client,
|
|
94
|
+
).parsed
|
|
95
|
+
|
|
96
|
+
|
|
97
|
+
async def asyncio_detailed(
|
|
98
|
+
resource_uuid: str,
|
|
99
|
+
*,
|
|
100
|
+
client: AuthenticatedClient,
|
|
101
|
+
) -> Response[RemoteResourceSyncStatus]:
|
|
102
|
+
"""Get remote resource sync status
|
|
103
|
+
|
|
104
|
+
Args:
|
|
105
|
+
resource_uuid (str):
|
|
106
|
+
|
|
107
|
+
Raises:
|
|
108
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code.
|
|
109
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
110
|
+
|
|
111
|
+
Returns:
|
|
112
|
+
Response[RemoteResourceSyncStatus]
|
|
113
|
+
"""
|
|
114
|
+
|
|
115
|
+
kwargs = _get_kwargs(
|
|
116
|
+
resource_uuid=resource_uuid,
|
|
117
|
+
)
|
|
118
|
+
|
|
119
|
+
response = await client.get_async_httpx_client().request(**kwargs)
|
|
120
|
+
|
|
121
|
+
return _build_response(client=client, response=response)
|
|
122
|
+
|
|
123
|
+
|
|
124
|
+
async def asyncio(
|
|
125
|
+
resource_uuid: str,
|
|
126
|
+
*,
|
|
127
|
+
client: AuthenticatedClient,
|
|
128
|
+
) -> RemoteResourceSyncStatus:
|
|
129
|
+
"""Get remote resource sync status
|
|
130
|
+
|
|
131
|
+
Args:
|
|
132
|
+
resource_uuid (str):
|
|
133
|
+
|
|
134
|
+
Raises:
|
|
135
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code.
|
|
136
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
137
|
+
|
|
138
|
+
Returns:
|
|
139
|
+
RemoteResourceSyncStatus
|
|
140
|
+
"""
|
|
141
|
+
|
|
142
|
+
return (
|
|
143
|
+
await asyncio_detailed(
|
|
144
|
+
resource_uuid=resource_uuid,
|
|
145
|
+
client=client,
|
|
146
|
+
)
|
|
147
|
+
).parsed
|