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.

Files changed (91) hide show
  1. waldur_api_client/api/broadcast_messages/broadcast_messages_schedule.py +89 -0
  2. waldur_api_client/api/call_proposal_project_role_mappings/call_proposal_project_role_mappings_create.py +152 -0
  3. waldur_api_client/api/call_proposal_project_role_mappings/call_proposal_project_role_mappings_destroy.py +89 -0
  4. waldur_api_client/api/call_proposal_project_role_mappings/call_proposal_project_role_mappings_list.py +194 -0
  5. waldur_api_client/api/call_proposal_project_role_mappings/call_proposal_project_role_mappings_partial_update.py +166 -0
  6. waldur_api_client/api/call_proposal_project_role_mappings/call_proposal_project_role_mappings_retrieve.py +144 -0
  7. waldur_api_client/api/call_proposal_project_role_mappings/call_proposal_project_role_mappings_update.py +166 -0
  8. waldur_api_client/api/invoices/invoices_list.py +0 -30
  9. waldur_api_client/api/invoices/invoices_stats_list.py +0 -30
  10. waldur_api_client/api/marketplace_maintenance_announcement_offerings/__init__.py +1 -0
  11. waldur_api_client/api/marketplace_maintenance_announcement_offerings/marketplace_maintenance_announcement_offerings_create.py +152 -0
  12. waldur_api_client/api/marketplace_maintenance_announcement_offerings/marketplace_maintenance_announcement_offerings_destroy.py +89 -0
  13. waldur_api_client/api/marketplace_maintenance_announcement_offerings/marketplace_maintenance_announcement_offerings_list.py +175 -0
  14. waldur_api_client/api/marketplace_maintenance_announcement_offerings/marketplace_maintenance_announcement_offerings_partial_update.py +166 -0
  15. waldur_api_client/api/marketplace_maintenance_announcement_offerings/marketplace_maintenance_announcement_offerings_retrieve.py +144 -0
  16. waldur_api_client/api/marketplace_maintenance_announcement_offerings/marketplace_maintenance_announcement_offerings_update.py +166 -0
  17. waldur_api_client/api/marketplace_maintenance_announcement_template_offerings/__init__.py +1 -0
  18. waldur_api_client/api/marketplace_maintenance_announcement_template_offerings/marketplace_maintenance_announcement_template_offerings_create.py +152 -0
  19. waldur_api_client/api/marketplace_maintenance_announcement_template_offerings/marketplace_maintenance_announcement_template_offerings_destroy.py +89 -0
  20. waldur_api_client/api/marketplace_maintenance_announcement_template_offerings/marketplace_maintenance_announcement_template_offerings_list.py +175 -0
  21. waldur_api_client/api/marketplace_maintenance_announcement_template_offerings/marketplace_maintenance_announcement_template_offerings_partial_update.py +168 -0
  22. waldur_api_client/api/marketplace_maintenance_announcement_template_offerings/marketplace_maintenance_announcement_template_offerings_retrieve.py +144 -0
  23. waldur_api_client/api/marketplace_maintenance_announcement_template_offerings/marketplace_maintenance_announcement_template_offerings_update.py +166 -0
  24. waldur_api_client/api/marketplace_maintenance_announcements/__init__.py +1 -0
  25. waldur_api_client/api/{autoprovisioning_rule_plans/autoprovisioning_rule_plans_create.py → marketplace_maintenance_announcements/marketplace_maintenance_announcements_create.py} +25 -23
  26. waldur_api_client/api/marketplace_maintenance_announcements/marketplace_maintenance_announcements_destroy.py +89 -0
  27. waldur_api_client/api/{autoprovisioning_rule_plans/autoprovisioning_rule_plans_list.py → marketplace_maintenance_announcements/marketplace_maintenance_announcements_list.py} +15 -13
  28. waldur_api_client/api/{autoprovisioning_rule_plans/autoprovisioning_rule_plans_partial_update.py → marketplace_maintenance_announcements/marketplace_maintenance_announcements_partial_update.py} +25 -23
  29. waldur_api_client/api/{autoprovisioning_rule_plans/autoprovisioning_rule_plans_retrieve.py → marketplace_maintenance_announcements/marketplace_maintenance_announcements_retrieve.py} +15 -13
  30. waldur_api_client/api/{autoprovisioning_rule_plans/autoprovisioning_rule_plans_update.py → marketplace_maintenance_announcements/marketplace_maintenance_announcements_update.py} +25 -23
  31. waldur_api_client/api/marketplace_maintenance_announcements_template/__init__.py +1 -0
  32. waldur_api_client/api/marketplace_maintenance_announcements_template/marketplace_maintenance_announcements_template_create.py +152 -0
  33. waldur_api_client/api/marketplace_maintenance_announcements_template/marketplace_maintenance_announcements_template_destroy.py +89 -0
  34. waldur_api_client/api/marketplace_maintenance_announcements_template/marketplace_maintenance_announcements_template_list.py +175 -0
  35. waldur_api_client/api/marketplace_maintenance_announcements_template/marketplace_maintenance_announcements_template_partial_update.py +166 -0
  36. waldur_api_client/api/marketplace_maintenance_announcements_template/marketplace_maintenance_announcements_template_retrieve.py +144 -0
  37. waldur_api_client/api/marketplace_maintenance_announcements_template/marketplace_maintenance_announcements_template_update.py +166 -0
  38. waldur_api_client/api/{autoprovisioning_rule_plans/autoprovisioning_rule_plans_destroy.py → marketplace_plans/marketplace_plans_destroy.py} +1 -1
  39. waldur_api_client/api/marketplace_provider_offerings/marketplace_provider_offerings_update_offering_component.py +6 -6
  40. waldur_api_client/api/openstack_volume_types/openstack_volume_types_names_retrieve.py +118 -0
  41. waldur_api_client/models/__init__.py +52 -18
  42. waldur_api_client/models/constance_settings.py +22 -0
  43. waldur_api_client/models/constance_settings_request.py +22 -0
  44. waldur_api_client/models/event_types_enum.py +1 -0
  45. waldur_api_client/models/impact_level_enum.py +11 -0
  46. waldur_api_client/models/maintenance_announcement.py +225 -0
  47. waldur_api_client/models/maintenance_announcement_offering.py +112 -0
  48. waldur_api_client/models/maintenance_announcement_offering_request.py +95 -0
  49. waldur_api_client/models/maintenance_announcement_offering_template.py +112 -0
  50. waldur_api_client/models/maintenance_announcement_offering_template_request.py +95 -0
  51. waldur_api_client/models/maintenance_announcement_request.py +113 -0
  52. waldur_api_client/models/maintenance_announcement_state_enum.py +12 -0
  53. waldur_api_client/models/maintenance_announcement_template.py +134 -0
  54. waldur_api_client/models/maintenance_announcement_template_request.py +95 -0
  55. waldur_api_client/models/maintenance_type_enum.py +12 -0
  56. waldur_api_client/models/merged_plugin_options.py +1 -1
  57. waldur_api_client/models/merged_plugin_options_request.py +1 -1
  58. waldur_api_client/models/offering_component.py +15 -4
  59. waldur_api_client/models/patched_maintenance_announcement_offering_request.py +94 -0
  60. waldur_api_client/models/patched_maintenance_announcement_offering_template_request.py +94 -0
  61. waldur_api_client/models/patched_maintenance_announcement_request.py +128 -0
  62. waldur_api_client/models/patched_maintenance_announcement_template_request.py +94 -0
  63. waldur_api_client/models/patched_proposal_project_role_mapping_request.py +88 -0
  64. waldur_api_client/models/patched_protected_call_request.py +0 -17
  65. waldur_api_client/models/patched_rule_request.py +90 -1
  66. waldur_api_client/models/{patched_rule_plans_request_limits.py → patched_rule_request_plan_attributes.py} +5 -5
  67. waldur_api_client/models/patched_rule_request_plan_limits.py +44 -0
  68. waldur_api_client/models/proposal_project_role_mapping.py +122 -0
  69. waldur_api_client/models/proposal_project_role_mapping_request.py +89 -0
  70. waldur_api_client/models/proposal_protected_calls_list_field_item.py +0 -3
  71. waldur_api_client/models/proposal_protected_calls_retrieve_field_item.py +0 -3
  72. waldur_api_client/models/protected_call.py +0 -34
  73. waldur_api_client/models/protected_call_request.py +0 -17
  74. waldur_api_client/models/provider_offering_details.py +1 -1
  75. waldur_api_client/models/public_offering_details.py +1 -1
  76. waldur_api_client/models/rule.py +99 -7
  77. waldur_api_client/models/{rule_plans_attributes.py → rule_plan_attributes.py} +5 -5
  78. waldur_api_client/models/{rule_plans_limits.py → rule_plan_limits.py} +5 -5
  79. waldur_api_client/models/rule_request.py +89 -1
  80. waldur_api_client/models/{rule_plans_request_attributes.py → rule_request_plan_attributes.py} +5 -5
  81. waldur_api_client/models/{rule_plans_request_limits.py → rule_request_plan_limits.py} +5 -5
  82. waldur_api_client/models/update_offering_component_request.py +274 -0
  83. {waldur_api_client-7.6.8.dist-info → waldur_api_client-7.7.0.dist-info}/METADATA +1 -1
  84. {waldur_api_client-7.6.8.dist-info → waldur_api_client-7.7.0.dist-info}/RECORD +87 -40
  85. waldur_api_client/models/patched_rule_plans_request.py +0 -108
  86. waldur_api_client/models/patched_rule_plans_request_attributes.py +0 -44
  87. waldur_api_client/models/rule_plans.py +0 -126
  88. waldur_api_client/models/rule_plans_request.py +0 -109
  89. /waldur_api_client/api/{autoprovisioning_rule_plans → call_proposal_project_role_mappings}/__init__.py +0 -0
  90. {waldur_api_client-7.6.8.dist-info → waldur_api_client-7.7.0.dist-info}/LICENSE +0 -0
  91. {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.rule_plans import RulePlans
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/autoprovisioning-rule-plans/",
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(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> list["RulePlans"]:
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 = RulePlans.from_dict(response_200_item_data)
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["RulePlans"]]:
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["RulePlans"]]:
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['RulePlans']]
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["RulePlans"]:
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['RulePlans']
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["RulePlans"]]:
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['RulePlans']]
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["RulePlans"]:
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['RulePlans']
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.patched_rule_plans_request import PatchedRulePlansRequest
10
- from ...models.rule_plans import RulePlans
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: PatchedRulePlansRequest,
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/autoprovisioning-rule-plans/{uuid}/",
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) -> RulePlans:
34
+ def _parse_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> MaintenanceAnnouncement:
35
35
  if response.status_code == 200:
