waldur-api-client 7.6.8__py3-none-any.whl → 7.7.0__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/broadcast_messages/broadcast_messages_schedule.py +89 -0
- waldur_api_client/api/call_proposal_project_role_mappings/call_proposal_project_role_mappings_create.py +152 -0
- waldur_api_client/api/call_proposal_project_role_mappings/call_proposal_project_role_mappings_destroy.py +89 -0
- waldur_api_client/api/call_proposal_project_role_mappings/call_proposal_project_role_mappings_list.py +194 -0
- waldur_api_client/api/call_proposal_project_role_mappings/call_proposal_project_role_mappings_partial_update.py +166 -0
- waldur_api_client/api/call_proposal_project_role_mappings/call_proposal_project_role_mappings_retrieve.py +144 -0
- waldur_api_client/api/call_proposal_project_role_mappings/call_proposal_project_role_mappings_update.py +166 -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/{autoprovisioning_rule_plans/autoprovisioning_rule_plans_create.py → marketplace_maintenance_announcements/marketplace_maintenance_announcements_create.py} +25 -23
- waldur_api_client/api/marketplace_maintenance_announcements/marketplace_maintenance_announcements_destroy.py +89 -0
- waldur_api_client/api/{autoprovisioning_rule_plans/autoprovisioning_rule_plans_list.py → marketplace_maintenance_announcements/marketplace_maintenance_announcements_list.py} +15 -13
- waldur_api_client/api/{autoprovisioning_rule_plans/autoprovisioning_rule_plans_partial_update.py → marketplace_maintenance_announcements/marketplace_maintenance_announcements_partial_update.py} +25 -23
- waldur_api_client/api/{autoprovisioning_rule_plans/autoprovisioning_rule_plans_retrieve.py → marketplace_maintenance_announcements/marketplace_maintenance_announcements_retrieve.py} +15 -13
- waldur_api_client/api/{autoprovisioning_rule_plans/autoprovisioning_rule_plans_update.py → marketplace_maintenance_announcements/marketplace_maintenance_announcements_update.py} +25 -23
- 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/{autoprovisioning_rule_plans/autoprovisioning_rule_plans_destroy.py → marketplace_plans/marketplace_plans_destroy.py} +1 -1
- waldur_api_client/api/marketplace_provider_offerings/marketplace_provider_offerings_update_offering_component.py +6 -6
- waldur_api_client/api/openstack_volume_types/openstack_volume_types_names_retrieve.py +118 -0
- waldur_api_client/models/__init__.py +52 -18
- 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 +1 -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 +1 -1
- waldur_api_client/models/merged_plugin_options_request.py +1 -1
- waldur_api_client/models/offering_component.py +15 -4
- 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/patched_proposal_project_role_mapping_request.py +88 -0
- waldur_api_client/models/patched_protected_call_request.py +0 -17
- waldur_api_client/models/patched_rule_request.py +90 -1
- waldur_api_client/models/{patched_rule_plans_request_limits.py → patched_rule_request_plan_attributes.py} +5 -5
- waldur_api_client/models/patched_rule_request_plan_limits.py +44 -0
- waldur_api_client/models/proposal_project_role_mapping.py +122 -0
- waldur_api_client/models/proposal_project_role_mapping_request.py +89 -0
- waldur_api_client/models/proposal_protected_calls_list_field_item.py +0 -3
- waldur_api_client/models/proposal_protected_calls_retrieve_field_item.py +0 -3
- waldur_api_client/models/protected_call.py +0 -34
- waldur_api_client/models/protected_call_request.py +0 -17
- waldur_api_client/models/provider_offering_details.py +1 -1
- waldur_api_client/models/public_offering_details.py +1 -1
- waldur_api_client/models/rule.py +99 -7
- waldur_api_client/models/{rule_plans_attributes.py → rule_plan_attributes.py} +5 -5
- waldur_api_client/models/{rule_plans_limits.py → rule_plan_limits.py} +5 -5
- waldur_api_client/models/rule_request.py +89 -1
- waldur_api_client/models/{rule_plans_request_attributes.py → rule_request_plan_attributes.py} +5 -5
- waldur_api_client/models/{rule_plans_request_limits.py → rule_request_plan_limits.py} +5 -5
- waldur_api_client/models/update_offering_component_request.py +274 -0
- {waldur_api_client-7.6.8.dist-info → waldur_api_client-7.7.0.dist-info}/METADATA +1 -1
- {waldur_api_client-7.6.8.dist-info → waldur_api_client-7.7.0.dist-info}/RECORD +87 -40
- waldur_api_client/models/patched_rule_plans_request.py +0 -108
- waldur_api_client/models/patched_rule_plans_request_attributes.py +0 -44
- waldur_api_client/models/rule_plans.py +0 -126
- waldur_api_client/models/rule_plans_request.py +0 -109
- /waldur_api_client/api/{autoprovisioning_rule_plans → call_proposal_project_role_mappings}/__init__.py +0 -0
- {waldur_api_client-7.6.8.dist-info → waldur_api_client-7.7.0.dist-info}/LICENSE +0 -0
- {waldur_api_client-7.6.8.dist-info → waldur_api_client-7.7.0.dist-info}/WHEEL +0 -0
|
@@ -0,0 +1,168 @@
|
|
|
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_offering_template import MaintenanceAnnouncementOfferingTemplate
|
|
10
|
+
from ...models.patched_maintenance_announcement_offering_template_request import (
|
|
11
|
+
PatchedMaintenanceAnnouncementOfferingTemplateRequest,
|
|
12
|
+
)
|
|
13
|
+
from ...types import Response
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
def _get_kwargs(
|
|
17
|
+
uuid: UUID,
|
|
18
|
+
*,
|
|
19
|
+
body: PatchedMaintenanceAnnouncementOfferingTemplateRequest,
|
|
20
|
+
) -> dict[str, Any]:
|
|
21
|
+
headers: dict[str, Any] = {}
|
|
22
|
+
|
|
23
|
+
_kwargs: dict[str, Any] = {
|
|
24
|
+
"method": "patch",
|
|
25
|
+
"url": f"/api/marketplace-maintenance-announcement-template-offerings/{uuid}/",
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
_kwargs["json"] = body.to_dict()
|
|
29
|
+
|
|
30
|
+
headers["Content-Type"] = "application/json"
|
|
31
|
+
|
|
32
|
+
_kwargs["headers"] = headers
|
|
33
|
+
return _kwargs
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
def _parse_response(
|
|
37
|
+
*, client: Union[AuthenticatedClient, Client], response: httpx.Response
|
|
38
|
+
) -> MaintenanceAnnouncementOfferingTemplate:
|
|
39
|
+
if response.status_code == 200:
|
|
40
|
+
response_200 = MaintenanceAnnouncementOfferingTemplate.from_dict(response.json())
|
|
41
|
+
|
|
42
|
+
return response_200
|
|
43
|
+
raise errors.UnexpectedStatus(response.status_code, response.content)
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
def _build_response(
|
|
47
|
+
*, client: Union[AuthenticatedClient, Client], response: httpx.Response
|
|
48
|
+
) -> Response[MaintenanceAnnouncementOfferingTemplate]:
|
|
49
|
+
return Response(
|
|
50
|
+
status_code=HTTPStatus(response.status_code),
|
|
51
|
+
content=response.content,
|
|
52
|
+
headers=response.headers,
|
|
53
|
+
parsed=_parse_response(client=client, response=response),
|
|
54
|
+
)
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
def sync_detailed(
|
|
58
|
+
uuid: UUID,
|
|
59
|
+
*,
|
|
60
|
+
client: AuthenticatedClient,
|
|
61
|
+
body: PatchedMaintenanceAnnouncementOfferingTemplateRequest,
|
|
62
|
+
) -> Response[MaintenanceAnnouncementOfferingTemplate]:
|
|
63
|
+
"""
|
|
64
|
+
Args:
|
|
65
|
+
uuid (UUID):
|
|
66
|
+
body (PatchedMaintenanceAnnouncementOfferingTemplateRequest):
|
|
67
|
+
|
|
68
|
+
Raises:
|
|
69
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code.
|
|
70
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
71
|
+
|
|
72
|
+
Returns:
|
|
73
|
+
Response[MaintenanceAnnouncementOfferingTemplate]
|
|
74
|
+
"""
|
|
75
|
+
|
|
76
|
+
kwargs = _get_kwargs(
|
|
77
|
+
uuid=uuid,
|
|
78
|
+
body=body,
|
|
79
|
+
)
|
|
80
|
+
|
|
81
|
+
response = client.get_httpx_client().request(
|
|
82
|
+
**kwargs,
|
|
83
|
+
)
|
|
84
|
+
|
|
85
|
+
return _build_response(client=client, response=response)
|
|
86
|
+
|
|
87
|
+
|
|
88
|
+
def sync(
|
|
89
|
+
uuid: UUID,
|
|
90
|
+
*,
|
|
91
|
+
client: AuthenticatedClient,
|
|
92
|
+
body: PatchedMaintenanceAnnouncementOfferingTemplateRequest,
|
|
93
|
+
) -> MaintenanceAnnouncementOfferingTemplate:
|
|
94
|
+
"""
|
|
95
|
+
Args:
|
|
96
|
+
uuid (UUID):
|
|
97
|
+
body (PatchedMaintenanceAnnouncementOfferingTemplateRequest):
|
|
98
|
+
|
|
99
|
+
Raises:
|
|
100
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code.
|
|
101
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
102
|
+
|
|
103
|
+
Returns:
|
|
104
|
+
MaintenanceAnnouncementOfferingTemplate
|
|
105
|
+
"""
|
|
106
|
+
|
|
107
|
+
return sync_detailed(
|
|
108
|
+
uuid=uuid,
|
|
109
|
+
client=client,
|
|
110
|
+
body=body,
|
|
111
|
+
).parsed
|
|
112
|
+
|
|
113
|
+
|
|
114
|
+
async def asyncio_detailed(
|
|
115
|
+
uuid: UUID,
|
|
116
|
+
*,
|
|
117
|
+
client: AuthenticatedClient,
|
|
118
|
+
body: PatchedMaintenanceAnnouncementOfferingTemplateRequest,
|
|
119
|
+
) -> Response[MaintenanceAnnouncementOfferingTemplate]:
|
|
120
|
+
"""
|
|
121
|
+
Args:
|
|
122
|
+
uuid (UUID):
|
|
123
|
+
body (PatchedMaintenanceAnnouncementOfferingTemplateRequest):
|
|
124
|
+
|
|
125
|
+
Raises:
|
|
126
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code.
|
|
127
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
128
|
+
|
|
129
|
+
Returns:
|
|
130
|
+
Response[MaintenanceAnnouncementOfferingTemplate]
|
|
131
|
+
"""
|
|
132
|
+
|
|
133
|
+
kwargs = _get_kwargs(
|
|
134
|
+
uuid=uuid,
|
|
135
|
+
body=body,
|
|
136
|
+
)
|
|
137
|
+
|
|
138
|
+
response = await client.get_async_httpx_client().request(**kwargs)
|
|
139
|
+
|
|
140
|
+
return _build_response(client=client, response=response)
|
|
141
|
+
|
|
142
|
+
|
|
143
|
+
async def asyncio(
|
|
144
|
+
uuid: UUID,
|
|
145
|
+
*,
|
|
146
|
+
client: AuthenticatedClient,
|
|
147
|
+
body: PatchedMaintenanceAnnouncementOfferingTemplateRequest,
|
|
148
|
+
) -> MaintenanceAnnouncementOfferingTemplate:
|
|
149
|
+
"""
|
|
150
|
+
Args:
|
|
151
|
+
uuid (UUID):
|
|
152
|
+
body (PatchedMaintenanceAnnouncementOfferingTemplateRequest):
|
|
153
|
+
|
|
154
|
+
Raises:
|
|
155
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code.
|
|
156
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
157
|
+
|
|
158
|
+
Returns:
|
|
159
|
+
MaintenanceAnnouncementOfferingTemplate
|
|
160
|
+
"""
|
|
161
|
+
|
|
162
|
+
return (
|
|
163
|
+
await asyncio_detailed(
|
|
164
|
+
uuid=uuid,
|
|
165
|
+
client=client,
|
|
166
|
+
body=body,
|
|
167
|
+
)
|
|
168
|
+
).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_offering_template import MaintenanceAnnouncementOfferingTemplate
|
|
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-announcement-template-offerings/{uuid}/",
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
return _kwargs
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
def _parse_response(
|
|
25
|
+
*, client: Union[AuthenticatedClient, Client], response: httpx.Response
|
|
26
|
+
) -> MaintenanceAnnouncementOfferingTemplate:
|
|
27
|
+
if response.status_code == 200:
|
|
28
|
+
response_200 = MaintenanceAnnouncementOfferingTemplate.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[MaintenanceAnnouncementOfferingTemplate]:
|
|
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[MaintenanceAnnouncementOfferingTemplate]:
|
|
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[MaintenanceAnnouncementOfferingTemplate]
|
|
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
|
+
) -> MaintenanceAnnouncementOfferingTemplate:
|
|
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
|
+
MaintenanceAnnouncementOfferingTemplate
|
|
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[MaintenanceAnnouncementOfferingTemplate]:
|
|
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[MaintenanceAnnouncementOfferingTemplate]
|
|
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
|
+
) -> MaintenanceAnnouncementOfferingTemplate:
|
|
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
|
+
MaintenanceAnnouncementOfferingTemplate
|
|
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_offering_template import MaintenanceAnnouncementOfferingTemplate
|
|
10
|
+
from ...models.maintenance_announcement_offering_template_request import MaintenanceAnnouncementOfferingTemplateRequest
|
|
11
|
+
from ...types import Response
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
def _get_kwargs(
|
|
15
|
+
uuid: UUID,
|
|
16
|
+
*,
|
|
17
|
+
body: MaintenanceAnnouncementOfferingTemplateRequest,
|
|
18
|
+
) -> dict[str, Any]:
|
|
19
|
+
headers: dict[str, Any] = {}
|
|
20
|
+
|
|
21
|
+
_kwargs: dict[str, Any] = {
|
|
22
|
+
"method": "put",
|
|
23
|
+
"url": f"/api/marketplace-maintenance-announcement-template-offerings/{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
|
+
) -> MaintenanceAnnouncementOfferingTemplate:
|
|
37
|
+
if response.status_code == 200:
|
|
38
|
+
response_200 = MaintenanceAnnouncementOfferingTemplate.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[MaintenanceAnnouncementOfferingTemplate]:
|
|
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: MaintenanceAnnouncementOfferingTemplateRequest,
|
|
60
|
+
) -> Response[MaintenanceAnnouncementOfferingTemplate]:
|
|
61
|
+
"""
|
|
62
|
+
Args:
|
|
63
|
+
uuid (UUID):
|
|
64
|
+
body (MaintenanceAnnouncementOfferingTemplateRequest):
|
|
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[MaintenanceAnnouncementOfferingTemplate]
|
|
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: MaintenanceAnnouncementOfferingTemplateRequest,
|
|
91
|
+
) -> MaintenanceAnnouncementOfferingTemplate:
|
|
92
|
+
"""
|
|
93
|
+
Args:
|
|
94
|
+
uuid (UUID):
|
|
95
|
+
body (MaintenanceAnnouncementOfferingTemplateRequest):
|
|
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
|
+
MaintenanceAnnouncementOfferingTemplate
|
|
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: MaintenanceAnnouncementOfferingTemplateRequest,
|
|
117
|
+
) -> Response[MaintenanceAnnouncementOfferingTemplate]:
|
|
118
|
+
"""
|
|
119
|
+
Args:
|
|
120
|
+
uuid (UUID):
|
|
121
|
+
body (MaintenanceAnnouncementOfferingTemplateRequest):
|
|
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[MaintenanceAnnouncementOfferingTemplate]
|
|
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: MaintenanceAnnouncementOfferingTemplateRequest,
|
|
146
|
+
) -> MaintenanceAnnouncementOfferingTemplate:
|
|
147
|
+
"""
|
|
148
|
+
Args:
|
|
149
|
+
uuid (UUID):
|
|
150
|
+
body (MaintenanceAnnouncementOfferingTemplateRequest):
|
|
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
|
+
MaintenanceAnnouncementOfferingTemplate
|
|
158
|
+
"""
|
|
159
|
+
|
|
160
|
+
return (
|
|
161
|
+
await asyncio_detailed(
|
|
162
|
+
uuid=uuid,
|
|
163
|
+
client=client,
|
|
164
|
+
body=body,
|
|
165
|
+
)
|
|
166
|
+
).parsed
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"""Contains endpoint functions for accessing the API"""
|
|
@@ -5,20 +5,20 @@ import httpx
|
|
|
5
5
|
|
|
6
6
|
from ... import errors
|
|
7
7
|
from ...client import AuthenticatedClient, Client
|
|
8
|
-
from ...models.
|
|
9
|
-
from ...models.
|
|
8
|
+
from ...models.maintenance_announcement import MaintenanceAnnouncement
|
|
9
|
+
from ...models.maintenance_announcement_request import MaintenanceAnnouncementRequest
|
|
10
10
|
from ...types import Response
|
|
11
11
|
|
|
12
12
|
|
|
13
13
|
def _get_kwargs(
|
|
14
14
|
*,
|
|
15
|
-
body:
|
|
15
|
+
body: MaintenanceAnnouncementRequest,
|
|
16
16
|
) -> dict[str, Any]:
|
|
17
17
|
headers: dict[str, Any] = {}
|
|
18
18
|
|
|
19
19
|
_kwargs: dict[str, Any] = {
|
|
20
20
|
"method": "post",
|
|
21
|
-
"url": "/api/
|
|
21
|
+
"url": "/api/marketplace-maintenance-announcements/",
|
|
22
22
|
}
|
|
23
23
|
|
|
24
24
|
_kwargs["json"] = body.to_dict()
|
|
@@ -29,15 +29,17 @@ def _get_kwargs(
|
|
|
29
29
|
return _kwargs
|
|
30
30
|
|
|
31
31
|
|
|
32
|
-
def _parse_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) ->
|
|
32
|
+
def _parse_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> MaintenanceAnnouncement:
|
|
33
33
|
if response.status_code == 201:
|
|
34
|
-
response_201 =
|
|
34
|
+
response_201 = MaintenanceAnnouncement.from_dict(response.json())
|
|
35
35
|
|
|
36
36
|
return response_201
|
|
37
37
|
raise errors.UnexpectedStatus(response.status_code, response.content)
|
|
38
38
|
|
|
39
39
|
|
|
40
|
-
def _build_response(
|
|
40
|
+
def _build_response(
|
|
41
|
+
*, client: Union[AuthenticatedClient, Client], response: httpx.Response
|
|
42
|
+
) -> Response[MaintenanceAnnouncement]:
|
|
41
43
|
return Response(
|
|
42
44
|
status_code=HTTPStatus(response.status_code),
|
|
43
45
|
content=response.content,
|
|
@@ -49,18 +51,18 @@ def _build_response(*, client: Union[AuthenticatedClient, Client], response: htt
|
|
|
49
51
|
def sync_detailed(
|
|
50
52
|
*,
|
|
51
53
|
client: AuthenticatedClient,
|
|
52
|
-
body:
|
|
53
|
-
) -> Response[
|
|
54
|
+
body: MaintenanceAnnouncementRequest,
|
|
55
|
+
) -> Response[MaintenanceAnnouncement]:
|
|
54
56
|
"""
|
|
55
57
|
Args:
|
|
56
|
-
body (
|
|
58
|
+
body (MaintenanceAnnouncementRequest):
|
|
57
59
|
|
|
58
60
|
Raises:
|
|
59
61
|
errors.UnexpectedStatus: If the server returns an undocumented status code.
|
|
60
62
|
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
61
63
|
|
|
62
64
|
Returns:
|
|
63
|
-
Response[
|
|
65
|
+
Response[MaintenanceAnnouncement]
|
|
64
66
|
"""
|
|
65
67
|
|
|
66
68
|
kwargs = _get_kwargs(
|
|
@@ -77,18 +79,18 @@ def sync_detailed(
|
|
|
77
79
|
def sync(
|
|
78
80
|
*,
|
|
79
81
|
client: AuthenticatedClient,
|
|
80
|
-
body:
|
|
81
|
-
) ->
|
|
82
|
+
body: MaintenanceAnnouncementRequest,
|
|
83
|
+
) -> MaintenanceAnnouncement:
|
|
82
84
|
"""
|
|
83
85
|
Args:
|
|
84
|
-
body (
|
|
86
|
+
body (MaintenanceAnnouncementRequest):
|
|
85
87
|
|
|
86
88
|
Raises:
|
|
87
89
|
errors.UnexpectedStatus: If the server returns an undocumented status code.
|
|
88
90
|
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
89
91
|
|
|
90
92
|
Returns:
|
|
91
|
-
|
|
93
|
+
MaintenanceAnnouncement
|
|
92
94
|
"""
|
|
93
95
|
|
|
94
96
|
return sync_detailed(
|
|
@@ -100,18 +102,18 @@ def sync(
|
|
|
100
102
|
async def asyncio_detailed(
|
|
101
103
|
*,
|
|
102
104
|
client: AuthenticatedClient,
|
|
103
|
-
body:
|
|
104
|
-
) -> Response[
|
|
105
|
+
body: MaintenanceAnnouncementRequest,
|
|
106
|
+
) -> Response[MaintenanceAnnouncement]:
|
|
105
107
|
"""
|
|
106
108
|
Args:
|
|
107
|
-
body (
|
|
109
|
+
body (MaintenanceAnnouncementRequest):
|
|
108
110
|
|
|
109
111
|
Raises:
|
|
110
112
|
errors.UnexpectedStatus: If the server returns an undocumented status code.
|
|
111
113
|
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
112
114
|
|
|
113
115
|
Returns:
|
|
114
|
-
Response[
|
|
116
|
+
Response[MaintenanceAnnouncement]
|
|
115
117
|
"""
|
|
116
118
|
|
|
117
119
|
kwargs = _get_kwargs(
|
|
@@ -126,18 +128,18 @@ async def asyncio_detailed(
|
|
|
126
128
|
async def asyncio(
|
|
127
129
|
*,
|
|
128
130
|
client: AuthenticatedClient,
|
|
129
|
-
body:
|
|
130
|
-
) ->
|
|
131
|
+
body: MaintenanceAnnouncementRequest,
|
|
132
|
+
) -> MaintenanceAnnouncement:
|
|
131
133
|
"""
|
|
132
134
|
Args:
|
|
133
|
-
body (
|
|
135
|
+
body (MaintenanceAnnouncementRequest):
|
|
134
136
|
|
|
135
137
|
Raises:
|
|
136
138
|
errors.UnexpectedStatus: If the server returns an undocumented status code.
|
|
137
139
|
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
138
140
|
|
|
139
141
|
Returns:
|
|
140
|
-
|
|
142
|
+
MaintenanceAnnouncement
|
|
141
143
|
"""
|
|
142
144
|
|
|
143
145
|
return (
|
|
@@ -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-maintenance-announcements/{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)
|