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,1674 @@
1
+ """
2
+ Pidgin Host API
3
+
4
+ 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.
5
+
6
+ The version of the OpenAPI document: 1.0.0 (v1)
7
+ Contact: support@pidginhost.com
8
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
9
+
10
+ Do not edit the class manually.
11
+ """ # noqa: E501
12
+
13
+
14
+ import warnings
15
+ from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt
16
+ from typing import Any, Dict, List, Optional, Tuple, Union
17
+ from typing_extensions import Annotated
18
+
19
+ from pydantic import Field, StrictInt, StrictStr
20
+ from typing import Optional
21
+ from typing_extensions import Annotated
22
+ from pidginhost_sdk.models.change_password import ChangePassword
23
+ from pidginhost_sdk.models.hosting_change_password_response import HostingChangePasswordResponse
24
+ from pidginhost_sdk.models.hosting_service import HostingService
25
+ from pidginhost_sdk.models.paginated_hosting_service_list import PaginatedHostingServiceList
26
+
27
+ from pidginhost_sdk.api_client import ApiClient, RequestSerialized
28
+ from pidginhost_sdk.api_response import ApiResponse
29
+ from pidginhost_sdk.rest import RESTResponseType
30
+
31
+
32
+ class HostingApi:
33
+ """NOTE: This class is auto generated by OpenAPI Generator
34
+ Ref: https://openapi-generator.tech
35
+
36
+ Do not edit the class manually.
37
+ """
38
+
39
+ def __init__(self, api_client=None) -> None:
40
+ if api_client is None:
41
+ api_client = ApiClient.get_default()
42
+ self.api_client = api_client
43
+
44
+
45
+ @validate_call
46
+ def hosting_hosting_change_password_create(
47
+ self,
48
+ id: StrictStr,
49
+ change_password: ChangePassword,
50
+ _request_timeout: Union[
51
+ None,
52
+ Annotated[StrictFloat, Field(gt=0)],
53
+ Tuple[
54
+ Annotated[StrictFloat, Field(gt=0)],
55
+ Annotated[StrictFloat, Field(gt=0)]
56
+ ]
57
+ ] = None,
58
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
59
+ _content_type: Optional[StrictStr] = None,
60
+ _headers: Optional[Dict[StrictStr, Any]] = None,
61
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
62
+ ) -> HostingChangePasswordResponse:
63
+ """hosting_hosting_change_password_create
64
+
65
+ Change the cPanel password for this hosting service.
66
+
67
+ :param id: (required)
68
+ :type id: str
69
+ :param change_password: (required)
70
+ :type change_password: ChangePassword
71
+ :param _request_timeout: timeout setting for this request. If one
72
+ number provided, it will be total request
73
+ timeout. It can also be a pair (tuple) of
74
+ (connection, read) timeouts.
75
+ :type _request_timeout: int, tuple(int, int), optional
76
+ :param _request_auth: set to override the auth_settings for an a single
77
+ request; this effectively ignores the
78
+ authentication in the spec for a single request.
79
+ :type _request_auth: dict, optional
80
+ :param _content_type: force content-type for the request.
81
+ :type _content_type: str, Optional
82
+ :param _headers: set to override the headers for a single
83
+ request; this effectively ignores the headers
84
+ in the spec for a single request.
85
+ :type _headers: dict, optional
86
+ :param _host_index: set to override the host_index for a single
87
+ request; this effectively ignores the host_index
88
+ in the spec for a single request.
89
+ :type _host_index: int, optional
90
+ :return: Returns the result object.
91
+ """ # noqa: E501
92
+
93
+ _param = self._hosting_hosting_change_password_create_serialize(
94
+ id=id,
95
+ change_password=change_password,
96
+ _request_auth=_request_auth,
97
+ _content_type=_content_type,
98
+ _headers=_headers,
99
+ _host_index=_host_index
100
+ )
101
+
102
+ _response_types_map: Dict[str, Optional[str]] = {
103
+ '200': "HostingChangePasswordResponse",
104
+ }
105
+ response_data = self.api_client.call_api(
106
+ *_param,
107
+ _request_timeout=_request_timeout
108
+ )
109
+ response_data.read()
110
+ return self.api_client.response_deserialize(
111
+ response_data=response_data,
112
+ response_types_map=_response_types_map,
113
+ ).data
114
+
115
+
116
+ @validate_call
117
+ def hosting_hosting_change_password_create_with_http_info(
118
+ self,
119
+ id: StrictStr,
120
+ change_password: ChangePassword,
121
+ _request_timeout: Union[
122
+ None,
123
+ Annotated[StrictFloat, Field(gt=0)],
124
+ Tuple[
125
+ Annotated[StrictFloat, Field(gt=0)],
126
+ Annotated[StrictFloat, Field(gt=0)]
127
+ ]
128
+ ] = None,
129
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
130
+ _content_type: Optional[StrictStr] = None,
131
+ _headers: Optional[Dict[StrictStr, Any]] = None,
132
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
133
+ ) -> ApiResponse[HostingChangePasswordResponse]:
134
+ """hosting_hosting_change_password_create
135
+
136
+ Change the cPanel password for this hosting service.
137
+
138
+ :param id: (required)
139
+ :type id: str
140
+ :param change_password: (required)
141
+ :type change_password: ChangePassword
142
+ :param _request_timeout: timeout setting for this request. If one
143
+ number provided, it will be total request
144
+ timeout. It can also be a pair (tuple) of
145
+ (connection, read) timeouts.
146
+ :type _request_timeout: int, tuple(int, int), optional
147
+ :param _request_auth: set to override the auth_settings for an a single
148
+ request; this effectively ignores the
149
+ authentication in the spec for a single request.
150
+ :type _request_auth: dict, optional
151
+ :param _content_type: force content-type for the request.
152
+ :type _content_type: str, Optional
153
+ :param _headers: set to override the headers for a single
154
+ request; this effectively ignores the headers
155
+ in the spec for a single request.
156
+ :type _headers: dict, optional
157
+ :param _host_index: set to override the host_index for a single
158
+ request; this effectively ignores the host_index
159
+ in the spec for a single request.
160
+ :type _host_index: int, optional
161
+ :return: Returns the result object.
162
+ """ # noqa: E501
163
+
164
+ _param = self._hosting_hosting_change_password_create_serialize(
165
+ id=id,
166
+ change_password=change_password,
167
+ _request_auth=_request_auth,
168
+ _content_type=_content_type,
169
+ _headers=_headers,
170
+ _host_index=_host_index
171
+ )
172
+
173
+ _response_types_map: Dict[str, Optional[str]] = {
174
+ '200': "HostingChangePasswordResponse",
175
+ }
176
+ response_data = self.api_client.call_api(
177
+ *_param,
178
+ _request_timeout=_request_timeout
179
+ )
180
+ response_data.read()
181
+ return self.api_client.response_deserialize(
182
+ response_data=response_data,
183
+ response_types_map=_response_types_map,
184
+ )
185
+
186
+
187
+ @validate_call
188
+ def hosting_hosting_change_password_create_without_preload_content(
189
+ self,
190
+ id: StrictStr,
191
+ change_password: ChangePassword,
192
+ _request_timeout: Union[
193
+ None,
194
+ Annotated[StrictFloat, Field(gt=0)],
195
+ Tuple[
196
+ Annotated[StrictFloat, Field(gt=0)],
197
+ Annotated[StrictFloat, Field(gt=0)]
198
+ ]
199
+ ] = None,
200
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
201
+ _content_type: Optional[StrictStr] = None,
202
+ _headers: Optional[Dict[StrictStr, Any]] = None,
203
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
204
+ ) -> RESTResponseType:
205
+ """hosting_hosting_change_password_create
206
+
207
+ Change the cPanel password for this hosting service.
208
+
209
+ :param id: (required)
210
+ :type id: str
211
+ :param change_password: (required)
212
+ :type change_password: ChangePassword
213
+ :param _request_timeout: timeout setting for this request. If one
214
+ number provided, it will be total request
215
+ timeout. It can also be a pair (tuple) of
216
+ (connection, read) timeouts.
217
+ :type _request_timeout: int, tuple(int, int), optional
218
+ :param _request_auth: set to override the auth_settings for an a single
219
+ request; this effectively ignores the
220
+ authentication in the spec for a single request.
221
+ :type _request_auth: dict, optional
222
+ :param _content_type: force content-type for the request.
223
+ :type _content_type: str, Optional
224
+ :param _headers: set to override the headers for a single
225
+ request; this effectively ignores the headers
226
+ in the spec for a single request.
227
+ :type _headers: dict, optional
228
+ :param _host_index: set to override the host_index for a single
229
+ request; this effectively ignores the host_index
230
+ in the spec for a single request.
231
+ :type _host_index: int, optional
232
+ :return: Returns the result object.
233
+ """ # noqa: E501
234
+
235
+ _param = self._hosting_hosting_change_password_create_serialize(
236
+ id=id,
237
+ change_password=change_password,
238
+ _request_auth=_request_auth,
239
+ _content_type=_content_type,
240
+ _headers=_headers,
241
+ _host_index=_host_index
242
+ )
243
+
244
+ _response_types_map: Dict[str, Optional[str]] = {
245
+ '200': "HostingChangePasswordResponse",
246
+ }
247
+ response_data = self.api_client.call_api(
248
+ *_param,
249
+ _request_timeout=_request_timeout
250
+ )
251
+ return response_data.response
252
+
253
+
254
+ def _hosting_hosting_change_password_create_serialize(
255
+ self,
256
+ id,
257
+ change_password,
258
+ _request_auth,
259
+ _content_type,
260
+ _headers,
261
+ _host_index,
262
+ ) -> RequestSerialized:
263
+
264
+ _host = None
265
+
266
+ _collection_formats: Dict[str, str] = {
267
+ }
268
+
269
+ _path_params: Dict[str, str] = {}
270
+ _query_params: List[Tuple[str, str]] = []
271
+ _header_params: Dict[str, Optional[str]] = _headers or {}
272
+ _form_params: List[Tuple[str, str]] = []
273
+ _files: Dict[
274
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
275
+ ] = {}
276
+ _body_params: Optional[bytes] = None
277
+
278
+ # process the path parameters
279
+ if id is not None:
280
+ _path_params['id'] = id
281
+ # process the query parameters
282
+ # process the header parameters
283
+ # process the form parameters
284
+ # process the body parameter
285
+ if change_password is not None:
286
+ _body_params = change_password
287
+
288
+
289
+ # set the HTTP header `Accept`
290
+ if 'Accept' not in _header_params:
291
+ _header_params['Accept'] = self.api_client.select_header_accept(
292
+ [
293
+ 'application/json'
294
+ ]
295
+ )
296
+
297
+ # set the HTTP header `Content-Type`
298
+ if _content_type:
299
+ _header_params['Content-Type'] = _content_type
300
+ else:
301
+ _default_content_type = (
302
+ self.api_client.select_header_content_type(
303
+ [
304
+ 'application/json'
305
+ ]
306
+ )
307
+ )
308
+ if _default_content_type is not None:
309
+ _header_params['Content-Type'] = _default_content_type
310
+
311
+ # authentication setting
312
+ _auth_settings: List[str] = [
313
+ 'cookieAuth',
314
+ 'tokenAuth'
315
+ ]
316
+
317
+ return self.api_client.param_serialize(
318
+ method='POST',
319
+ resource_path='/api/hosting/hosting/{id}/change-password/',
320
+ path_params=_path_params,
321
+ query_params=_query_params,
322
+ header_params=_header_params,
323
+ body=_body_params,
324
+ post_params=_form_params,
325
+ files=_files,
326
+ auth_settings=_auth_settings,
327
+ collection_formats=_collection_formats,
328
+ _host=_host,
329
+ _request_auth=_request_auth
330
+ )
331
+
332
+
333
+
334
+
335
+ @validate_call
336
+ def hosting_hosting_change_password_create2(
337
+ self,
338
+ id: StrictStr,
339
+ change_password: ChangePassword,
340
+ _request_timeout: Union[
341
+ None,
342
+ Annotated[StrictFloat, Field(gt=0)],
343
+ Tuple[
344
+ Annotated[StrictFloat, Field(gt=0)],
345
+ Annotated[StrictFloat, Field(gt=0)]
346
+ ]
347
+ ] = None,
348
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
349
+ _content_type: Optional[StrictStr] = None,
350
+ _headers: Optional[Dict[StrictStr, Any]] = None,
351
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
352
+ ) -> HostingChangePasswordResponse:
353
+ """hosting_hosting_change_password_create2
354
+
355
+ Change the cPanel password for this hosting service.
356
+
357
+ :param id: (required)
358
+ :type id: str
359
+ :param change_password: (required)
360
+ :type change_password: ChangePassword
361
+ :param _request_timeout: timeout setting for this request. If one
362
+ number provided, it will be total request
363
+ timeout. It can also be a pair (tuple) of
364
+ (connection, read) timeouts.
365
+ :type _request_timeout: int, tuple(int, int), optional
366
+ :param _request_auth: set to override the auth_settings for an a single
367
+ request; this effectively ignores the
368
+ authentication in the spec for a single request.
369
+ :type _request_auth: dict, optional
370
+ :param _content_type: force content-type for the request.
371
+ :type _content_type: str, Optional
372
+ :param _headers: set to override the headers for a single
373
+ request; this effectively ignores the headers
374
+ in the spec for a single request.
375
+ :type _headers: dict, optional
376
+ :param _host_index: set to override the host_index for a single
377
+ request; this effectively ignores the host_index
378
+ in the spec for a single request.
379
+ :type _host_index: int, optional
380
+ :return: Returns the result object.
381
+ """ # noqa: E501
382
+
383
+ _param = self._hosting_hosting_change_password_create2_serialize(
384
+ id=id,
385
+ change_password=change_password,
386
+ _request_auth=_request_auth,
387
+ _content_type=_content_type,
388
+ _headers=_headers,
389
+ _host_index=_host_index
390
+ )
391
+
392
+ _response_types_map: Dict[str, Optional[str]] = {
393
+ '200': "HostingChangePasswordResponse",
394
+ }
395
+ response_data = self.api_client.call_api(
396
+ *_param,
397
+ _request_timeout=_request_timeout
398
+ )
399
+ response_data.read()
400
+ return self.api_client.response_deserialize(
401
+ response_data=response_data,
402
+ response_types_map=_response_types_map,
403
+ ).data
404
+
405
+
406
+ @validate_call
407
+ def hosting_hosting_change_password_create2_with_http_info(
408
+ self,
409
+ id: StrictStr,
410
+ change_password: ChangePassword,
411
+ _request_timeout: Union[
412
+ None,
413
+ Annotated[StrictFloat, Field(gt=0)],
414
+ Tuple[
415
+ Annotated[StrictFloat, Field(gt=0)],
416
+ Annotated[StrictFloat, Field(gt=0)]
417
+ ]
418
+ ] = None,
419
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
420
+ _content_type: Optional[StrictStr] = None,
421
+ _headers: Optional[Dict[StrictStr, Any]] = None,
422
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
423
+ ) -> ApiResponse[HostingChangePasswordResponse]:
424
+ """hosting_hosting_change_password_create2
425
+
426
+ Change the cPanel password for this hosting service.
427
+
428
+ :param id: (required)
429
+ :type id: str
430
+ :param change_password: (required)
431
+ :type change_password: ChangePassword
432
+ :param _request_timeout: timeout setting for this request. If one
433
+ number provided, it will be total request
434
+ timeout. It can also be a pair (tuple) of
435
+ (connection, read) timeouts.
436
+ :type _request_timeout: int, tuple(int, int), optional
437
+ :param _request_auth: set to override the auth_settings for an a single
438
+ request; this effectively ignores the
439
+ authentication in the spec for a single request.
440
+ :type _request_auth: dict, optional
441
+ :param _content_type: force content-type for the request.
442
+ :type _content_type: str, Optional
443
+ :param _headers: set to override the headers for a single
444
+ request; this effectively ignores the headers
445
+ in the spec for a single request.
446
+ :type _headers: dict, optional
447
+ :param _host_index: set to override the host_index for a single
448
+ request; this effectively ignores the host_index
449
+ in the spec for a single request.
450
+ :type _host_index: int, optional
451
+ :return: Returns the result object.
452
+ """ # noqa: E501
453
+
454
+ _param = self._hosting_hosting_change_password_create2_serialize(
455
+ id=id,
456
+ change_password=change_password,
457
+ _request_auth=_request_auth,
458
+ _content_type=_content_type,
459
+ _headers=_headers,
460
+ _host_index=_host_index
461
+ )
462
+
463
+ _response_types_map: Dict[str, Optional[str]] = {
464
+ '200': "HostingChangePasswordResponse",
465
+ }
466
+ response_data = self.api_client.call_api(
467
+ *_param,
468
+ _request_timeout=_request_timeout
469
+ )
470
+ response_data.read()
471
+ return self.api_client.response_deserialize(
472
+ response_data=response_data,
473
+ response_types_map=_response_types_map,
474
+ )
475
+
476
+
477
+ @validate_call
478
+ def hosting_hosting_change_password_create2_without_preload_content(
479
+ self,
480
+ id: StrictStr,
481
+ change_password: ChangePassword,
482
+ _request_timeout: Union[
483
+ None,
484
+ Annotated[StrictFloat, Field(gt=0)],
485
+ Tuple[
486
+ Annotated[StrictFloat, Field(gt=0)],
487
+ Annotated[StrictFloat, Field(gt=0)]
488
+ ]
489
+ ] = None,
490
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
491
+ _content_type: Optional[StrictStr] = None,
492
+ _headers: Optional[Dict[StrictStr, Any]] = None,
493
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
494
+ ) -> RESTResponseType:
495
+ """hosting_hosting_change_password_create2
496
+
497
+ Change the cPanel password for this hosting service.
498
+
499
+ :param id: (required)
500
+ :type id: str
501
+ :param change_password: (required)
502
+ :type change_password: ChangePassword
503
+ :param _request_timeout: timeout setting for this request. If one
504
+ number provided, it will be total request
505
+ timeout. It can also be a pair (tuple) of
506
+ (connection, read) timeouts.
507
+ :type _request_timeout: int, tuple(int, int), optional
508
+ :param _request_auth: set to override the auth_settings for an a single
509
+ request; this effectively ignores the
510
+ authentication in the spec for a single request.
511
+ :type _request_auth: dict, optional
512
+ :param _content_type: force content-type for the request.
513
+ :type _content_type: str, Optional
514
+ :param _headers: set to override the headers for a single
515
+ request; this effectively ignores the headers
516
+ in the spec for a single request.
517
+ :type _headers: dict, optional
518
+ :param _host_index: set to override the host_index for a single
519
+ request; this effectively ignores the host_index
520
+ in the spec for a single request.
521
+ :type _host_index: int, optional
522
+ :return: Returns the result object.
523
+ """ # noqa: E501
524
+
525
+ _param = self._hosting_hosting_change_password_create2_serialize(
526
+ id=id,
527
+ change_password=change_password,
528
+ _request_auth=_request_auth,
529
+ _content_type=_content_type,
530
+ _headers=_headers,
531
+ _host_index=_host_index
532
+ )
533
+
534
+ _response_types_map: Dict[str, Optional[str]] = {
535
+ '200': "HostingChangePasswordResponse",
536
+ }
537
+ response_data = self.api_client.call_api(
538
+ *_param,
539
+ _request_timeout=_request_timeout
540
+ )
541
+ return response_data.response
542
+
543
+
544
+ def _hosting_hosting_change_password_create2_serialize(
545
+ self,
546
+ id,
547
+ change_password,
548
+ _request_auth,
549
+ _content_type,
550
+ _headers,
551
+ _host_index,
552
+ ) -> RequestSerialized:
553
+
554
+ _host = None
555
+
556
+ _collection_formats: Dict[str, str] = {
557
+ }
558
+
559
+ _path_params: Dict[str, str] = {}
560
+ _query_params: List[Tuple[str, str]] = []
561
+ _header_params: Dict[str, Optional[str]] = _headers or {}
562
+ _form_params: List[Tuple[str, str]] = []
563
+ _files: Dict[
564
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
565
+ ] = {}
566
+ _body_params: Optional[bytes] = None
567
+
568
+ # process the path parameters
569
+ if id is not None:
570
+ _path_params['id'] = id
571
+ # process the query parameters
572
+ # process the header parameters
573
+ # process the form parameters
574
+ # process the body parameter
575
+ if change_password is not None:
576
+ _body_params = change_password
577
+
578
+
579
+ # set the HTTP header `Accept`
580
+ if 'Accept' not in _header_params:
581
+ _header_params['Accept'] = self.api_client.select_header_accept(
582
+ [
583
+ 'application/json'
584
+ ]
585
+ )
586
+
587
+ # set the HTTP header `Content-Type`
588
+ if _content_type:
589
+ _header_params['Content-Type'] = _content_type
590
+ else:
591
+ _default_content_type = (
592
+ self.api_client.select_header_content_type(
593
+ [
594
+ 'application/json'
595
+ ]
596
+ )
597
+ )
598
+ if _default_content_type is not None:
599
+ _header_params['Content-Type'] = _default_content_type
600
+
601
+ # authentication setting
602
+ _auth_settings: List[str] = [
603
+ 'cookieAuth',
604
+ 'tokenAuth'
605
+ ]
606
+
607
+ return self.api_client.param_serialize(
608
+ method='POST',
609
+ resource_path='/api/v1/hosting/hosting/{id}/change-password/',
610
+ path_params=_path_params,
611
+ query_params=_query_params,
612
+ header_params=_header_params,
613
+ body=_body_params,
614
+ post_params=_form_params,
615
+ files=_files,
616
+ auth_settings=_auth_settings,
617
+ collection_formats=_collection_formats,
618
+ _host=_host,
619
+ _request_auth=_request_auth
620
+ )
621
+
622
+
623
+
624
+
625
+ @validate_call
626
+ def hosting_hosting_list(
627
+ self,
628
+ page: Annotated[Optional[StrictInt], Field(description="A page number within the paginated result set.")] = None,
629
+ _request_timeout: Union[
630
+ None,
631
+ Annotated[StrictFloat, Field(gt=0)],
632
+ Tuple[
633
+ Annotated[StrictFloat, Field(gt=0)],
634
+ Annotated[StrictFloat, Field(gt=0)]
635
+ ]
636
+ ] = None,
637
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
638
+ _content_type: Optional[StrictStr] = None,
639
+ _headers: Optional[Dict[StrictStr, Any]] = None,
640
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
641
+ ) -> PaginatedHostingServiceList:
642
+ """hosting_hosting_list
643
+
644
+ List and manage cPanel/shared hosting services.
645
+
646
+ :param page: A page number within the paginated result set.
647
+ :type page: int
648
+ :param _request_timeout: timeout setting for this request. If one
649
+ number provided, it will be total request
650
+ timeout. It can also be a pair (tuple) of
651
+ (connection, read) timeouts.
652
+ :type _request_timeout: int, tuple(int, int), optional
653
+ :param _request_auth: set to override the auth_settings for an a single
654
+ request; this effectively ignores the
655
+ authentication in the spec for a single request.
656
+ :type _request_auth: dict, optional
657
+ :param _content_type: force content-type for the request.
658
+ :type _content_type: str, Optional
659
+ :param _headers: set to override the headers for a single
660
+ request; this effectively ignores the headers
661
+ in the spec for a single request.
662
+ :type _headers: dict, optional
663
+ :param _host_index: set to override the host_index for a single
664
+ request; this effectively ignores the host_index
665
+ in the spec for a single request.
666
+ :type _host_index: int, optional
667
+ :return: Returns the result object.
668
+ """ # noqa: E501
669
+
670
+ _param = self._hosting_hosting_list_serialize(
671
+ page=page,
672
+ _request_auth=_request_auth,
673
+ _content_type=_content_type,
674
+ _headers=_headers,
675
+ _host_index=_host_index
676
+ )
677
+
678
+ _response_types_map: Dict[str, Optional[str]] = {
679
+ '200': "PaginatedHostingServiceList",
680
+ }
681
+ response_data = self.api_client.call_api(
682
+ *_param,
683
+ _request_timeout=_request_timeout
684
+ )
685
+ response_data.read()
686
+ return self.api_client.response_deserialize(
687
+ response_data=response_data,
688
+ response_types_map=_response_types_map,
689
+ ).data
690
+
691
+
692
+ @validate_call
693
+ def hosting_hosting_list_with_http_info(
694
+ self,
695
+ page: Annotated[Optional[StrictInt], Field(description="A page number within the paginated result set.")] = None,
696
+ _request_timeout: Union[
697
+ None,
698
+ Annotated[StrictFloat, Field(gt=0)],
699
+ Tuple[
700
+ Annotated[StrictFloat, Field(gt=0)],
701
+ Annotated[StrictFloat, Field(gt=0)]
702
+ ]
703
+ ] = None,
704
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
705
+ _content_type: Optional[StrictStr] = None,
706
+ _headers: Optional[Dict[StrictStr, Any]] = None,
707
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
708
+ ) -> ApiResponse[PaginatedHostingServiceList]:
709
+ """hosting_hosting_list
710
+
711
+ List and manage cPanel/shared hosting services.
712
+
713
+ :param page: A page number within the paginated result set.
714
+ :type page: int
715
+ :param _request_timeout: timeout setting for this request. If one
716
+ number provided, it will be total request
717
+ timeout. It can also be a pair (tuple) of
718
+ (connection, read) timeouts.
719
+ :type _request_timeout: int, tuple(int, int), optional
720
+ :param _request_auth: set to override the auth_settings for an a single
721
+ request; this effectively ignores the
722
+ authentication in the spec for a single request.
723
+ :type _request_auth: dict, optional
724
+ :param _content_type: force content-type for the request.
725
+ :type _content_type: str, Optional
726
+ :param _headers: set to override the headers for a single
727
+ request; this effectively ignores the headers
728
+ in the spec for a single request.
729
+ :type _headers: dict, optional
730
+ :param _host_index: set to override the host_index for a single
731
+ request; this effectively ignores the host_index
732
+ in the spec for a single request.
733
+ :type _host_index: int, optional
734
+ :return: Returns the result object.
735
+ """ # noqa: E501
736
+
737
+ _param = self._hosting_hosting_list_serialize(
738
+ page=page,
739
+ _request_auth=_request_auth,
740
+ _content_type=_content_type,
741
+ _headers=_headers,
742
+ _host_index=_host_index
743
+ )
744
+
745
+ _response_types_map: Dict[str, Optional[str]] = {
746
+ '200': "PaginatedHostingServiceList",
747
+ }
748
+ response_data = self.api_client.call_api(
749
+ *_param,
750
+ _request_timeout=_request_timeout
751
+ )
752
+ response_data.read()
753
+ return self.api_client.response_deserialize(
754
+ response_data=response_data,
755
+ response_types_map=_response_types_map,
756
+ )
757
+
758
+
759
+ @validate_call
760
+ def hosting_hosting_list_without_preload_content(
761
+ self,
762
+ page: Annotated[Optional[StrictInt], Field(description="A page number within the paginated result set.")] = None,
763
+ _request_timeout: Union[
764
+ None,
765
+ Annotated[StrictFloat, Field(gt=0)],
766
+ Tuple[
767
+ Annotated[StrictFloat, Field(gt=0)],
768
+ Annotated[StrictFloat, Field(gt=0)]
769
+ ]
770
+ ] = None,
771
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
772
+ _content_type: Optional[StrictStr] = None,
773
+ _headers: Optional[Dict[StrictStr, Any]] = None,
774
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
775
+ ) -> RESTResponseType:
776
+ """hosting_hosting_list
777
+
778
+ List and manage cPanel/shared hosting services.
779
+
780
+ :param page: A page number within the paginated result set.
781
+ :type page: int
782
+ :param _request_timeout: timeout setting for this request. If one
783
+ number provided, it will be total request
784
+ timeout. It can also be a pair (tuple) of
785
+ (connection, read) timeouts.
786
+ :type _request_timeout: int, tuple(int, int), optional
787
+ :param _request_auth: set to override the auth_settings for an a single
788
+ request; this effectively ignores the
789
+ authentication in the spec for a single request.
790
+ :type _request_auth: dict, optional
791
+ :param _content_type: force content-type for the request.
792
+ :type _content_type: str, Optional
793
+ :param _headers: set to override the headers for a single
794
+ request; this effectively ignores the headers
795
+ in the spec for a single request.
796
+ :type _headers: dict, optional
797
+ :param _host_index: set to override the host_index for a single
798
+ request; this effectively ignores the host_index
799
+ in the spec for a single request.
800
+ :type _host_index: int, optional
801
+ :return: Returns the result object.
802
+ """ # noqa: E501
803
+
804
+ _param = self._hosting_hosting_list_serialize(
805
+ page=page,
806
+ _request_auth=_request_auth,
807
+ _content_type=_content_type,
808
+ _headers=_headers,
809
+ _host_index=_host_index
810
+ )
811
+
812
+ _response_types_map: Dict[str, Optional[str]] = {
813
+ '200': "PaginatedHostingServiceList",
814
+ }
815
+ response_data = self.api_client.call_api(
816
+ *_param,
817
+ _request_timeout=_request_timeout
818
+ )
819
+ return response_data.response
820
+
821
+
822
+ def _hosting_hosting_list_serialize(
823
+ self,
824
+ page,
825
+ _request_auth,
826
+ _content_type,
827
+ _headers,
828
+ _host_index,
829
+ ) -> RequestSerialized:
830
+
831
+ _host = None
832
+
833
+ _collection_formats: Dict[str, str] = {
834
+ }
835
+
836
+ _path_params: Dict[str, str] = {}
837
+ _query_params: List[Tuple[str, str]] = []
838
+ _header_params: Dict[str, Optional[str]] = _headers or {}
839
+ _form_params: List[Tuple[str, str]] = []
840
+ _files: Dict[
841
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
842
+ ] = {}
843
+ _body_params: Optional[bytes] = None
844
+
845
+ # process the path parameters
846
+ # process the query parameters
847
+ if page is not None:
848
+
849
+ _query_params.append(('page', page))
850
+
851
+ # process the header parameters
852
+ # process the form parameters
853
+ # process the body parameter
854
+
855
+
856
+ # set the HTTP header `Accept`
857
+ if 'Accept' not in _header_params:
858
+ _header_params['Accept'] = self.api_client.select_header_accept(
859
+ [
860
+ 'application/json'
861
+ ]
862
+ )
863
+
864
+
865
+ # authentication setting
866
+ _auth_settings: List[str] = [
867
+ 'cookieAuth',
868
+ 'tokenAuth'
869
+ ]
870
+
871
+ return self.api_client.param_serialize(
872
+ method='GET',
873
+ resource_path='/api/hosting/hosting/',
874
+ path_params=_path_params,
875
+ query_params=_query_params,
876
+ header_params=_header_params,
877
+ body=_body_params,
878
+ post_params=_form_params,
879
+ files=_files,
880
+ auth_settings=_auth_settings,
881
+ collection_formats=_collection_formats,
882
+ _host=_host,
883
+ _request_auth=_request_auth
884
+ )
885
+
886
+
887
+
888
+
889
+ @validate_call
890
+ def hosting_hosting_list2(
891
+ self,
892
+ page: Annotated[Optional[StrictInt], Field(description="A page number within the paginated result set.")] = None,
893
+ _request_timeout: Union[
894
+ None,
895
+ Annotated[StrictFloat, Field(gt=0)],
896
+ Tuple[
897
+ Annotated[StrictFloat, Field(gt=0)],
898
+ Annotated[StrictFloat, Field(gt=0)]
899
+ ]
900
+ ] = None,
901
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
902
+ _content_type: Optional[StrictStr] = None,
903
+ _headers: Optional[Dict[StrictStr, Any]] = None,
904
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
905
+ ) -> PaginatedHostingServiceList:
906
+ """hosting_hosting_list2
907
+
908
+ List and manage cPanel/shared hosting services.
909
+
910
+ :param page: A page number within the paginated result set.
911
+ :type page: int
912
+ :param _request_timeout: timeout setting for this request. If one
913
+ number provided, it will be total request
914
+ timeout. It can also be a pair (tuple) of
915
+ (connection, read) timeouts.
916
+ :type _request_timeout: int, tuple(int, int), optional
917
+ :param _request_auth: set to override the auth_settings for an a single
918
+ request; this effectively ignores the
919
+ authentication in the spec for a single request.
920
+ :type _request_auth: dict, optional
921
+ :param _content_type: force content-type for the request.
922
+ :type _content_type: str, Optional
923
+ :param _headers: set to override the headers for a single
924
+ request; this effectively ignores the headers
925
+ in the spec for a single request.
926
+ :type _headers: dict, optional
927
+ :param _host_index: set to override the host_index for a single
928
+ request; this effectively ignores the host_index
929
+ in the spec for a single request.
930
+ :type _host_index: int, optional
931
+ :return: Returns the result object.
932
+ """ # noqa: E501
933
+
934
+ _param = self._hosting_hosting_list2_serialize(
935
+ page=page,
936
+ _request_auth=_request_auth,
937
+ _content_type=_content_type,
938
+ _headers=_headers,
939
+ _host_index=_host_index
940
+ )
941
+
942
+ _response_types_map: Dict[str, Optional[str]] = {
943
+ '200': "PaginatedHostingServiceList",
944
+ }
945
+ response_data = self.api_client.call_api(
946
+ *_param,
947
+ _request_timeout=_request_timeout
948
+ )
949
+ response_data.read()
950
+ return self.api_client.response_deserialize(
951
+ response_data=response_data,
952
+ response_types_map=_response_types_map,
953
+ ).data
954
+
955
+
956
+ @validate_call
957
+ def hosting_hosting_list2_with_http_info(
958
+ self,
959
+ page: Annotated[Optional[StrictInt], Field(description="A page number within the paginated result set.")] = None,
960
+ _request_timeout: Union[
961
+ None,
962
+ Annotated[StrictFloat, Field(gt=0)],
963
+ Tuple[
964
+ Annotated[StrictFloat, Field(gt=0)],
965
+ Annotated[StrictFloat, Field(gt=0)]
966
+ ]
967
+ ] = None,
968
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
969
+ _content_type: Optional[StrictStr] = None,
970
+ _headers: Optional[Dict[StrictStr, Any]] = None,
971
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
972
+ ) -> ApiResponse[PaginatedHostingServiceList]:
973
+ """hosting_hosting_list2
974
+
975
+ List and manage cPanel/shared hosting services.
976
+
977
+ :param page: A page number within the paginated result set.
978
+ :type page: int
979
+ :param _request_timeout: timeout setting for this request. If one
980
+ number provided, it will be total request
981
+ timeout. It can also be a pair (tuple) of
982
+ (connection, read) timeouts.
983
+ :type _request_timeout: int, tuple(int, int), optional
984
+ :param _request_auth: set to override the auth_settings for an a single
985
+ request; this effectively ignores the
986
+ authentication in the spec for a single request.
987
+ :type _request_auth: dict, optional
988
+ :param _content_type: force content-type for the request.
989
+ :type _content_type: str, Optional
990
+ :param _headers: set to override the headers for a single
991
+ request; this effectively ignores the headers
992
+ in the spec for a single request.
993
+ :type _headers: dict, optional
994
+ :param _host_index: set to override the host_index for a single
995
+ request; this effectively ignores the host_index
996
+ in the spec for a single request.
997
+ :type _host_index: int, optional
998
+ :return: Returns the result object.
999
+ """ # noqa: E501
1000
+
1001
+ _param = self._hosting_hosting_list2_serialize(
1002
+ page=page,
1003
+ _request_auth=_request_auth,
1004
+ _content_type=_content_type,
1005
+ _headers=_headers,
1006
+ _host_index=_host_index
1007
+ )
1008
+
1009
+ _response_types_map: Dict[str, Optional[str]] = {
1010
+ '200': "PaginatedHostingServiceList",
1011
+ }
1012
+ response_data = self.api_client.call_api(
1013
+ *_param,
1014
+ _request_timeout=_request_timeout
1015
+ )
1016
+ response_data.read()
1017
+ return self.api_client.response_deserialize(
1018
+ response_data=response_data,
1019
+ response_types_map=_response_types_map,
1020
+ )
1021
+
1022
+
1023
+ @validate_call
1024
+ def hosting_hosting_list2_without_preload_content(
1025
+ self,
1026
+ page: Annotated[Optional[StrictInt], Field(description="A page number within the paginated result set.")] = None,
1027
+ _request_timeout: Union[
1028
+ None,
1029
+ Annotated[StrictFloat, Field(gt=0)],
1030
+ Tuple[
1031
+ Annotated[StrictFloat, Field(gt=0)],
1032
+ Annotated[StrictFloat, Field(gt=0)]
1033
+ ]
1034
+ ] = None,
1035
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1036
+ _content_type: Optional[StrictStr] = None,
1037
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1038
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1039
+ ) -> RESTResponseType:
1040
+ """hosting_hosting_list2
1041
+
1042
+ List and manage cPanel/shared hosting services.
1043
+
1044
+ :param page: A page number within the paginated result set.
1045
+ :type page: int
1046
+ :param _request_timeout: timeout setting for this request. If one
1047
+ number provided, it will be total request
1048
+ timeout. It can also be a pair (tuple) of
1049
+ (connection, read) timeouts.
1050
+ :type _request_timeout: int, tuple(int, int), optional
1051
+ :param _request_auth: set to override the auth_settings for an a single
1052
+ request; this effectively ignores the
1053
+ authentication in the spec for a single request.
1054
+ :type _request_auth: dict, optional
1055
+ :param _content_type: force content-type for the request.
1056
+ :type _content_type: str, Optional
1057
+ :param _headers: set to override the headers for a single
1058
+ request; this effectively ignores the headers
1059
+ in the spec for a single request.
1060
+ :type _headers: dict, optional
1061
+ :param _host_index: set to override the host_index for a single
1062
+ request; this effectively ignores the host_index
1063
+ in the spec for a single request.
1064
+ :type _host_index: int, optional
1065
+ :return: Returns the result object.
1066
+ """ # noqa: E501
1067
+
1068
+ _param = self._hosting_hosting_list2_serialize(
1069
+ page=page,
1070
+ _request_auth=_request_auth,
1071
+ _content_type=_content_type,
1072
+ _headers=_headers,
1073
+ _host_index=_host_index
1074
+ )
1075
+
1076
+ _response_types_map: Dict[str, Optional[str]] = {
1077
+ '200': "PaginatedHostingServiceList",
1078
+ }
1079
+ response_data = self.api_client.call_api(
1080
+ *_param,
1081
+ _request_timeout=_request_timeout
1082
+ )
1083
+ return response_data.response
1084
+
1085
+
1086
+ def _hosting_hosting_list2_serialize(
1087
+ self,
1088
+ page,
1089
+ _request_auth,
1090
+ _content_type,
1091
+ _headers,
1092
+ _host_index,
1093
+ ) -> RequestSerialized:
1094
+
1095
+ _host = None
1096
+
1097
+ _collection_formats: Dict[str, str] = {
1098
+ }
1099
+
1100
+ _path_params: Dict[str, str] = {}
1101
+ _query_params: List[Tuple[str, str]] = []
1102
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1103
+ _form_params: List[Tuple[str, str]] = []
1104
+ _files: Dict[
1105
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1106
+ ] = {}
1107
+ _body_params: Optional[bytes] = None
1108
+
1109
+ # process the path parameters
1110
+ # process the query parameters
1111
+ if page is not None:
1112
+
1113
+ _query_params.append(('page', page))
1114
+
1115
+ # process the header parameters
1116
+ # process the form parameters
1117
+ # process the body parameter
1118
+
1119
+
1120
+ # set the HTTP header `Accept`
1121
+ if 'Accept' not in _header_params:
1122
+ _header_params['Accept'] = self.api_client.select_header_accept(
1123
+ [
1124
+ 'application/json'
1125
+ ]
1126
+ )
1127
+
1128
+
1129
+ # authentication setting
1130
+ _auth_settings: List[str] = [
1131
+ 'cookieAuth',
1132
+ 'tokenAuth'
1133
+ ]
1134
+
1135
+ return self.api_client.param_serialize(
1136
+ method='GET',
1137
+ resource_path='/api/v1/hosting/hosting/',
1138
+ path_params=_path_params,
1139
+ query_params=_query_params,
1140
+ header_params=_header_params,
1141
+ body=_body_params,
1142
+ post_params=_form_params,
1143
+ files=_files,
1144
+ auth_settings=_auth_settings,
1145
+ collection_formats=_collection_formats,
1146
+ _host=_host,
1147
+ _request_auth=_request_auth
1148
+ )
1149
+
1150
+
1151
+
1152
+
1153
+ @validate_call
1154
+ def hosting_hosting_retrieve(
1155
+ self,
1156
+ id: StrictStr,
1157
+ _request_timeout: Union[
1158
+ None,
1159
+ Annotated[StrictFloat, Field(gt=0)],
1160
+ Tuple[
1161
+ Annotated[StrictFloat, Field(gt=0)],
1162
+ Annotated[StrictFloat, Field(gt=0)]
1163
+ ]
1164
+ ] = None,
1165
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1166
+ _content_type: Optional[StrictStr] = None,
1167
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1168
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1169
+ ) -> HostingService:
1170
+ """hosting_hosting_retrieve
1171
+
1172
+ List and manage cPanel/shared hosting services.
1173
+
1174
+ :param id: (required)
1175
+ :type id: str
1176
+ :param _request_timeout: timeout setting for this request. If one
1177
+ number provided, it will be total request
1178
+ timeout. It can also be a pair (tuple) of
1179
+ (connection, read) timeouts.
1180
+ :type _request_timeout: int, tuple(int, int), optional
1181
+ :param _request_auth: set to override the auth_settings for an a single
1182
+ request; this effectively ignores the
1183
+ authentication in the spec for a single request.
1184
+ :type _request_auth: dict, optional
1185
+ :param _content_type: force content-type for the request.
1186
+ :type _content_type: str, Optional
1187
+ :param _headers: set to override the headers for a single
1188
+ request; this effectively ignores the headers
1189
+ in the spec for a single request.
1190
+ :type _headers: dict, optional
1191
+ :param _host_index: set to override the host_index for a single
1192
+ request; this effectively ignores the host_index
1193
+ in the spec for a single request.
1194
+ :type _host_index: int, optional
1195
+ :return: Returns the result object.
1196
+ """ # noqa: E501
1197
+
1198
+ _param = self._hosting_hosting_retrieve_serialize(
1199
+ id=id,
1200
+ _request_auth=_request_auth,
1201
+ _content_type=_content_type,
1202
+ _headers=_headers,
1203
+ _host_index=_host_index
1204
+ )
1205
+
1206
+ _response_types_map: Dict[str, Optional[str]] = {
1207
+ '200': "HostingService",
1208
+ }
1209
+ response_data = self.api_client.call_api(
1210
+ *_param,
1211
+ _request_timeout=_request_timeout
1212
+ )
1213
+ response_data.read()
1214
+ return self.api_client.response_deserialize(
1215
+ response_data=response_data,
1216
+ response_types_map=_response_types_map,
1217
+ ).data
1218
+
1219
+
1220
+ @validate_call
1221
+ def hosting_hosting_retrieve_with_http_info(
1222
+ self,
1223
+ id: StrictStr,
1224
+ _request_timeout: Union[
1225
+ None,
1226
+ Annotated[StrictFloat, Field(gt=0)],
1227
+ Tuple[
1228
+ Annotated[StrictFloat, Field(gt=0)],
1229
+ Annotated[StrictFloat, Field(gt=0)]
1230
+ ]
1231
+ ] = None,
1232
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1233
+ _content_type: Optional[StrictStr] = None,
1234
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1235
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1236
+ ) -> ApiResponse[HostingService]:
1237
+ """hosting_hosting_retrieve
1238
+
1239
+ List and manage cPanel/shared hosting services.
1240
+
1241
+ :param id: (required)
1242
+ :type id: str
1243
+ :param _request_timeout: timeout setting for this request. If one
1244
+ number provided, it will be total request
1245
+ timeout. It can also be a pair (tuple) of
1246
+ (connection, read) timeouts.
1247
+ :type _request_timeout: int, tuple(int, int), optional
1248
+ :param _request_auth: set to override the auth_settings for an a single
1249
+ request; this effectively ignores the
1250
+ authentication in the spec for a single request.
1251
+ :type _request_auth: dict, optional
1252
+ :param _content_type: force content-type for the request.
1253
+ :type _content_type: str, Optional
1254
+ :param _headers: set to override the headers for a single
1255
+ request; this effectively ignores the headers
1256
+ in the spec for a single request.
1257
+ :type _headers: dict, optional
1258
+ :param _host_index: set to override the host_index for a single
1259
+ request; this effectively ignores the host_index
1260
+ in the spec for a single request.
1261
+ :type _host_index: int, optional
1262
+ :return: Returns the result object.
1263
+ """ # noqa: E501
1264
+
1265
+ _param = self._hosting_hosting_retrieve_serialize(
1266
+ id=id,
1267
+ _request_auth=_request_auth,
1268
+ _content_type=_content_type,
1269
+ _headers=_headers,
1270
+ _host_index=_host_index
1271
+ )
1272
+
1273
+ _response_types_map: Dict[str, Optional[str]] = {
1274
+ '200': "HostingService",
1275
+ }
1276
+ response_data = self.api_client.call_api(
1277
+ *_param,
1278
+ _request_timeout=_request_timeout
1279
+ )
1280
+ response_data.read()
1281
+ return self.api_client.response_deserialize(
1282
+ response_data=response_data,
1283
+ response_types_map=_response_types_map,
1284
+ )
1285
+
1286
+
1287
+ @validate_call
1288
+ def hosting_hosting_retrieve_without_preload_content(
1289
+ self,
1290
+ id: StrictStr,
1291
+ _request_timeout: Union[
1292
+ None,
1293
+ Annotated[StrictFloat, Field(gt=0)],
1294
+ Tuple[
1295
+ Annotated[StrictFloat, Field(gt=0)],
1296
+ Annotated[StrictFloat, Field(gt=0)]
1297
+ ]
1298
+ ] = None,
1299
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1300
+ _content_type: Optional[StrictStr] = None,
1301
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1302
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1303
+ ) -> RESTResponseType:
1304
+ """hosting_hosting_retrieve
1305
+
1306
+ List and manage cPanel/shared hosting services.
1307
+
1308
+ :param id: (required)
1309
+ :type id: str
1310
+ :param _request_timeout: timeout setting for this request. If one
1311
+ number provided, it will be total request
1312
+ timeout. It can also be a pair (tuple) of
1313
+ (connection, read) timeouts.
1314
+ :type _request_timeout: int, tuple(int, int), optional
1315
+ :param _request_auth: set to override the auth_settings for an a single
1316
+ request; this effectively ignores the
1317
+ authentication in the spec for a single request.
1318
+ :type _request_auth: dict, optional
1319
+ :param _content_type: force content-type for the request.
1320
+ :type _content_type: str, Optional
1321
+ :param _headers: set to override the headers for a single
1322
+ request; this effectively ignores the headers
1323
+ in the spec for a single request.
1324
+ :type _headers: dict, optional
1325
+ :param _host_index: set to override the host_index for a single
1326
+ request; this effectively ignores the host_index
1327
+ in the spec for a single request.
1328
+ :type _host_index: int, optional
1329
+ :return: Returns the result object.
1330
+ """ # noqa: E501
1331
+
1332
+ _param = self._hosting_hosting_retrieve_serialize(
1333
+ id=id,
1334
+ _request_auth=_request_auth,
1335
+ _content_type=_content_type,
1336
+ _headers=_headers,
1337
+ _host_index=_host_index
1338
+ )
1339
+
1340
+ _response_types_map: Dict[str, Optional[str]] = {
1341
+ '200': "HostingService",
1342
+ }
1343
+ response_data = self.api_client.call_api(
1344
+ *_param,
1345
+ _request_timeout=_request_timeout
1346
+ )
1347
+ return response_data.response
1348
+
1349
+
1350
+ def _hosting_hosting_retrieve_serialize(
1351
+ self,
1352
+ id,
1353
+ _request_auth,
1354
+ _content_type,
1355
+ _headers,
1356
+ _host_index,
1357
+ ) -> RequestSerialized:
1358
+
1359
+ _host = None
1360
+
1361
+ _collection_formats: Dict[str, str] = {
1362
+ }
1363
+
1364
+ _path_params: Dict[str, str] = {}
1365
+ _query_params: List[Tuple[str, str]] = []
1366
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1367
+ _form_params: List[Tuple[str, str]] = []
1368
+ _files: Dict[
1369
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1370
+ ] = {}
1371
+ _body_params: Optional[bytes] = None
1372
+
1373
+ # process the path parameters
1374
+ if id is not None:
1375
+ _path_params['id'] = id
1376
+ # process the query parameters
1377
+ # process the header parameters
1378
+ # process the form parameters
1379
+ # process the body parameter
1380
+
1381
+
1382
+ # set the HTTP header `Accept`
1383
+ if 'Accept' not in _header_params:
1384
+ _header_params['Accept'] = self.api_client.select_header_accept(
1385
+ [
1386
+ 'application/json'
1387
+ ]
1388
+ )
1389
+
1390
+
1391
+ # authentication setting
1392
+ _auth_settings: List[str] = [
1393
+ 'cookieAuth',
1394
+ 'tokenAuth'
1395
+ ]
1396
+
1397
+ return self.api_client.param_serialize(
1398
+ method='GET',
1399
+ resource_path='/api/hosting/hosting/{id}/',
1400
+ path_params=_path_params,
1401
+ query_params=_query_params,
1402
+ header_params=_header_params,
1403
+ body=_body_params,
1404
+ post_params=_form_params,
1405
+ files=_files,
1406
+ auth_settings=_auth_settings,
1407
+ collection_formats=_collection_formats,
1408
+ _host=_host,
1409
+ _request_auth=_request_auth
1410
+ )
1411
+
1412
+
1413
+
1414
+
1415
+ @validate_call
1416
+ def hosting_hosting_retrieve2(
1417
+ self,
1418
+ id: StrictStr,
1419
+ _request_timeout: Union[
1420
+ None,
1421
+ Annotated[StrictFloat, Field(gt=0)],
1422
+ Tuple[
1423
+ Annotated[StrictFloat, Field(gt=0)],
1424
+ Annotated[StrictFloat, Field(gt=0)]
1425
+ ]
1426
+ ] = None,
1427
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1428
+ _content_type: Optional[StrictStr] = None,
1429
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1430
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1431
+ ) -> HostingService:
1432
+ """hosting_hosting_retrieve2
1433
+
1434
+ List and manage cPanel/shared hosting services.
1435
+
1436
+ :param id: (required)
1437
+ :type id: str
1438
+ :param _request_timeout: timeout setting for this request. If one
1439
+ number provided, it will be total request
1440
+ timeout. It can also be a pair (tuple) of
1441
+ (connection, read) timeouts.
1442
+ :type _request_timeout: int, tuple(int, int), optional
1443
+ :param _request_auth: set to override the auth_settings for an a single
1444
+ request; this effectively ignores the
1445
+ authentication in the spec for a single request.
1446
+ :type _request_auth: dict, optional
1447
+ :param _content_type: force content-type for the request.
1448
+ :type _content_type: str, Optional
1449
+ :param _headers: set to override the headers for a single
1450
+ request; this effectively ignores the headers
1451
+ in the spec for a single request.
1452
+ :type _headers: dict, optional
1453
+ :param _host_index: set to override the host_index for a single
1454
+ request; this effectively ignores the host_index
1455
+ in the spec for a single request.
1456
+ :type _host_index: int, optional
1457
+ :return: Returns the result object.
1458
+ """ # noqa: E501
1459
+
1460
+ _param = self._hosting_hosting_retrieve2_serialize(
1461
+ id=id,
1462
+ _request_auth=_request_auth,
1463
+ _content_type=_content_type,
1464
+ _headers=_headers,
1465
+ _host_index=_host_index
1466
+ )
1467
+
1468
+ _response_types_map: Dict[str, Optional[str]] = {
1469
+ '200': "HostingService",
1470
+ }
1471
+ response_data = self.api_client.call_api(
1472
+ *_param,
1473
+ _request_timeout=_request_timeout
1474
+ )
1475
+ response_data.read()
1476
+ return self.api_client.response_deserialize(
1477
+ response_data=response_data,
1478
+ response_types_map=_response_types_map,
1479
+ ).data
1480
+
1481
+
1482
+ @validate_call
1483
+ def hosting_hosting_retrieve2_with_http_info(
1484
+ self,
1485
+ id: StrictStr,
1486
+ _request_timeout: Union[
1487
+ None,
1488
+ Annotated[StrictFloat, Field(gt=0)],
1489
+ Tuple[
1490
+ Annotated[StrictFloat, Field(gt=0)],
1491
+ Annotated[StrictFloat, Field(gt=0)]
1492
+ ]
1493
+ ] = None,
1494
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1495
+ _content_type: Optional[StrictStr] = None,
1496
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1497
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1498
+ ) -> ApiResponse[HostingService]:
1499
+ """hosting_hosting_retrieve2
1500
+
1501
+ List and manage cPanel/shared hosting services.
1502
+
1503
+ :param id: (required)
1504
+ :type id: str
1505
+ :param _request_timeout: timeout setting for this request. If one
1506
+ number provided, it will be total request
1507
+ timeout. It can also be a pair (tuple) of
1508
+ (connection, read) timeouts.
1509
+ :type _request_timeout: int, tuple(int, int), optional
1510
+ :param _request_auth: set to override the auth_settings for an a single
1511
+ request; this effectively ignores the
1512
+ authentication in the spec for a single request.
1513
+ :type _request_auth: dict, optional
1514
+ :param _content_type: force content-type for the request.
1515
+ :type _content_type: str, Optional
1516
+ :param _headers: set to override the headers for a single
1517
+ request; this effectively ignores the headers
1518
+ in the spec for a single request.
1519
+ :type _headers: dict, optional
1520
+ :param _host_index: set to override the host_index for a single
1521
+ request; this effectively ignores the host_index
1522
+ in the spec for a single request.
1523
+ :type _host_index: int, optional
1524
+ :return: Returns the result object.
1525
+ """ # noqa: E501
1526
+
1527
+ _param = self._hosting_hosting_retrieve2_serialize(
1528
+ id=id,
1529
+ _request_auth=_request_auth,
1530
+ _content_type=_content_type,
1531
+ _headers=_headers,
1532
+ _host_index=_host_index
1533
+ )
1534
+
1535
+ _response_types_map: Dict[str, Optional[str]] = {
1536
+ '200': "HostingService",
1537
+ }
1538
+ response_data = self.api_client.call_api(
1539
+ *_param,
1540
+ _request_timeout=_request_timeout
1541
+ )
1542
+ response_data.read()
1543
+ return self.api_client.response_deserialize(
1544
+ response_data=response_data,
1545
+ response_types_map=_response_types_map,
1546
+ )
1547
+
1548
+
1549
+ @validate_call
1550
+ def hosting_hosting_retrieve2_without_preload_content(
1551
+ self,
1552
+ id: StrictStr,
1553
+ _request_timeout: Union[
1554
+ None,
1555
+ Annotated[StrictFloat, Field(gt=0)],
1556
+ Tuple[
1557
+ Annotated[StrictFloat, Field(gt=0)],
1558
+ Annotated[StrictFloat, Field(gt=0)]
1559
+ ]
1560
+ ] = None,
1561
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1562
+ _content_type: Optional[StrictStr] = None,
1563
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1564
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1565
+ ) -> RESTResponseType:
1566
+ """hosting_hosting_retrieve2
1567
+
1568
+ List and manage cPanel/shared hosting services.
1569
+
1570
+ :param id: (required)
1571
+ :type id: str
1572
+ :param _request_timeout: timeout setting for this request. If one
1573
+ number provided, it will be total request
1574
+ timeout. It can also be a pair (tuple) of
1575
+ (connection, read) timeouts.
1576
+ :type _request_timeout: int, tuple(int, int), optional
1577
+ :param _request_auth: set to override the auth_settings for an a single
1578
+ request; this effectively ignores the
1579
+ authentication in the spec for a single request.
1580
+ :type _request_auth: dict, optional
1581
+ :param _content_type: force content-type for the request.
1582
+ :type _content_type: str, Optional
1583
+ :param _headers: set to override the headers for a single
1584
+ request; this effectively ignores the headers
1585
+ in the spec for a single request.
1586
+ :type _headers: dict, optional
1587
+ :param _host_index: set to override the host_index for a single
1588
+ request; this effectively ignores the host_index
1589
+ in the spec for a single request.
1590
+ :type _host_index: int, optional
1591
+ :return: Returns the result object.
1592
+ """ # noqa: E501
1593
+
1594
+ _param = self._hosting_hosting_retrieve2_serialize(
1595
+ id=id,
1596
+ _request_auth=_request_auth,
1597
+ _content_type=_content_type,
1598
+ _headers=_headers,
1599
+ _host_index=_host_index
1600
+ )
1601
+
1602
+ _response_types_map: Dict[str, Optional[str]] = {
1603
+ '200': "HostingService",
1604
+ }
1605
+ response_data = self.api_client.call_api(
1606
+ *_param,
1607
+ _request_timeout=_request_timeout
1608
+ )
1609
+ return response_data.response
1610
+
1611
+
1612
+ def _hosting_hosting_retrieve2_serialize(
1613
+ self,
1614
+ id,
1615
+ _request_auth,
1616
+ _content_type,
1617
+ _headers,
1618
+ _host_index,
1619
+ ) -> RequestSerialized:
1620
+
1621
+ _host = None
1622
+
1623
+ _collection_formats: Dict[str, str] = {
1624
+ }
1625
+
1626
+ _path_params: Dict[str, str] = {}
1627
+ _query_params: List[Tuple[str, str]] = []
1628
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1629
+ _form_params: List[Tuple[str, str]] = []
1630
+ _files: Dict[
1631
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1632
+ ] = {}
1633
+ _body_params: Optional[bytes] = None
1634
+
1635
+ # process the path parameters
1636
+ if id is not None:
1637
+ _path_params['id'] = id
1638
+ # process the query parameters
1639
+ # process the header parameters
1640
+ # process the form parameters
1641
+ # process the body parameter
1642
+
1643
+
1644
+ # set the HTTP header `Accept`
1645
+ if 'Accept' not in _header_params:
1646
+ _header_params['Accept'] = self.api_client.select_header_accept(
1647
+ [
1648
+ 'application/json'
1649
+ ]
1650
+ )
1651
+
1652
+
1653
+ # authentication setting
1654
+ _auth_settings: List[str] = [
1655
+ 'cookieAuth',
1656
+ 'tokenAuth'
1657
+ ]
1658
+
1659
+ return self.api_client.param_serialize(
1660
+ method='GET',
1661
+ resource_path='/api/v1/hosting/hosting/{id}/',
1662
+ path_params=_path_params,
1663
+ query_params=_query_params,
1664
+ header_params=_header_params,
1665
+ body=_body_params,
1666
+ post_params=_form_params,
1667
+ files=_files,
1668
+ auth_settings=_auth_settings,
1669
+ collection_formats=_collection_formats,
1670
+ _host=_host,
1671
+ _request_auth=_request_auth
1672
+ )
1673
+
1674
+