36
- response_200 = RulePlans.from_dict(response.json())
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(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Response[RulePlans]:
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: PatchedRulePlansRequest,
56
- ) -> Response[RulePlans]:
57
+ body: PatchedMaintenanceAnnouncementRequest,
58
+ ) -> Response[MaintenanceAnnouncement]:
57
59
  """
58
60
  Args:
59
61
  uuid (UUID):
60
- body (PatchedRulePlansRequest):
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[RulePlans]
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: PatchedRulePlansRequest,
87
- ) -> RulePlans:
88
+ body: PatchedMaintenanceAnnouncementRequest,
89
+ ) -> MaintenanceAnnouncement:
88
90
  """
89
91
  Args:
90
92
  uuid (UUID):
91
- body (PatchedRulePlansRequest):
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
- RulePlans
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: PatchedRulePlansRequest,
113
- ) -> Response[RulePlans]:
114
+ body: PatchedMaintenanceAnnouncementRequest,
115
+ ) -> Response[MaintenanceAnnouncement]:
114
116
  """
115
117
  Args:
116
118
  uuid (UUID):
117
- body (PatchedRulePlansRequest):
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[RulePlans]
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: PatchedRulePlansRequest,
142
- ) -> RulePlans:
143
+ body: PatchedMaintenanceAnnouncementRequest,
144
+ ) -> MaintenanceAnnouncement:
143
145
  """
