waldur-api-client 7.6.7__py3-none-any.whl → 7.6.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/backend_resource_requests/__init__.py +1 -0
- waldur_api_client/api/backend_resource_requests/backend_resource_requests_create.py +150 -0
- waldur_api_client/api/backend_resource_requests/backend_resource_requests_list.py +313 -0
- waldur_api_client/api/backend_resource_requests/backend_resource_requests_retrieve.py +142 -0
- waldur_api_client/api/backend_resource_requests/backend_resource_requests_set_done.py +144 -0
- waldur_api_client/api/backend_resource_requests/backend_resource_requests_set_erred.py +166 -0
- waldur_api_client/api/backend_resource_requests/backend_resource_requests_start_processing.py +146 -0
- waldur_api_client/api/backend_resources/__init__.py +1 -0
- waldur_api_client/api/backend_resources/backend_resources_create.py +150 -0
- waldur_api_client/api/backend_resources/backend_resources_destroy.py +89 -0
- waldur_api_client/api/backend_resources/backend_resources_import_resource.py +162 -0
- waldur_api_client/api/backend_resources/backend_resources_list.py +315 -0
- waldur_api_client/api/backend_resources/backend_resources_retrieve.py +142 -0
- waldur_api_client/api/invoices/invoices_list.py +0 -30
- waldur_api_client/api/invoices/invoices_stats_list.py +0 -30
- waldur_api_client/api/marketplace_maintenance_announcement_offerings/__init__.py +1 -0
- waldur_api_client/api/marketplace_maintenance_announcement_offerings/marketplace_maintenance_announcement_offerings_create.py +152 -0
- waldur_api_client/api/marketplace_maintenance_announcement_offerings/marketplace_maintenance_announcement_offerings_destroy.py +89 -0
- waldur_api_client/api/marketplace_maintenance_announcement_offerings/marketplace_maintenance_announcement_offerings_list.py +175 -0
- waldur_api_client/api/marketplace_maintenance_announcement_offerings/marketplace_maintenance_announcement_offerings_partial_update.py +166 -0
- waldur_api_client/api/marketplace_maintenance_announcement_offerings/marketplace_maintenance_announcement_offerings_retrieve.py +144 -0
- waldur_api_client/api/marketplace_maintenance_announcement_offerings/marketplace_maintenance_announcement_offerings_update.py +166 -0
- waldur_api_client/api/marketplace_maintenance_announcement_template_offerings/__init__.py +1 -0
- waldur_api_client/api/marketplace_maintenance_announcement_template_offerings/marketplace_maintenance_announcement_template_offerings_create.py +152 -0
- waldur_api_client/api/marketplace_maintenance_announcement_template_offerings/marketplace_maintenance_announcement_template_offerings_destroy.py +89 -0
- waldur_api_client/api/marketplace_maintenance_announcement_template_offerings/marketplace_maintenance_announcement_template_offerings_list.py +175 -0
- waldur_api_client/api/marketplace_maintenance_announcement_template_offerings/marketplace_maintenance_announcement_template_offerings_partial_update.py +168 -0
- waldur_api_client/api/marketplace_maintenance_announcement_template_offerings/marketplace_maintenance_announcement_template_offerings_retrieve.py +144 -0
- waldur_api_client/api/marketplace_maintenance_announcement_template_offerings/marketplace_maintenance_announcement_template_offerings_update.py +166 -0
- waldur_api_client/api/marketplace_maintenance_announcements/__init__.py +1 -0
- waldur_api_client/api/marketplace_maintenance_announcements/marketplace_maintenance_announcements_create.py +150 -0
- waldur_api_client/api/marketplace_maintenance_announcements/marketplace_maintenance_announcements_destroy.py +89 -0
- waldur_api_client/api/marketplace_maintenance_announcements/marketplace_maintenance_announcements_list.py +175 -0
- waldur_api_client/api/marketplace_maintenance_announcements/marketplace_maintenance_announcements_partial_update.py +164 -0
- waldur_api_client/api/marketplace_maintenance_announcements/marketplace_maintenance_announcements_retrieve.py +142 -0
- waldur_api_client/api/marketplace_maintenance_announcements/marketplace_maintenance_announcements_update.py +164 -0
- waldur_api_client/api/marketplace_maintenance_announcements_template/__init__.py +1 -0
- waldur_api_client/api/marketplace_maintenance_announcements_template/marketplace_maintenance_announcements_template_create.py +152 -0
- waldur_api_client/api/marketplace_maintenance_announcements_template/marketplace_maintenance_announcements_template_destroy.py +89 -0
- waldur_api_client/api/marketplace_maintenance_announcements_template/marketplace_maintenance_announcements_template_list.py +175 -0
- waldur_api_client/api/marketplace_maintenance_announcements_template/marketplace_maintenance_announcements_template_partial_update.py +166 -0
- waldur_api_client/api/marketplace_maintenance_announcements_template/marketplace_maintenance_announcements_template_retrieve.py +144 -0
- waldur_api_client/api/marketplace_maintenance_announcements_template/marketplace_maintenance_announcements_template_update.py +166 -0
- waldur_api_client/api/marketplace_provider_offerings/marketplace_provider_offerings_update_offering_component.py +6 -6
- waldur_api_client/api/marketplace_service_providers/marketplace_service_providers_customer_projects_list.py +15 -0
- waldur_api_client/api/marketplace_service_providers/marketplace_service_providers_projects_list.py +15 -0
- waldur_api_client/api/openstack_volume_types/openstack_volume_types_names_retrieve.py +118 -0
- waldur_api_client/api/projects/projects_list.py +15 -0
- waldur_api_client/models/__init__.py +60 -2
- waldur_api_client/models/backend_resource.py +162 -0
- waldur_api_client/models/backend_resource_import_request.py +67 -0
- waldur_api_client/models/backend_resource_req.py +162 -0
- waldur_api_client/models/backend_resource_req_request.py +60 -0
- waldur_api_client/models/backend_resource_req_state_enum.py +11 -0
- waldur_api_client/models/backend_resource_request.py +96 -0
- waldur_api_client/models/backend_resource_request_set_erred_request.py +68 -0
- waldur_api_client/models/backend_resource_requests_list_o_item.py +9 -0
- waldur_api_client/models/backend_resource_requests_list_state_item.py +11 -0
- waldur_api_client/models/{order_details_attributes.py → backend_resource_requests_set_done_response_200.py} +6 -6
- waldur_api_client/models/backend_resource_requests_set_erred_response_200.py +44 -0
- waldur_api_client/models/backend_resource_requests_start_processing_response_200.py +44 -0
- waldur_api_client/models/backend_resources_list_o_item.py +9 -0
- waldur_api_client/models/constance_settings.py +22 -0
- waldur_api_client/models/constance_settings_request.py +22 -0
- waldur_api_client/models/event_types_enum.py +4 -0
- waldur_api_client/models/impact_level_enum.py +11 -0
- waldur_api_client/models/maintenance_announcement.py +225 -0
- waldur_api_client/models/maintenance_announcement_offering.py +112 -0
- waldur_api_client/models/maintenance_announcement_offering_request.py +95 -0
- waldur_api_client/models/maintenance_announcement_offering_template.py +112 -0
- waldur_api_client/models/maintenance_announcement_offering_template_request.py +95 -0
- waldur_api_client/models/maintenance_announcement_request.py +113 -0
- waldur_api_client/models/maintenance_announcement_state_enum.py +12 -0
- waldur_api_client/models/maintenance_announcement_template.py +134 -0
- waldur_api_client/models/maintenance_announcement_template_request.py +95 -0
- waldur_api_client/models/maintenance_type_enum.py +12 -0
- waldur_api_client/models/merged_plugin_options.py +21 -1
- waldur_api_client/models/merged_plugin_options_request.py +21 -1
- waldur_api_client/models/offering_component.py +15 -4
- waldur_api_client/models/order_details.py +4 -14
- waldur_api_client/models/patched_maintenance_announcement_offering_request.py +94 -0
- waldur_api_client/models/patched_maintenance_announcement_offering_template_request.py +94 -0
- waldur_api_client/models/patched_maintenance_announcement_request.py +128 -0
- waldur_api_client/models/patched_maintenance_announcement_template_request.py +94 -0
- waldur_api_client/models/update_offering_component_request.py +274 -0
- waldur_api_client/models/user_agreement.py +9 -11
- waldur_api_client/models/user_agreement_request.py +9 -11
- {waldur_api_client-7.6.7.dist-info → waldur_api_client-7.6.9.dist-info}/METADATA +1 -1
- {waldur_api_client-7.6.7.dist-info → waldur_api_client-7.6.9.dist-info}/RECORD +91 -21
- {waldur_api_client-7.6.7.dist-info → waldur_api_client-7.6.9.dist-info}/LICENSE +0 -0
- {waldur_api_client-7.6.7.dist-info → waldur_api_client-7.6.9.dist-info}/WHEEL +0 -0
|
@@ -0,0 +1,166 @@
|
|
|
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.maintenance_announcement_template import MaintenanceAnnouncementTemplate
|
|
10
|
+
from ...models.patched_maintenance_announcement_template_request import PatchedMaintenanceAnnouncementTemplateRequest
|
|
11
|
+
from ...types import Response
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
def _get_kwargs(
|
|
15
|
+
uuid: UUID,
|
|
16
|
+
*,
|
|
17
|
+
body: PatchedMaintenanceAnnouncementTemplateRequest,
|
|
18
|
+
) -> dict[str, Any]:
|
|
19
|
+
headers: dict[str, Any] = {}
|
|
20
|
+
|
|
21
|
+
_kwargs: dict[str, Any] = {
|
|
22
|
+
"method": "patch",
|
|
23
|
+
"url": f"/api/marketplace-maintenance-announcements-template/{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(
|
|
35
|
+
*, client: Union[AuthenticatedClient, Client], response: httpx.Response
|
|
36
|
+
) -> MaintenanceAnnouncementTemplate:
|
|
37
|
+
if response.status_code == 200:
|
|
38
|
+
response_200 = MaintenanceAnnouncementTemplate.from_dict(response.json())
|
|
39
|
+
|
|
40
|
+
return response_200
|
|
41
|
+
raise errors.UnexpectedStatus(response.status_code, response.content)
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
def _build_response(
|
|
45
|
+
*, client: Union[AuthenticatedClient, Client], response: httpx.Response
|
|
46
|
+
) -> Response[MaintenanceAnnouncementTemplate]:
|
|
47
|
+
return Response(
|
|
48
|
+
status_code=HTTPStatus(response.status_code),
|
|
49
|
+
content=response.content,
|
|
50
|
+
headers=response.headers,
|
|
51
|
+
parsed=_parse_response(client=client, response=response),
|
|
52
|
+
)
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
def sync_detailed(
|
|
56
|
+
uuid: UUID,
|
|
57
|
+
*,
|
|
58
|
+
client: AuthenticatedClient,
|
|
59
|
+
body: PatchedMaintenanceAnnouncementTemplateRequest,
|
|
60
|
+
) -> Response[MaintenanceAnnouncementTemplate]:
|
|
61
|
+
"""
|
|
62
|
+
Args:
|
|
63
|
+
uuid (UUID):
|
|
64
|
+
body (PatchedMaintenanceAnnouncementTemplateRequest):
|
|
65
|
+
|
|
66
|
+
Raises:
|
|
67
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code.
|
|
68
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
69
|
+
|
|
70
|
+
Returns:
|
|
71
|
+
Response[MaintenanceAnnouncementTemplate]
|
|
72
|
+
"""
|
|
73
|
+
|
|
74
|
+
kwargs = _get_kwargs(
|
|
75
|
+
uuid=uuid,
|
|
76
|
+
body=body,
|
|
77
|
+
)
|
|
78
|
+
|
|
79
|
+
response = client.get_httpx_client().request(
|
|
80
|
+
**kwargs,
|
|
81
|
+
)
|
|
82
|
+
|
|
83
|
+
return _build_response(client=client, response=response)
|
|
84
|
+
|
|
85
|
+
|
|
86
|
+
def sync(
|
|
87
|
+
uuid: UUID,
|
|
88
|
+
*,
|
|
89
|
+
client: AuthenticatedClient,
|
|
90
|
+
body: PatchedMaintenanceAnnouncementTemplateRequest,
|
|
91
|
+
) -> MaintenanceAnnouncementTemplate:
|
|
92
|
+
"""
|
|
93
|
+
Args:
|
|
94
|
+
uuid (UUID):
|
|
95
|
+
body (PatchedMaintenanceAnnouncementTemplateRequest):
|
|
96
|
+
|
|
97
|
+
Raises:
|
|
98
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code.
|
|
99
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
100
|
+
|
|
101
|
+
Returns:
|
|
102
|
+
MaintenanceAnnouncementTemplate
|
|
103
|
+
"""
|
|
104
|
+
|
|
105
|
+
return sync_detailed(
|
|
106
|
+
uuid=uuid,
|
|
107
|
+
client=client,
|
|
108
|
+
body=body,
|
|
109
|
+
).parsed
|
|
110
|
+
|
|
111
|
+
|
|
112
|
+
async def asyncio_detailed(
|
|
113
|
+
uuid: UUID,
|
|
114
|
+
*,
|
|
115
|
+
client: AuthenticatedClient,
|
|
116
|
+
body: PatchedMaintenanceAnnouncementTemplateRequest,
|
|
117
|
+
) -> Response[MaintenanceAnnouncementTemplate]:
|
|
118
|
+
"""
|
|
119
|
+
Args:
|
|
120
|
+
uuid (UUID):
|
|
121
|
+
body (PatchedMaintenanceAnnouncementTemplateRequest):
|
|
122
|
+
|
|
123
|
+
Raises:
|
|
124
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code.
|
|
125
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
126
|
+
|
|
127
|
+
Returns:
|
|
128
|
+
Response[MaintenanceAnnouncementTemplate]
|
|
129
|
+
"""
|
|
130
|
+
|
|
131
|
+
kwargs = _get_kwargs(
|
|
132
|
+
uuid=uuid,
|
|
133
|
+
body=body,
|
|
134
|
+
)
|
|
135
|
+
|
|
136
|
+
response = await client.get_async_httpx_client().request(**kwargs)
|
|
137
|
+
|
|
138
|
+
return _build_response(client=client, response=response)
|
|
139
|
+
|
|
140
|
+
|
|
141
|
+
async def asyncio(
|
|
142
|
+
uuid: UUID,
|
|
143
|
+
*,
|
|
144
|
+
client: AuthenticatedClient,
|
|
145
|
+
body: PatchedMaintenanceAnnouncementTemplateRequest,
|
|
146
|
+
) -> MaintenanceAnnouncementTemplate:
|
|
147
|
+
"""
|
|
148
|
+
Args:
|
|
149
|
+
uuid (UUID):
|
|
150
|
+
body (PatchedMaintenanceAnnouncementTemplateRequest):
|
|
151
|
+
|
|
152
|
+
Raises:
|
|
153
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code.
|
|
154
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
155
|
+
|
|
156
|
+
Returns:
|
|
157
|
+
MaintenanceAnnouncementTemplate
|
|
158
|
+
"""
|
|
159
|
+
|
|
160
|
+
return (
|
|
161
|
+
await asyncio_detailed(
|
|
162
|
+
uuid=uuid,
|
|
163
|
+
client=client,
|
|
164
|
+
body=body,
|
|
165
|
+
)
|
|
166
|
+
).parsed
|
|
@@ -0,0 +1,144 @@
|
|
|
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.maintenance_announcement_template import MaintenanceAnnouncementTemplate
|
|
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-maintenance-announcements-template/{uuid}/",
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
return _kwargs
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
def _parse_response(
|
|
25
|
+
*, client: Union[AuthenticatedClient, Client], response: httpx.Response
|
|
26
|
+
) -> MaintenanceAnnouncementTemplate:
|
|
27
|
+
if response.status_code == 200:
|
|
28
|
+
response_200 = MaintenanceAnnouncementTemplate.from_dict(response.json())
|
|
29
|
+
|
|
30
|
+
return response_200
|
|
31
|
+
raise errors.UnexpectedStatus(response.status_code, response.content)
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
def _build_response(
|
|
35
|
+
*, client: Union[AuthenticatedClient, Client], response: httpx.Response
|
|
36
|
+
) -> Response[MaintenanceAnnouncementTemplate]:
|
|
37
|
+
return Response(
|
|
38
|
+
status_code=HTTPStatus(response.status_code),
|
|
39
|
+
content=response.content,
|
|
40
|
+
headers=response.headers,
|
|
41
|
+
parsed=_parse_response(client=client, response=response),
|
|
42
|
+
)
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
def sync_detailed(
|
|
46
|
+
uuid: UUID,
|
|
47
|
+
*,
|
|
48
|
+
client: AuthenticatedClient,
|
|
49
|
+
) -> Response[MaintenanceAnnouncementTemplate]:
|
|
50
|
+
"""
|
|
51
|
+
Args:
|
|
52
|
+
uuid (UUID):
|
|
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[MaintenanceAnnouncementTemplate]
|
|
60
|
+
"""
|
|
61
|
+
|
|
62
|
+
kwargs = _get_kwargs(
|
|
63
|
+
uuid=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
|
+
uuid: UUID,
|
|
75
|
+
*,
|
|
76
|
+
client: AuthenticatedClient,
|
|
77
|
+
) -> MaintenanceAnnouncementTemplate:
|
|
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
|
+
MaintenanceAnnouncementTemplate
|
|
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[MaintenanceAnnouncementTemplate]:
|
|
101
|
+
"""
|
|
102
|
+
Args:
|
|
103
|
+
uuid (UUID):
|
|
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[MaintenanceAnnouncementTemplate]
|
|
111
|
+
"""
|
|
112
|
+
|
|
113
|
+
kwargs = _get_kwargs(
|
|
114
|
+
uuid=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
|
+
uuid: UUID,
|
|
124
|
+
*,
|
|
125
|
+
client: AuthenticatedClient,
|
|
126
|
+
) -> MaintenanceAnnouncementTemplate:
|
|
127
|
+
"""
|
|
128
|
+
Args:
|
|
129
|
+
uuid (UUID):
|
|
130
|
+
|
|
131
|
+
Raises:
|
|
132
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code.
|
|
133
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
134
|
+
|
|
135
|
+
Returns:
|
|
136
|
+
MaintenanceAnnouncementTemplate
|
|
137
|
+
"""
|
|
138
|
+
|
|
139
|
+
return (
|
|
140
|
+
await asyncio_detailed(
|
|
141
|
+
uuid=uuid,
|
|
142
|
+
client=client,
|
|
143
|
+
)
|
|
144
|
+
).parsed
|
|
@@ -0,0 +1,166 @@
|
|
|
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.maintenance_announcement_template import MaintenanceAnnouncementTemplate
|
|
10
|
+
from ...models.maintenance_announcement_template_request import MaintenanceAnnouncementTemplateRequest
|
|
11
|
+
from ...types import Response
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
def _get_kwargs(
|
|
15
|
+
uuid: UUID,
|
|
16
|
+
*,
|
|
17
|
+
body: MaintenanceAnnouncementTemplateRequest,
|
|
18
|
+
) -> dict[str, Any]:
|
|
19
|
+
headers: dict[str, Any] = {}
|
|
20
|
+
|
|
21
|
+
_kwargs: dict[str, Any] = {
|
|
22
|
+
"method": "put",
|
|
23
|
+
"url": f"/api/marketplace-maintenance-announcements-template/{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(
|
|
35
|
+
*, client: Union[AuthenticatedClient, Client], response: httpx.Response
|
|
36
|
+
) -> MaintenanceAnnouncementTemplate:
|
|
37
|
+
if response.status_code == 200:
|
|
38
|
+
response_200 = MaintenanceAnnouncementTemplate.from_dict(response.json())
|
|
39
|
+
|
|
40
|
+
return response_200
|
|
41
|
+
raise errors.UnexpectedStatus(response.status_code, response.content)
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
def _build_response(
|
|
45
|
+
*, client: Union[AuthenticatedClient, Client], response: httpx.Response
|
|
46
|
+
) -> Response[MaintenanceAnnouncementTemplate]:
|
|
47
|
+
return Response(
|
|
48
|
+
status_code=HTTPStatus(response.status_code),
|
|
49
|
+
content=response.content,
|
|
50
|
+
headers=response.headers,
|
|
51
|
+
parsed=_parse_response(client=client, response=response),
|
|
52
|
+
)
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
def sync_detailed(
|
|
56
|
+
uuid: UUID,
|
|
57
|
+
*,
|
|
58
|
+
client: AuthenticatedClient,
|
|
59
|
+
body: MaintenanceAnnouncementTemplateRequest,
|
|
60
|
+
) -> Response[MaintenanceAnnouncementTemplate]:
|
|
61
|
+
"""
|
|
62
|
+
Args:
|
|
63
|
+
uuid (UUID):
|
|
64
|
+
body (MaintenanceAnnouncementTemplateRequest):
|
|
65
|
+
|
|
66
|
+
Raises:
|
|
67
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code.
|
|
68
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
69
|
+
|
|
70
|
+
Returns:
|
|
71
|
+
Response[MaintenanceAnnouncementTemplate]
|
|
72
|
+
"""
|
|
73
|
+
|
|
74
|
+
kwargs = _get_kwargs(
|
|
75
|
+
uuid=uuid,
|
|
76
|
+
body=body,
|
|
77
|
+
)
|
|
78
|
+
|
|
79
|
+
response = client.get_httpx_client().request(
|
|
80
|
+
**kwargs,
|
|
81
|
+
)
|
|
82
|
+
|
|
83
|
+
return _build_response(client=client, response=response)
|
|
84
|
+
|
|
85
|
+
|
|
86
|
+
def sync(
|
|
87
|
+
uuid: UUID,
|
|
88
|
+
*,
|
|
89
|
+
client: AuthenticatedClient,
|
|
90
|
+
body: MaintenanceAnnouncementTemplateRequest,
|
|
91
|
+
) -> MaintenanceAnnouncementTemplate:
|
|
92
|
+
"""
|
|
93
|
+
Args:
|
|
94
|
+
uuid (UUID):
|
|
95
|
+
body (MaintenanceAnnouncementTemplateRequest):
|
|
96
|
+
|
|
97
|
+
Raises:
|
|
98
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code.
|
|
99
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
100
|
+
|
|
101
|
+
Returns:
|
|
102
|
+
MaintenanceAnnouncementTemplate
|
|
103
|
+
"""
|
|
104
|
+
|
|
105
|
+
return sync_detailed(
|
|
106
|
+
uuid=uuid,
|
|
107
|
+
client=client,
|
|
108
|
+
body=body,
|
|
109
|
+
).parsed
|
|
110
|
+
|
|
111
|
+
|
|
112
|
+
async def asyncio_detailed(
|
|
113
|
+
uuid: UUID,
|
|
114
|
+
*,
|
|
115
|
+
client: AuthenticatedClient,
|
|
116
|
+
body: MaintenanceAnnouncementTemplateRequest,
|
|
117
|
+
) -> Response[MaintenanceAnnouncementTemplate]:
|
|
118
|
+
"""
|
|
119
|
+
Args:
|
|
120
|
+
uuid (UUID):
|
|
121
|
+
body (MaintenanceAnnouncementTemplateRequest):
|
|
122
|
+
|
|
123
|
+
Raises:
|
|
124
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code.
|
|
125
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
126
|
+
|
|
127
|
+
Returns:
|
|
128
|
+
Response[MaintenanceAnnouncementTemplate]
|
|
129
|
+
"""
|
|
130
|
+
|
|
131
|
+
kwargs = _get_kwargs(
|
|
132
|
+
uuid=uuid,
|
|
133
|
+
body=body,
|
|
134
|
+
)
|
|
135
|
+
|
|
136
|
+
response = await client.get_async_httpx_client().request(**kwargs)
|
|
137
|
+
|
|
138
|
+
return _build_response(client=client, response=response)
|
|
139
|
+
|
|
140
|
+
|
|
141
|
+
async def asyncio(
|
|
142
|
+
uuid: UUID,
|
|
143
|
+
*,
|
|
144
|
+
client: AuthenticatedClient,
|
|
145
|
+
body: MaintenanceAnnouncementTemplateRequest,
|
|
146
|
+
) -> MaintenanceAnnouncementTemplate:
|
|
147
|
+
"""
|
|
148
|
+
Args:
|
|
149
|
+
uuid (UUID):
|
|
150
|
+
body (MaintenanceAnnouncementTemplateRequest):
|
|
151
|
+
|
|
152
|
+
Raises:
|
|
153
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code.
|
|
154
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
155
|
+
|
|
156
|
+
Returns:
|
|
157
|
+
MaintenanceAnnouncementTemplate
|
|
158
|
+
"""
|
|
159
|
+
|
|
160
|
+
return (
|
|
161
|
+
await asyncio_detailed(
|
|
162
|
+
uuid=uuid,
|
|
163
|
+
client=client,
|
|
164
|
+
body=body,
|
|
165
|
+
)
|
|
166
|
+
).parsed
|
|
@@ -6,14 +6,14 @@ import httpx
|
|
|
6
6
|
|
|
7
7
|
from ... import errors
|
|
8
8
|
from ...client import AuthenticatedClient, Client
|
|
9
|
-
from ...models.
|
|
9
|
+
from ...models.update_offering_component_request import UpdateOfferingComponentRequest
|
|
10
10
|
from ...types import Response
|
|
11
11
|
|
|
12
12
|
|
|
13
13
|
def _get_kwargs(
|
|
14
14
|
uuid: UUID,
|
|
15
15
|
*,
|
|
16
|
-
body:
|
|
16
|
+
body: UpdateOfferingComponentRequest,
|
|
17
17
|
) -> dict[str, Any]:
|
|
18
18
|
headers: dict[str, Any] = {}
|
|
19
19
|
|
|
@@ -49,12 +49,12 @@ def sync_detailed(
|
|
|
49
49
|
uuid: UUID,
|
|
50
50
|
*,
|
|
51
51
|
client: AuthenticatedClient,
|
|
52
|
-
body:
|
|
52
|
+
body: UpdateOfferingComponentRequest,
|
|
53
53
|
) -> Response[Any]:
|
|
54
54
|
"""
|
|
55
55
|
Args:
|
|
56
56
|
uuid (UUID):
|
|
57
|
-
body (
|
|
57
|
+
body (UpdateOfferingComponentRequest):
|
|
58
58
|
|
|
59
59
|
Raises:
|
|
60
60
|
errors.UnexpectedStatus: If the server returns an undocumented status code.
|
|
@@ -80,12 +80,12 @@ async def asyncio_detailed(
|
|
|
80
80
|
uuid: UUID,
|
|
81
81
|
*,
|
|
82
82
|
client: AuthenticatedClient,
|
|
83
|
-
body:
|
|
83
|
+
body: UpdateOfferingComponentRequest,
|
|
84
84
|
) -> Response[Any]:
|
|
85
85
|
"""
|
|
86
86
|
Args:
|
|
87
87
|
uuid (UUID):
|
|
88
|
-
body (
|
|
88
|
+
body (UpdateOfferingComponentRequest):
|
|
89
89
|
|
|
90
90
|
Raises:
|
|
91
91
|
errors.UnexpectedStatus: If the server returns an undocumented status code.
|
|
@@ -38,6 +38,7 @@ def _get_kwargs(
|
|
|
38
38
|
page: Union[Unset, int] = UNSET,
|
|
39
39
|
page_size: Union[Unset, int] = UNSET,
|
|
40
40
|
query: Union[Unset, str] = UNSET,
|
|
41
|
+
slug: Union[Unset, str] = UNSET,
|
|
41
42
|
) -> dict[str, Any]:
|
|
42
43
|
params: dict[str, Any] = {}
|
|
43
44
|
|
|
@@ -104,6 +105,8 @@ def _get_kwargs(
|
|
|
104
105
|
|
|
105
106
|
params["query"] = query
|
|
106
107
|
|
|
108
|
+
params["slug"] = slug
|
|
109
|
+
|
|
107
110
|
params = {k: v for k, v in params.items() if v is not UNSET and v is not None}
|
|
108
111
|
|
|
109
112
|
_kwargs: dict[str, Any] = {
|
|
@@ -163,6 +166,7 @@ def sync_detailed(
|
|
|
163
166
|
page: Union[Unset, int] = UNSET,
|
|
164
167
|
page_size: Union[Unset, int] = UNSET,
|
|
165
168
|
query: Union[Unset, str] = UNSET,
|
|
169
|
+
slug: Union[Unset, str] = UNSET,
|
|
166
170
|
) -> Response[list["MarketplaceProviderCustomerProject"]]:
|
|
167
171
|
"""Return customer projects of service provider.
|
|
168
172
|
|
|
@@ -186,6 +190,7 @@ def sync_detailed(
|
|
|
186
190
|
page (Union[Unset, int]):
|
|
187
191
|
page_size (Union[Unset, int]):
|
|
188
192
|
query (Union[Unset, str]):
|
|
193
|
+
slug (Union[Unset, str]):
|
|
189
194
|
|
|
190
195
|
Raises:
|
|
191
196
|
errors.UnexpectedStatus: If the server returns an undocumented status code.
|
|
@@ -215,6 +220,7 @@ def sync_detailed(
|
|
|
215
220
|
page=page,
|
|
216
221
|
page_size=page_size,
|
|
217
222
|
query=query,
|
|
223
|
+
slug=slug,
|
|
218
224
|
)
|
|
219
225
|
|
|
220
226
|
response = client.get_httpx_client().request(
|
|
@@ -246,6 +252,7 @@ def sync(
|
|
|
246
252
|
page: Union[Unset, int] = UNSET,
|
|
247
253
|
page_size: Union[Unset, int] = UNSET,
|
|
248
254
|
query: Union[Unset, str] = UNSET,
|
|
255
|
+
slug: Union[Unset, str] = UNSET,
|
|
249
256
|
) -> list["MarketplaceProviderCustomerProject"]:
|
|
250
257
|
"""Return customer projects of service provider.
|
|
251
258
|
|
|
@@ -269,6 +276,7 @@ def sync(
|
|
|
269
276
|
page (Union[Unset, int]):
|
|
270
277
|
page_size (Union[Unset, int]):
|
|
271
278
|
query (Union[Unset, str]):
|
|
279
|
+
slug (Union[Unset, str]):
|
|
272
280
|
|
|
273
281
|
Raises:
|
|
274
282
|
errors.UnexpectedStatus: If the server returns an undocumented status code.
|
|
@@ -299,6 +307,7 @@ def sync(
|
|
|
299
307
|
page=page,
|
|
300
308
|
page_size=page_size,
|
|
301
309
|
query=query,
|
|
310
|
+
slug=slug,
|
|
302
311
|
).parsed
|
|
303
312
|
|
|
304
313
|
|
|
@@ -324,6 +333,7 @@ async def asyncio_detailed(
|
|
|
324
333
|
page: Union[Unset, int] = UNSET,
|
|
325
334
|
page_size: Union[Unset, int] = UNSET,
|
|
326
335
|
query: Union[Unset, str] = UNSET,
|
|
336
|
+
slug: Union[Unset, str] = UNSET,
|
|
327
337
|
) -> Response[list["MarketplaceProviderCustomerProject"]]:
|
|
328
338
|
"""Return customer projects of service provider.
|
|
329
339
|
|
|
@@ -347,6 +357,7 @@ async def asyncio_detailed(
|
|
|
347
357
|
page (Union[Unset, int]):
|
|
348
358
|
page_size (Union[Unset, int]):
|
|
349
359
|
query (Union[Unset, str]):
|
|
360
|
+
slug (Union[Unset, str]):
|
|
350
361
|
|
|
351
362
|
Raises:
|
|
352
363
|
errors.UnexpectedStatus: If the server returns an undocumented status code.
|
|
@@ -376,6 +387,7 @@ async def asyncio_detailed(
|
|
|
376
387
|
page=page,
|
|
377
388
|
page_size=page_size,
|
|
378
389
|
query=query,
|
|
390
|
+
slug=slug,
|
|
379
391
|
)
|
|
380
392
|
|
|
381
393
|
response = await client.get_async_httpx_client().request(**kwargs)
|
|
@@ -405,6 +417,7 @@ async def asyncio(
|
|
|
405
417
|
page: Union[Unset, int] = UNSET,
|
|
406
418
|
page_size: Union[Unset, int] = UNSET,
|
|
407
419
|
query: Union[Unset, str] = UNSET,
|
|
420
|
+
slug: Union[Unset, str] = UNSET,
|
|
408
421
|
) -> list["MarketplaceProviderCustomerProject"]:
|
|
409
422
|
"""Return customer projects of service provider.
|
|
410
423
|
|
|
@@ -428,6 +441,7 @@ async def asyncio(
|
|
|
428
441
|
page (Union[Unset, int]):
|
|
429
442
|
page_size (Union[Unset, int]):
|
|
430
443
|
query (Union[Unset, str]):
|
|
444
|
+
slug (Union[Unset, str]):
|
|
431
445
|
|
|
432
446
|
Raises:
|
|
433
447
|
errors.UnexpectedStatus: If the server returns an undocumented status code.
|
|
@@ -459,5 +473,6 @@ async def asyncio(
|
|
|
459
473
|
page=page,
|
|
460
474
|
page_size=page_size,
|
|
461
475
|
query=query,
|
|
476
|
+
slug=slug,
|
|
462
477
|
)
|
|
463
478
|
).parsed
|