ha-sdk-python 1.0.10__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.
Files changed (237) hide show
  1. ha_sdk_python/__init__.py +490 -0
  2. ha_sdk_python/api/__init__.py +15 -0
  3. ha_sdk_python/api/backups_api.py +2434 -0
  4. ha_sdk_python/api/console_access_api.py +334 -0
  5. ha_sdk_python/api/dns_api.py +896 -0
  6. ha_sdk_python/api/firewall_api.py +1534 -0
  7. ha_sdk_python/api/monitoring_api.py +1234 -0
  8. ha_sdk_python/api/power_management_api.py +2434 -0
  9. ha_sdk_python/api/security_api.py +1243 -0
  10. ha_sdk_python/api/service_management_api.py +1797 -0
  11. ha_sdk_python/api/snapshots_api.py +1534 -0
  12. ha_sdk_python/api/user_management_api.py +331 -0
  13. ha_sdk_python/api/vps_management_api.py +2399 -0
  14. ha_sdk_python/api_client.py +805 -0
  15. ha_sdk_python/api_response.py +21 -0
  16. ha_sdk_python/configuration.py +593 -0
  17. ha_sdk_python/exceptions.py +218 -0
  18. ha_sdk_python/models/__init__.py +227 -0
  19. ha_sdk_python/models/backup_create_response_data.py +97 -0
  20. ha_sdk_python/models/backup_creation_info.py +95 -0
  21. ha_sdk_python/models/backup_item.py +95 -0
  22. ha_sdk_python/models/backup_mode.py +89 -0
  23. ha_sdk_python/models/backup_mode_type.py +38 -0
  24. ha_sdk_python/models/backup_schedule.py +98 -0
  25. ha_sdk_python/models/backup_schedule_list_response_data.py +97 -0
  26. ha_sdk_python/models/bad_request_error_response_content.py +89 -0
  27. ha_sdk_python/models/billing_cycle.py +37 -0
  28. ha_sdk_python/models/cancel_vps_request_content.py +90 -0
  29. ha_sdk_python/models/cancel_vps_response_content.py +94 -0
  30. ha_sdk_python/models/catalogue_config_option.py +105 -0
  31. ha_sdk_python/models/catalogue_config_suboption.py +96 -0
  32. ha_sdk_python/models/catalogue_currency.py +91 -0
  33. ha_sdk_python/models/catalogue_data.py +107 -0
  34. ha_sdk_python/models/catalogue_group.py +99 -0
  35. ha_sdk_python/models/catalogue_plan.py +108 -0
  36. ha_sdk_python/models/catalogue_product.py +131 -0
  37. ha_sdk_python/models/change_password_request_content.py +90 -0
  38. ha_sdk_python/models/change_password_response_content.py +94 -0
  39. ha_sdk_python/models/compression_method.py +89 -0
  40. ha_sdk_python/models/compression_type.py +39 -0
  41. ha_sdk_python/models/create_backup_request_content.py +93 -0
  42. ha_sdk_python/models/create_backup_response_content.py +94 -0
  43. ha_sdk_python/models/create_backup_schedule_request_content.py +108 -0
  44. ha_sdk_python/models/create_backup_schedule_response_content.py +94 -0
  45. ha_sdk_python/models/create_firewall_rule_request_content.py +115 -0
  46. ha_sdk_python/models/create_firewall_rule_response_content.py +94 -0
  47. ha_sdk_python/models/create_notification_request_content.py +111 -0
  48. ha_sdk_python/models/create_notification_response_content.py +94 -0
  49. ha_sdk_python/models/create_order_domain_item.py +101 -0
  50. ha_sdk_python/models/create_order_items.py +105 -0
  51. ha_sdk_python/models/create_order_product.py +108 -0
  52. ha_sdk_python/models/create_order_product_item.py +101 -0
  53. ha_sdk_python/models/create_order_request_content.py +97 -0
  54. ha_sdk_python/models/create_order_response_content.py +94 -0
  55. ha_sdk_python/models/create_order_response_data.py +126 -0
  56. ha_sdk_python/models/create_order_total.py +91 -0
  57. ha_sdk_python/models/create_power_task_request_content.py +160 -0
  58. ha_sdk_python/models/create_power_task_response_content.py +94 -0
  59. ha_sdk_python/models/create_rdns_record_request_content.py +96 -0
  60. ha_sdk_python/models/create_rdns_record_response_content.py +94 -0
  61. ha_sdk_python/models/create_rdns_record_response_data.py +91 -0
  62. ha_sdk_python/models/create_snapshot_request_content.py +91 -0
  63. ha_sdk_python/models/create_snapshot_response_content.py +94 -0
  64. ha_sdk_python/models/day_of_week.py +42 -0
  65. ha_sdk_python/models/delete_backup_request_content.py +89 -0
  66. ha_sdk_python/models/delete_backup_response_content.py +94 -0
  67. ha_sdk_python/models/delete_backup_schedule_request_content.py +89 -0
  68. ha_sdk_python/models/delete_backup_schedule_response_content.py +94 -0
  69. ha_sdk_python/models/delete_firewall_rule_request_content.py +89 -0
  70. ha_sdk_python/models/delete_firewall_rule_response_content.py +94 -0
  71. ha_sdk_python/models/delete_notification_request_content.py +89 -0
  72. ha_sdk_python/models/delete_notification_response_content.py +94 -0
  73. ha_sdk_python/models/delete_power_task_request_content.py +89 -0
  74. ha_sdk_python/models/delete_power_task_response_content.py +94 -0
  75. ha_sdk_python/models/delete_rdns_record_request_content.py +88 -0
  76. ha_sdk_python/models/delete_rdns_record_response_content.py +94 -0
  77. ha_sdk_python/models/delete_snapshot_request_content.py +89 -0
  78. ha_sdk_python/models/delete_snapshot_response_content.py +94 -0
  79. ha_sdk_python/models/edit_backup_schedule_request_content.py +110 -0
  80. ha_sdk_python/models/edit_backup_schedule_response_content.py +94 -0
  81. ha_sdk_python/models/firewall_list_response_data.py +125 -0
  82. ha_sdk_python/models/firewall_move_direction.py +39 -0
  83. ha_sdk_python/models/firewall_move_response_data.py +91 -0
  84. ha_sdk_python/models/firewall_option.py +89 -0
  85. ha_sdk_python/models/firewall_rule.py +113 -0
  86. ha_sdk_python/models/firewall_rule_action.py +38 -0
  87. ha_sdk_python/models/firewall_rule_type.py +38 -0
  88. ha_sdk_python/models/forbidden_error_response_content.py +89 -0
  89. ha_sdk_python/models/get_catalogue_request_content.py +89 -0
  90. ha_sdk_python/models/get_catalogue_response_content.py +94 -0
  91. ha_sdk_python/models/get_no_vnc_console_request_content.py +87 -0
  92. ha_sdk_python/models/get_no_vnc_console_response_content.py +94 -0
  93. ha_sdk_python/models/get_private_ssh_key_request_content.py +87 -0
  94. ha_sdk_python/models/get_private_ssh_key_response_content.py +94 -0
  95. ha_sdk_python/models/get_public_ssh_key_request_content.py +87 -0
  96. ha_sdk_python/models/get_public_ssh_key_response_content.py +94 -0
  97. ha_sdk_python/models/get_vps_config_request_content.py +87 -0
  98. ha_sdk_python/models/get_vps_config_response_content.py +94 -0
  99. ha_sdk_python/models/get_vps_details_request_content.py +87 -0
  100. ha_sdk_python/models/get_vps_details_response_content.py +94 -0
  101. ha_sdk_python/models/internal_service_error_response_content.py +89 -0
  102. ha_sdk_python/models/invalid_state_error_response_content.py +89 -0
  103. ha_sdk_python/models/list_backup_schedules_request_content.py +87 -0
  104. ha_sdk_python/models/list_backup_schedules_response_content.py +94 -0
  105. ha_sdk_python/models/list_backups_request_content.py +87 -0
  106. ha_sdk_python/models/list_backups_response_content.py +94 -0
  107. ha_sdk_python/models/list_firewall_rules_request_content.py +87 -0
  108. ha_sdk_python/models/list_firewall_rules_response_content.py +94 -0
  109. ha_sdk_python/models/list_isos_request_content.py +87 -0
  110. ha_sdk_python/models/list_isos_response_content.py +94 -0
  111. ha_sdk_python/models/list_isos_response_data.py +89 -0
  112. ha_sdk_python/models/list_notifications_request_content.py +87 -0
  113. ha_sdk_python/models/list_notifications_response_content.py +94 -0
  114. ha_sdk_python/models/list_orders_response_content.py +94 -0
  115. ha_sdk_python/models/list_orders_response_data.py +95 -0
  116. ha_sdk_python/models/list_power_tasks_request_content.py +87 -0
  117. ha_sdk_python/models/list_power_tasks_response_content.py +94 -0
  118. ha_sdk_python/models/list_rdns_records_response_content.py +94 -0
  119. ha_sdk_python/models/list_rdns_response_data.py +115 -0
  120. ha_sdk_python/models/list_reinstall_os_request_content.py +87 -0
  121. ha_sdk_python/models/list_reinstall_os_response_content.py +94 -0
  122. ha_sdk_python/models/list_reinstall_os_response_data.py +89 -0
  123. ha_sdk_python/models/list_snapshots_request_content.py +87 -0
  124. ha_sdk_python/models/list_snapshots_response_content.py +94 -0
  125. ha_sdk_python/models/list_vps_services_data.py +95 -0
  126. ha_sdk_python/models/list_vps_services_response_content.py +94 -0
  127. ha_sdk_python/models/mount_iso_request_content.py +91 -0
  128. ha_sdk_python/models/mount_iso_response_content.py +94 -0
  129. ha_sdk_python/models/move_firewall_rule_request_content.py +94 -0
  130. ha_sdk_python/models/move_firewall_rule_response_content.py +94 -0
  131. ha_sdk_python/models/no_vnc_console_details.py +95 -0
  132. ha_sdk_python/models/no_vnc_console_response_data.py +93 -0
  133. ha_sdk_python/models/notification.py +105 -0
  134. ha_sdk_python/models/notification_create_response_data.py +93 -0
  135. ha_sdk_python/models/notification_dialog_rules.py +95 -0
  136. ha_sdk_python/models/notification_list_response_data.py +103 -0
  137. ha_sdk_python/models/notification_status.py +43 -0
  138. ha_sdk_python/models/operation_status.py +37 -0
  139. ha_sdk_python/models/order.py +109 -0
  140. ha_sdk_python/models/order_last_attempt.py +93 -0
  141. ha_sdk_python/models/order_warning.py +89 -0
  142. ha_sdk_python/models/payment_error.py +89 -0
  143. ha_sdk_python/models/payment_status.py +38 -0
  144. ha_sdk_python/models/power_task.py +105 -0
  145. ha_sdk_python/models/power_task_action.py +38 -0
  146. ha_sdk_python/models/power_task_create_response_data.py +93 -0
  147. ha_sdk_python/models/power_task_dialog_rules.py +95 -0
  148. ha_sdk_python/models/power_task_job_type.py +38 -0
  149. ha_sdk_python/models/power_task_list_response_data.py +107 -0
  150. ha_sdk_python/models/public_ssh_key_response_data.py +93 -0
  151. ha_sdk_python/models/rdns_available_item.py +111 -0
  152. ha_sdk_python/models/rdns_pool.py +89 -0
  153. ha_sdk_python/models/rdns_record.py +109 -0
  154. ha_sdk_python/models/reboot_vps_request_content.py +87 -0
  155. ha_sdk_python/models/reboot_vps_response_content.py +94 -0
  156. ha_sdk_python/models/resource_not_found_error_response_content.py +89 -0
  157. ha_sdk_python/models/restore_backup_request_content.py +89 -0
  158. ha_sdk_python/models/restore_backup_response_content.py +94 -0
  159. ha_sdk_python/models/retry_payment_request_content.py +89 -0
  160. ha_sdk_python/models/retry_payment_response_content.py +94 -0
  161. ha_sdk_python/models/retry_payment_response_data.py +98 -0
  162. ha_sdk_python/models/retry_payment_total.py +91 -0
  163. ha_sdk_python/models/rollback_snapshot_request_content.py +89 -0
  164. ha_sdk_python/models/rollback_snapshot_response_content.py +94 -0
  165. ha_sdk_python/models/service_backups_response_data.py +131 -0
  166. ha_sdk_python/models/service_snapshots_response_data.py +101 -0
  167. ha_sdk_python/models/service_unavailable_error_response_content.py +89 -0
  168. ha_sdk_python/models/shutdown_vps_request_content.py +87 -0
  169. ha_sdk_python/models/shutdown_vps_response_content.py +94 -0
  170. ha_sdk_python/models/snapshot_create_response_data.py +89 -0
  171. ha_sdk_python/models/snapshot_item.py +95 -0
  172. ha_sdk_python/models/ssh_key_details.py +89 -0
  173. ha_sdk_python/models/start_vps_request_content.py +87 -0
  174. ha_sdk_python/models/start_vps_response_content.py +94 -0
  175. ha_sdk_python/models/stop_vps_request_content.py +87 -0
  176. ha_sdk_python/models/stop_vps_response_content.py +94 -0
  177. ha_sdk_python/models/too_many_requests_error_response_content.py +89 -0
  178. ha_sdk_python/models/trigger_reinstall_request_content.py +89 -0
  179. ha_sdk_python/models/trigger_reinstall_response_content.py +94 -0
  180. ha_sdk_python/models/trigger_reinstall_response_data.py +89 -0
  181. ha_sdk_python/models/unauthorized_error_response_content.py +89 -0
  182. ha_sdk_python/models/update_firewall_rule_request_content.py +94 -0
  183. ha_sdk_python/models/update_firewall_rule_response_content.py +94 -0
  184. ha_sdk_python/models/update_notification_request_content.py +113 -0
  185. ha_sdk_python/models/update_notification_response_content.py +94 -0
  186. ha_sdk_python/models/update_power_task_request_content.py +164 -0
  187. ha_sdk_python/models/update_power_task_response_content.py +94 -0
  188. ha_sdk_python/models/update_snapshot_request_content.py +91 -0
  189. ha_sdk_python/models/update_snapshot_response_content.py +94 -0
  190. ha_sdk_python/models/update_ssh_keys_request_content.py +97 -0
  191. ha_sdk_python/models/update_ssh_keys_response_content.py +94 -0
  192. ha_sdk_python/models/update_vps_config_request_content.py +99 -0
  193. ha_sdk_python/models/update_vps_config_response_content.py +94 -0
  194. ha_sdk_python/models/user_change_password_details.py +91 -0
  195. ha_sdk_python/models/user_change_password_request_content.py +92 -0
  196. ha_sdk_python/models/user_change_password_response_content.py +94 -0
  197. ha_sdk_python/models/user_change_password_response_data.py +95 -0
  198. ha_sdk_python/models/validate_pricing_base.py +89 -0
  199. ha_sdk_python/models/validate_pricing_breakdown.py +103 -0
  200. ha_sdk_python/models/validate_pricing_config_item.py +116 -0
  201. ha_sdk_python/models/validate_pricing_currency.py +93 -0
  202. ha_sdk_python/models/validate_pricing_discount.py +97 -0
  203. ha_sdk_python/models/validate_pricing_plan_config.py +97 -0
  204. ha_sdk_python/models/validate_pricing_plan_pricing.py +89 -0
  205. ha_sdk_python/models/validate_pricing_price_range.py +91 -0
  206. ha_sdk_python/models/validate_pricing_product.py +101 -0
  207. ha_sdk_python/models/validate_pricing_product_result.py +121 -0
  208. ha_sdk_python/models/validate_pricing_prorata.py +95 -0
  209. ha_sdk_python/models/validate_pricing_request_content.py +97 -0
  210. ha_sdk_python/models/validate_pricing_response_content.py +94 -0
  211. ha_sdk_python/models/validate_pricing_response_data.py +109 -0
  212. ha_sdk_python/models/validate_pricing_summary.py +101 -0
  213. ha_sdk_python/models/validate_pricing_summary_recurring.py +91 -0
  214. ha_sdk_python/models/validation_error_response_content.py +89 -0
  215. ha_sdk_python/models/vps_available_features.py +115 -0
  216. ha_sdk_python/models/vps_bandwidth_info.py +94 -0
  217. ha_sdk_python/models/vps_cancel_response_data.py +93 -0
  218. ha_sdk_python/models/vps_cancel_type.py +37 -0
  219. ha_sdk_python/models/vps_config_response_data.py +108 -0
  220. ha_sdk_python/models/vps_cpu_info.py +92 -0
  221. ha_sdk_python/models/vps_credentials.py +89 -0
  222. ha_sdk_python/models/vps_details_response.py +143 -0
  223. ha_sdk_python/models/vps_disk_info.py +96 -0
  224. ha_sdk_python/models/vps_memory_info.py +96 -0
  225. ha_sdk_python/models/vps_network_rate.py +92 -0
  226. ha_sdk_python/models/vps_os_info.py +89 -0
  227. ha_sdk_python/models/vps_service_info.py +97 -0
  228. ha_sdk_python/models/vps_simple_action_response_data.py +87 -0
  229. ha_sdk_python/models/vps_vm_info.py +102 -0
  230. ha_sdk_python/py.typed +0 -0
  231. ha_sdk_python/rest.py +263 -0
  232. ha_sdk_python/retryable_paths.py +26 -0
  233. ha_sdk_python-1.0.10.dist-info/METADATA +131 -0
  234. ha_sdk_python-1.0.10.dist-info/RECORD +237 -0
  235. ha_sdk_python-1.0.10.dist-info/WHEEL +5 -0
  236. ha_sdk_python-1.0.10.dist-info/licenses/LICENSE +21 -0
  237. ha_sdk_python-1.0.10.dist-info/top_level.txt +1 -0
