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,2838 @@
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.dedicated_rdns import DedicatedRDNS
23
+ from pidginhost_sdk.models.dedicated_server import DedicatedServer
24
+ from pidginhost_sdk.models.paginated_dedicated_server_list import PaginatedDedicatedServerList
25
+ from pidginhost_sdk.models.power_action import PowerAction
26
+ from pidginhost_sdk.models.power_action_response import PowerActionResponse
27
+ from pidginhost_sdk.models.rdns_update_response import RDNSUpdateResponse
28
+ from pidginhost_sdk.models.reinstall import Reinstall
29
+ from pidginhost_sdk.models.reinstall_response import ReinstallResponse
30
+
31
+ from pidginhost_sdk.api_client import ApiClient, RequestSerialized
32
+ from pidginhost_sdk.api_response import ApiResponse
33
+ from pidginhost_sdk.rest import RESTResponseType
34
+
35
+
36
+ class DedicatedApi:
37
+ """NOTE: This class is auto generated by OpenAPI Generator
38
+ Ref: https://openapi-generator.tech
39
+
40
+ Do not edit the class manually.
41
+ """
42
+
43
+ def __init__(self, api_client=None) -> None:
44
+ if api_client is None:
45
+ api_client = ApiClient.get_default()
46
+ self.api_client = api_client
47
+
48
+
49
+ @validate_call
50
+ def dedicated_servers_list(
51
+ self,
52
+ page: Annotated[Optional[StrictInt], Field(description="A page number within the paginated result set.")] = None,
53
+ _request_timeout: Union[
54
+ None,
55
+ Annotated[StrictFloat, Field(gt=0)],
56
+ Tuple[
57
+ Annotated[StrictFloat, Field(gt=0)],
58
+ Annotated[StrictFloat, Field(gt=0)]
59
+ ]
60
+ ] = None,
61
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
62
+ _content_type: Optional[StrictStr] = None,
63
+ _headers: Optional[Dict[StrictStr, Any]] = None,
64
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
65
+ ) -> PaginatedDedicatedServerList:
66
+ """dedicated_servers_list
67
+
68
+ List and manage dedicated server services.
69
+
70
+ :param page: A page number within the paginated result set.
71
+ :type page: int
72
+ :param _request_timeout: timeout setting for this request. If one
73
+ number provided, it will be total request
74
+ timeout. It can also be a pair (tuple) of
75
+ (connection, read) timeouts.
76
+ :type _request_timeout: int, tuple(int, int), optional
77
+ :param _request_auth: set to override the auth_settings for an a single
78
+ request; this effectively ignores the
79
+ authentication in the spec for a single request.
80
+ :type _request_auth: dict, optional
81
+ :param _content_type: force content-type for the request.
82
+ :type _content_type: str, Optional
83
+ :param _headers: set to override the headers for a single
84
+ request; this effectively ignores the headers
85
+ in the spec for a single request.
86
+ :type _headers: dict, optional
87
+ :param _host_index: set to override the host_index for a single
88
+ request; this effectively ignores the host_index
89
+ in the spec for a single request.
90
+ :type _host_index: int, optional
91
+ :return: Returns the result object.
92
+ """ # noqa: E501
93
+
94
+ _param = self._dedicated_servers_list_serialize(
95
+ page=page,
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': "PaginatedDedicatedServerList",
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 dedicated_servers_list_with_http_info(
118
+ self,
119
+ page: Annotated[Optional[StrictInt], Field(description="A page number within the paginated result set.")] = None,
120
+ _request_timeout: Union[
121
+ None,
122
+ Annotated[StrictFloat, Field(gt=0)],
123
+ Tuple[
124
+ Annotated[StrictFloat, Field(gt=0)],
125
+ Annotated[StrictFloat, Field(gt=0)]
126
+ ]
127
+ ] = None,
128
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
129
+ _content_type: Optional[StrictStr] = None,
130
+ _headers: Optional[Dict[StrictStr, Any]] = None,
131
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
132
+ ) -> ApiResponse[PaginatedDedicatedServerList]:
133
+ """dedicated_servers_list
134
+
135
+ List and manage dedicated server services.
136
+
137
+ :param page: A page number within the paginated result set.
138
+ :type page: int
139
+ :param _request_timeout: timeout setting for this request. If one
140
+ number provided, it will be total request
141
+ timeout. It can also be a pair (tuple) of
142
+ (connection, read) timeouts.
143
+ :type _request_timeout: int, tuple(int, int), optional
144
+ :param _request_auth: set to override the auth_settings for an a single
145
+ request; this effectively ignores the
146
+ authentication in the spec for a single request.
147
+ :type _request_auth: dict, optional
148
+ :param _content_type: force content-type for the request.
149
+ :type _content_type: str, Optional
150
+ :param _headers: set to override the headers for a single
151
+ request; this effectively ignores the headers
152
+ in the spec for a single request.
153
+ :type _headers: dict, optional
154
+ :param _host_index: set to override the host_index for a single
155
+ request; this effectively ignores the host_index
156
+ in the spec for a single request.
157
+ :type _host_index: int, optional
158
+ :return: Returns the result object.
159
+ """ # noqa: E501
160
+
161
+ _param = self._dedicated_servers_list_serialize(
162
+ page=page,
163
+ _request_auth=_request_auth,
164
+ _content_type=_content_type,
165
+ _headers=_headers,
166
+ _host_index=_host_index
167
+ )
168
+
169
+ _response_types_map: Dict[str, Optional[str]] = {
170
+ '200': "PaginatedDedicatedServerList",
171
+ }
172
+ response_data = self.api_client.call_api(
173
+ *_param,
174
+ _request_timeout=_request_timeout
175
+ )
176
+ response_data.read()
177
+ return self.api_client.response_deserialize(
178
+ response_data=response_data,
179
+ response_types_map=_response_types_map,
180
+ )
181
+
182
+
183
+ @validate_call
184
+ def dedicated_servers_list_without_preload_content(
185
+ self,
186
+ page: Annotated[Optional[StrictInt], Field(description="A page number within the paginated result set.")] = None,
187
+ _request_timeout: Union[
188
+ None,
189
+ Annotated[StrictFloat, Field(gt=0)],
190
+ Tuple[
191
+ Annotated[StrictFloat, Field(gt=0)],
192
+ Annotated[StrictFloat, Field(gt=0)]
193
+ ]
194
+ ] = None,
195
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
196
+ _content_type: Optional[StrictStr] = None,
197
+ _headers: Optional[Dict[StrictStr, Any]] = None,
198
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
199
+ ) -> RESTResponseType:
200
+ """dedicated_servers_list
201
+
202
+ List and manage dedicated server services.
203
+
204
+ :param page: A page number within the paginated result set.
205
+ :type page: int
206
+ :param _request_timeout: timeout setting for this request. If one
207
+ number provided, it will be total request
208
+ timeout. It can also be a pair (tuple) of
209
+ (connection, read) timeouts.
210
+ :type _request_timeout: int, tuple(int, int), optional
211
+ :param _request_auth: set to override the auth_settings for an a single
212
+ request; this effectively ignores the
213
+ authentication in the spec for a single request.
214
+ :type _request_auth: dict, optional
215
+ :param _content_type: force content-type for the request.
216
+ :type _content_type: str, Optional
217
+ :param _headers: set to override the headers for a single
218
+ request; this effectively ignores the headers
219
+ in the spec for a single request.
220
+ :type _headers: dict, optional
221
+ :param _host_index: set to override the host_index for a single
222
+ request; this effectively ignores the host_index
223
+ in the spec for a single request.
224
+ :type _host_index: int, optional
225
+ :return: Returns the result object.
226
+ """ # noqa: E501
227
+
228
+ _param = self._dedicated_servers_list_serialize(
229
+ page=page,
230
+ _request_auth=_request_auth,
231
+ _content_type=_content_type,
232
+ _headers=_headers,
233
+ _host_index=_host_index
234
+ )
235
+
236
+ _response_types_map: Dict[str, Optional[str]] = {
237
+ '200': "PaginatedDedicatedServerList",
238
+ }
239
+ response_data = self.api_client.call_api(
240
+ *_param,
241
+ _request_timeout=_request_timeout
242
+ )
243
+ return response_data.response
244
+
245
+
246
+ def _dedicated_servers_list_serialize(
247
+ self,
248
+ page,
249
+ _request_auth,
250
+ _content_type,
251
+ _headers,
252
+ _host_index,
253
+ ) -> RequestSerialized:
254
+
255
+ _host = None
256
+
257
+ _collection_formats: Dict[str, str] = {
258
+ }
259
+
260
+ _path_params: Dict[str, str] = {}
261
+ _query_params: List[Tuple[str, str]] = []
262
+ _header_params: Dict[str, Optional[str]] = _headers or {}
263
+ _form_params: List[Tuple[str, str]] = []
264
+ _files: Dict[
265
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
266
+ ] = {}
267
+ _body_params: Optional[bytes] = None
268
+
269
+ # process the path parameters
270
+ # process the query parameters
271
+ if page is not None:
272
+
273
+ _query_params.append(('page', page))
274
+
275
+ # process the header parameters
276
+ # process the form parameters
277
+ # process the body parameter
278
+
279
+
280
+ # set the HTTP header `Accept`
281
+ if 'Accept' not in _header_params:
282
+ _header_params['Accept'] = self.api_client.select_header_accept(
283
+ [
284
+ 'application/json'
285
+ ]
286
+ )
287
+
288
+
289
+ # authentication setting
290
+ _auth_settings: List[str] = [
291
+ 'cookieAuth',
292
+ 'tokenAuth'
293
+ ]
294
+
295
+ return self.api_client.param_serialize(
296
+ method='GET',
297
+ resource_path='/api/dedicated/servers/',
298
+ path_params=_path_params,
299
+ query_params=_query_params,
300
+ header_params=_header_params,
301
+ body=_body_params,
302
+ post_params=_form_params,
303
+ files=_files,
304
+ auth_settings=_auth_settings,
305
+ collection_formats=_collection_formats,
306
+ _host=_host,
307
+ _request_auth=_request_auth
308
+ )
309
+
310
+
311
+
312
+
313
+ @validate_call
314
+ def dedicated_servers_list2(
315
+ self,
316
+ page: Annotated[Optional[StrictInt], Field(description="A page number within the paginated result set.")] = None,
317
+ _request_timeout: Union[
318
+ None,
319
+ Annotated[StrictFloat, Field(gt=0)],
320
+ Tuple[
321
+ Annotated[StrictFloat, Field(gt=0)],
322
+ Annotated[StrictFloat, Field(gt=0)]
323
+ ]
324
+ ] = None,
325
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
326
+ _content_type: Optional[StrictStr] = None,
327
+ _headers: Optional[Dict[StrictStr, Any]] = None,
328
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
329
+ ) -> PaginatedDedicatedServerList:
330
+ """dedicated_servers_list2
331
+
332
+ List and manage dedicated server services.
333
+
334
+ :param page: A page number within the paginated result set.
335
+ :type page: int
336
+ :param _request_timeout: timeout setting for this request. If one
337
+ number provided, it will be total request
338
+ timeout. It can also be a pair (tuple) of
339
+ (connection, read) timeouts.
340
+ :type _request_timeout: int, tuple(int, int), optional
341
+ :param _request_auth: set to override the auth_settings for an a single
342
+ request; this effectively ignores the
343
+ authentication in the spec for a single request.
344
+ :type _request_auth: dict, optional
345
+ :param _content_type: force content-type for the request.
346
+ :type _content_type: str, Optional
347
+ :param _headers: set to override the headers for a single
348
+ request; this effectively ignores the headers
349
+ in the spec for a single request.
350
+ :type _headers: dict, optional
351
+ :param _host_index: set to override the host_index for a single
352
+ request; this effectively ignores the host_index
353
+ in the spec for a single request.
354
+ :type _host_index: int, optional
355
+ :return: Returns the result object.
356
+ """ # noqa: E501
357
+
358
+ _param = self._dedicated_servers_list2_serialize(
359
+ page=page,
360
+ _request_auth=_request_auth,
361
+ _content_type=_content_type,
362
+ _headers=_headers,
363
+ _host_index=_host_index
364
+ )
365
+
366
+ _response_types_map: Dict[str, Optional[str]] = {
367
+ '200': "PaginatedDedicatedServerList",
368
+ }
369
+ response_data = self.api_client.call_api(
370
+ *_param,
371
+ _request_timeout=_request_timeout
372
+ )
373
+ response_data.read()
374
+ return self.api_client.response_deserialize(
375
+ response_data=response_data,
376
+ response_types_map=_response_types_map,
377
+ ).data
378
+
379
+
380
+ @validate_call
381
+ def dedicated_servers_list2_with_http_info(
382
+ self,
383
+ page: Annotated[Optional[StrictInt], Field(description="A page number within the paginated result set.")] = None,
384
+ _request_timeout: Union[
385
+ None,
386
+ Annotated[StrictFloat, Field(gt=0)],
387
+ Tuple[
388
+ Annotated[StrictFloat, Field(gt=0)],
389
+ Annotated[StrictFloat, Field(gt=0)]
390
+ ]
391
+ ] = None,
392
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
393
+ _content_type: Optional[StrictStr] = None,
394
+ _headers: Optional[Dict[StrictStr, Any]] = None,
395
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
396
+ ) -> ApiResponse[PaginatedDedicatedServerList]:
397
+ """dedicated_servers_list2
398
+
399
+ List and manage dedicated server services.
400
+
401
+ :param page: A page number within the paginated result set.
402
+ :type page: int
403
+ :param _request_timeout: timeout setting for this request. If one
404
+ number provided, it will be total request
405
+ timeout. It can also be a pair (tuple) of
406
+ (connection, read) timeouts.
407
+ :type _request_timeout: int, tuple(int, int), optional
408
+ :param _request_auth: set to override the auth_settings for an a single
409
+ request; this effectively ignores the
410
+ authentication in the spec for a single request.
411
+ :type _request_auth: dict, optional
412
+ :param _content_type: force content-type for the request.
413
+ :type _content_type: str, Optional
414
+ :param _headers: set to override the headers for a single
415
+ request; this effectively ignores the headers
416
+ in the spec for a single request.
417
+ :type _headers: dict, optional
418
+ :param _host_index: set to override the host_index for a single
419
+ request; this effectively ignores the host_index
420
+ in the spec for a single request.
421
+ :type _host_index: int, optional
422
+ :return: Returns the result object.
423
+ """ # noqa: E501
424
+
425
+ _param = self._dedicated_servers_list2_serialize(
426
+ page=page,
427
+ _request_auth=_request_auth,
428
+ _content_type=_content_type,
429
+ _headers=_headers,
430
+ _host_index=_host_index
431
+ )
432
+
433
+ _response_types_map: Dict[str, Optional[str]] = {
434
+ '200': "PaginatedDedicatedServerList",
435
+ }
436
+ response_data = self.api_client.call_api(
437
+ *_param,
438
+ _request_timeout=_request_timeout
439
+ )
440
+ response_data.read()
441
+ return self.api_client.response_deserialize(
442
+ response_data=response_data,
443
+ response_types_map=_response_types_map,
444
+ )
445
+
446
+
447
+ @validate_call
448
+ def dedicated_servers_list2_without_preload_content(
449
+ self,
450
+ page: Annotated[Optional[StrictInt], Field(description="A page number within the paginated result set.")] = None,
451
+ _request_timeout: Union[
452
+ None,
453
+ Annotated[StrictFloat, Field(gt=0)],
454
+ Tuple[
455
+ Annotated[StrictFloat, Field(gt=0)],
456
+ Annotated[StrictFloat, Field(gt=0)]
457
+ ]
458
+ ] = None,
459
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
460
+ _content_type: Optional[StrictStr] = None,
461
+ _headers: Optional[Dict[StrictStr, Any]] = None,
462
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
463
+ ) -> RESTResponseType:
464
+ """dedicated_servers_list2
465
+
466
+ List and manage dedicated server services.
467
+
468
+ :param page: A page number within the paginated result set.
469
+ :type page: int
470
+ :param _request_timeout: timeout setting for this request. If one
471
+ number provided, it will be total request
472
+ timeout. It can also be a pair (tuple) of
473
+ (connection, read) timeouts.
474
+ :type _request_timeout: int, tuple(int, int), optional
475
+ :param _request_auth: set to override the auth_settings for an a single
476
+ request; this effectively ignores the
477
+ authentication in the spec for a single request.
478
+ :type _request_auth: dict, optional
479
+ :param _content_type: force content-type for the request.
480
+ :type _content_type: str, Optional
481
+ :param _headers: set to override the headers for a single
482
+ request; this effectively ignores the headers
483
+ in the spec for a single request.
484
+ :type _headers: dict, optional
485
+ :param _host_index: set to override the host_index for a single
486
+ request; this effectively ignores the host_index
487
+ in the spec for a single request.
488
+ :type _host_index: int, optional
489
+ :return: Returns the result object.
490
+ """ # noqa: E501
491
+
492
+ _param = self._dedicated_servers_list2_serialize(
493
+ page=page,
494
+ _request_auth=_request_auth,
495
+ _content_type=_content_type,
496
+ _headers=_headers,
497
+ _host_index=_host_index
498
+ )
499
+
500
+ _response_types_map: Dict[str, Optional[str]] = {
501
+ '200': "PaginatedDedicatedServerList",
502
+ }
503
+ response_data = self.api_client.call_api(
504
+ *_param,
505
+ _request_timeout=_request_timeout
506
+ )
507
+ return response_data.response
508
+
509
+
510
+ def _dedicated_servers_list2_serialize(
511
+ self,
512
+ page,
513
+ _request_auth,
514
+ _content_type,
515
+ _headers,
516
+ _host_index,
517
+ ) -> RequestSerialized:
518
+
519
+ _host = None
520
+
521
+ _collection_formats: Dict[str, str] = {
522
+ }
523
+
524
+ _path_params: Dict[str, str] = {}
525
+ _query_params: List[Tuple[str, str]] = []
526
+ _header_params: Dict[str, Optional[str]] = _headers or {}
527
+ _form_params: List[Tuple[str, str]] = []
528
+ _files: Dict[
529
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
530
+ ] = {}
531
+ _body_params: Optional[bytes] = None
532
+
533
+ # process the path parameters
534
+ # process the query parameters
535
+ if page is not None:
536
+
537
+ _query_params.append(('page', page))
538
+
539
+ # process the header parameters
540
+ # process the form parameters
541
+ # process the body parameter
542
+
543
+
544
+ # set the HTTP header `Accept`
545
+ if 'Accept' not in _header_params:
546
+ _header_params['Accept'] = self.api_client.select_header_accept(
547
+ [
548
+ 'application/json'
549
+ ]
550
+ )
551
+
552
+
553
+ # authentication setting
554
+ _auth_settings: List[str] = [
555
+ 'cookieAuth',
556
+ 'tokenAuth'
557
+ ]
558
+
559
+ return self.api_client.param_serialize(
560
+ method='GET',
561
+ resource_path='/api/v1/dedicated/servers/',
562
+ path_params=_path_params,
563
+ query_params=_query_params,
564
+ header_params=_header_params,
565
+ body=_body_params,
566
+ post_params=_form_params,
567
+ files=_files,
568
+ auth_settings=_auth_settings,
569
+ collection_formats=_collection_formats,
570
+ _host=_host,
571
+ _request_auth=_request_auth
572
+ )
573
+
574
+
575
+
576
+
577
+ @validate_call
578
+ def dedicated_servers_power_create(
579
+ self,
580
+ id: StrictStr,
581
+ power_action: PowerAction,
582
+ _request_timeout: Union[
583
+ None,
584
+ Annotated[StrictFloat, Field(gt=0)],
585
+ Tuple[
586
+ Annotated[StrictFloat, Field(gt=0)],
587
+ Annotated[StrictFloat, Field(gt=0)]
588
+ ]
589
+ ] = None,
590
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
591
+ _content_type: Optional[StrictStr] = None,
592
+ _headers: Optional[Dict[StrictStr, Any]] = None,
593
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
594
+ ) -> PowerActionResponse:
595
+ """dedicated_servers_power_create
596
+
597
+ Execute a power management action (start, stop, restart, shutdown).
598
+
599
+ :param id: (required)
600
+ :type id: str
601
+ :param power_action: (required)
602
+ :type power_action: PowerAction
603
+ :param _request_timeout: timeout setting for this request. If one
604
+ number provided, it will be total request
605
+ timeout. It can also be a pair (tuple) of
606
+ (connection, read) timeouts.
607
+ :type _request_timeout: int, tuple(int, int), optional
608
+ :param _request_auth: set to override the auth_settings for an a single
609
+ request; this effectively ignores the
610
+ authentication in the spec for a single request.
611
+ :type _request_auth: dict, optional
612
+ :param _content_type: force content-type for the request.
613
+ :type _content_type: str, Optional
614
+ :param _headers: set to override the headers for a single
615
+ request; this effectively ignores the headers
616
+ in the spec for a single request.
617
+ :type _headers: dict, optional
618
+ :param _host_index: set to override the host_index for a single
619
+ request; this effectively ignores the host_index
620
+ in the spec for a single request.
621
+ :type _host_index: int, optional
622
+ :return: Returns the result object.
623
+ """ # noqa: E501
624
+
625
+ _param = self._dedicated_servers_power_create_serialize(
626
+ id=id,
627
+ power_action=power_action,
628
+ _request_auth=_request_auth,
629
+ _content_type=_content_type,
630
+ _headers=_headers,
631
+ _host_index=_host_index
632
+ )
633
+
634
+ _response_types_map: Dict[str, Optional[str]] = {
635
+ '200': "PowerActionResponse",
636
+ }
637
+ response_data = self.api_client.call_api(
638
+ *_param,
639
+ _request_timeout=_request_timeout
640
+ )
641
+ response_data.read()
642
+ return self.api_client.response_deserialize(
643
+ response_data=response_data,
644
+ response_types_map=_response_types_map,
645
+ ).data
646
+
647
+
648
+ @validate_call
649
+ def dedicated_servers_power_create_with_http_info(
650
+ self,
651
+ id: StrictStr,
652
+ power_action: PowerAction,
653
+ _request_timeout: Union[
654
+ None,
655
+ Annotated[StrictFloat, Field(gt=0)],
656
+ Tuple[
657
+ Annotated[StrictFloat, Field(gt=0)],
658
+ Annotated[StrictFloat, Field(gt=0)]
659
+ ]
660
+ ] = None,
661
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
662
+ _content_type: Optional[StrictStr] = None,
663
+ _headers: Optional[Dict[StrictStr, Any]] = None,
664
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
665
+ ) -> ApiResponse[PowerActionResponse]:
666
+ """dedicated_servers_power_create
667
+
668
+ Execute a power management action (start, stop, restart, shutdown).
669
+
670
+ :param id: (required)
671
+ :type id: str
672
+ :param power_action: (required)
673
+ :type power_action: PowerAction
674
+ :param _request_timeout: timeout setting for this request. If one
675
+ number provided, it will be total request
676
+ timeout. It can also be a pair (tuple) of
677
+ (connection, read) timeouts.
678
+ :type _request_timeout: int, tuple(int, int), optional
679
+ :param _request_auth: set to override the auth_settings for an a single
680
+ request; this effectively ignores the
681
+ authentication in the spec for a single request.
682
+ :type _request_auth: dict, optional
683
+ :param _content_type: force content-type for the request.
684
+ :type _content_type: str, Optional
685
+ :param _headers: set to override the headers for a single
686
+ request; this effectively ignores the headers
687
+ in the spec for a single request.
688
+ :type _headers: dict, optional
689
+ :param _host_index: set to override the host_index for a single
690
+ request; this effectively ignores the host_index
691
+ in the spec for a single request.
692
+ :type _host_index: int, optional
693
+ :return: Returns the result object.
694
+ """ # noqa: E501
695
+
696
+ _param = self._dedicated_servers_power_create_serialize(
697
+ id=id,
698
+ power_action=power_action,
699
+ _request_auth=_request_auth,
700
+ _content_type=_content_type,
701
+ _headers=_headers,
702
+ _host_index=_host_index
703
+ )
704
+
705
+ _response_types_map: Dict[str, Optional[str]] = {
706
+ '200': "PowerActionResponse",
707
+ }
708
+ response_data = self.api_client.call_api(
709
+ *_param,
710
+ _request_timeout=_request_timeout
711
+ )
712
+ response_data.read()
713
+ return self.api_client.response_deserialize(
714
+ response_data=response_data,
715
+ response_types_map=_response_types_map,
716
+ )
717
+
718
+
719
+ @validate_call
720
+ def dedicated_servers_power_create_without_preload_content(
721
+ self,
722
+ id: StrictStr,
723
+ power_action: PowerAction,
724
+ _request_timeout: Union[
725
+ None,
726
+ Annotated[StrictFloat, Field(gt=0)],
727
+ Tuple[
728
+ Annotated[StrictFloat, Field(gt=0)],
729
+ Annotated[StrictFloat, Field(gt=0)]
730
+ ]
731
+ ] = None,
732
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
733
+ _content_type: Optional[StrictStr] = None,
734
+ _headers: Optional[Dict[StrictStr, Any]] = None,
735
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
736
+ ) -> RESTResponseType:
737
+ """dedicated_servers_power_create
738
+
739
+ Execute a power management action (start, stop, restart, shutdown).
740
+
741
+ :param id: (required)
742
+ :type id: str
743
+ :param power_action: (required)
744
+ :type power_action: PowerAction
745
+ :param _request_timeout: timeout setting for this request. If one
746
+ number provided, it will be total request
747
+ timeout. It can also be a pair (tuple) of
748
+ (connection, read) timeouts.
749
+ :type _request_timeout: int, tuple(int, int), optional
750
+ :param _request_auth: set to override the auth_settings for an a single
751
+ request; this effectively ignores the
752
+ authentication in the spec for a single request.
753
+ :type _request_auth: dict, optional
754
+ :param _content_type: force content-type for the request.
755
+ :type _content_type: str, Optional
756
+ :param _headers: set to override the headers for a single
757
+ request; this effectively ignores the headers
758
+ in the spec for a single request.
759
+ :type _headers: dict, optional
760
+ :param _host_index: set to override the host_index for a single
761
+ request; this effectively ignores the host_index
762
+ in the spec for a single request.
763
+ :type _host_index: int, optional
764
+ :return: Returns the result object.
765
+ """ # noqa: E501
766
+
767
+ _param = self._dedicated_servers_power_create_serialize(
768
+ id=id,
769
+ power_action=power_action,
770
+ _request_auth=_request_auth,
771
+ _content_type=_content_type,
772
+ _headers=_headers,
773
+ _host_index=_host_index
774
+ )
775
+
776
+ _response_types_map: Dict[str, Optional[str]] = {
777
+ '200': "PowerActionResponse",
778
+ }
779
+ response_data = self.api_client.call_api(
780
+ *_param,
781
+ _request_timeout=_request_timeout
782
+ )
783
+ return response_data.response
784
+
785
+
786
+ def _dedicated_servers_power_create_serialize(
787
+ self,
788
+ id,
789
+ power_action,
790
+ _request_auth,
791
+ _content_type,
792
+ _headers,
793
+ _host_index,
794
+ ) -> RequestSerialized:
795
+
796
+ _host = None
797
+
798
+ _collection_formats: Dict[str, str] = {
799
+ }
800
+
801
+ _path_params: Dict[str, str] = {}
802
+ _query_params: List[Tuple[str, str]] = []
803
+ _header_params: Dict[str, Optional[str]] = _headers or {}
804
+ _form_params: List[Tuple[str, str]] = []
805
+ _files: Dict[
806
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
807
+ ] = {}
808
+ _body_params: Optional[bytes] = None
809
+
810
+ # process the path parameters
811
+ if id is not None:
812
+ _path_params['id'] = id
813
+ # process the query parameters
814
+ # process the header parameters
815
+ # process the form parameters
816
+ # process the body parameter
817
+ if power_action is not None:
818
+ _body_params = power_action
819
+
820
+
821
+ # set the HTTP header `Accept`
822
+ if 'Accept' not in _header_params:
823
+ _header_params['Accept'] = self.api_client.select_header_accept(
824
+ [
825
+ 'application/json'
826
+ ]
827
+ )
828
+
829
+ # set the HTTP header `Content-Type`
830
+ if _content_type:
831
+ _header_params['Content-Type'] = _content_type
832
+ else:
833
+ _default_content_type = (
834
+ self.api_client.select_header_content_type(
835
+ [
836
+ 'application/json'
837
+ ]
838
+ )
839
+ )
840
+ if _default_content_type is not None:
841
+ _header_params['Content-Type'] = _default_content_type
842
+
843
+ # authentication setting
844
+ _auth_settings: List[str] = [
845
+ 'cookieAuth',
846
+ 'tokenAuth'
847
+ ]
848
+
849
+ return self.api_client.param_serialize(
850
+ method='POST',
851
+ resource_path='/api/dedicated/servers/{id}/power/',
852
+ path_params=_path_params,
853
+ query_params=_query_params,
854
+ header_params=_header_params,
855
+ body=_body_params,
856
+ post_params=_form_params,
857
+ files=_files,
858
+ auth_settings=_auth_settings,
859
+ collection_formats=_collection_formats,
860
+ _host=_host,
861
+ _request_auth=_request_auth
862
+ )
863
+
864
+
865
+
866
+
867
+ @validate_call
868
+ def dedicated_servers_power_create2(
869
+ self,
870
+ id: StrictStr,
871
+ power_action: PowerAction,
872
+ _request_timeout: Union[
873
+ None,
874
+ Annotated[StrictFloat, Field(gt=0)],
875
+ Tuple[
876
+ Annotated[StrictFloat, Field(gt=0)],
877
+ Annotated[StrictFloat, Field(gt=0)]
878
+ ]
879
+ ] = None,
880
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
881
+ _content_type: Optional[StrictStr] = None,
882
+ _headers: Optional[Dict[StrictStr, Any]] = None,
883
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
884
+ ) -> PowerActionResponse:
885
+ """dedicated_servers_power_create2
886
+
887
+ Execute a power management action (start, stop, restart, shutdown).
888
+
889
+ :param id: (required)
890
+ :type id: str
891
+ :param power_action: (required)
892
+ :type power_action: PowerAction
893
+ :param _request_timeout: timeout setting for this request. If one
894
+ number provided, it will be total request
895
+ timeout. It can also be a pair (tuple) of
896
+ (connection, read) timeouts.
897
+ :type _request_timeout: int, tuple(int, int), optional
898
+ :param _request_auth: set to override the auth_settings for an a single
899
+ request; this effectively ignores the
900
+ authentication in the spec for a single request.
901
+ :type _request_auth: dict, optional
902
+ :param _content_type: force content-type for the request.
903
+ :type _content_type: str, Optional
904
+ :param _headers: set to override the headers for a single
905
+ request; this effectively ignores the headers
906
+ in the spec for a single request.
907
+ :type _headers: dict, optional
908
+ :param _host_index: set to override the host_index for a single
909
+ request; this effectively ignores the host_index
910
+ in the spec for a single request.
911
+ :type _host_index: int, optional
912
+ :return: Returns the result object.
913
+ """ # noqa: E501
914
+
915
+ _param = self._dedicated_servers_power_create2_serialize(
916
+ id=id,
917
+ power_action=power_action,
918
+ _request_auth=_request_auth,
919
+ _content_type=_content_type,
920
+ _headers=_headers,
921
+ _host_index=_host_index
922
+ )
923
+
924
+ _response_types_map: Dict[str, Optional[str]] = {
925
+ '200': "PowerActionResponse",
926
+ }
927
+ response_data = self.api_client.call_api(
928
+ *_param,
929
+ _request_timeout=_request_timeout
930
+ )
931
+ response_data.read()
932
+ return self.api_client.response_deserialize(
933
+ response_data=response_data,
934
+ response_types_map=_response_types_map,
935
+ ).data
936
+
937
+
938
+ @validate_call
939
+ def dedicated_servers_power_create2_with_http_info(
940
+ self,
941
+ id: StrictStr,
942
+ power_action: PowerAction,
943
+ _request_timeout: Union[
944
+ None,
945
+ Annotated[StrictFloat, Field(gt=0)],
946
+ Tuple[
947
+ Annotated[StrictFloat, Field(gt=0)],
948
+ Annotated[StrictFloat, Field(gt=0)]
949
+ ]
950
+ ] = None,
951
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
952
+ _content_type: Optional[StrictStr] = None,
953
+ _headers: Optional[Dict[StrictStr, Any]] = None,
954
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
955
+ ) -> ApiResponse[PowerActionResponse]:
956
+ """dedicated_servers_power_create2
957
+
958
+ Execute a power management action (start, stop, restart, shutdown).
959
+
960
+ :param id: (required)
961
+ :type id: str
962
+ :param power_action: (required)
963
+ :type power_action: PowerAction
964
+ :param _request_timeout: timeout setting for this request. If one
965
+ number provided, it will be total request
966
+ timeout. It can also be a pair (tuple) of
967
+ (connection, read) timeouts.
968
+ :type _request_timeout: int, tuple(int, int), optional
969
+ :param _request_auth: set to override the auth_settings for an a single
970
+ request; this effectively ignores the
971
+ authentication in the spec for a single request.
972
+ :type _request_auth: dict, optional
973
+ :param _content_type: force content-type for the request.
974
+ :type _content_type: str, Optional
975
+ :param _headers: set to override the headers for a single
976
+ request; this effectively ignores the headers
977
+ in the spec for a single request.
978
+ :type _headers: dict, optional
979
+ :param _host_index: set to override the host_index for a single
980
+ request; this effectively ignores the host_index
981
+ in the spec for a single request.
982
+ :type _host_index: int, optional
983
+ :return: Returns the result object.
984
+ """ # noqa: E501
985
+
986
+ _param = self._dedicated_servers_power_create2_serialize(
987
+ id=id,
988
+ power_action=power_action,
989
+ _request_auth=_request_auth,
990
+ _content_type=_content_type,
991
+ _headers=_headers,
992
+ _host_index=_host_index
993
+ )
994
+
995
+ _response_types_map: Dict[str, Optional[str]] = {
996
+ '200': "PowerActionResponse",
997
+ }
998
+ response_data = self.api_client.call_api(
999
+ *_param,
1000
+ _request_timeout=_request_timeout
1001
+ )
1002
+ response_data.read()
1003
+ return self.api_client.response_deserialize(
1004
+ response_data=response_data,
1005
+ response_types_map=_response_types_map,
1006
+ )
1007
+
1008
+
1009
+ @validate_call
1010
+ def dedicated_servers_power_create2_without_preload_content(
1011
+ self,
1012
+ id: StrictStr,
1013
+ power_action: PowerAction,
1014
+ _request_timeout: Union[
1015
+ None,
1016
+ Annotated[StrictFloat, Field(gt=0)],
1017
+ Tuple[
1018
+ Annotated[StrictFloat, Field(gt=0)],
1019
+ Annotated[StrictFloat, Field(gt=0)]
1020
+ ]
1021
+ ] = None,
1022
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1023
+ _content_type: Optional[StrictStr] = None,
1024
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1025
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1026
+ ) -> RESTResponseType:
1027
+ """dedicated_servers_power_create2
1028
+
1029
+ Execute a power management action (start, stop, restart, shutdown).
1030
+
1031
+ :param id: (required)
1032
+ :type id: str
1033
+ :param power_action: (required)
1034
+ :type power_action: PowerAction
1035
+ :param _request_timeout: timeout setting for this request. If one
1036
+ number provided, it will be total request
1037
+ timeout. It can also be a pair (tuple) of
1038
+ (connection, read) timeouts.
1039
+ :type _request_timeout: int, tuple(int, int), optional
1040
+ :param _request_auth: set to override the auth_settings for an a single
1041
+ request; this effectively ignores the
1042
+ authentication in the spec for a single request.
1043
+ :type _request_auth: dict, optional
1044
+ :param _content_type: force content-type for the request.
1045
+ :type _content_type: str, Optional
1046
+ :param _headers: set to override the headers for a single
1047
+ request; this effectively ignores the headers
1048
+ in the spec for a single request.
1049
+ :type _headers: dict, optional
1050
+ :param _host_index: set to override the host_index for a single
1051
+ request; this effectively ignores the host_index
1052
+ in the spec for a single request.
1053
+ :type _host_index: int, optional
1054
+ :return: Returns the result object.
1055
+ """ # noqa: E501
1056
+
1057
+ _param = self._dedicated_servers_power_create2_serialize(
1058
+ id=id,
1059
+ power_action=power_action,
1060
+ _request_auth=_request_auth,
1061
+ _content_type=_content_type,
1062
+ _headers=_headers,
1063
+ _host_index=_host_index
1064
+ )
1065
+
1066
+ _response_types_map: Dict[str, Optional[str]] = {
1067
+ '200': "PowerActionResponse",
1068
+ }
1069
+ response_data = self.api_client.call_api(
1070
+ *_param,
1071
+ _request_timeout=_request_timeout
1072
+ )
1073
+ return response_data.response
1074
+
1075
+
1076
+ def _dedicated_servers_power_create2_serialize(
1077
+ self,
1078
+ id,
1079
+ power_action,
1080
+ _request_auth,
1081
+ _content_type,
1082
+ _headers,
1083
+ _host_index,
1084
+ ) -> RequestSerialized:
1085
+
1086
+ _host = None
1087
+
1088
+ _collection_formats: Dict[str, str] = {
1089
+ }
1090
+
1091
+ _path_params: Dict[str, str] = {}
1092
+ _query_params: List[Tuple[str, str]] = []
1093
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1094
+ _form_params: List[Tuple[str, str]] = []
1095
+ _files: Dict[
1096
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1097
+ ] = {}
1098
+ _body_params: Optional[bytes] = None
1099
+
1100
+ # process the path parameters
1101
+ if id is not None:
1102
+ _path_params['id'] = id
1103
+ # process the query parameters
1104
+ # process the header parameters
1105
+ # process the form parameters
1106
+ # process the body parameter
1107
+ if power_action is not None:
1108
+ _body_params = power_action
1109
+
1110
+
1111
+ # set the HTTP header `Accept`
1112
+ if 'Accept' not in _header_params:
1113
+ _header_params['Accept'] = self.api_client.select_header_accept(
1114
+ [
1115
+ 'application/json'
1116
+ ]
1117
+ )
1118
+
1119
+ # set the HTTP header `Content-Type`
1120
+ if _content_type:
1121
+ _header_params['Content-Type'] = _content_type
1122
+ else:
1123
+ _default_content_type = (
1124
+ self.api_client.select_header_content_type(
1125
+ [
1126
+ 'application/json'
1127
+ ]
1128
+ )
1129
+ )
1130
+ if _default_content_type is not None:
1131
+ _header_params['Content-Type'] = _default_content_type
1132
+
1133
+ # authentication setting
1134
+ _auth_settings: List[str] = [
1135
+ 'cookieAuth',
1136
+ 'tokenAuth'
1137
+ ]
1138
+
1139
+ return self.api_client.param_serialize(
1140
+ method='POST',
1141
+ resource_path='/api/v1/dedicated/servers/{id}/power/',
1142
+ path_params=_path_params,
1143
+ query_params=_query_params,
1144
+ header_params=_header_params,
1145
+ body=_body_params,
1146
+ post_params=_form_params,
1147
+ files=_files,
1148
+ auth_settings=_auth_settings,
1149
+ collection_formats=_collection_formats,
1150
+ _host=_host,
1151
+ _request_auth=_request_auth
1152
+ )
1153
+
1154
+
1155
+
1156
+
1157
+ @validate_call
1158
+ def dedicated_servers_rdns_create(
1159
+ self,
1160
+ id: StrictStr,
1161
+ dedicated_rdns: DedicatedRDNS,
1162
+ _request_timeout: Union[
1163
+ None,
1164
+ Annotated[StrictFloat, Field(gt=0)],
1165
+ Tuple[
1166
+ Annotated[StrictFloat, Field(gt=0)],
1167
+ Annotated[StrictFloat, Field(gt=0)]
1168
+ ]
1169
+ ] = None,
1170
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1171
+ _content_type: Optional[StrictStr] = None,
1172
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1173
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1174
+ ) -> RDNSUpdateResponse:
1175
+ """dedicated_servers_rdns_create
1176
+
1177
+ Update reverse DNS for a dedicated server IP.
1178
+
1179
+ :param id: (required)
1180
+ :type id: str
1181
+ :param dedicated_rdns: (required)
1182
+ :type dedicated_rdns: DedicatedRDNS
1183
+ :param _request_timeout: timeout setting for this request. If one
1184
+ number provided, it will be total request
1185
+ timeout. It can also be a pair (tuple) of
1186
+ (connection, read) timeouts.
1187
+ :type _request_timeout: int, tuple(int, int), optional
1188
+ :param _request_auth: set to override the auth_settings for an a single
1189
+ request; this effectively ignores the
1190
+ authentication in the spec for a single request.
1191
+ :type _request_auth: dict, optional
1192
+ :param _content_type: force content-type for the request.
1193
+ :type _content_type: str, Optional
1194
+ :param _headers: set to override the headers for a single
1195
+ request; this effectively ignores the headers
1196
+ in the spec for a single request.
1197
+ :type _headers: dict, optional
1198
+ :param _host_index: set to override the host_index for a single
1199
+ request; this effectively ignores the host_index
1200
+ in the spec for a single request.
1201
+ :type _host_index: int, optional
1202
+ :return: Returns the result object.
1203
+ """ # noqa: E501
1204
+
1205
+ _param = self._dedicated_servers_rdns_create_serialize(
1206
+ id=id,
1207
+ dedicated_rdns=dedicated_rdns,
1208
+ _request_auth=_request_auth,
1209
+ _content_type=_content_type,
1210
+ _headers=_headers,
1211
+ _host_index=_host_index
1212
+ )
1213
+
1214
+ _response_types_map: Dict[str, Optional[str]] = {
1215
+ '200': "RDNSUpdateResponse",
1216
+ }
1217
+ response_data = self.api_client.call_api(
1218
+ *_param,
1219
+ _request_timeout=_request_timeout
1220
+ )
1221
+ response_data.read()
1222
+ return self.api_client.response_deserialize(
1223
+ response_data=response_data,
1224
+ response_types_map=_response_types_map,
1225
+ ).data
1226
+
1227
+
1228
+ @validate_call
1229
+ def dedicated_servers_rdns_create_with_http_info(
1230
+ self,
1231
+ id: StrictStr,
1232
+ dedicated_rdns: DedicatedRDNS,
1233
+ _request_timeout: Union[
1234
+ None,
1235
+ Annotated[StrictFloat, Field(gt=0)],
1236
+ Tuple[
1237
+ Annotated[StrictFloat, Field(gt=0)],
1238
+ Annotated[StrictFloat, Field(gt=0)]
1239
+ ]
1240
+ ] = None,
1241
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1242
+ _content_type: Optional[StrictStr] = None,
1243
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1244
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1245
+ ) -> ApiResponse[RDNSUpdateResponse]:
1246
+ """dedicated_servers_rdns_create
1247
+
1248
+ Update reverse DNS for a dedicated server IP.
1249
+
1250
+ :param id: (required)
1251
+ :type id: str
1252
+ :param dedicated_rdns: (required)
1253
+ :type dedicated_rdns: DedicatedRDNS
1254
+ :param _request_timeout: timeout setting for this request. If one
1255
+ number provided, it will be total request
1256
+ timeout. It can also be a pair (tuple) of
1257
+ (connection, read) timeouts.
1258
+ :type _request_timeout: int, tuple(int, int), optional
1259
+ :param _request_auth: set to override the auth_settings for an a single
1260
+ request; this effectively ignores the
1261
+ authentication in the spec for a single request.
1262
+ :type _request_auth: dict, optional
1263
+ :param _content_type: force content-type for the request.
1264
+ :type _content_type: str, Optional
1265
+ :param _headers: set to override the headers for a single
1266
+ request; this effectively ignores the headers
1267
+ in the spec for a single request.
1268
+ :type _headers: dict, optional
1269
+ :param _host_index: set to override the host_index for a single
1270
+ request; this effectively ignores the host_index
1271
+ in the spec for a single request.
1272
+ :type _host_index: int, optional
1273
+ :return: Returns the result object.
1274
+ """ # noqa: E501
1275
+
1276
+ _param = self._dedicated_servers_rdns_create_serialize(
1277
+ id=id,
1278
+ dedicated_rdns=dedicated_rdns,
1279
+ _request_auth=_request_auth,
1280
+ _content_type=_content_type,
1281
+ _headers=_headers,
1282
+ _host_index=_host_index
1283
+ )
1284
+
1285
+ _response_types_map: Dict[str, Optional[str]] = {
1286
+ '200': "RDNSUpdateResponse",
1287
+ }
1288
+ response_data = self.api_client.call_api(
1289
+ *_param,
1290
+ _request_timeout=_request_timeout
1291
+ )
1292
+ response_data.read()
1293
+ return self.api_client.response_deserialize(
1294
+ response_data=response_data,
1295
+ response_types_map=_response_types_map,
1296
+ )
1297
+
1298
+
1299
+ @validate_call
1300
+ def dedicated_servers_rdns_create_without_preload_content(
1301
+ self,
1302
+ id: StrictStr,
1303
+ dedicated_rdns: DedicatedRDNS,
1304
+ _request_timeout: Union[
1305
+ None,
1306
+ Annotated[StrictFloat, Field(gt=0)],
1307
+ Tuple[
1308
+ Annotated[StrictFloat, Field(gt=0)],
1309
+ Annotated[StrictFloat, Field(gt=0)]
1310
+ ]
1311
+ ] = None,
1312
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1313
+ _content_type: Optional[StrictStr] = None,
1314
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1315
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1316
+ ) -> RESTResponseType:
1317
+ """dedicated_servers_rdns_create
1318
+
1319
+ Update reverse DNS for a dedicated server IP.
1320
+
1321
+ :param id: (required)
1322
+ :type id: str
1323
+ :param dedicated_rdns: (required)
1324
+ :type dedicated_rdns: DedicatedRDNS
1325
+ :param _request_timeout: timeout setting for this request. If one
1326
+ number provided, it will be total request
1327
+ timeout. It can also be a pair (tuple) of
1328
+ (connection, read) timeouts.
1329
+ :type _request_timeout: int, tuple(int, int), optional
1330
+ :param _request_auth: set to override the auth_settings for an a single
1331
+ request; this effectively ignores the
1332
+ authentication in the spec for a single request.
1333
+ :type _request_auth: dict, optional
1334
+ :param _content_type: force content-type for the request.
1335
+ :type _content_type: str, Optional
1336
+ :param _headers: set to override the headers for a single
1337
+ request; this effectively ignores the headers
1338
+ in the spec for a single request.
1339
+ :type _headers: dict, optional
1340
+ :param _host_index: set to override the host_index for a single
1341
+ request; this effectively ignores the host_index
1342
+ in the spec for a single request.
1343
+ :type _host_index: int, optional
1344
+ :return: Returns the result object.
1345
+ """ # noqa: E501
1346
+
1347
+ _param = self._dedicated_servers_rdns_create_serialize(
1348
+ id=id,
1349
+ dedicated_rdns=dedicated_rdns,
1350
+ _request_auth=_request_auth,
1351
+ _content_type=_content_type,
1352
+ _headers=_headers,
1353
+ _host_index=_host_index
1354
+ )
1355
+
1356
+ _response_types_map: Dict[str, Optional[str]] = {
1357
+ '200': "RDNSUpdateResponse",
1358
+ }
1359
+ response_data = self.api_client.call_api(
1360
+ *_param,
1361
+ _request_timeout=_request_timeout
1362
+ )
1363
+ return response_data.response
1364
+
1365
+
1366
+ def _dedicated_servers_rdns_create_serialize(
1367
+ self,
1368
+ id,
1369
+ dedicated_rdns,
1370
+ _request_auth,
1371
+ _content_type,
1372
+ _headers,
1373
+ _host_index,
1374
+ ) -> RequestSerialized:
1375
+
1376
+ _host = None
1377
+
1378
+ _collection_formats: Dict[str, str] = {
1379
+ }
1380
+
1381
+ _path_params: Dict[str, str] = {}
1382
+ _query_params: List[Tuple[str, str]] = []
1383
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1384
+ _form_params: List[Tuple[str, str]] = []
1385
+ _files: Dict[
1386
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1387
+ ] = {}
1388
+ _body_params: Optional[bytes] = None
1389
+
1390
+ # process the path parameters
1391
+ if id is not None:
1392
+ _path_params['id'] = id
1393
+ # process the query parameters
1394
+ # process the header parameters
1395
+ # process the form parameters
1396
+ # process the body parameter
1397
+ if dedicated_rdns is not None:
1398
+ _body_params = dedicated_rdns
1399
+
1400
+
1401
+ # set the HTTP header `Accept`
1402
+ if 'Accept' not in _header_params:
1403
+ _header_params['Accept'] = self.api_client.select_header_accept(
1404
+ [
1405
+ 'application/json'
1406
+ ]
1407
+ )
1408
+
1409
+ # set the HTTP header `Content-Type`
1410
+ if _content_type:
1411
+ _header_params['Content-Type'] = _content_type
1412
+ else:
1413
+ _default_content_type = (
1414
+ self.api_client.select_header_content_type(
1415
+ [
1416
+ 'application/json'
1417
+ ]
1418
+ )
1419
+ )
1420
+ if _default_content_type is not None:
1421
+ _header_params['Content-Type'] = _default_content_type
1422
+
1423
+ # authentication setting
1424
+ _auth_settings: List[str] = [
1425
+ 'cookieAuth',
1426
+ 'tokenAuth'
1427
+ ]
1428
+
1429
+ return self.api_client.param_serialize(
1430
+ method='POST',
1431
+ resource_path='/api/dedicated/servers/{id}/rdns/',
1432
+ path_params=_path_params,
1433
+ query_params=_query_params,
1434
+ header_params=_header_params,
1435
+ body=_body_params,
1436
+ post_params=_form_params,
1437
+ files=_files,
1438
+ auth_settings=_auth_settings,
1439
+ collection_formats=_collection_formats,
1440
+ _host=_host,
1441
+ _request_auth=_request_auth
1442
+ )
1443
+
1444
+
1445
+
1446
+
1447
+ @validate_call
1448
+ def dedicated_servers_rdns_create2(
1449
+ self,
1450
+ id: StrictStr,
1451
+ dedicated_rdns: DedicatedRDNS,
1452
+ _request_timeout: Union[
1453
+ None,
1454
+ Annotated[StrictFloat, Field(gt=0)],
1455
+ Tuple[
1456
+ Annotated[StrictFloat, Field(gt=0)],
1457
+ Annotated[StrictFloat, Field(gt=0)]
1458
+ ]
1459
+ ] = None,
1460
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1461
+ _content_type: Optional[StrictStr] = None,
1462
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1463
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1464
+ ) -> RDNSUpdateResponse:
1465
+ """dedicated_servers_rdns_create2
1466
+
1467
+ Update reverse DNS for a dedicated server IP.
1468
+
1469
+ :param id: (required)
1470
+ :type id: str
1471
+ :param dedicated_rdns: (required)
1472
+ :type dedicated_rdns: DedicatedRDNS
1473
+ :param _request_timeout: timeout setting for this request. If one
1474
+ number provided, it will be total request
1475
+ timeout. It can also be a pair (tuple) of
1476
+ (connection, read) timeouts.
1477
+ :type _request_timeout: int, tuple(int, int), optional
1478
+ :param _request_auth: set to override the auth_settings for an a single
1479
+ request; this effectively ignores the
1480
+ authentication in the spec for a single request.
1481
+ :type _request_auth: dict, optional
1482
+ :param _content_type: force content-type for the request.
1483
+ :type _content_type: str, Optional
1484
+ :param _headers: set to override the headers for a single
1485
+ request; this effectively ignores the headers
1486
+ in the spec for a single request.
1487
+ :type _headers: dict, optional
1488
+ :param _host_index: set to override the host_index for a single
1489
+ request; this effectively ignores the host_index
1490
+ in the spec for a single request.
1491
+ :type _host_index: int, optional
1492
+ :return: Returns the result object.
1493
+ """ # noqa: E501
1494
+
1495
+ _param = self._dedicated_servers_rdns_create2_serialize(
1496
+ id=id,
1497
+ dedicated_rdns=dedicated_rdns,
1498
+ _request_auth=_request_auth,
1499
+ _content_type=_content_type,
1500
+ _headers=_headers,
1501
+ _host_index=_host_index
1502
+ )
1503
+
1504
+ _response_types_map: Dict[str, Optional[str]] = {
1505
+ '200': "RDNSUpdateResponse",
1506
+ }
1507
+ response_data = self.api_client.call_api(
1508
+ *_param,
1509
+ _request_timeout=_request_timeout
1510
+ )
1511
+ response_data.read()
1512
+ return self.api_client.response_deserialize(
1513
+ response_data=response_data,
1514
+ response_types_map=_response_types_map,
1515
+ ).data
1516
+
1517
+
1518
+ @validate_call
1519
+ def dedicated_servers_rdns_create2_with_http_info(
1520
+ self,
1521
+ id: StrictStr,
1522
+ dedicated_rdns: DedicatedRDNS,
1523
+ _request_timeout: Union[
1524
+ None,
1525
+ Annotated[StrictFloat, Field(gt=0)],
1526
+ Tuple[
1527
+ Annotated[StrictFloat, Field(gt=0)],
1528
+ Annotated[StrictFloat, Field(gt=0)]
1529
+ ]
1530
+ ] = None,
1531
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1532
+ _content_type: Optional[StrictStr] = None,
1533
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1534
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1535
+ ) -> ApiResponse[RDNSUpdateResponse]:
1536
+ """dedicated_servers_rdns_create2
1537
+
1538
+ Update reverse DNS for a dedicated server IP.
1539
+
1540
+ :param id: (required)
1541
+ :type id: str
1542
+ :param dedicated_rdns: (required)
1543
+ :type dedicated_rdns: DedicatedRDNS
1544
+ :param _request_timeout: timeout setting for this request. If one
1545
+ number provided, it will be total request
1546
+ timeout. It can also be a pair (tuple) of
1547
+ (connection, read) timeouts.
1548
+ :type _request_timeout: int, tuple(int, int), optional
1549
+ :param _request_auth: set to override the auth_settings for an a single
1550
+ request; this effectively ignores the
1551
+ authentication in the spec for a single request.
1552
+ :type _request_auth: dict, optional
1553
+ :param _content_type: force content-type for the request.
1554
+ :type _content_type: str, Optional
1555
+ :param _headers: set to override the headers for a single
1556
+ request; this effectively ignores the headers
1557
+ in the spec for a single request.
1558
+ :type _headers: dict, optional
1559
+ :param _host_index: set to override the host_index for a single
1560
+ request; this effectively ignores the host_index
1561
+ in the spec for a single request.
1562
+ :type _host_index: int, optional
1563
+ :return: Returns the result object.
1564
+ """ # noqa: E501
1565
+
1566
+ _param = self._dedicated_servers_rdns_create2_serialize(
1567
+ id=id,
1568
+ dedicated_rdns=dedicated_rdns,
1569
+ _request_auth=_request_auth,
1570
+ _content_type=_content_type,
1571
+ _headers=_headers,
1572
+ _host_index=_host_index
1573
+ )
1574
+
1575
+ _response_types_map: Dict[str, Optional[str]] = {
1576
+ '200': "RDNSUpdateResponse",
1577
+ }
1578
+ response_data = self.api_client.call_api(
1579
+ *_param,
1580
+ _request_timeout=_request_timeout
1581
+ )
1582
+ response_data.read()
1583
+ return self.api_client.response_deserialize(
1584
+ response_data=response_data,
1585
+ response_types_map=_response_types_map,
1586
+ )
1587
+
1588
+
1589
+ @validate_call
1590
+ def dedicated_servers_rdns_create2_without_preload_content(
1591
+ self,
1592
+ id: StrictStr,
1593
+ dedicated_rdns: DedicatedRDNS,
1594
+ _request_timeout: Union[
1595
+ None,
1596
+ Annotated[StrictFloat, Field(gt=0)],
1597
+ Tuple[
1598
+ Annotated[StrictFloat, Field(gt=0)],
1599
+ Annotated[StrictFloat, Field(gt=0)]
1600
+ ]
1601
+ ] = None,
1602
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1603
+ _content_type: Optional[StrictStr] = None,
1604
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1605
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1606
+ ) -> RESTResponseType:
1607
+ """dedicated_servers_rdns_create2
1608
+
1609
+ Update reverse DNS for a dedicated server IP.
1610
+
1611
+ :param id: (required)
1612
+ :type id: str
1613
+ :param dedicated_rdns: (required)
1614
+ :type dedicated_rdns: DedicatedRDNS
1615
+ :param _request_timeout: timeout setting for this request. If one
1616
+ number provided, it will be total request
1617
+ timeout. It can also be a pair (tuple) of
1618
+ (connection, read) timeouts.
1619
+ :type _request_timeout: int, tuple(int, int), optional
1620
+ :param _request_auth: set to override the auth_settings for an a single
1621
+ request; this effectively ignores the
1622
+ authentication in the spec for a single request.
1623
+ :type _request_auth: dict, optional
1624
+ :param _content_type: force content-type for the request.
1625
+ :type _content_type: str, Optional
1626
+ :param _headers: set to override the headers for a single
1627
+ request; this effectively ignores the headers
1628
+ in the spec for a single request.
1629
+ :type _headers: dict, optional
1630
+ :param _host_index: set to override the host_index for a single
1631
+ request; this effectively ignores the host_index
1632
+ in the spec for a single request.
1633
+ :type _host_index: int, optional
1634
+ :return: Returns the result object.
1635
+ """ # noqa: E501
1636
+
1637
+ _param = self._dedicated_servers_rdns_create2_serialize(
1638
+ id=id,
1639
+ dedicated_rdns=dedicated_rdns,
1640
+ _request_auth=_request_auth,
1641
+ _content_type=_content_type,
1642
+ _headers=_headers,
1643
+ _host_index=_host_index
1644
+ )
1645
+
1646
+ _response_types_map: Dict[str, Optional[str]] = {
1647
+ '200': "RDNSUpdateResponse",
1648
+ }
1649
+ response_data = self.api_client.call_api(
1650
+ *_param,
1651
+ _request_timeout=_request_timeout
1652
+ )
1653
+ return response_data.response
1654
+
1655
+
1656
+ def _dedicated_servers_rdns_create2_serialize(
1657
+ self,
1658
+ id,
1659
+ dedicated_rdns,
1660
+ _request_auth,
1661
+ _content_type,
1662
+ _headers,
1663
+ _host_index,
1664
+ ) -> RequestSerialized:
1665
+
1666
+ _host = None
1667
+
1668
+ _collection_formats: Dict[str, str] = {
1669
+ }
1670
+
1671
+ _path_params: Dict[str, str] = {}
1672
+ _query_params: List[Tuple[str, str]] = []
1673
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1674
+ _form_params: List[Tuple[str, str]] = []
1675
+ _files: Dict[
1676
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1677
+ ] = {}
1678
+ _body_params: Optional[bytes] = None
1679
+
1680
+ # process the path parameters
1681
+ if id is not None:
1682
+ _path_params['id'] = id
1683
+ # process the query parameters
1684
+ # process the header parameters
1685
+ # process the form parameters
1686
+ # process the body parameter
1687
+ if dedicated_rdns is not None:
1688
+ _body_params = dedicated_rdns
1689
+
1690
+
1691
+ # set the HTTP header `Accept`
1692
+ if 'Accept' not in _header_params:
1693
+ _header_params['Accept'] = self.api_client.select_header_accept(
1694
+ [
1695
+ 'application/json'
1696
+ ]
1697
+ )
1698
+
1699
+ # set the HTTP header `Content-Type`
1700
+ if _content_type:
1701
+ _header_params['Content-Type'] = _content_type
1702
+ else:
1703
+ _default_content_type = (
1704
+ self.api_client.select_header_content_type(
1705
+ [
1706
+ 'application/json'
1707
+ ]
1708
+ )
1709
+ )
1710
+ if _default_content_type is not None:
1711
+ _header_params['Content-Type'] = _default_content_type
1712
+
1713
+ # authentication setting
1714
+ _auth_settings: List[str] = [
1715
+ 'cookieAuth',
1716
+ 'tokenAuth'
1717
+ ]
1718
+
1719
+ return self.api_client.param_serialize(
1720
+ method='POST',
1721
+ resource_path='/api/v1/dedicated/servers/{id}/rdns/',
1722
+ path_params=_path_params,
1723
+ query_params=_query_params,
1724
+ header_params=_header_params,
1725
+ body=_body_params,
1726
+ post_params=_form_params,
1727
+ files=_files,
1728
+ auth_settings=_auth_settings,
1729
+ collection_formats=_collection_formats,
1730
+ _host=_host,
1731
+ _request_auth=_request_auth
1732
+ )
1733
+
1734
+
1735
+
1736
+
1737
+ @validate_call
1738
+ def dedicated_servers_reinstall_create(
1739
+ self,
1740
+ id: StrictStr,
1741
+ reinstall: Reinstall,
1742
+ _request_timeout: Union[
1743
+ None,
1744
+ Annotated[StrictFloat, Field(gt=0)],
1745
+ Tuple[
1746
+ Annotated[StrictFloat, Field(gt=0)],
1747
+ Annotated[StrictFloat, Field(gt=0)]
1748
+ ]
1749
+ ] = None,
1750
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1751
+ _content_type: Optional[StrictStr] = None,
1752
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1753
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1754
+ ) -> ReinstallResponse:
1755
+ """dedicated_servers_reinstall_create
1756
+
1757
+ Reinstall the dedicated server with a new operating system.
1758
+
1759
+ :param id: (required)
1760
+ :type id: str
1761
+ :param reinstall: (required)
1762
+ :type reinstall: Reinstall
1763
+ :param _request_timeout: timeout setting for this request. If one
1764
+ number provided, it will be total request
1765
+ timeout. It can also be a pair (tuple) of
1766
+ (connection, read) timeouts.
1767
+ :type _request_timeout: int, tuple(int, int), optional
1768
+ :param _request_auth: set to override the auth_settings for an a single
1769
+ request; this effectively ignores the
1770
+ authentication in the spec for a single request.
1771
+ :type _request_auth: dict, optional
1772
+ :param _content_type: force content-type for the request.
1773
+ :type _content_type: str, Optional
1774
+ :param _headers: set to override the headers for a single
1775
+ request; this effectively ignores the headers
1776
+ in the spec for a single request.
1777
+ :type _headers: dict, optional
1778
+ :param _host_index: set to override the host_index for a single
1779
+ request; this effectively ignores the host_index
1780
+ in the spec for a single request.
1781
+ :type _host_index: int, optional
1782
+ :return: Returns the result object.
1783
+ """ # noqa: E501
1784
+
1785
+ _param = self._dedicated_servers_reinstall_create_serialize(
1786
+ id=id,
1787
+ reinstall=reinstall,
1788
+ _request_auth=_request_auth,
1789
+ _content_type=_content_type,
1790
+ _headers=_headers,
1791
+ _host_index=_host_index
1792
+ )
1793
+
1794
+ _response_types_map: Dict[str, Optional[str]] = {
1795
+ '200': "ReinstallResponse",
1796
+ }
1797
+ response_data = self.api_client.call_api(
1798
+ *_param,
1799
+ _request_timeout=_request_timeout
1800
+ )
1801
+ response_data.read()
1802
+ return self.api_client.response_deserialize(
1803
+ response_data=response_data,
1804
+ response_types_map=_response_types_map,
1805
+ ).data
1806
+
1807
+
1808
+ @validate_call
1809
+ def dedicated_servers_reinstall_create_with_http_info(
1810
+ self,
1811
+ id: StrictStr,
1812
+ reinstall: Reinstall,
1813
+ _request_timeout: Union[
1814
+ None,
1815
+ Annotated[StrictFloat, Field(gt=0)],
1816
+ Tuple[
1817
+ Annotated[StrictFloat, Field(gt=0)],
1818
+ Annotated[StrictFloat, Field(gt=0)]
1819
+ ]
1820
+ ] = None,
1821
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1822
+ _content_type: Optional[StrictStr] = None,
1823
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1824
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1825
+ ) -> ApiResponse[ReinstallResponse]:
1826
+ """dedicated_servers_reinstall_create
1827
+
1828
+ Reinstall the dedicated server with a new operating system.
1829
+
1830
+ :param id: (required)
1831
+ :type id: str
1832
+ :param reinstall: (required)
1833
+ :type reinstall: Reinstall
1834
+ :param _request_timeout: timeout setting for this request. If one
1835
+ number provided, it will be total request
1836
+ timeout. It can also be a pair (tuple) of
1837
+ (connection, read) timeouts.
1838
+ :type _request_timeout: int, tuple(int, int), optional
1839
+ :param _request_auth: set to override the auth_settings for an a single
1840
+ request; this effectively ignores the
1841
+ authentication in the spec for a single request.
1842
+ :type _request_auth: dict, optional
1843
+ :param _content_type: force content-type for the request.
1844
+ :type _content_type: str, Optional
1845
+ :param _headers: set to override the headers for a single
1846
+ request; this effectively ignores the headers
1847
+ in the spec for a single request.
1848
+ :type _headers: dict, optional
1849
+ :param _host_index: set to override the host_index for a single
1850
+ request; this effectively ignores the host_index
1851
+ in the spec for a single request.
1852
+ :type _host_index: int, optional
1853
+ :return: Returns the result object.
1854
+ """ # noqa: E501
1855
+
1856
+ _param = self._dedicated_servers_reinstall_create_serialize(
1857
+ id=id,
1858
+ reinstall=reinstall,
1859
+ _request_auth=_request_auth,
1860
+ _content_type=_content_type,
1861
+ _headers=_headers,
1862
+ _host_index=_host_index
1863
+ )
1864
+
1865
+ _response_types_map: Dict[str, Optional[str]] = {
1866
+ '200': "ReinstallResponse",
1867
+ }
1868
+ response_data = self.api_client.call_api(
1869
+ *_param,
1870
+ _request_timeout=_request_timeout
1871
+ )
1872
+ response_data.read()
1873
+ return self.api_client.response_deserialize(
1874
+ response_data=response_data,
1875
+ response_types_map=_response_types_map,
1876
+ )
1877
+
1878
+
1879
+ @validate_call
1880
+ def dedicated_servers_reinstall_create_without_preload_content(
1881
+ self,
1882
+ id: StrictStr,
1883
+ reinstall: Reinstall,
1884
+ _request_timeout: Union[
1885
+ None,
1886
+ Annotated[StrictFloat, Field(gt=0)],
1887
+ Tuple[
1888
+ Annotated[StrictFloat, Field(gt=0)],
1889
+ Annotated[StrictFloat, Field(gt=0)]
1890
+ ]
1891
+ ] = None,
1892
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1893
+ _content_type: Optional[StrictStr] = None,
1894
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1895
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1896
+ ) -> RESTResponseType:
1897
+ """dedicated_servers_reinstall_create
1898
+
1899
+ Reinstall the dedicated server with a new operating system.
1900
+
1901
+ :param id: (required)
1902
+ :type id: str
1903
+ :param reinstall: (required)
1904
+ :type reinstall: Reinstall
1905
+ :param _request_timeout: timeout setting for this request. If one
1906
+ number provided, it will be total request
1907
+ timeout. It can also be a pair (tuple) of
1908
+ (connection, read) timeouts.
1909
+ :type _request_timeout: int, tuple(int, int), optional
1910
+ :param _request_auth: set to override the auth_settings for an a single
1911
+ request; this effectively ignores the
1912
+ authentication in the spec for a single request.
1913
+ :type _request_auth: dict, optional
1914
+ :param _content_type: force content-type for the request.
1915
+ :type _content_type: str, Optional
1916
+ :param _headers: set to override the headers for a single
1917
+ request; this effectively ignores the headers
1918
+ in the spec for a single request.
1919
+ :type _headers: dict, optional
1920
+ :param _host_index: set to override the host_index for a single
1921
+ request; this effectively ignores the host_index
1922
+ in the spec for a single request.
1923
+ :type _host_index: int, optional
1924
+ :return: Returns the result object.
1925
+ """ # noqa: E501
1926
+
1927
+ _param = self._dedicated_servers_reinstall_create_serialize(
1928
+ id=id,
1929
+ reinstall=reinstall,
1930
+ _request_auth=_request_auth,
1931
+ _content_type=_content_type,
1932
+ _headers=_headers,
1933
+ _host_index=_host_index
1934
+ )
1935
+
1936
+ _response_types_map: Dict[str, Optional[str]] = {
1937
+ '200': "ReinstallResponse",
1938
+ }
1939
+ response_data = self.api_client.call_api(
1940
+ *_param,
1941
+ _request_timeout=_request_timeout
1942
+ )
1943
+ return response_data.response
1944
+
1945
+
1946
+ def _dedicated_servers_reinstall_create_serialize(
1947
+ self,
1948
+ id,
1949
+ reinstall,
1950
+ _request_auth,
1951
+ _content_type,
1952
+ _headers,
1953
+ _host_index,
1954
+ ) -> RequestSerialized:
1955
+
1956
+ _host = None
1957
+
1958
+ _collection_formats: Dict[str, str] = {
1959
+ }
1960
+
1961
+ _path_params: Dict[str, str] = {}
1962
+ _query_params: List[Tuple[str, str]] = []
1963
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1964
+ _form_params: List[Tuple[str, str]] = []
1965
+ _files: Dict[
1966
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1967
+ ] = {}
1968
+ _body_params: Optional[bytes] = None
1969
+
1970
+ # process the path parameters
1971
+ if id is not None:
1972
+ _path_params['id'] = id
1973
+ # process the query parameters
1974
+ # process the header parameters
1975
+ # process the form parameters
1976
+ # process the body parameter
1977
+ if reinstall is not None:
1978
+ _body_params = reinstall
1979
+
1980
+
1981
+ # set the HTTP header `Accept`
1982
+ if 'Accept' not in _header_params:
1983
+ _header_params['Accept'] = self.api_client.select_header_accept(
1984
+ [
1985
+ 'application/json'
1986
+ ]
1987
+ )
1988
+
1989
+ # set the HTTP header `Content-Type`
1990
+ if _content_type:
1991
+ _header_params['Content-Type'] = _content_type
1992
+ else:
1993
+ _default_content_type = (
1994
+ self.api_client.select_header_content_type(
1995
+ [
1996
+ 'application/json'
1997
+ ]
1998
+ )
1999
+ )
2000
+ if _default_content_type is not None:
2001
+ _header_params['Content-Type'] = _default_content_type
2002
+
2003
+ # authentication setting
2004
+ _auth_settings: List[str] = [
2005
+ 'cookieAuth',
2006
+ 'tokenAuth'
2007
+ ]
2008
+
2009
+ return self.api_client.param_serialize(
2010
+ method='POST',
2011
+ resource_path='/api/dedicated/servers/{id}/reinstall/',
2012
+ path_params=_path_params,
2013
+ query_params=_query_params,
2014
+ header_params=_header_params,
2015
+ body=_body_params,
2016
+ post_params=_form_params,
2017
+ files=_files,
2018
+ auth_settings=_auth_settings,
2019
+ collection_formats=_collection_formats,
2020
+ _host=_host,
2021
+ _request_auth=_request_auth
2022
+ )
2023
+
2024
+
2025
+
2026
+
2027
+ @validate_call
2028
+ def dedicated_servers_reinstall_create2(
2029
+ self,
2030
+ id: StrictStr,
2031
+ reinstall: Reinstall,
2032
+ _request_timeout: Union[
2033
+ None,
2034
+ Annotated[StrictFloat, Field(gt=0)],
2035
+ Tuple[
2036
+ Annotated[StrictFloat, Field(gt=0)],
2037
+ Annotated[StrictFloat, Field(gt=0)]
2038
+ ]
2039
+ ] = None,
2040
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2041
+ _content_type: Optional[StrictStr] = None,
2042
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2043
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2044
+ ) -> ReinstallResponse:
2045
+ """dedicated_servers_reinstall_create2
2046
+
2047
+ Reinstall the dedicated server with a new operating system.
2048
+
2049
+ :param id: (required)
2050
+ :type id: str
2051
+ :param reinstall: (required)
2052
+ :type reinstall: Reinstall
2053
+ :param _request_timeout: timeout setting for this request. If one
2054
+ number provided, it will be total request
2055
+ timeout. It can also be a pair (tuple) of
2056
+ (connection, read) timeouts.
2057
+ :type _request_timeout: int, tuple(int, int), optional
2058
+ :param _request_auth: set to override the auth_settings for an a single
2059
+ request; this effectively ignores the
2060
+ authentication in the spec for a single request.
2061
+ :type _request_auth: dict, optional
2062
+ :param _content_type: force content-type for the request.
2063
+ :type _content_type: str, Optional
2064
+ :param _headers: set to override the headers for a single
2065
+ request; this effectively ignores the headers
2066
+ in the spec for a single request.
2067
+ :type _headers: dict, optional
2068
+ :param _host_index: set to override the host_index for a single
2069
+ request; this effectively ignores the host_index
2070
+ in the spec for a single request.
2071
+ :type _host_index: int, optional
2072
+ :return: Returns the result object.
2073
+ """ # noqa: E501
2074
+
2075
+ _param = self._dedicated_servers_reinstall_create2_serialize(
2076
+ id=id,
2077
+ reinstall=reinstall,
2078
+ _request_auth=_request_auth,
2079
+ _content_type=_content_type,
2080
+ _headers=_headers,
2081
+ _host_index=_host_index
2082
+ )
2083
+
2084
+ _response_types_map: Dict[str, Optional[str]] = {
2085
+ '200': "ReinstallResponse",
2086
+ }
2087
+ response_data = self.api_client.call_api(
2088
+ *_param,
2089
+ _request_timeout=_request_timeout
2090
+ )
2091
+ response_data.read()
2092
+ return self.api_client.response_deserialize(
2093
+ response_data=response_data,
2094
+ response_types_map=_response_types_map,
2095
+ ).data
2096
+
2097
+
2098
+ @validate_call
2099
+ def dedicated_servers_reinstall_create2_with_http_info(
2100
+ self,
2101
+ id: StrictStr,
2102
+ reinstall: Reinstall,
2103
+ _request_timeout: Union[
2104
+ None,
2105
+ Annotated[StrictFloat, Field(gt=0)],
2106
+ Tuple[
2107
+ Annotated[StrictFloat, Field(gt=0)],
2108
+ Annotated[StrictFloat, Field(gt=0)]
2109
+ ]
2110
+ ] = None,
2111
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2112
+ _content_type: Optional[StrictStr] = None,
2113
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2114
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2115
+ ) -> ApiResponse[ReinstallResponse]:
2116
+ """dedicated_servers_reinstall_create2
2117
+
2118
+ Reinstall the dedicated server with a new operating system.
2119
+
2120
+ :param id: (required)
2121
+ :type id: str
2122
+ :param reinstall: (required)
2123
+ :type reinstall: Reinstall
2124
+ :param _request_timeout: timeout setting for this request. If one
2125
+ number provided, it will be total request
2126
+ timeout. It can also be a pair (tuple) of
2127
+ (connection, read) timeouts.
2128
+ :type _request_timeout: int, tuple(int, int), optional
2129
+ :param _request_auth: set to override the auth_settings for an a single
2130
+ request; this effectively ignores the
2131
+ authentication in the spec for a single request.
2132
+ :type _request_auth: dict, optional
2133
+ :param _content_type: force content-type for the request.
2134
+ :type _content_type: str, Optional
2135
+ :param _headers: set to override the headers for a single
2136
+ request; this effectively ignores the headers
2137
+ in the spec for a single request.
2138
+ :type _headers: dict, optional
2139
+ :param _host_index: set to override the host_index for a single
2140
+ request; this effectively ignores the host_index
2141
+ in the spec for a single request.
2142
+ :type _host_index: int, optional
2143
+ :return: Returns the result object.
2144
+ """ # noqa: E501
2145
+
2146
+ _param = self._dedicated_servers_reinstall_create2_serialize(
2147
+ id=id,
2148
+ reinstall=reinstall,
2149
+ _request_auth=_request_auth,
2150
+ _content_type=_content_type,
2151
+ _headers=_headers,
2152
+ _host_index=_host_index
2153
+ )
2154
+
2155
+ _response_types_map: Dict[str, Optional[str]] = {
2156
+ '200': "ReinstallResponse",
2157
+ }
2158
+ response_data = self.api_client.call_api(
2159
+ *_param,
2160
+ _request_timeout=_request_timeout
2161
+ )
2162
+ response_data.read()
2163
+ return self.api_client.response_deserialize(
2164
+ response_data=response_data,
2165
+ response_types_map=_response_types_map,
2166
+ )
2167
+
2168
+
2169
+ @validate_call
2170
+ def dedicated_servers_reinstall_create2_without_preload_content(
2171
+ self,
2172
+ id: StrictStr,
2173
+ reinstall: Reinstall,
2174
+ _request_timeout: Union[
2175
+ None,
2176
+ Annotated[StrictFloat, Field(gt=0)],
2177
+ Tuple[
2178
+ Annotated[StrictFloat, Field(gt=0)],
2179
+ Annotated[StrictFloat, Field(gt=0)]
2180
+ ]
2181
+ ] = None,
2182
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2183
+ _content_type: Optional[StrictStr] = None,
2184
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2185
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2186
+ ) -> RESTResponseType:
2187
+ """dedicated_servers_reinstall_create2
2188
+
2189
+ Reinstall the dedicated server with a new operating system.
2190
+
2191
+ :param id: (required)
2192
+ :type id: str
2193
+ :param reinstall: (required)
2194
+ :type reinstall: Reinstall
2195
+ :param _request_timeout: timeout setting for this request. If one
2196
+ number provided, it will be total request
2197
+ timeout. It can also be a pair (tuple) of
2198
+ (connection, read) timeouts.
2199
+ :type _request_timeout: int, tuple(int, int), optional
2200
+ :param _request_auth: set to override the auth_settings for an a single
2201
+ request; this effectively ignores the
2202
+ authentication in the spec for a single request.
2203
+ :type _request_auth: dict, optional
2204
+ :param _content_type: force content-type for the request.
2205
+ :type _content_type: str, Optional
2206
+ :param _headers: set to override the headers for a single
2207
+ request; this effectively ignores the headers
2208
+ in the spec for a single request.
2209
+ :type _headers: dict, optional
2210
+ :param _host_index: set to override the host_index for a single
2211
+ request; this effectively ignores the host_index
2212
+ in the spec for a single request.
2213
+ :type _host_index: int, optional
2214
+ :return: Returns the result object.
2215
+ """ # noqa: E501
2216
+
2217
+ _param = self._dedicated_servers_reinstall_create2_serialize(
2218
+ id=id,
2219
+ reinstall=reinstall,
2220
+ _request_auth=_request_auth,
2221
+ _content_type=_content_type,
2222
+ _headers=_headers,
2223
+ _host_index=_host_index
2224
+ )
2225
+
2226
+ _response_types_map: Dict[str, Optional[str]] = {
2227
+ '200': "ReinstallResponse",
2228
+ }
2229
+ response_data = self.api_client.call_api(
2230
+ *_param,
2231
+ _request_timeout=_request_timeout
2232
+ )
2233
+ return response_data.response
2234
+
2235
+
2236
+ def _dedicated_servers_reinstall_create2_serialize(
2237
+ self,
2238
+ id,
2239
+ reinstall,
2240
+ _request_auth,
2241
+ _content_type,
2242
+ _headers,
2243
+ _host_index,
2244
+ ) -> RequestSerialized:
2245
+
2246
+ _host = None
2247
+
2248
+ _collection_formats: Dict[str, str] = {
2249
+ }
2250
+
2251
+ _path_params: Dict[str, str] = {}
2252
+ _query_params: List[Tuple[str, str]] = []
2253
+ _header_params: Dict[str, Optional[str]] = _headers or {}
2254
+ _form_params: List[Tuple[str, str]] = []
2255
+ _files: Dict[
2256
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
2257
+ ] = {}
2258
+ _body_params: Optional[bytes] = None
2259
+
2260
+ # process the path parameters
2261
+ if id is not None:
2262
+ _path_params['id'] = id
2263
+ # process the query parameters
2264
+ # process the header parameters
2265
+ # process the form parameters
2266
+ # process the body parameter
2267
+ if reinstall is not None:
2268
+ _body_params = reinstall
2269
+
2270
+
2271
+ # set the HTTP header `Accept`
2272
+ if 'Accept' not in _header_params:
2273
+ _header_params['Accept'] = self.api_client.select_header_accept(
2274
+ [
2275
+ 'application/json'
2276
+ ]
2277
+ )
2278
+
2279
+ # set the HTTP header `Content-Type`
2280
+ if _content_type:
2281
+ _header_params['Content-Type'] = _content_type
2282
+ else:
2283
+ _default_content_type = (
2284
+ self.api_client.select_header_content_type(
2285
+ [
2286
+ 'application/json'
2287
+ ]
2288
+ )
2289
+ )
2290
+ if _default_content_type is not None:
2291
+ _header_params['Content-Type'] = _default_content_type
2292
+
2293
+ # authentication setting
2294
+ _auth_settings: List[str] = [
2295
+ 'cookieAuth',
2296
+ 'tokenAuth'
2297
+ ]
2298
+
2299
+ return self.api_client.param_serialize(
2300
+ method='POST',
2301
+ resource_path='/api/v1/dedicated/servers/{id}/reinstall/',
2302
+ path_params=_path_params,
2303
+ query_params=_query_params,
2304
+ header_params=_header_params,
2305
+ body=_body_params,
2306
+ post_params=_form_params,
2307
+ files=_files,
2308
+ auth_settings=_auth_settings,
2309
+ collection_formats=_collection_formats,
2310
+ _host=_host,
2311
+ _request_auth=_request_auth
2312
+ )
2313
+
2314
+
2315
+
2316
+
2317
+ @validate_call
2318
+ def dedicated_servers_retrieve(
2319
+ self,
2320
+ id: StrictStr,
2321
+ _request_timeout: Union[
2322
+ None,
2323
+ Annotated[StrictFloat, Field(gt=0)],
2324
+ Tuple[
2325
+ Annotated[StrictFloat, Field(gt=0)],
2326
+ Annotated[StrictFloat, Field(gt=0)]
2327
+ ]
2328
+ ] = None,
2329
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2330
+ _content_type: Optional[StrictStr] = None,
2331
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2332
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2333
+ ) -> DedicatedServer:
2334
+ """dedicated_servers_retrieve
2335
+
2336
+ List and manage dedicated server services.
2337
+
2338
+ :param id: (required)
2339
+ :type id: str
2340
+ :param _request_timeout: timeout setting for this request. If one
2341
+ number provided, it will be total request
2342
+ timeout. It can also be a pair (tuple) of
2343
+ (connection, read) timeouts.
2344
+ :type _request_timeout: int, tuple(int, int), optional
2345
+ :param _request_auth: set to override the auth_settings for an a single
2346
+ request; this effectively ignores the
2347
+ authentication in the spec for a single request.
2348
+ :type _request_auth: dict, optional
2349
+ :param _content_type: force content-type for the request.
2350
+ :type _content_type: str, Optional
2351
+ :param _headers: set to override the headers for a single
2352
+ request; this effectively ignores the headers
2353
+ in the spec for a single request.
2354
+ :type _headers: dict, optional
2355
+ :param _host_index: set to override the host_index for a single
2356
+ request; this effectively ignores the host_index
2357
+ in the spec for a single request.
2358
+ :type _host_index: int, optional
2359
+ :return: Returns the result object.
2360
+ """ # noqa: E501
2361
+
2362
+ _param = self._dedicated_servers_retrieve_serialize(
2363
+ id=id,
2364
+ _request_auth=_request_auth,
2365
+ _content_type=_content_type,
2366
+ _headers=_headers,
2367
+ _host_index=_host_index
2368
+ )
2369
+
2370
+ _response_types_map: Dict[str, Optional[str]] = {
2371
+ '200': "DedicatedServer",
2372
+ }
2373
+ response_data = self.api_client.call_api(
2374
+ *_param,
2375
+ _request_timeout=_request_timeout
2376
+ )
2377
+ response_data.read()
2378
+ return self.api_client.response_deserialize(
2379
+ response_data=response_data,
2380
+ response_types_map=_response_types_map,
2381
+ ).data
2382
+
2383
+
2384
+ @validate_call
2385
+ def dedicated_servers_retrieve_with_http_info(
2386
+ self,
2387
+ id: StrictStr,
2388
+ _request_timeout: Union[
2389
+ None,
2390
+ Annotated[StrictFloat, Field(gt=0)],
2391
+ Tuple[
2392
+ Annotated[StrictFloat, Field(gt=0)],
2393
+ Annotated[StrictFloat, Field(gt=0)]
2394
+ ]
2395
+ ] = None,
2396
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2397
+ _content_type: Optional[StrictStr] = None,
2398
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2399
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2400
+ ) -> ApiResponse[DedicatedServer]:
2401
+ """dedicated_servers_retrieve
2402
+
2403
+ List and manage dedicated server services.
2404
+
2405
+ :param id: (required)
2406
+ :type id: str
2407
+ :param _request_timeout: timeout setting for this request. If one
2408
+ number provided, it will be total request
2409
+ timeout. It can also be a pair (tuple) of
2410
+ (connection, read) timeouts.
2411
+ :type _request_timeout: int, tuple(int, int), optional
2412
+ :param _request_auth: set to override the auth_settings for an a single
2413
+ request; this effectively ignores the
2414
+ authentication in the spec for a single request.
2415
+ :type _request_auth: dict, optional
2416
+ :param _content_type: force content-type for the request.
2417
+ :type _content_type: str, Optional
2418
+ :param _headers: set to override the headers for a single
2419
+ request; this effectively ignores the headers
2420
+ in the spec for a single request.
2421
+ :type _headers: dict, optional
2422
+ :param _host_index: set to override the host_index for a single
2423
+ request; this effectively ignores the host_index
2424
+ in the spec for a single request.
2425
+ :type _host_index: int, optional
2426
+ :return: Returns the result object.
2427
+ """ # noqa: E501
2428
+
2429
+ _param = self._dedicated_servers_retrieve_serialize(
2430
+ id=id,
2431
+ _request_auth=_request_auth,
2432
+ _content_type=_content_type,
2433
+ _headers=_headers,
2434
+ _host_index=_host_index
2435
+ )
2436
+
2437
+ _response_types_map: Dict[str, Optional[str]] = {
2438
+ '200': "DedicatedServer",
2439
+ }
2440
+ response_data = self.api_client.call_api(
2441
+ *_param,
2442
+ _request_timeout=_request_timeout
2443
+ )
2444
+ response_data.read()
2445
+ return self.api_client.response_deserialize(
2446
+ response_data=response_data,
2447
+ response_types_map=_response_types_map,
2448
+ )
2449
+
2450
+
2451
+ @validate_call
2452
+ def dedicated_servers_retrieve_without_preload_content(
2453
+ self,
2454
+ id: StrictStr,
2455
+ _request_timeout: Union[
2456
+ None,
2457
+ Annotated[StrictFloat, Field(gt=0)],
2458
+ Tuple[
2459
+ Annotated[StrictFloat, Field(gt=0)],
2460
+ Annotated[StrictFloat, Field(gt=0)]
2461
+ ]
2462
+ ] = None,
2463
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2464
+ _content_type: Optional[StrictStr] = None,
2465
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2466
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2467
+ ) -> RESTResponseType:
2468
+ """dedicated_servers_retrieve
2469
+
2470
+ List and manage dedicated server services.
2471
+
2472
+ :param id: (required)
2473
+ :type id: str
2474
+ :param _request_timeout: timeout setting for this request. If one
2475
+ number provided, it will be total request
2476
+ timeout. It can also be a pair (tuple) of
2477
+ (connection, read) timeouts.
2478
+ :type _request_timeout: int, tuple(int, int), optional
2479
+ :param _request_auth: set to override the auth_settings for an a single
2480
+ request; this effectively ignores the
2481
+ authentication in the spec for a single request.
2482
+ :type _request_auth: dict, optional
2483
+ :param _content_type: force content-type for the request.
2484
+ :type _content_type: str, Optional
2485
+ :param _headers: set to override the headers for a single
2486
+ request; this effectively ignores the headers
2487
+ in the spec for a single request.
2488
+ :type _headers: dict, optional
2489
+ :param _host_index: set to override the host_index for a single
2490
+ request; this effectively ignores the host_index
2491
+ in the spec for a single request.
2492
+ :type _host_index: int, optional
2493
+ :return: Returns the result object.
2494
+ """ # noqa: E501
2495
+
2496
+ _param = self._dedicated_servers_retrieve_serialize(
2497
+ id=id,
2498
+ _request_auth=_request_auth,
2499
+ _content_type=_content_type,
2500
+ _headers=_headers,
2501
+ _host_index=_host_index
2502
+ )
2503
+
2504
+ _response_types_map: Dict[str, Optional[str]] = {
2505
+ '200': "DedicatedServer",
2506
+ }
2507
+ response_data = self.api_client.call_api(
2508
+ *_param,
2509
+ _request_timeout=_request_timeout
2510
+ )
2511
+ return response_data.response
2512
+
2513
+
2514
+ def _dedicated_servers_retrieve_serialize(
2515
+ self,
2516
+ id,
2517
+ _request_auth,
2518
+ _content_type,
2519
+ _headers,
2520
+ _host_index,
2521
+ ) -> RequestSerialized:
2522
+
2523
+ _host = None
2524
+
2525
+ _collection_formats: Dict[str, str] = {
2526
+ }
2527
+
2528
+ _path_params: Dict[str, str] = {}
2529
+ _query_params: List[Tuple[str, str]] = []
2530
+ _header_params: Dict[str, Optional[str]] = _headers or {}
2531
+ _form_params: List[Tuple[str, str]] = []
2532
+ _files: Dict[
2533
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
2534
+ ] = {}
2535
+ _body_params: Optional[bytes] = None
2536
+
2537
+ # process the path parameters
2538
+ if id is not None:
2539
+ _path_params['id'] = id
2540
+ # process the query parameters
2541
+ # process the header parameters
2542
+ # process the form parameters
2543
+ # process the body parameter
2544
+
2545
+
2546
+ # set the HTTP header `Accept`
2547
+ if 'Accept' not in _header_params:
2548
+ _header_params['Accept'] = self.api_client.select_header_accept(
2549
+ [
2550
+ 'application/json'
2551
+ ]
2552
+ )
2553
+
2554
+
2555
+ # authentication setting
2556
+ _auth_settings: List[str] = [
2557
+ 'cookieAuth',
2558
+ 'tokenAuth'
2559
+ ]
2560
+
2561
+ return self.api_client.param_serialize(
2562
+ method='GET',
2563
+ resource_path='/api/dedicated/servers/{id}/',
2564
+ path_params=_path_params,
2565
+ query_params=_query_params,
2566
+ header_params=_header_params,
2567
+ body=_body_params,
2568
+ post_params=_form_params,
2569
+ files=_files,
2570
+ auth_settings=_auth_settings,
2571
+ collection_formats=_collection_formats,
2572
+ _host=_host,
2573
+ _request_auth=_request_auth
2574
+ )
2575
+
2576
+
2577
+
2578
+
2579
+ @validate_call
2580
+ def dedicated_servers_retrieve2(
2581
+ self,
2582
+ id: StrictStr,
2583
+ _request_timeout: Union[
2584
+ None,
2585
+ Annotated[StrictFloat, Field(gt=0)],
2586
+ Tuple[
2587
+ Annotated[StrictFloat, Field(gt=0)],
2588
+ Annotated[StrictFloat, Field(gt=0)]
2589
+ ]
2590
+ ] = None,
2591
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2592
+ _content_type: Optional[StrictStr] = None,
2593
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2594
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2595
+ ) -> DedicatedServer:
2596
+ """dedicated_servers_retrieve2
2597
+
2598
+ List and manage dedicated server services.
2599
+
2600
+ :param id: (required)
2601
+ :type id: str
2602
+ :param _request_timeout: timeout setting for this request. If one
2603
+ number provided, it will be total request
2604
+ timeout. It can also be a pair (tuple) of
2605
+ (connection, read) timeouts.
2606
+ :type _request_timeout: int, tuple(int, int), optional
2607
+ :param _request_auth: set to override the auth_settings for an a single
2608
+ request; this effectively ignores the
2609
+ authentication in the spec for a single request.
2610
+ :type _request_auth: dict, optional
2611
+ :param _content_type: force content-type for the request.
2612
+ :type _content_type: str, Optional
2613
+ :param _headers: set to override the headers for a single
2614
+ request; this effectively ignores the headers
2615
+ in the spec for a single request.
2616
+ :type _headers: dict, optional
2617
+ :param _host_index: set to override the host_index for a single
2618
+ request; this effectively ignores the host_index
2619
+ in the spec for a single request.
2620
+ :type _host_index: int, optional
2621
+ :return: Returns the result object.
2622
+ """ # noqa: E501
2623
+
2624
+ _param = self._dedicated_servers_retrieve2_serialize(
2625
+ id=id,
2626
+ _request_auth=_request_auth,
2627
+ _content_type=_content_type,
2628
+ _headers=_headers,
2629
+ _host_index=_host_index
2630
+ )
2631
+
2632
+ _response_types_map: Dict[str, Optional[str]] = {
2633
+ '200': "DedicatedServer",
2634
+ }
2635
+ response_data = self.api_client.call_api(
2636
+ *_param,
2637
+ _request_timeout=_request_timeout
2638
+ )
2639
+ response_data.read()
2640
+ return self.api_client.response_deserialize(
2641
+ response_data=response_data,
2642
+ response_types_map=_response_types_map,
2643
+ ).data
2644
+
2645
+
2646
+ @validate_call
2647
+ def dedicated_servers_retrieve2_with_http_info(
2648
+ self,
2649
+ id: StrictStr,
2650
+ _request_timeout: Union[
2651
+ None,
2652
+ Annotated[StrictFloat, Field(gt=0)],
2653
+ Tuple[
2654
+ Annotated[StrictFloat, Field(gt=0)],
2655
+ Annotated[StrictFloat, Field(gt=0)]
2656
+ ]
2657
+ ] = None,
2658
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2659
+ _content_type: Optional[StrictStr] = None,
2660
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2661
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2662
+ ) -> ApiResponse[DedicatedServer]:
2663
+ """dedicated_servers_retrieve2
2664
+
2665
+ List and manage dedicated server services.
2666
+
2667
+ :param id: (required)
2668
+ :type id: str
2669
+ :param _request_timeout: timeout setting for this request. If one
2670
+ number provided, it will be total request
2671
+ timeout. It can also be a pair (tuple) of
2672
+ (connection, read) timeouts.
2673
+ :type _request_timeout: int, tuple(int, int), optional
2674
+ :param _request_auth: set to override the auth_settings for an a single
2675
+ request; this effectively ignores the
2676
+ authentication in the spec for a single request.
2677
+ :type _request_auth: dict, optional
2678
+ :param _content_type: force content-type for the request.
2679
+ :type _content_type: str, Optional
2680
+ :param _headers: set to override the headers for a single
2681
+ request; this effectively ignores the headers
2682
+ in the spec for a single request.
2683
+ :type _headers: dict, optional
2684
+ :param _host_index: set to override the host_index for a single
2685
+ request; this effectively ignores the host_index
2686
+ in the spec for a single request.
2687
+ :type _host_index: int, optional
2688
+ :return: Returns the result object.
2689
+ """ # noqa: E501
2690
+
2691
+ _param = self._dedicated_servers_retrieve2_serialize(
2692
+ id=id,
2693
+ _request_auth=_request_auth,
2694
+ _content_type=_content_type,
2695
+ _headers=_headers,
2696
+ _host_index=_host_index
2697
+ )
2698
+
2699
+ _response_types_map: Dict[str, Optional[str]] = {
2700
+ '200': "DedicatedServer",
2701
+ }
2702
+ response_data = self.api_client.call_api(
2703
+ *_param,
2704
+ _request_timeout=_request_timeout
2705
+ )
2706
+ response_data.read()
2707
+ return self.api_client.response_deserialize(
2708
+ response_data=response_data,
2709
+ response_types_map=_response_types_map,
2710
+ )
2711
+
2712
+
2713
+ @validate_call
2714
+ def dedicated_servers_retrieve2_without_preload_content(
2715
+ self,
2716
+ id: StrictStr,
2717
+ _request_timeout: Union[
2718
+ None,
2719
+ Annotated[StrictFloat, Field(gt=0)],
2720
+ Tuple[
2721
+ Annotated[StrictFloat, Field(gt=0)],
2722
+ Annotated[StrictFloat, Field(gt=0)]
2723
+ ]
2724
+ ] = None,
2725
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2726
+ _content_type: Optional[StrictStr] = None,
2727
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2728
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2729
+ ) -> RESTResponseType:
2730
+ """dedicated_servers_retrieve2
2731
+
2732
+ List and manage dedicated server services.
2733
+
2734
+ :param id: (required)
2735
+ :type id: str
2736
+ :param _request_timeout: timeout setting for this request. If one
2737
+ number provided, it will be total request
2738
+ timeout. It can also be a pair (tuple) of
2739
+ (connection, read) timeouts.
2740
+ :type _request_timeout: int, tuple(int, int), optional
2741
+ :param _request_auth: set to override the auth_settings for an a single
2742
+ request; this effectively ignores the
2743
+ authentication in the spec for a single request.
2744
+ :type _request_auth: dict, optional
2745
+ :param _content_type: force content-type for the request.
2746
+ :type _content_type: str, Optional
2747
+ :param _headers: set to override the headers for a single
2748
+ request; this effectively ignores the headers
2749
+ in the spec for a single request.
2750
+ :type _headers: dict, optional
2751
+ :param _host_index: set to override the host_index for a single
2752
+ request; this effectively ignores the host_index
2753
+ in the spec for a single request.
2754
+ :type _host_index: int, optional
2755
+ :return: Returns the result object.
2756
+ """ # noqa: E501
2757
+
2758
+ _param = self._dedicated_servers_retrieve2_serialize(
2759
+ id=id,
2760
+ _request_auth=_request_auth,
2761
+ _content_type=_content_type,
2762
+ _headers=_headers,
2763
+ _host_index=_host_index
2764
+ )
2765
+
2766
+ _response_types_map: Dict[str, Optional[str]] = {
2767
+ '200': "DedicatedServer",
2768
+ }
2769
+ response_data = self.api_client.call_api(
2770
+ *_param,
2771
+ _request_timeout=_request_timeout
2772
+ )
2773
+ return response_data.response
2774
+
2775
+
2776
+ def _dedicated_servers_retrieve2_serialize(
2777
+ self,
2778
+ id,
2779
+ _request_auth,
2780
+ _content_type,
2781
+ _headers,
2782
+ _host_index,
2783
+ ) -> RequestSerialized:
2784
+
2785
+ _host = None
2786
+
2787
+ _collection_formats: Dict[str, str] = {
2788
+ }
2789
+
2790
+ _path_params: Dict[str, str] = {}
2791
+ _query_params: List[Tuple[str, str]] = []
2792
+ _header_params: Dict[str, Optional[str]] = _headers or {}
2793
+ _form_params: List[Tuple[str, str]] = []
2794
+ _files: Dict[
2795
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
2796
+ ] = {}
2797
+ _body_params: Optional[bytes] = None
2798
+
2799
+ # process the path parameters
2800
+ if id is not None:
2801
+ _path_params['id'] = id
2802
+ # process the query parameters
2803
+ # process the header parameters
2804
+ # process the form parameters
2805
+ # process the body parameter
2806
+
2807
+
2808
+ # set the HTTP header `Accept`
2809
+ if 'Accept' not in _header_params:
2810
+ _header_params['Accept'] = self.api_client.select_header_accept(
2811
+ [
2812
+ 'application/json'
2813
+ ]
2814
+ )
2815
+
2816
+
2817
+ # authentication setting
2818
+ _auth_settings: List[str] = [
2819
+ 'cookieAuth',
2820
+ 'tokenAuth'
2821
+ ]
2822
+
2823
+ return self.api_client.param_serialize(
2824
+ method='GET',
2825
+ resource_path='/api/v1/dedicated/servers/{id}/',
2826
+ path_params=_path_params,
2827
+ query_params=_query_params,
2828
+ header_params=_header_params,
2829
+ body=_body_params,
2830
+ post_params=_form_params,
2831
+ files=_files,
2832
+ auth_settings=_auth_settings,
2833
+ collection_formats=_collection_formats,
2834
+ _host=_host,
2835
+ _request_auth=_request_auth
2836
+ )
2837
+
2838
+