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
|
@@ -5,7 +5,7 @@ import httpx
|
|
|
5
5
|
|
|
6
6
|
from ... import errors
|
|
7
7
|
from ...client import AuthenticatedClient, Client
|
|
8
|
-
from ...models.
|
|
8
|
+
from ...models.maintenance_announcement import MaintenanceAnnouncement
|
|
9
9
|
from ...types import UNSET, Response, Unset
|
|
10
10
|
|
|
11
11
|
|
|
@@ -24,19 +24,21 @@ def _get_kwargs(
|
|
|
24
24
|
|
|
25
25
|
_kwargs: dict[str, Any] = {
|
|
26
26
|
"method": "get",
|
|
27
|
-
"url": "/api/
|
|
27
|
+
"url": "/api/marketplace-maintenance-announcements/",
|
|
28
28
|
"params": params,
|
|
29
29
|
}
|
|
30
30
|
|
|
31
31
|
return _kwargs
|
|
32
32
|
|
|
33
33
|
|
|
34
|
-
def _parse_response(
|
|
34
|
+
def _parse_response(
|
|
35
|
+
*, client: Union[AuthenticatedClient, Client], response: httpx.Response
|
|
36
|
+
) -> list["MaintenanceAnnouncement"]:
|
|
35
37
|
if response.status_code == 200:
|
|
36
38
|
response_200 = []
|
|
37
39
|
_response_200 = response.json()
|
|
38
40
|
for response_200_item_data in _response_200:
|
|
39
|
-
response_200_item =
|
|
41
|
+
response_200_item = MaintenanceAnnouncement.from_dict(response_200_item_data)
|
|
40
42
|
|
|
41
43
|
response_200.append(response_200_item)
|
|
42
44
|
|
|
@@ -46,7 +48,7 @@ def _parse_response(*, client: Union[AuthenticatedClient, Client], response: htt
|
|
|
46
48
|
|
|
47
49
|
def _build_response(
|
|
48
50
|
*, client: Union[AuthenticatedClient, Client], response: httpx.Response
|
|
49
|
-
) -> Response[list["
|
|
51
|
+
) -> Response[list["MaintenanceAnnouncement"]]:
|
|
50
52
|
return Response(
|
|
51
53
|
status_code=HTTPStatus(response.status_code),
|
|
52
54
|
content=response.content,
|
|
@@ -60,7 +62,7 @@ def sync_detailed(
|
|
|
60
62
|
client: AuthenticatedClient,
|
|
61
63
|
page: Union[Unset, int] = UNSET,
|
|
62
64
|
page_size: Union[Unset, int] = UNSET,
|
|
63
|
-
) -> Response[list["
|
|
65
|
+
) -> Response[list["MaintenanceAnnouncement"]]:
|
|
64
66
|
"""Mixin to optimize HEAD requests for DRF views bypassing serializer processing
|
|
65
67
|
|
|
66
68
|
Args:
|
|
@@ -72,7 +74,7 @@ def sync_detailed(
|
|
|
72
74
|
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
73
75
|
|
|
74
76
|
Returns:
|
|
75
|
-
Response[list['
|
|
77
|
+
Response[list['MaintenanceAnnouncement']]
|
|
76
78
|
"""
|
|
77
79
|
|
|
78
80
|
kwargs = _get_kwargs(
|
|
@@ -92,7 +94,7 @@ def sync(
|
|
|
92
94
|
client: AuthenticatedClient,
|
|
93
95
|
page: Union[Unset, int] = UNSET,
|
|
94
96
|
page_size: Union[Unset, int] = UNSET,
|
|
95
|
-
) -> list["
|
|
97
|
+
) -> list["MaintenanceAnnouncement"]:
|
|
96
98
|
"""Mixin to optimize HEAD requests for DRF views bypassing serializer processing
|
|
97
99
|
|
|
98
100
|
Args:
|
|
@@ -104,7 +106,7 @@ def sync(
|
|
|
104
106
|
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
105
107
|
|
|
106
108
|
Returns:
|
|
107
|
-
list['
|
|
109
|
+
list['MaintenanceAnnouncement']
|
|
108
110
|
"""
|
|
109
111
|
|
|
110
112
|
return sync_detailed(
|
|
@@ -119,7 +121,7 @@ async def asyncio_detailed(
|
|
|
119
121
|
client: AuthenticatedClient,
|
|
120
122
|
page: Union[Unset, int] = UNSET,
|
|
121
123
|
page_size: Union[Unset, int] = UNSET,
|
|
122
|
-
) -> Response[list["
|
|
124
|
+
) -> Response[list["MaintenanceAnnouncement"]]:
|
|
123
125
|
"""Mixin to optimize HEAD requests for DRF views bypassing serializer processing
|
|
124
126
|
|
|
125
127
|
Args:
|
|
@@ -131,7 +133,7 @@ async def asyncio_detailed(
|
|
|
131
133
|
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
132
134
|
|
|
133
135
|
Returns:
|
|
134
|
-
Response[list['
|
|
136
|
+
Response[list['MaintenanceAnnouncement']]
|
|
135
137
|
"""
|
|
136
138
|
|
|
137
139
|
kwargs = _get_kwargs(
|
|
@@ -149,7 +151,7 @@ async def asyncio(
|
|
|
149
151
|
client: AuthenticatedClient,
|
|
150
152
|
page: Union[Unset, int] = UNSET,
|
|
151
153
|
page_size: Union[Unset, int] = UNSET,
|
|
152
|
-
) -> list["
|
|
154
|
+
) -> list["MaintenanceAnnouncement"]:
|
|
153
155
|
"""Mixin to optimize HEAD requests for DRF views bypassing serializer processing
|
|
154
156
|
|
|
155
157
|
Args:
|
|
@@ -161,7 +163,7 @@ async def asyncio(
|
|
|
161
163
|
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
162
164
|
|
|
163
165
|
Returns:
|
|
164
|
-
list['
|
|
166
|
+
list['MaintenanceAnnouncement']
|
|
165
167
|
"""
|
|
166
168
|
|
|
167
169
|
return (
|
|
@@ -6,21 +6,21 @@ import httpx
|
|
|
6
6
|
|
|
7
7
|
from ... import errors
|
|
8
8
|
from ...client import AuthenticatedClient, Client
|
|
9
|
-
from ...models.
|
|
10
|
-
from ...models.
|
|
9
|
+
from ...models.maintenance_announcement import MaintenanceAnnouncement
|
|
10
|
+
from ...models.patched_maintenance_announcement_request import PatchedMaintenanceAnnouncementRequest
|
|
11
11
|
from ...types import Response
|
|
12
12
|
|
|
13
13
|
|
|
14
14
|
def _get_kwargs(
|
|
15
15
|
uuid: UUID,
|
|
16
16
|
*,
|
|
17
|
-
body:
|
|
17
|
+
body: PatchedMaintenanceAnnouncementRequest,
|
|
18
18
|
) -> dict[str, Any]:
|
|
19
19
|
headers: dict[str, Any] = {}
|
|
20
20
|
|
|
21
21
|
_kwargs: dict[str, Any] = {
|
|
22
22
|
"method": "patch",
|
|
23
|
-
"url": f"/api/
|
|
23
|
+
"url": f"/api/marketplace-maintenance-announcements/{uuid}/",
|
|
24
24
|
}
|
|
25
25
|
|
|
26
26
|
_kwargs["json"] = body.to_dict()
|
|
@@ -31,15 +31,17 @@ def _get_kwargs(
|
|
|
31
31
|
return _kwargs
|
|
32
32
|
|
|
33
33
|
|
|
34
|
-
def _parse_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) ->
|
|
34
|
+
def _parse_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> MaintenanceAnnouncement:
|
|
35
35
|
if response.status_code == 200:
|
|
36
|
-
response_200 =
|
|
36
|
+
response_200 = MaintenanceAnnouncement.from_dict(response.json())
|
|
37
37
|
|
|
38
38
|
return response_200
|
|
39
39
|
raise errors.UnexpectedStatus(response.status_code, response.content)
|
|
40
40
|
|
|
41
41
|
|
|
42
|
-
def _build_response(
|
|
42
|
+
def _build_response(
|
|
43
|
+
*, client: Union[AuthenticatedClient, Client], response: httpx.Response
|
|
44
|
+
) -> Response[MaintenanceAnnouncement]:
|
|
43
45
|
return Response(
|
|
44
46
|
status_code=HTTPStatus(response.status_code),
|
|
45
47
|
content=response.content,
|
|
@@ -52,19 +54,19 @@ def sync_detailed(
|
|
|
52
54
|
uuid: UUID,
|
|
53
55
|
*,
|
|
54
56
|
client: AuthenticatedClient,
|
|
55
|
-
body:
|
|
56
|
-
) -> Response[
|
|
57
|
+
body: PatchedMaintenanceAnnouncementRequest,
|
|
58
|
+
) -> Response[MaintenanceAnnouncement]:
|
|
57
59
|
"""
|
|
58
60
|
Args:
|
|
59
61
|
uuid (UUID):
|
|
60
|
-
body (
|
|
62
|
+
body (PatchedMaintenanceAnnouncementRequest):
|
|
61
63
|
|
|
62
64
|
Raises:
|
|
63
65
|
errors.UnexpectedStatus: If the server returns an undocumented status code.
|
|
64
66
|
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
65
67
|
|
|
66
68
|
Returns:
|
|
67
|
-
Response[
|
|
69
|
+
Response[MaintenanceAnnouncement]
|
|
68
70
|
"""
|
|
69
71
|
|
|
70
72
|
kwargs = _get_kwargs(
|
|
@@ -83,19 +85,19 @@ def sync(
|
|
|
83
85
|
uuid: UUID,
|
|
84
86
|
*,
|
|
85
87
|
client: AuthenticatedClient,
|
|
86
|
-
body:
|
|
87
|
-
) ->
|
|
88
|
+
body: PatchedMaintenanceAnnouncementRequest,
|
|
89
|
+
) -> MaintenanceAnnouncement:
|
|
88
90
|
"""
|
|
89
91
|
Args:
|
|
90
92
|
uuid (UUID):
|
|
91
|
-
body (
|
|
93
|
+
body (PatchedMaintenanceAnnouncementRequest):
|
|
92
94
|
|
|
93
95
|
Raises:
|
|
94
96
|
errors.UnexpectedStatus: If the server returns an undocumented status code.
|
|
95
97
|
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
96
98
|
|
|
97
99
|
Returns:
|
|
98
|
-
|
|
100
|
+
MaintenanceAnnouncement
|
|
99
101
|
"""
|
|
100
102
|
|
|
101
103
|
return sync_detailed(
|
|
@@ -109,19 +111,19 @@ async def asyncio_detailed(
|
|
|
109
111
|
uuid: UUID,
|
|
110
112
|
*,
|
|
111
113
|
client: AuthenticatedClient,
|
|
112
|
-
body:
|
|
113
|
-
) -> Response[
|
|
114
|
+
body: PatchedMaintenanceAnnouncementRequest,
|
|
115
|
+
) -> Response[MaintenanceAnnouncement]:
|
|
114
116
|
"""
|
|
115
117
|
Args:
|
|
116
118
|
uuid (UUID):
|
|
117
|
-
body (
|
|
119
|
+
body (PatchedMaintenanceAnnouncementRequest):
|
|
118
120
|
|
|
119
121
|
Raises:
|
|
120
122
|
errors.UnexpectedStatus: If the server returns an undocumented status code.
|
|
121
123
|
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
122
124
|
|
|
123
125
|
Returns:
|
|
124
|
-
Response[
|
|
126
|
+
Response[MaintenanceAnnouncement]
|
|
125
127
|
"""
|
|
126
128
|
|
|
127
129
|
kwargs = _get_kwargs(
|
|
@@ -138,19 +140,19 @@ async def asyncio(
|
|
|
138
140
|
uuid: UUID,
|
|
139
141
|
*,
|
|
140
142
|
client: AuthenticatedClient,
|
|
141
|
-
body:
|
|
142
|
-
) ->
|
|
143
|
+
body: PatchedMaintenanceAnnouncementRequest,
|
|
144
|
+
) -> MaintenanceAnnouncement:
|
|
143
145
|
"""
|
|
144
146
|
Args:
|
|
145
147
|
uuid (UUID):
|
|
146
|
-
body (
|
|
148
|
+
body (PatchedMaintenanceAnnouncementRequest):
|
|
147
149
|
|
|
148
150
|
Raises:
|
|
149
151
|
errors.UnexpectedStatus: If the server returns an undocumented status code.
|
|
150
152
|
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
151
153
|
|
|
152
154
|
Returns:
|
|
153
|
-
|
|
155
|
+
MaintenanceAnnouncement
|
|
154
156
|
"""
|
|
155
157
|
|
|
156
158
|
return (
|
|
@@ -6,7 +6,7 @@ import httpx
|
|
|
6
6
|
|
|
7
7
|
from ... import errors
|
|
8
8
|
from ...client import AuthenticatedClient, Client
|
|
9
|
-
from ...models.
|
|
9
|
+
from ...models.maintenance_announcement import MaintenanceAnnouncement
|
|
10
10
|
from ...types import Response
|
|
11
11
|
|
|
12
12
|
|
|
@@ -15,21 +15,23 @@ def _get_kwargs(
|
|
|
15
15
|
) -> dict[str, Any]:
|
|
16
16
|
_kwargs: dict[str, Any] = {
|
|
17
17
|
"method": "get",
|
|
18
|
-
"url": f"/api/
|
|
18
|
+
"url": f"/api/marketplace-maintenance-announcements/{uuid}/",
|
|
19
19
|
}
|
|
20
20
|
|
|
21
21
|
return _kwargs
|
|
22
22
|
|
|
23
23
|
|
|
24
|
-
def _parse_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) ->
|
|
24
|
+
def _parse_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> MaintenanceAnnouncement:
|
|
25
25
|
if response.status_code == 200:
|
|
26
|
-
response_200 =
|
|
26
|
+
response_200 = MaintenanceAnnouncement.from_dict(response.json())
|
|
27
27
|
|
|
28
28
|
return response_200
|
|
29
29
|
raise errors.UnexpectedStatus(response.status_code, response.content)
|
|
30
30
|
|
|
31
31
|
|
|
32
|
-
def _build_response(
|
|
32
|
+
def _build_response(
|
|
33
|
+
*, client: Union[AuthenticatedClient, Client], response: httpx.Response
|
|
34
|
+
) -> Response[MaintenanceAnnouncement]:
|
|
33
35
|
return Response(
|
|
34
36
|
status_code=HTTPStatus(response.status_code),
|
|
35
37
|
content=response.content,
|
|
@@ -42,7 +44,7 @@ def sync_detailed(
|
|
|
42
44
|
uuid: UUID,
|
|
43
45
|
*,
|
|
44
46
|
client: AuthenticatedClient,
|
|
45
|
-
) -> Response[
|
|
47
|
+
) -> Response[MaintenanceAnnouncement]:
|
|
46
48
|
"""
|
|
47
49
|
Args:
|
|
48
50
|
uuid (UUID):
|
|
@@ -52,7 +54,7 @@ def sync_detailed(
|
|
|
52
54
|
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
53
55
|
|
|
54
56
|
Returns:
|
|
55
|
-
Response[
|
|
57
|
+
Response[MaintenanceAnnouncement]
|
|
56
58
|
"""
|
|
57
59
|
|
|
58
60
|
kwargs = _get_kwargs(
|
|
@@ -70,7 +72,7 @@ def sync(
|
|
|
70
72
|
uuid: UUID,
|
|
71
73
|
*,
|
|
72
74
|
client: AuthenticatedClient,
|
|
73
|
-
) ->
|
|
75
|
+
) -> MaintenanceAnnouncement:
|
|
74
76
|
"""
|
|
75
77
|
Args:
|
|
76
78
|
uuid (UUID):
|
|
@@ -80,7 +82,7 @@ def sync(
|
|
|
80
82
|
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
81
83
|
|
|
82
84
|
Returns:
|
|
83
|
-
|
|
85
|
+
MaintenanceAnnouncement
|
|
84
86
|
"""
|
|
85
87
|
|
|
86
88
|
return sync_detailed(
|
|
@@ -93,7 +95,7 @@ async def asyncio_detailed(
|
|
|
93
95
|
uuid: UUID,
|
|
94
96
|
*,
|
|
95
97
|
client: AuthenticatedClient,
|
|
96
|
-
) -> Response[
|
|
98
|
+
) -> Response[MaintenanceAnnouncement]:
|
|
97
99
|
"""
|
|
98
100
|
Args:
|
|
99
101
|
uuid (UUID):
|
|
@@ -103,7 +105,7 @@ async def asyncio_detailed(
|
|
|
103
105
|
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
104
106
|
|
|
105
107
|
Returns:
|
|
106
|
-
Response[
|
|
108
|
+
Response[MaintenanceAnnouncement]
|
|
107
109
|
"""
|
|
108
110
|
|
|
109
111
|
kwargs = _get_kwargs(
|
|
@@ -119,7 +121,7 @@ async def asyncio(
|
|
|
119
121
|
uuid: UUID,
|
|
120
122
|
*,
|
|
121
123
|
client: AuthenticatedClient,
|
|
122
|
-
) ->
|
|
124
|
+
) -> MaintenanceAnnouncement:
|
|
123
125
|
"""
|
|
124
126
|
Args:
|
|
125
127
|
uuid (UUID):
|
|
@@ -129,7 +131,7 @@ async def asyncio(
|
|
|
129
131
|
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
130
132
|
|
|
131
133
|
Returns:
|
|
132
|
-
|
|
134
|
+
MaintenanceAnnouncement
|
|
133
135
|
"""
|
|
134
136
|
|
|
135
137
|
return (
|
|
@@ -6,21 +6,21 @@ import httpx
|
|
|
6
6
|
|
|
7
7
|
from ... import errors
|
|
8
8
|
from ...client import AuthenticatedClient, Client
|
|
9
|
-
from ...models.
|
|
10
|
-
from ...models.
|
|
9
|
+
from ...models.maintenance_announcement import MaintenanceAnnouncement
|
|
10
|
+
from ...models.maintenance_announcement_request import MaintenanceAnnouncementRequest
|
|
11
11
|
from ...types import Response
|
|
12
12
|
|
|
13
13
|
|
|
14
14
|
def _get_kwargs(
|
|
15
15
|
uuid: UUID,
|
|
16
16
|
*,
|
|
17
|
-
body:
|
|
17
|
+
body: MaintenanceAnnouncementRequest,
|
|
18
18
|
) -> dict[str, Any]:
|
|
19
19
|
headers: dict[str, Any] = {}
|
|
20
20
|
|
|
21
21
|
_kwargs: dict[str, Any] = {
|
|
22
22
|
"method": "put",
|
|
23
|
-
"url": f"/api/
|
|
23
|
+
"url": f"/api/marketplace-maintenance-announcements/{uuid}/",
|
|
24
24
|
}
|
|
25
25
|
|
|
26
26
|
_kwargs["json"] = body.to_dict()
|
|
@@ -31,15 +31,17 @@ def _get_kwargs(
|
|
|
31
31
|
return _kwargs
|
|
32
32
|
|
|
33
33
|
|
|
34
|
-
def _parse_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) ->
|
|
34
|
+
def _parse_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> MaintenanceAnnouncement:
|
|
35
35
|
if response.status_code == 200:
|
|
36
|
-
response_200 =
|
|
36
|
+
response_200 = MaintenanceAnnouncement.from_dict(response.json())
|
|
37
37
|
|
|
38
38
|
return response_200
|
|
39
39
|
raise errors.UnexpectedStatus(response.status_code, response.content)
|
|
40
40
|
|
|
41
41
|
|
|
42
|
-
def _build_response(
|
|
42
|
+
def _build_response(
|
|
43
|
+
*, client: Union[AuthenticatedClient, Client], response: httpx.Response
|
|
44
|
+
) -> Response[MaintenanceAnnouncement]:
|
|
43
45
|
return Response(
|
|
44
46
|
status_code=HTTPStatus(response.status_code),
|
|
45
47
|
content=response.content,
|
|
@@ -52,19 +54,19 @@ def sync_detailed(
|
|
|
52
54
|
uuid: UUID,
|
|
53
55
|
*,
|
|
54
56
|
client: AuthenticatedClient,
|
|
55
|
-
body:
|
|
56
|
-
) -> Response[
|
|
57
|
+
body: MaintenanceAnnouncementRequest,
|
|
58
|
+
) -> Response[MaintenanceAnnouncement]:
|
|
57
59
|
"""
|
|
58
60
|
Args:
|
|
59
61
|
uuid (UUID):
|
|
60
|
-
body (
|
|
62
|
+
body (MaintenanceAnnouncementRequest):
|
|
61
63
|
|
|
62
64
|
Raises:
|
|
63
65
|
errors.UnexpectedStatus: If the server returns an undocumented status code.
|
|
64
66
|
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
65
67
|
|
|
66
68
|
Returns:
|
|
67
|
-
Response[
|
|
69
|
+
Response[MaintenanceAnnouncement]
|
|
68
70
|
"""
|
|
69
71
|
|
|
70
72
|
kwargs = _get_kwargs(
|
|
@@ -83,19 +85,19 @@ def sync(
|
|
|
83
85
|
uuid: UUID,
|
|
84
86
|
*,
|
|
85
87
|
client: AuthenticatedClient,
|
|
86
|
-
body:
|
|
87
|
-
) ->
|
|
88
|
+
body: MaintenanceAnnouncementRequest,
|
|
89
|
+
) -> MaintenanceAnnouncement:
|
|
88
90
|
"""
|
|
89
91
|
Args:
|
|
90
92
|
uuid (UUID):
|
|
91
|
-
body (
|
|
93
|
+
body (MaintenanceAnnouncementRequest):
|
|
92
94
|
|
|
93
95
|
Raises:
|
|
94
96
|
errors.UnexpectedStatus: If the server returns an undocumented status code.
|
|
95
97
|
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
96
98
|
|
|
97
99
|
Returns:
|
|
98
|
-
|
|
100
|
+
MaintenanceAnnouncement
|
|
99
101
|
"""
|
|
100
102
|
|
|
101
103
|
return sync_detailed(
|
|
@@ -109,19 +111,19 @@ async def asyncio_detailed(
|
|
|
109
111
|
uuid: UUID,
|
|
110
112
|
*,
|
|
111
113
|
client: AuthenticatedClient,
|
|
112
|
-
body:
|
|
113
|
-
) -> Response[
|
|
114
|
+
body: MaintenanceAnnouncementRequest,
|
|
115
|
+
) -> Response[MaintenanceAnnouncement]:
|
|
114
116
|
"""
|
|
115
117
|
Args:
|
|
116
118
|
uuid (UUID):
|
|
117
|
-
body (
|
|
119
|
+
body (MaintenanceAnnouncementRequest):
|
|
118
120
|
|
|
119
121
|
Raises:
|
|
120
122
|
errors.UnexpectedStatus: If the server returns an undocumented status code.
|
|
121
123
|
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
122
124
|
|
|
123
125
|
Returns:
|
|
124
|
-
Response[
|
|
126
|
+
Response[MaintenanceAnnouncement]
|
|
125
127
|
"""
|
|
126
128
|
|
|
127
129
|
kwargs = _get_kwargs(
|
|
@@ -138,19 +140,19 @@ async def asyncio(
|
|
|
138
140
|
uuid: UUID,
|
|
139
141
|
*,
|
|
140
142
|
client: AuthenticatedClient,
|
|
141
|
-
body:
|
|
142
|
-
) ->
|
|
143
|
+
body: MaintenanceAnnouncementRequest,
|
|
144
|
+
) -> MaintenanceAnnouncement:
|
|
143
145
|
"""
|
|
144
146
|
Args:
|
|
145
147
|
uuid (UUID):
|
|
146
|
-
body (
|
|
148
|
+
body (MaintenanceAnnouncementRequest):
|
|
147
149
|
|
|
148
150
|
Raises:
|
|
149
151
|
errors.UnexpectedStatus: If the server returns an undocumented status code.
|
|
150
152
|
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
151
153
|
|
|
152
154
|
Returns:
|
|
153
|
-
|
|
155
|
+
MaintenanceAnnouncement
|
|
154
156
|
"""
|
|
155
157
|
|
|
156
158
|
return (
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"""Contains endpoint functions for accessing the API"""
|
|
@@ -0,0 +1,152 @@
|
|
|
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.maintenance_announcement_template import MaintenanceAnnouncementTemplate
|
|
9
|
+
from ...models.maintenance_announcement_template_request import MaintenanceAnnouncementTemplateRequest
|
|
10
|
+
from ...types import Response
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
def _get_kwargs(
|
|
14
|
+
*,
|
|
15
|
+
body: MaintenanceAnnouncementTemplateRequest,
|
|
16
|
+
) -> dict[str, Any]:
|
|
17
|
+
headers: dict[str, Any] = {}
|
|
18
|
+
|
|
19
|
+
_kwargs: dict[str, Any] = {
|
|
20
|
+
"method": "post",
|
|
21
|
+
"url": "/api/marketplace-maintenance-announcements-template/",
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
_kwargs["json"] = body.to_dict()
|
|
25
|
+
|
|
26
|
+
headers["Content-Type"] = "application/json"
|
|
27
|
+
|
|
28
|
+
_kwargs["headers"] = headers
|
|
29
|
+
return _kwargs
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
def _parse_response(
|
|
33
|
+
*, client: Union[AuthenticatedClient, Client], response: httpx.Response
|
|
34
|
+
) -> MaintenanceAnnouncementTemplate:
|
|
35
|
+
if response.status_code == 201:
|
|
36
|
+
response_201 = MaintenanceAnnouncementTemplate.from_dict(response.json())
|
|
37
|
+
|
|
38
|
+
return response_201
|
|
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[MaintenanceAnnouncementTemplate]:
|
|
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
|
+
*,
|
|
55
|
+
client: AuthenticatedClient,
|
|
56
|
+
body: MaintenanceAnnouncementTemplateRequest,
|
|
57
|
+
) -> Response[MaintenanceAnnouncementTemplate]:
|
|
58
|
+
"""
|
|
59
|
+
Args:
|
|
60
|
+
body (MaintenanceAnnouncementTemplateRequest):
|
|
61
|
+
|
|
62
|
+
Raises:
|
|
63
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code.
|
|
64
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
65
|
+
|
|
66
|
+
Returns:
|
|
67
|
+
Response[MaintenanceAnnouncementTemplate]
|
|
68
|
+
"""
|
|
69
|
+
|
|
70
|
+
kwargs = _get_kwargs(
|
|
71
|
+
body=body,
|
|
72
|
+
)
|
|
73
|
+
|
|
74
|
+
response = client.get_httpx_client().request(
|
|
75
|
+
**kwargs,
|
|
76
|
+
)
|
|
77
|
+
|
|
78
|
+
return _build_response(client=client, response=response)
|
|
79
|
+
|
|
80
|
+
|
|
81
|
+
def sync(
|
|
82
|
+
*,
|
|
83
|
+
client: AuthenticatedClient,
|
|
84
|
+
body: MaintenanceAnnouncementTemplateRequest,
|
|
85
|
+
) -> MaintenanceAnnouncementTemplate:
|
|
86
|
+
"""
|
|
87
|
+
Args:
|
|
88
|
+
body (MaintenanceAnnouncementTemplateRequest):
|
|
89
|
+
|
|
90
|
+
Raises:
|
|
91
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code.
|
|
92
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
93
|
+
|
|
94
|
+
Returns:
|
|
95
|
+
MaintenanceAnnouncementTemplate
|
|
96
|
+
"""
|
|
97
|
+
|
|
98
|
+
return sync_detailed(
|
|
99
|
+
client=client,
|
|
100
|
+
body=body,
|
|
101
|
+
).parsed
|
|
102
|
+
|
|
103
|
+
|
|
104
|
+
async def asyncio_detailed(
|
|
105
|
+
*,
|
|
106
|
+
client: AuthenticatedClient,
|
|
107
|
+
body: MaintenanceAnnouncementTemplateRequest,
|
|
108
|
+
) -> Response[MaintenanceAnnouncementTemplate]:
|
|
109
|
+
"""
|
|
110
|
+
Args:
|
|
111
|
+
body (MaintenanceAnnouncementTemplateRequest):
|
|
112
|
+
|
|
113
|
+
Raises:
|
|
114
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code.
|
|
115
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
116
|
+
|
|
117
|
+
Returns:
|
|
118
|
+
Response[MaintenanceAnnouncementTemplate]
|
|
119
|
+
"""
|
|
120
|
+
|
|
121
|
+
kwargs = _get_kwargs(
|
|
122
|
+
body=body,
|
|
123
|
+
)
|
|
124
|
+
|
|
125
|
+
response = await client.get_async_httpx_client().request(**kwargs)
|
|
126
|
+
|
|
127
|
+
return _build_response(client=client, response=response)
|
|
128
|
+
|
|
129
|
+
|
|
130
|
+
async def asyncio(
|
|
131
|
+
*,
|
|
132
|
+
client: AuthenticatedClient,
|
|
133
|
+
body: MaintenanceAnnouncementTemplateRequest,
|
|
134
|
+
) -> MaintenanceAnnouncementTemplate:
|
|
135
|
+
"""
|
|
136
|
+
Args:
|
|
137
|
+
body (MaintenanceAnnouncementTemplateRequest):
|
|
138
|
+
|
|
139
|
+
Raises:
|
|
140
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code.
|
|
141
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
142
|
+
|
|
143
|
+
Returns:
|
|
144
|
+
MaintenanceAnnouncementTemplate
|
|
145
|
+
"""
|
|
146
|
+
|
|
147
|
+
return (
|
|
148
|
+
await asyncio_detailed(
|
|
149
|
+
client=client,
|
|
150
|
+
body=body,
|
|
151
|
+
)
|
|
152
|
+
).parsed
|