@@ -0,0 +1,89 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ HostAfricaApi
5
+
6
+ HostAfrica API
7
+
8
+ The version of the OpenAPI document: 2026-01-01
9
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
10
+
11
+ Do not edit the class manually.
12
+ """ # noqa: E501
13
+
14
+
15
+ from __future__ import annotations
16
+ import pprint
17
+ import re # noqa: F401
18
+ import json
19
+
20
+ from pydantic import BaseModel, ConfigDict, Field, StrictStr
21
+ from typing import Any, ClassVar, Dict, List
22
+ from typing import Optional, Set
23
+ from typing_extensions import Self
24
+
25
+ class TriggerReinstallRequestContent(BaseModel):
26
+ """
27
+ TriggerReinstallRequestContent
28
+ """ # noqa: E501
29
+ service_id: StrictStr = Field(description="Service ID - must be sent as a string")
30
+ template: StrictStr = Field(description="Template identifier for the OS to reinstall")
31
+ __properties: ClassVar[List[str]] = ["service_id", "template"]
32
+
33
+ model_config = ConfigDict(
34
+ populate_by_name=True,
35
+ validate_assignment=True,
36
+ protected_namespaces=(),
37
+ )
38
+
39
+
40
+ def to_str(self) -> str:
41
+ """Returns the string representation of the model using alias"""
42
+ return pprint.pformat(self.model_dump(by_alias=True))
43
+
44
+ def to_json(self) -> str:
45
+ """Returns the JSON representation of the model using alias"""
46
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
47
+ return json.dumps(self.to_dict())
48
+
49
+ @classmethod
50
+ def from_json(cls, json_str: str) -> Optional[Self]:
51
+ """Create an instance of TriggerReinstallRequestContent from a JSON string"""
52
+ return cls.from_dict(json.loads(json_str))
53
+
54
+ def to_dict(self) -> Dict[str, Any]:
55
+ """Return the dictionary representation of the model using alias.
56
+
57
+ This has the following differences from calling pydantic's
58
+ `self.model_dump(by_alias=True)`:
59
+
60
+ * `None` is only added to the output dict for nullable fields that
61
+ were set at model initialization. Other fields with value `None`
62
+ are ignored.
63
+ """
64
+ excluded_fields: Set[str] = set([
65
+ ])
66
+
67
+ _dict = self.model_dump(
68
+ by_alias=True,
69
+ exclude=excluded_fields,
70
+ exclude_none=True,
71
+ )
72
+ return _dict
73
+
74
+ @classmethod
75
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
76
+ """Create an instance of TriggerReinstallRequestContent from a dict"""
77
+ if obj is None:
78
+ return None
79
+
80
+ if not isinstance(obj, dict):
81
+ return cls.model_validate(obj)
82
+
83
+ _obj = cls.model_validate({
84
+ "service_id": obj.get("service_id"),
85
+ "template": obj.get("template")
86
+ })
87
+ return _obj
88
+
89
+
@@ -0,0 +1,94 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ HostAfricaApi
5
+
6
+ HostAfrica API
7
+
8
+ The version of the OpenAPI document: 2026-01-01
9
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
10
+
11
+ Do not edit the class manually.
12
+ """ # noqa: E501
13
+
14
+
15
+ from __future__ import annotations
16
+ import pprint
17
+ import re # noqa: F401
18
+ import json
19
+
20
+ from pydantic import BaseModel, ConfigDict
21
+ from typing import Any, ClassVar, Dict, List
22
+ from ha_sdk_python.models.operation_status import OperationStatus
23
+ from ha_sdk_python.models.trigger_reinstall_response_data import TriggerReinstallResponseData
24
+ from typing import Optional, Set
25
+ from typing_extensions import Self
26
+
27
+ class TriggerReinstallResponseContent(BaseModel):
28
+ """
29
+ TriggerReinstallResponseContent
30
+ """ # noqa: E501
31
+ status: OperationStatus
32
+ data: TriggerReinstallResponseData
33
+ __properties: ClassVar[List[str]] = ["status", "data"]
34
+
35
+ model_config = ConfigDict(
36
+ populate_by_name=True,
37
+ validate_assignment=True,
38
+ protected_namespaces=(),
39
+ )
40
+
41
+
42
+ def to_str(self) -> str:
43
+ """Returns the string representation of the model using alias"""
44
+ return pprint.pformat(self.model_dump(by_alias=True))
45
+
46
+ def to_json(self) -> str:
47
+ """Returns the JSON representation of the model using alias"""
48
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
49
+ return json.dumps(self.to_dict())
50
+
51
+ @classmethod
52
+ def from_json(cls, json_str: str) -> Optional[Self]:
53
+ """Create an instance of TriggerReinstallResponseContent from a JSON string"""
54
+ return cls.from_dict(json.loads(json_str))
55
+
56
+ def to_dict(self) -> Dict[str, Any]:
57
+ """Return the dictionary representation of the model using alias.
58
+
59
+ This has the following differences from calling pydantic's
60
+ `self.model_dump(by_alias=True)`:
61
+
62
+ * `None` is only added to the output dict for nullable fields that
63
+ were set at model initialization. Other fields with value `None`
64
+ are ignored.
65
+ """
66
+ excluded_fields: Set[str] = set([
67
+ ])
68
+
69
+ _dict = self.model_dump(
70
+ by_alias=True,
71
+ exclude=excluded_fields,
72
+ exclude_none=True,
73
+ )
74
+ # override the default output from pydantic by calling `to_dict()` of data
75
+ if self.data:
76
+ _dict['data'] = self.data.to_dict()
77
+ return _dict
78
+
79
+ @classmethod
80
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
81
+ """Create an instance of TriggerReinstallResponseContent from a dict"""
82
+ if obj is None:
83
+ return None
84
+
85
+ if not isinstance(obj, dict):
86
+ return cls.model_validate(obj)
87
+
88
+ _obj = cls.model_validate({
89
+ "status": obj.get("status"),
90
+ "data": TriggerReinstallResponseData.from_dict(obj["data"]) if obj.get("data") is not None else None
91
+ })
92
+ return _obj
93
+
94
+
@@ -0,0 +1,89 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ HostAfricaApi
5
+
6
+ HostAfrica API
7
+
8
+ The version of the OpenAPI document: 2026-01-01
9
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
10
+
11
+ Do not edit the class manually.
12
+ """ # noqa: E501
13
+
14
+
15
+ from __future__ import annotations
16
+ import pprint
17
+ import re # noqa: F401
18
+ import json
19
+
20
+ from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr
21
+ from typing import Any, ClassVar, Dict, List
22
+ from typing import Optional, Set
23
+ from typing_extensions import Self
24
+
25
+ class TriggerReinstallResponseData(BaseModel):
26
+ """
27
+ Response data for trigger reinstall operation
28
+ """ # noqa: E501
29
+ message: StrictStr = Field(description="Status message indicating the result")
30
+ task_id: StrictInt = Field(description="Task ID for the reinstall process")
31
+ __properties: ClassVar[List[str]] = ["message", "task_id"]
32
+
33
+ model_config = ConfigDict(
34
+ populate_by_name=True,
35
+ validate_assignment=True,
36
+ protected_namespaces=(),
37
+ )
38
+
39
+
40
+ def to_str(self) -> str:
41
+ """Returns the string representation of the model using alias"""
42
+ return pprint.pformat(self.model_dump(by_alias=True))
43
+
44
+ def to_json(self) -> str:
45
+ """Returns the JSON representation of the model using alias"""
46
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
47
+ return json.dumps(self.to_dict())
48
+
49
+ @classmethod
50
+ def from_json(cls, json_str: str) -> Optional[Self]:
51
+ """Create an instance of TriggerReinstallResponseData from a JSON string"""
52
+ return cls.from_dict(json.loads(json_str))
53
+
54
+ def to_dict(self) -> Dict[str, Any]:
55
+ """Return the dictionary representation of the model using alias.
56
+
57
+ This has the following differences from calling pydantic's
58
+ `self.model_dump(by_alias=True)`:
59
+
60
+ * `None` is only added to the output dict for nullable fields that
61
+ were set at model initialization. Other fields with value `None`
62
+ are ignored.
63
+ """
64
+ excluded_fields: Set[str] = set([
65
+ ])
66
+
67
+ _dict = self.model_dump(
68
+ by_alias=True,
69
+ exclude=excluded_fields,
70
+ exclude_none=True,
71
+ )
72
+ return _dict
73
+
74
+ @classmethod
75
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
76
+ """Create an instance of TriggerReinstallResponseData from a dict"""
77
+ if obj is None:
78
+ return None
79
+
80
+ if not isinstance(obj, dict):
81
+ return cls.model_validate(obj)
82
+
83
+ _obj = cls.model_validate({
84
+ "message": obj.get("message"),
85
+ "task_id": obj.get("task_id")
86
+ })
87
+ return _obj
88
+
89
+
@@ -0,0 +1,89 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ HostAfricaApi
5
+
6
+ HostAfrica API
7
+
8
+ The version of the OpenAPI document: 2026-01-01
9
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
10
+
11
+ Do not edit the class manually.
12
+ """ # noqa: E501
13
+
14
+
15
+ from __future__ import annotations
16
+ import pprint
17
+ import re # noqa: F401
18
+ import json
19
+
20
+ from pydantic import BaseModel, ConfigDict, Field, StrictStr
21
+ from typing import Any, ClassVar, Dict, List
22
+ from typing import Optional, Set
23
+ from typing_extensions import Self
24
+
25
+ class UnauthorizedErrorResponseContent(BaseModel):
26
+ """
27
+ UnauthorizedErrorResponseContent
28
+ """ # noqa: E501
29
+ message: StrictStr
30
+ data: Dict[str, Any] = Field(description="Empty object for operations that don't return data")
31
+ __properties: ClassVar[List[str]] = ["message", "data"]
32
+
33
+ model_config = ConfigDict(
34
+ populate_by_name=True,
35
+ validate_assignment=True,
36
+ protected_namespaces=(),
37
+ )
38
+
39
+
40
+ def to_str(self) -> str:
41
+ """Returns the string representation of the model using alias"""
42
+ return pprint.pformat(self.model_dump(by_alias=True))
43
+
44
+ def to_json(self) -> str:
45
+ """Returns the JSON representation of the model using alias"""
46
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
47
+ return json.dumps(self.to_dict())
48
+
49
+ @classmethod
50
+ def from_json(cls, json_str: str) -> Optional[Self]:
51
+ """Create an instance of UnauthorizedErrorResponseContent from a JSON string"""
52
+ return cls.from_dict(json.loads(json_str))
53
+
54
+ def to_dict(self) -> Dict[str, Any]:
55
+ """Return the dictionary representation of the model using alias.
56
+
57
+ This has the following differences from calling pydantic's
58
+ `self.model_dump(by_alias=True)`:
59
+
60
+ * `None` is only added to the output dict for nullable fields that
61
+ were set at model initialization. Other fields with value `None`
62
+ are ignored.
63
+ """
64
+ excluded_fields: Set[str] = set([
65
+ ])
66
+
67
+ _dict = self.model_dump(
68
+ by_alias=True,
69
+ exclude=excluded_fields,
70
+ exclude_none=True,
71
+ )
72
+ return _dict
73
+
74
+ @classmethod
75
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
76
+ """Create an instance of UnauthorizedErrorResponseContent from a dict"""
77
+ if obj is None:
78
+ return None
79
+
80
+ if not isinstance(obj, dict):
81
+ return cls.model_validate(obj)
82
+
83
+ _obj = cls.model_validate({
84
+ "message": obj.get("message"),
85
+ "data": obj.get("data")
86
+ })
87
+ return _obj
88
+
89
+
@@ -0,0 +1,94 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ HostAfricaApi
5
+
6
+ HostAfrica API
7
+
8
+ The version of the OpenAPI document: 2026-01-01
9
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
10
+
11
+ Do not edit the class manually.
12
+ """ # noqa: E501
13
+
14
+
15
+ from __future__ import annotations
16
+ import pprint
17
+ import re # noqa: F401
18
+ import json
19
+
20
+ from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr
21
+ from typing import Any, ClassVar, Dict, List, Optional
22
+ from ha_sdk_python.models.firewall_rule_action import FirewallRuleAction
23
+ from typing import Optional, Set
24
+ from typing_extensions import Self
25
+
26
+ class UpdateFirewallRuleRequestContent(BaseModel):
27
+ """
28
+ UpdateFirewallRuleRequestContent
29
+ """ # noqa: E501
30
+ service_id: StrictStr = Field(description="Service ID - must be sent as a string")
31
+ pos: StrictInt = Field(description="Position/index of the rule to update")
32
+ comment: Optional[StrictStr] = Field(default=None, description="Comment/description for the rule")
33
+ rule_action: Optional[FirewallRuleAction] = None
34
+ __properties: ClassVar[List[str]] = ["service_id", "pos", "comment", "rule_action"]
35
+
36
+ model_config = ConfigDict(
37
+ populate_by_name=True,
38
+ validate_assignment=True,
39
+ protected_namespaces=(),
40
+ )
41
+
42
+
43
+ def to_str(self) -> str:
44
+ """Returns the string representation of the model using alias"""
45
+ return pprint.pformat(self.model_dump(by_alias=True))
46
+
47
+ def to_json(self) -> str:
48
+ """Returns the JSON representation of the model using alias"""
49
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
50
+ return json.dumps(self.to_dict())
51
+
52
+ @classmethod
53
+ def from_json(cls, json_str: str) -> Optional[Self]:
54
+ """Create an instance of UpdateFirewallRuleRequestContent from a JSON string"""
55
+ return cls.from_dict(json.loads(json_str))
56
+
57
+ def to_dict(self) -> Dict[str, Any]:
58
+ """Return the dictionary representation of the model using alias.
59
+
60
+ This has the following differences from calling pydantic's
61
+ `self.model_dump(by_alias=True)`:
62
+
63
+ * `None` is only added to the output dict for nullable fields that
64
+ were set at model initialization. Other fields with value `None`
65
+ are ignored.
66
+ """
67
+ excluded_fields: Set[str] = set([
68
+ ])
69
+
70
+ _dict = self.model_dump(
71
+ by_alias=True,
72
+ exclude=excluded_fields,
73
+ exclude_none=True,
74
+ )
75
+ return _dict
76
+
77
+ @classmethod
78
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
79
+ """Create an instance of UpdateFirewallRuleRequestContent from a dict"""
80
+ if obj is None:
81
+ return None
82
+
83
+ if not isinstance(obj, dict):
84
+ return cls.model_validate(obj)
85
+
86
+ _obj = cls.model_validate({
87
+ "service_id": obj.get("service_id"),
88
+ "pos": obj.get("pos"),
89
+ "comment": obj.get("comment"),
90
+ "rule_action": obj.get("rule_action")
91
+ })
92
+ return _obj
93
+
94
+
@@ -0,0 +1,94 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ HostAfricaApi
5
+
6
+ HostAfrica API
7
+
8
+ The version of the OpenAPI document: 2026-01-01
9
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
10
+
11
+ Do not edit the class manually.
12
+ """ # noqa: E501
13
+
14
+
15
+ from __future__ import annotations
16
+ import pprint
17
+ import re # noqa: F401
18
+ import json
19
+
20
+ from pydantic import BaseModel, ConfigDict
21
+ from typing import Any, ClassVar, Dict, List
22
+ from ha_sdk_python.models.operation_status import OperationStatus
23
+ from ha_sdk_python.models.vps_simple_action_response_data import VpsSimpleActionResponseData
24
+ from typing import Optional, Set
25
+ from typing_extensions import Self
26
+
27
+ class UpdateFirewallRuleResponseContent(BaseModel):
28
+ """
29
+ UpdateFirewallRuleResponseContent
30
+ """ # noqa: E501
31
+ status: OperationStatus
32
+ data: VpsSimpleActionResponseData
33
+ __properties: ClassVar[List[str]] = ["status", "data"]
34
+
35
+ model_config = ConfigDict(
36
+ populate_by_name=True,
37
+ validate_assignment=True,
38
+ protected_namespaces=(),
39
+ )
40
+
41
+
42
+ def to_str(self) -> str:
43
+ """Returns the string representation of the model using alias"""
44
+ return pprint.pformat(self.model_dump(by_alias=True))
45
+
46
+ def to_json(self) -> str:
47
+ """Returns the JSON representation of the model using alias"""
48
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
49
+ return json.dumps(self.to_dict())
50
+
51
+ @classmethod
52
+ def from_json(cls, json_str: str) -> Optional[Self]:
53
+ """Create an instance of UpdateFirewallRuleResponseContent from a JSON string"""
54
+ return cls.from_dict(json.loads(json_str))
55
+
56
+ def to_dict(self) -> Dict[str, Any]:
57
+ """Return the dictionary representation of the model using alias.
58
+
59
+ This has the following differences from calling pydantic's
60
+ `self.model_dump(by_alias=True)`:
61
+
62
+ * `None` is only added to the output dict for nullable fields that
63
+ were set at model initialization. Other fields with value `None`
64
+ are ignored.
65
+ """
66
+ excluded_fields: Set[str] = set([
67
+ ])
68
+
69
+ _dict = self.model_dump(
70
+ by_alias=True,
71
+ exclude=excluded_fields,
72
+ exclude_none=True,
73
+ )
74
+ # override the default output from pydantic by calling `to_dict()` of data
75
+ if self.data:
76
+ _dict['data'] = self.data.to_dict()
77
+ return _dict
78
+
79
+ @classmethod
80
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
81
+ """Create an instance of UpdateFirewallRuleResponseContent from a dict"""
82
+ if obj is None:
83
+ return None
84
+
85
+ if not isinstance(obj, dict):
86
+ return cls.model_validate(obj)
87
+
88
+ _obj = cls.model_validate({
89
+ "status": obj.get("status"),
90
+ "data": VpsSimpleActionResponseData.from_dict(obj["data"]) if obj.get("data") is not None else None
91
+ })
92
+ return _obj
93
+
94
+
@@ -0,0 +1,113 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ HostAfricaApi
5
+
6
+ HostAfrica API
7
+
8
+ The version of the OpenAPI document: 2026-01-01
9
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
10
+
11
+ Do not edit the class manually.
12
+ """ # noqa: E501
13
+
14
+
15
+ from __future__ import annotations
16
+ import pprint
17
+ import re # noqa: F401
18
+ import json
19
+
20
+ from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr
21
+ from typing import Any, ClassVar, Dict, List, Optional
22
+ from typing_extensions import Annotated
23
+ from ha_sdk_python.models.notification_status import NotificationStatus
24
+ from typing import Optional, Set
25
+ from typing_extensions import Self
26
+
27
+ class UpdateNotificationRequestContent(BaseModel):
28
+ """
29
+ UpdateNotificationRequestContent
30
+ """ # noqa: E501
31
+ service_id: StrictStr = Field(description="Service ID - must be sent as a string")
32
+ notification_id: StrictInt = Field(description="Notification ID to update")
33
+ name: Optional[Annotated[str, Field(min_length=1, strict=True, max_length=255)]] = Field(default=None, description="Name/title for the notification")
34
+ status: Optional[NotificationStatus] = None
35
+ notification_interval: Optional[Annotated[int, Field(strict=True, ge=1)]] = Field(default=None, description="Notification interval in minutes (must be > 0)")
36
+ data_timeframe: Optional[Annotated[int, Field(strict=True, ge=1)]] = Field(default=None, description="Data timeframe in minutes (must be > 0)")
37
+ exceed_all: Optional[StrictBool] = Field(default=None, description="Whether all thresholds must be exceeded (true) or any one (false)")
38
+ email_address: Optional[List[StrictStr]] = Field(default=None, description="Email addresses for notifications (comma-separated string or array)")
39
+ cpu_usage: Optional[Annotated[int, Field(le=100, strict=True, ge=0)]] = Field(default=None, description="CPU usage threshold percentage (0-100)")
40
+ memory_usage: Optional[Annotated[int, Field(le=100, strict=True, ge=0)]] = Field(default=None, description="Memory usage threshold percentage (0-100)")
41
+ network_traffic: Optional[Annotated[int, Field(le=100, strict=True, ge=0)]] = Field(default=None, description="Network traffic threshold percentage (0-100)")
42
+ disk_read: Optional[Annotated[int, Field(le=100, strict=True, ge=0)]] = Field(default=None, description="Disk read threshold percentage (0-100)")
43
+ disk_write: Optional[Annotated[int, Field(le=100, strict=True, ge=0)]] = Field(default=None, description="Disk write threshold percentage (0-100)")
44
+ __properties: ClassVar[List[str]] = ["service_id", "notification_id", "name", "status", "notification_interval", "data_timeframe", "exceed_all", "email_address", "cpu_usage", "memory_usage", "network_traffic", "disk_read", "disk_write"]
45
+
46
+ model_config = ConfigDict(
47
+ populate_by_name=True,
48
+ validate_assignment=True,
49
+ protected_namespaces=(),
50
+ )
51
+
52
+
53
+ def to_str(self) -> str:
54
+ """Returns the string representation of the model using alias"""
55
+ return pprint.pformat(self.model_dump(by_alias=True))
56
+
57
+ def to_json(self) -> str:
58
+ """Returns the JSON representation of the model using alias"""
59
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
60
+ return json.dumps(self.to_dict())
61
+
62
+ @classmethod
63
+ def from_json(cls, json_str: str) -> Optional[Self]:
64
+ """Create an instance of UpdateNotificationRequestContent from a JSON string"""
65
+ return cls.from_dict(json.loads(json_str))
66
+
67
+ def to_dict(self) -> Dict[str, Any]:
68
+ """Return the dictionary representation of the model using alias.
69
+
70
+ This has the following differences from calling pydantic's
71
+ `self.model_dump(by_alias=True)`:
72
+
73
+ * `None` is only added to the output dict for nullable fields that
74
+ were set at model initialization. Other fields with value `None`
75
+ are ignored.
76
+ """
77
+ excluded_fields: Set[str] = set([
78
+ ])
79
+
80
+ _dict = self.model_dump(
81
+ by_alias=True,
82
+ exclude=excluded_fields,
83
+ exclude_none=True,
84
+ )
85
+ return _dict
86
+
87
+ @classmethod
88
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
89
+ """Create an instance of UpdateNotificationRequestContent from a dict"""
90
+ if obj is None:
91
+ return None
92
+
93
+ if not isinstance(obj, dict):
94
+ return cls.model_validate(obj)
95
+
96
+ _obj = cls.model_validate({
97
+ "service_id": obj.get("service_id"),
98
+ "notification_id": obj.get("notification_id"),
99
+ "name": obj.get("name"),
100
+ "status": obj.get("status"),
101
+ "notification_interval": obj.get("notification_interval"),
102
+ "data_timeframe": obj.get("data_timeframe"),
103
+ "exceed_all": obj.get("exceed_all"),
104
+ "email_address": obj.get("email_address"),
105
+ "cpu_usage": obj.get("cpu_usage"),
106
+ "memory_usage": obj.get("memory_usage"),
107
+ "network_traffic": obj.get("network_traffic"),
108
+ "disk_read": obj.get("disk_read"),
109
+ "disk_write": obj.get("disk_write")
110
+ })
111
+ return _obj
112
+
113
+