144
146
  Args:
145
147
  uuid (UUID):
146
- body (PatchedRulePlansRequest):
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
- RulePlans
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.rule_plans import RulePlans
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/autoprovisioning-rule-plans/{uuid}/",
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) -> RulePlans:
24
+ def _parse_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> MaintenanceAnnouncement:
25
25
  if response.status_code == 200:
26
- response_200 = RulePlans.from_dict(response.json())
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(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Response[RulePlans]:
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[RulePlans]:
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[RulePlans]
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
- ) -> RulePlans:
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
- RulePlans
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[RulePlans]:
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[RulePlans]
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
- ) -> RulePlans:
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
- RulePlans
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.rule_plans import RulePlans
10
- from ...models.rule_plans_request import RulePlansRequest
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: RulePlansRequest,
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/autoprovisioning-rule-plans/{uuid}/",
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) -> RulePlans:
34
+ def _parse_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> MaintenanceAnnouncement:
35
35
  if response.status_code == 200:
36
- response_200 = RulePlans.from_dict(response.json())
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(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Response[RulePlans]:
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: RulePlansRequest,
56
- ) -> Response[RulePlans]:
57
+ body: MaintenanceAnnouncementRequest,
58
+ ) -> Response[MaintenanceAnnouncement]:
57
59
  """
58
60
  Args:
59
61
  uuid (UUID):
60
- body (RulePlansRequest):
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[RulePlans]
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: RulePlansRequest,
87
- ) -> RulePlans:
88
+ body: MaintenanceAnnouncementRequest,
89
+ ) -> MaintenanceAnnouncement:
88
90
  """
89
91
  Args:
90
92
  uuid (UUID):
91
- body (RulePlansRequest):
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
- RulePlans
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: RulePlansRequest,
113
- ) -> Response[RulePlans]:
114
+ body: MaintenanceAnnouncementRequest,
115
+ ) -> Response[MaintenanceAnnouncement]:
114
116
  """
115
117
  Args:
116
118
  uuid (UUID):
117
- body (RulePlansRequest):
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[RulePlans]
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: RulePlansRequest,
142
- ) -> RulePlans:
143
+ body: MaintenanceAnnouncementRequest,
144
+ ) -> MaintenanceAnnouncement:
143
145
  """
144
146
  Args:
145
147
  uuid (UUID):
146
- body (RulePlansRequest):
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
- RulePlans
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