pidginhost-sdk 0.2.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.
Files changed (224) hide show
  1. pidginhost_sdk/__init__.py +467 -0
  2. pidginhost_sdk/api/__init__.py +14 -0
  3. pidginhost_sdk/api/account_api.py +10267 -0
  4. pidginhost_sdk/api/billing_api.py +9644 -0
  5. pidginhost_sdk/api/cloud_api.py +43062 -0
  6. pidginhost_sdk/api/dedicated_api.py +2838 -0
  7. pidginhost_sdk/api/domain_api.py +10505 -0
  8. pidginhost_sdk/api/freedns_api.py +3440 -0
  9. pidginhost_sdk/api/hosting_api.py +1674 -0
  10. pidginhost_sdk/api/kubernetes_api.py +31395 -0
  11. pidginhost_sdk/api/schema_api.py +605 -0
  12. pidginhost_sdk/api/support_api.py +4324 -0
  13. pidginhost_sdk/api_client.py +806 -0
  14. pidginhost_sdk/api_response.py +21 -0
  15. pidginhost_sdk/client.py +50 -0
  16. pidginhost_sdk/configuration.py +617 -0
  17. pidginhost_sdk/exceptions.py +219 -0
  18. pidginhost_sdk/models/__init__.py +217 -0
  19. pidginhost_sdk/models/activate_free_dns.py +93 -0
  20. pidginhost_sdk/models/activate_free_dns_response.py +92 -0
  21. pidginhost_sdk/models/activity_log_entry.py +90 -0
  22. pidginhost_sdk/models/activity_log_response.py +96 -0
  23. pidginhost_sdk/models/add_server_response.py +88 -0
  24. pidginhost_sdk/models/address.py +116 -0
  25. pidginhost_sdk/models/api_token_create.py +105 -0
  26. pidginhost_sdk/models/api_token_list.py +121 -0
  27. pidginhost_sdk/models/attach_ipv4.py +88 -0
  28. pidginhost_sdk/models/attach_ipv6.py +88 -0
  29. pidginhost_sdk/models/attach_volume.py +88 -0
  30. pidginhost_sdk/models/cancel_service_response.py +90 -0
  31. pidginhost_sdk/models/change_billing_cycle.py +88 -0
  32. pidginhost_sdk/models/change_billing_cycle_response.py +90 -0
  33. pidginhost_sdk/models/change_company.py +93 -0
  34. pidginhost_sdk/models/change_company_response.py +95 -0
  35. pidginhost_sdk/models/change_password.py +89 -0
  36. pidginhost_sdk/models/check_availability.py +89 -0
  37. pidginhost_sdk/models/cluster_add.py +104 -0
  38. pidginhost_sdk/models/cluster_add_response.py +88 -0
  39. pidginhost_sdk/models/cluster_detail.py +148 -0
  40. pidginhost_sdk/models/cluster_package.py +104 -0
  41. pidginhost_sdk/models/cluster_type.py +104 -0
  42. pidginhost_sdk/models/cluster_type_enum.py +38 -0
  43. pidginhost_sdk/models/company.py +111 -0
  44. pidginhost_sdk/models/connect_vm_request.py +88 -0
  45. pidginhost_sdk/models/connect_vm_response.py +90 -0
  46. pidginhost_sdk/models/connected_vm.py +92 -0
  47. pidginhost_sdk/models/connected_vms_response.py +96 -0
  48. pidginhost_sdk/models/console_token.py +90 -0
  49. pidginhost_sdk/models/contact_type_enum.py +40 -0
  50. pidginhost_sdk/models/contacts_update.py +91 -0
  51. pidginhost_sdk/models/contacts_update_response.py +88 -0
  52. pidginhost_sdk/models/country_enum.py +290 -0
  53. pidginhost_sdk/models/deactivate_free_dns.py +91 -0
  54. pidginhost_sdk/models/deactivate_free_dns_response.py +88 -0
  55. pidginhost_sdk/models/dedicated_rdns.py +91 -0
  56. pidginhost_sdk/models/dedicated_server.py +136 -0
  57. pidginhost_sdk/models/delete_record.py +88 -0
  58. pidginhost_sdk/models/delete_record_response.py +90 -0
  59. pidginhost_sdk/models/department.py +94 -0
  60. pidginhost_sdk/models/deposit.py +138 -0
  61. pidginhost_sdk/models/deposit_create.py +88 -0
  62. pidginhost_sdk/models/deposit_status_enum.py +40 -0
  63. pidginhost_sdk/models/destroy_protection.py +88 -0
  64. pidginhost_sdk/models/detach_ipv4.py +88 -0
  65. pidginhost_sdk/models/detach_ipv4_response.py +88 -0
  66. pidginhost_sdk/models/detach_ipv6.py +88 -0
  67. pidginhost_sdk/models/detach_ipv6_response.py +88 -0
  68. pidginhost_sdk/models/detach_volume.py +88 -0
  69. pidginhost_sdk/models/disconnect_vm_request.py +88 -0
  70. pidginhost_sdk/models/disconnect_vm_response.py +90 -0
  71. pidginhost_sdk/models/dns_record.py +154 -0
  72. pidginhost_sdk/models/dns_record_create.py +121 -0
  73. pidginhost_sdk/models/dns_record_create_type_enum.py +43 -0
  74. pidginhost_sdk/models/dns_record_mutate_response.py +94 -0
  75. pidginhost_sdk/models/domain.py +152 -0
  76. pidginhost_sdk/models/domain_cancel_response.py +90 -0
  77. pidginhost_sdk/models/domain_create.py +93 -0
  78. pidginhost_sdk/models/domain_registrant.py +131 -0
  79. pidginhost_sdk/models/email_history.py +107 -0
  80. pidginhost_sdk/models/feature_upgrade_request.py +90 -0
  81. pidginhost_sdk/models/feature_upgrade_response.py +90 -0
  82. pidginhost_sdk/models/features_enum.py +41 -0
  83. pidginhost_sdk/models/firewall_rule.py +119 -0
  84. pidginhost_sdk/models/firewall_rule_direction_enum.py +38 -0
  85. pidginhost_sdk/models/firewall_rules_set.py +114 -0
  86. pidginhost_sdk/models/firewall_rules_set_status_enum.py +39 -0
  87. pidginhost_sdk/models/free_dns_domain.py +98 -0
  88. pidginhost_sdk/models/funds_balance_response.py +122 -0
  89. pidginhost_sdk/models/funds_log.py +117 -0
  90. pidginhost_sdk/models/fw_policy_out_enum.py +39 -0
  91. pidginhost_sdk/models/hosting_change_password_response.py +88 -0
  92. pidginhost_sdk/models/hosting_service.py +136 -0
  93. pidginhost_sdk/models/http_route.py +129 -0
  94. pidginhost_sdk/models/invoice_detail.py +199 -0
  95. pidginhost_sdk/models/invoice_list.py +164 -0
  96. pidginhost_sdk/models/kube_upgrade_response.py +88 -0
  97. pidginhost_sdk/models/kube_version_enum.py +39 -0
  98. pidginhost_sdk/models/lb_firewall_rule.py +122 -0
  99. pidginhost_sdk/models/lb_firewall_rule_action_enum.py +39 -0
  100. pidginhost_sdk/models/lb_firewall_rule_direction_enum.py +38 -0
  101. pidginhost_sdk/models/low_balance_settings.py +114 -0
  102. pidginhost_sdk/models/nameservers_update.py +89 -0
  103. pidginhost_sdk/models/nameservers_update_response.py +88 -0
  104. pidginhost_sdk/models/node_metrics_response.py +100 -0
  105. pidginhost_sdk/models/node_rrd_response.py +90 -0
  106. pidginhost_sdk/models/notification_settings_response.py +115 -0
  107. pidginhost_sdk/models/operation_enum.py +46 -0
  108. pidginhost_sdk/models/os_image.py +108 -0
  109. pidginhost_sdk/models/paginated_api_token_list_list.py +112 -0
  110. pidginhost_sdk/models/paginated_cluster_detail_list.py +112 -0
  111. pidginhost_sdk/models/paginated_cluster_type_list.py +112 -0
  112. pidginhost_sdk/models/paginated_company_list.py +112 -0
  113. pidginhost_sdk/models/paginated_dedicated_server_list.py +112 -0
  114. pidginhost_sdk/models/paginated_deposit_list.py +112 -0
  115. pidginhost_sdk/models/paginated_domain_list.py +112 -0
  116. pidginhost_sdk/models/paginated_domain_registrant_list.py +112 -0
  117. pidginhost_sdk/models/paginated_email_history_list.py +112 -0
  118. pidginhost_sdk/models/paginated_funds_log_list.py +112 -0
  119. pidginhost_sdk/models/paginated_hosting_service_list.py +112 -0
  120. pidginhost_sdk/models/paginated_invoice_list_list.py +112 -0
  121. pidginhost_sdk/models/paginated_lb_firewall_rule_list.py +112 -0
  122. pidginhost_sdk/models/paginated_os_image_list.py +112 -0
  123. pidginhost_sdk/models/paginated_private_network_list.py +112 -0
  124. pidginhost_sdk/models/paginated_public_ipv4_list.py +112 -0
  125. pidginhost_sdk/models/paginated_public_ipv6_list.py +112 -0
  126. pidginhost_sdk/models/paginated_resource_pool_list.py +112 -0
  127. pidginhost_sdk/models/paginated_resource_pool_node_list.py +112 -0
  128. pidginhost_sdk/models/paginated_server_list.py +112 -0
  129. pidginhost_sdk/models/paginated_server_product_list.py +112 -0
  130. pidginhost_sdk/models/paginated_service_list_list.py +112 -0
  131. pidginhost_sdk/models/paginated_snapshot_list.py +112 -0
  132. pidginhost_sdk/models/paginated_ssh_key_list.py +112 -0
  133. pidginhost_sdk/models/paginated_storage_product_list.py +112 -0
  134. pidginhost_sdk/models/paginated_subscription_list.py +112 -0
  135. pidginhost_sdk/models/paginated_ticket_list_list.py +112 -0
  136. pidginhost_sdk/models/paginated_tld_list.py +112 -0
  137. pidginhost_sdk/models/patched_cluster_detail.py +151 -0
  138. pidginhost_sdk/models/patched_company.py +111 -0
  139. pidginhost_sdk/models/patched_domain.py +152 -0
  140. pidginhost_sdk/models/patched_domain_registrant.py +131 -0
  141. pidginhost_sdk/models/patched_firewall_rule.py +119 -0
  142. pidginhost_sdk/models/patched_firewall_rules_set.py +114 -0
  143. pidginhost_sdk/models/patched_http_route.py +129 -0
  144. pidginhost_sdk/models/patched_lb_firewall_rule.py +122 -0
  145. pidginhost_sdk/models/patched_private_network.py +112 -0
  146. pidginhost_sdk/models/patched_profile.py +107 -0
  147. pidginhost_sdk/models/patched_resource_pool.py +113 -0
  148. pidginhost_sdk/models/patched_ssh_key.py +101 -0
  149. pidginhost_sdk/models/patched_tcp_route.py +125 -0
  150. pidginhost_sdk/models/patched_udp_route.py +125 -0
  151. pidginhost_sdk/models/patched_volume.py +107 -0
  152. pidginhost_sdk/models/pay_with_funds_response.py +98 -0
  153. pidginhost_sdk/models/power_action.py +89 -0
  154. pidginhost_sdk/models/power_action_action_enum.py +40 -0
  155. pidginhost_sdk/models/power_action_response.py +88 -0
  156. pidginhost_sdk/models/power_management.py +88 -0
  157. pidginhost_sdk/models/power_management_request.py +89 -0
  158. pidginhost_sdk/models/power_management_request_action_enum.py +40 -0
  159. pidginhost_sdk/models/priority3cd_enum.py +39 -0
  160. pidginhost_sdk/models/private_network.py +112 -0
  161. pidginhost_sdk/models/private_network_add_host.py +90 -0
  162. pidginhost_sdk/models/private_network_remove_host.py +88 -0
  163. pidginhost_sdk/models/profile.py +104 -0
  164. pidginhost_sdk/models/public_interface.py +110 -0
  165. pidginhost_sdk/models/public_ipv4.py +114 -0
  166. pidginhost_sdk/models/public_ipv6.py +114 -0
  167. pidginhost_sdk/models/rdns_update_response.py +88 -0
  168. pidginhost_sdk/models/reinstall.py +88 -0
  169. pidginhost_sdk/models/reinstall_response.py +88 -0
  170. pidginhost_sdk/models/remove_server_response.py +88 -0
  171. pidginhost_sdk/models/renew_domain.py +89 -0
  172. pidginhost_sdk/models/resource_pool.py +113 -0
  173. pidginhost_sdk/models/resource_pool_add.py +91 -0
  174. pidginhost_sdk/models/resource_pool_add_response.py +88 -0
  175. pidginhost_sdk/models/resource_pool_node.py +96 -0
  176. pidginhost_sdk/models/retry_provision.py +88 -0
  177. pidginhost_sdk/models/reverse_dns.py +89 -0
  178. pidginhost_sdk/models/scope_enum.py +38 -0
  179. pidginhost_sdk/models/server.py +130 -0
  180. pidginhost_sdk/models/server_add.py +128 -0
  181. pidginhost_sdk/models/server_add_response.py +88 -0
  182. pidginhost_sdk/models/server_product.py +104 -0
  183. pidginhost_sdk/models/server_product_upgrade.py +88 -0
  184. pidginhost_sdk/models/server_upgrade_response.py +88 -0
  185. pidginhost_sdk/models/server_usage_response.py +96 -0
  186. pidginhost_sdk/models/service.py +153 -0
  187. pidginhost_sdk/models/service_list.py +132 -0
  188. pidginhost_sdk/models/snapshot.py +104 -0
  189. pidginhost_sdk/models/snapshot_create.py +100 -0
  190. pidginhost_sdk/models/snapshot_create_queued.py +88 -0
  191. pidginhost_sdk/models/snapshot_delete_queued.py +88 -0
  192. pidginhost_sdk/models/snapshot_rollback_queued.py +88 -0
  193. pidginhost_sdk/models/source_enum.py +38 -0
  194. pidginhost_sdk/models/ssh_key.py +101 -0
  195. pidginhost_sdk/models/status03c_enum.py +43 -0
  196. pidginhost_sdk/models/status63a_enum.py +44 -0
  197. pidginhost_sdk/models/status_a57_enum.py +48 -0
  198. pidginhost_sdk/models/status_ef2_enum.py +40 -0
  199. pidginhost_sdk/models/storage_product.py +129 -0
  200. pidginhost_sdk/models/subscription.py +142 -0
  201. pidginhost_sdk/models/subscription_status_enum.py +40 -0
  202. pidginhost_sdk/models/talos_upgrade_response.py +88 -0
  203. pidginhost_sdk/models/tcp_route.py +125 -0
  204. pidginhost_sdk/models/threshold_type_enum.py +39 -0
  205. pidginhost_sdk/models/ticket_close_response.py +90 -0
  206. pidginhost_sdk/models/ticket_create.py +110 -0
  207. pidginhost_sdk/models/ticket_create_priority_enum.py +39 -0
  208. pidginhost_sdk/models/ticket_detail.py +125 -0
  209. pidginhost_sdk/models/ticket_list.py +117 -0
  210. pidginhost_sdk/models/ticket_reopen_response.py +90 -0
  211. pidginhost_sdk/models/ticket_reply.py +95 -0
  212. pidginhost_sdk/models/ticket_reply_response.py +88 -0
  213. pidginhost_sdk/models/tld.py +146 -0
  214. pidginhost_sdk/models/toggle_auto_payment_response.py +90 -0
  215. pidginhost_sdk/models/transfer_ro_domain.py +91 -0
  216. pidginhost_sdk/models/type2fa_enum.py +38 -0
  217. pidginhost_sdk/models/udp_route.py +125 -0
  218. pidginhost_sdk/models/volume.py +107 -0
  219. pidginhost_sdk/py.typed +0 -0
  220. pidginhost_sdk/rest.py +264 -0
  221. pidginhost_sdk-0.2.0.dist-info/METADATA +805 -0
  222. pidginhost_sdk-0.2.0.dist-info/RECORD +224 -0
  223. pidginhost_sdk-0.2.0.dist-info/WHEEL +5 -0
  224. pidginhost_sdk-0.2.0.dist-info/top_level.txt +1 -0
@@ -0,0 +1,96 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ Pidgin Host API
5
+
6
+ The Pidgin Host API allows you to manage Services and resources within the Pidgin Host cloud in a simple, programmatic way using conventional HTTP requests. All of the functionality that you are familiar with in the Pidgin Host control panel is also available through the API, allowing you to script the complex actions that your situation requires.
7
+
8
+ The version of the OpenAPI document: 1.0.0 (v1)
9
+ Contact: support@pidginhost.com
10
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
11
+
12
+ Do not edit the class manually.
13
+ """ # noqa: E501
14
+
15
+
16
+ from __future__ import annotations
17
+ import pprint
18
+ import re # noqa: F401
19
+ import json
20
+
21
+ from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr
22
+ from typing import Any, ClassVar, Dict, List
23
+ from typing import Optional, Set
24
+ from typing_extensions import Self
25
+
26
+ class ResourcePoolNode(BaseModel):
27
+ """
28
+ ResourcePoolNode
29
+ """ # noqa: E501
30
+ id: StrictInt
31
+ name: StrictStr
32
+ ip: StrictStr
33
+ __properties: ClassVar[List[str]] = ["id", "name", "ip"]
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 ResourcePoolNode 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
+ * OpenAPI `readOnly` fields are excluded.
66
+ * OpenAPI `readOnly` fields are excluded.
67
+ """
68
+ excluded_fields: Set[str] = set([
69
+ "id",
70
+ "ip",
71
+ ])
72
+
73
+ _dict = self.model_dump(
74
+ by_alias=True,
75
+ exclude=excluded_fields,
76
+ exclude_none=True,
77
+ )
78
+ return _dict
79
+
80
+ @classmethod
81
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
82
+ """Create an instance of ResourcePoolNode from a dict"""
83
+ if obj is None:
84
+ return None
85
+
86
+ if not isinstance(obj, dict):
87
+ return cls.model_validate(obj)
88
+
89
+ _obj = cls.model_validate({
90
+ "id": obj.get("id"),
91
+ "name": obj.get("name"),
92
+ "ip": obj.get("ip")
93
+ })
94
+ return _obj
95
+
96
+
@@ -0,0 +1,88 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ Pidgin Host API
5
+
6
+ The Pidgin Host API allows you to manage Services and resources within the Pidgin Host cloud in a simple, programmatic way using conventional HTTP requests. All of the functionality that you are familiar with in the Pidgin Host control panel is also available through the API, allowing you to script the complex actions that your situation requires.
7
+
8
+ The version of the OpenAPI document: 1.0.0 (v1)
9
+ Contact: support@pidginhost.com
10
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
11
+
12
+ Do not edit the class manually.
13
+ """ # noqa: E501
14
+
15
+
16
+ from __future__ import annotations
17
+ import pprint
18
+ import re # noqa: F401
19
+ import json
20
+
21
+ from pydantic import BaseModel, ConfigDict, StrictBool
22
+ from typing import Any, ClassVar, Dict, List
23
+ from typing import Optional, Set
24
+ from typing_extensions import Self
25
+
26
+ class RetryProvision(BaseModel):
27
+ """
28
+ RetryProvision
29
+ """ # noqa: E501
30
+ retry: StrictBool
31
+ __properties: ClassVar[List[str]] = ["retry"]
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 RetryProvision 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 RetryProvision 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
+ "retry": obj.get("retry")
85
+ })
86
+ return _obj
87
+
88
+
@@ -0,0 +1,89 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ Pidgin Host API
5
+
6
+ The Pidgin Host API allows you to manage Services and resources within the Pidgin Host cloud in a simple, programmatic way using conventional HTTP requests. All of the functionality that you are familiar with in the Pidgin Host control panel is also available through the API, allowing you to script the complex actions that your situation requires.
7
+
8
+ The version of the OpenAPI document: 1.0.0 (v1)
9
+ Contact: support@pidginhost.com
10
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
11
+
12
+ Do not edit the class manually.
13
+ """ # noqa: E501
14
+
15
+
16
+ from __future__ import annotations
17
+ import pprint
18
+ import re # noqa: F401
19
+ import json
20
+
21
+ from pydantic import BaseModel, ConfigDict, Field
22
+ from typing import Any, ClassVar, Dict, List
23
+ from typing_extensions import Annotated
24
+ from typing import Optional, Set
25
+ from typing_extensions import Self
26
+
27
+ class ReverseDNS(BaseModel):
28
+ """
29
+ ReverseDNS
30
+ """ # noqa: E501
31
+ reverse_dns: Annotated[str, Field(strict=True, max_length=200)] = Field(description="Fully-qualified domain name for PTR record (e.g., host.example.com)")
32
+ __properties: ClassVar[List[str]] = ["reverse_dns"]
33
+
34
+ model_config = ConfigDict(
35
+ populate_by_name=True,
36
+ validate_assignment=True,
37
+ protected_namespaces=(),
38
+ )
39
+
40
+
41
+ def to_str(self) -> str:
42
+ """Returns the string representation of the model using alias"""
43
+ return pprint.pformat(self.model_dump(by_alias=True))
44
+
45
+ def to_json(self) -> str:
46
+ """Returns the JSON representation of the model using alias"""
47
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
48
+ return json.dumps(self.to_dict())
49
+
50
+ @classmethod
51
+ def from_json(cls, json_str: str) -> Optional[Self]:
52
+ """Create an instance of ReverseDNS from a JSON string"""
53
+ return cls.from_dict(json.loads(json_str))
54
+
55
+ def to_dict(self) -> Dict[str, Any]:
56
+ """Return the dictionary representation of the model using alias.
57
+
58
+ This has the following differences from calling pydantic's
59
+ `self.model_dump(by_alias=True)`:
60
+
61
+ * `None` is only added to the output dict for nullable fields that
62
+ were set at model initialization. Other fields with value `None`
63
+ are ignored.
64
+ """
65
+ excluded_fields: Set[str] = set([
66
+ ])
67
+
68
+ _dict = self.model_dump(
69
+ by_alias=True,
70
+ exclude=excluded_fields,
71
+ exclude_none=True,
72
+ )
73
+ return _dict
74
+
75
+ @classmethod
76
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
77
+ """Create an instance of ReverseDNS from a dict"""
78
+ if obj is None:
79
+ return None
80
+
81
+ if not isinstance(obj, dict):
82
+ return cls.model_validate(obj)
83
+
84
+ _obj = cls.model_validate({
85
+ "reverse_dns": obj.get("reverse_dns")
86
+ })
87
+ return _obj
88
+
89
+
@@ -0,0 +1,38 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ Pidgin Host API
5
+
6
+ The Pidgin Host API allows you to manage Services and resources within the Pidgin Host cloud in a simple, programmatic way using conventional HTTP requests. All of the functionality that you are familiar with in the Pidgin Host control panel is also available through the API, allowing you to script the complex actions that your situation requires.
7
+
8
+ The version of the OpenAPI document: 1.0.0 (v1)
9
+ Contact: support@pidginhost.com
10
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
11
+
12
+ Do not edit the class manually.
13
+ """ # noqa: E501
14
+
15
+
16
+ from __future__ import annotations
17
+ import json
18
+ from enum import Enum
19
+ from typing_extensions import Self
20
+
21
+
22
+ class ScopeEnum(str, Enum):
23
+ """
24
+ * `read_only` - Read only * `read_write` - Read & Write
25
+ """
26
+
27
+ """
28
+ allowed enum values
29
+ """
30
+ READ_ONLY = 'read_only'
31
+ READ_WRITE = 'read_write'
32
+
33
+ @classmethod
34
+ def from_json(cls, json_str: str) -> Self:
35
+ """Create an instance of ScopeEnum from a JSON string"""
36
+ return cls(json.loads(json_str))
37
+
38
+
@@ -0,0 +1,130 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ Pidgin Host API
5
+
6
+ The Pidgin Host API allows you to manage Services and resources within the Pidgin Host cloud in a simple, programmatic way using conventional HTTP requests. All of the functionality that you are familiar with in the Pidgin Host control panel is also available through the API, allowing you to script the complex actions that your situation requires.
7
+
8
+ The version of the OpenAPI document: 1.0.0 (v1)
9
+ Contact: support@pidginhost.com
10
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
11
+
12
+ Do not edit the class manually.
13
+ """ # noqa: E501
14
+
15
+
16
+ from __future__ import annotations
17
+ import pprint
18
+ import re # noqa: F401
19
+ import json
20
+
21
+ from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr
22
+ from typing import Any, ClassVar, Dict, List, Optional
23
+ from typing_extensions import Annotated
24
+ from pidginhost_sdk.models.status_a57_enum import StatusA57Enum
25
+ from typing import Optional, Set
26
+ from typing_extensions import Self
27
+
28
+ class Server(BaseModel):
29
+ """
30
+ Server
31
+ """ # noqa: E501
32
+ id: StrictInt
33
+ hostname: Optional[Annotated[str, Field(strict=True, max_length=200)]] = None
34
+ project: Optional[Annotated[str, Field(strict=True, max_length=200)]] = None
35
+ image: StrictStr
36
+ package: StrictStr
37
+ cpus: StrictStr
38
+ memory: StrictStr
39
+ disk_size: StrictStr
40
+ status: Optional[StatusA57Enum] = None
41
+ destroy_protection: StrictBool = Field(description="Prevents the server from being destroyed until disabled.")
42
+ ha_enabled: StrictBool = Field(description="Enables Proxmox HA — automatic restart and migration on node failure.")
43
+ networks: Dict[str, Any]
44
+ __properties: ClassVar[List[str]] = ["id", "hostname", "project", "image", "package", "cpus", "memory", "disk_size", "status", "destroy_protection", "ha_enabled", "networks"]
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 Server 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
+ * OpenAPI `readOnly` fields are excluded.
77
+ * OpenAPI `readOnly` fields are excluded.
78
+ * OpenAPI `readOnly` fields are excluded.
79
+ * OpenAPI `readOnly` fields are excluded.
80
+ * OpenAPI `readOnly` fields are excluded.
81
+ * OpenAPI `readOnly` fields are excluded.
82
+ * OpenAPI `readOnly` fields are excluded.
83
+ * OpenAPI `readOnly` fields are excluded.
84
+ * OpenAPI `readOnly` fields are excluded.
85
+ """
86
+ excluded_fields: Set[str] = set([
87
+ "id",
88
+ "image",
89
+ "package",
90
+ "cpus",
91
+ "memory",
92
+ "disk_size",
93
+ "destroy_protection",
94
+ "ha_enabled",
95
+ "networks",
96
+ ])
97
+
98
+ _dict = self.model_dump(
99
+ by_alias=True,
100
+ exclude=excluded_fields,
101
+ exclude_none=True,
102
+ )
103
+ return _dict
104
+
105
+ @classmethod
106
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
107
+ """Create an instance of Server from a dict"""
108
+ if obj is None:
109
+ return None
110
+
111
+ if not isinstance(obj, dict):
112
+ return cls.model_validate(obj)
113
+
114
+ _obj = cls.model_validate({
115
+ "id": obj.get("id"),
116
+ "hostname": obj.get("hostname"),
117
+ "project": obj.get("project"),
118
+ "image": obj.get("image"),
119
+ "package": obj.get("package"),
120
+ "cpus": obj.get("cpus"),
121
+ "memory": obj.get("memory"),
122
+ "disk_size": obj.get("disk_size"),
123
+ "status": obj.get("status"),
124
+ "destroy_protection": obj.get("destroy_protection"),
125
+ "ha_enabled": obj.get("ha_enabled"),
126
+ "networks": obj.get("networks")
127
+ })
128
+ return _obj
129
+
130
+
@@ -0,0 +1,128 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ Pidgin Host API
5
+
6
+ The Pidgin Host API allows you to manage Services and resources within the Pidgin Host cloud in a simple, programmatic way using conventional HTTP requests. All of the functionality that you are familiar with in the Pidgin Host control panel is also available through the API, allowing you to script the complex actions that your situation requires.
7
+
8
+ The version of the OpenAPI document: 1.0.0 (v1)
9
+ Contact: support@pidginhost.com
10
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
11
+
12
+ Do not edit the class manually.
13
+ """ # noqa: E501
14
+
15
+
16
+ from __future__ import annotations
17
+ import pprint
18
+ import re # noqa: F401
19
+ import json
20
+
21
+ from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr
22
+ from typing import Any, ClassVar, Dict, List, Optional
23
+ from typing_extensions import Annotated
24
+ from pidginhost_sdk.models.fw_policy_out_enum import FwPolicyOutEnum
25
+ from typing import Optional, Set
26
+ from typing_extensions import Self
27
+
28
+ class ServerAdd(BaseModel):
29
+ """
30
+ ServerAdd
31
+ """ # noqa: E501
32
+ image: StrictStr = Field(description="ID or slug")
33
+ package: StrictStr = Field(description="ID or slug")
34
+ hostname: Optional[Annotated[str, Field(strict=True, max_length=253)]] = None
35
+ project: Optional[Annotated[str, Field(strict=True, max_length=200)]] = None
36
+ password: Optional[Annotated[str, Field(strict=True, max_length=50)]] = None
37
+ ssh_pub_key: Optional[Annotated[str, Field(strict=True, max_length=3000)]] = Field(default=None, description="New SSH key")
38
+ ssh_pub_key_id: Optional[Annotated[str, Field(strict=True, max_length=100)]] = Field(default=None, description="ID or fingerprint")
39
+ public_ip: Optional[StrictStr] = Field(default=None, description="ID or slug")
40
+ new_ipv4: Optional[StrictBool] = None
41
+ public_ipv6: Optional[StrictStr] = Field(default=None, description="ID or slug")
42
+ new_ipv6: Optional[StrictBool] = None
43
+ fw_rules_set: Optional[StrictStr] = Field(default=None, description="ID or slug")
44
+ fw_policy_in: Optional[FwPolicyOutEnum] = None
45
+ fw_policy_out: Optional[FwPolicyOutEnum] = None
46
+ private_network: Optional[StrictStr] = Field(default=None, description="ID or slug")
47
+ private_address: Optional[StrictStr] = Field(default=None, description="Leave empty for auto-assign")
48
+ extra_volume_product: Optional[StrictStr] = Field(default=None, description="ID or slug")
49
+ extra_volume_size: Optional[Annotated[int, Field(strict=True, ge=0)]] = 0
50
+ no_network_acknowledged: Optional[StrictBool] = None
51
+ enable_ha: Optional[StrictBool] = False
52
+ __properties: ClassVar[List[str]] = ["image", "package", "hostname", "project", "password", "ssh_pub_key", "ssh_pub_key_id", "public_ip", "new_ipv4", "public_ipv6", "new_ipv6", "fw_rules_set", "fw_policy_in", "fw_policy_out", "private_network", "private_address", "extra_volume_product", "extra_volume_size", "no_network_acknowledged", "enable_ha"]
53
+
54
+ model_config = ConfigDict(
55
+ populate_by_name=True,
56
+ validate_assignment=True,
57
+ protected_namespaces=(),
58
+ )
59
+
60
+
61
+ def to_str(self) -> str:
62
+ """Returns the string representation of the model using alias"""
63
+ return pprint.pformat(self.model_dump(by_alias=True))
64
+
65
+ def to_json(self) -> str:
66
+ """Returns the JSON representation of the model using alias"""
67
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
68
+ return json.dumps(self.to_dict())
69
+
70
+ @classmethod
71
+ def from_json(cls, json_str: str) -> Optional[Self]:
72
+ """Create an instance of ServerAdd from a JSON string"""
73
+ return cls.from_dict(json.loads(json_str))
74
+
75
+ def to_dict(self) -> Dict[str, Any]:
76
+ """Return the dictionary representation of the model using alias.
77
+
78
+ This has the following differences from calling pydantic's
79
+ `self.model_dump(by_alias=True)`:
80
+
81
+ * `None` is only added to the output dict for nullable fields that
82
+ were set at model initialization. Other fields with value `None`
83
+ are ignored.
84
+ """
85
+ excluded_fields: Set[str] = set([
86
+ ])
87
+
88
+ _dict = self.model_dump(
89
+ by_alias=True,
90
+ exclude=excluded_fields,
91
+ exclude_none=True,
92
+ )
93
+ return _dict
94
+
95
+ @classmethod
96
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
97
+ """Create an instance of ServerAdd from a dict"""
98
+ if obj is None:
99
+ return None
100
+
101
+ if not isinstance(obj, dict):
102
+ return cls.model_validate(obj)
103
+
104
+ _obj = cls.model_validate({
105
+ "image": obj.get("image"),
106
+ "package": obj.get("package"),
107
+ "hostname": obj.get("hostname"),
108
+ "project": obj.get("project"),
109
+ "password": obj.get("password"),
110
+ "ssh_pub_key": obj.get("ssh_pub_key"),
111
+ "ssh_pub_key_id": obj.get("ssh_pub_key_id"),
112
+ "public_ip": obj.get("public_ip"),
113
+ "new_ipv4": obj.get("new_ipv4"),
114
+ "public_ipv6": obj.get("public_ipv6"),
115
+ "new_ipv6": obj.get("new_ipv6"),
116
+ "fw_rules_set": obj.get("fw_rules_set"),
117
+ "fw_policy_in": obj.get("fw_policy_in"),
118
+ "fw_policy_out": obj.get("fw_policy_out"),
119
+ "private_network": obj.get("private_network"),
120
+ "private_address": obj.get("private_address"),
121
+ "extra_volume_product": obj.get("extra_volume_product"),
122
+ "extra_volume_size": obj.get("extra_volume_size") if obj.get("extra_volume_size") is not None else 0,
123
+ "no_network_acknowledged": obj.get("no_network_acknowledged"),
124
+ "enable_ha": obj.get("enable_ha") if obj.get("enable_ha") is not None else False
125
+ })
126
+ return _obj
127
+
128
+
@@ -0,0 +1,88 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ Pidgin Host API
5
+
6
+ The Pidgin Host API allows you to manage Services and resources within the Pidgin Host cloud in a simple, programmatic way using conventional HTTP requests. All of the functionality that you are familiar with in the Pidgin Host control panel is also available through the API, allowing you to script the complex actions that your situation requires.
7
+
8
+ The version of the OpenAPI document: 1.0.0 (v1)
9
+ Contact: support@pidginhost.com
10
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
11
+
12
+ Do not edit the class manually.
13
+ """ # noqa: E501
14
+
15
+
16
+ from __future__ import annotations
17
+ import pprint
18
+ import re # noqa: F401
19
+ import json
20
+
21
+ from pydantic import BaseModel, ConfigDict, StrictInt
22
+ from typing import Any, ClassVar, Dict, List
23
+ from typing import Optional, Set
24
+ from typing_extensions import Self
25
+
26
+ class ServerAddResponse(BaseModel):
27
+ """
28
+ ServerAddResponse
29
+ """ # noqa: E501
30
+ id: StrictInt
31
+ __properties: ClassVar[List[str]] = ["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 ServerAddResponse 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 ServerAddResponse 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
+ "id": obj.get("id")
85
+ })
86
+ return _obj
87
+
88
+