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,3440 @@
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, StrictStr
20
+ from typing import List
21
+ from typing_extensions import Annotated
22
+ from pidginhost_sdk.models.activate_free_dns import ActivateFreeDNS
23
+ from pidginhost_sdk.models.activate_free_dns_response import ActivateFreeDNSResponse
24
+ from pidginhost_sdk.models.dns_record import DNSRecord
25
+ from pidginhost_sdk.models.dns_record_create import DNSRecordCreate
26
+ from pidginhost_sdk.models.dns_record_mutate_response import DNSRecordMutateResponse
27
+ from pidginhost_sdk.models.deactivate_free_dns import DeactivateFreeDNS
28
+ from pidginhost_sdk.models.deactivate_free_dns_response import DeactivateFreeDNSResponse
29
+ from pidginhost_sdk.models.delete_record import DeleteRecord
30
+ from pidginhost_sdk.models.delete_record_response import DeleteRecordResponse
31
+ from pidginhost_sdk.models.free_dns_domain import FreeDNSDomain
32
+
33
+ from pidginhost_sdk.api_client import ApiClient, RequestSerialized
34
+ from pidginhost_sdk.api_response import ApiResponse
35
+ from pidginhost_sdk.rest import RESTResponseType
36
+
37
+
38
+ class FreednsApi:
39
+ """NOTE: This class is auto generated by OpenAPI Generator
40
+ Ref: https://openapi-generator.tech
41
+
42
+ Do not edit the class manually.
43
+ """
44
+
45
+ def __init__(self, api_client=None) -> None:
46
+ if api_client is None:
47
+ api_client = ApiClient.get_default()
48
+ self.api_client = api_client
49
+
50
+
51
+ @validate_call
52
+ def freedns_dns_activate_create(
53
+ self,
54
+ activate_free_dns: ActivateFreeDNS,
55
+ _request_timeout: Union[
56
+ None,
57
+ Annotated[StrictFloat, Field(gt=0)],
58
+ Tuple[
59
+ Annotated[StrictFloat, Field(gt=0)],
60
+ Annotated[StrictFloat, Field(gt=0)]
61
+ ]
62
+ ] = None,
63
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
64
+ _content_type: Optional[StrictStr] = None,
65
+ _headers: Optional[Dict[StrictStr, Any]] = None,
66
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
67
+ ) -> ActivateFreeDNSResponse:
68
+ """freedns_dns_activate_create
69
+
70
+ Activate FreeDNS for a domain. For internal domains the nameservers are changed to PidginHost NS. A default zone is created on the cPanel node.
71
+
72
+ :param activate_free_dns: (required)
73
+ :type activate_free_dns: ActivateFreeDNS
74
+ :param _request_timeout: timeout setting for this request. If one
75
+ number provided, it will be total request
76
+ timeout. It can also be a pair (tuple) of
77
+ (connection, read) timeouts.
78
+ :type _request_timeout: int, tuple(int, int), optional
79
+ :param _request_auth: set to override the auth_settings for an a single
80
+ request; this effectively ignores the
81
+ authentication in the spec for a single request.
82
+ :type _request_auth: dict, optional
83
+ :param _content_type: force content-type for the request.
84
+ :type _content_type: str, Optional
85
+ :param _headers: set to override the headers for a single
86
+ request; this effectively ignores the headers
87
+ in the spec for a single request.
88
+ :type _headers: dict, optional
89
+ :param _host_index: set to override the host_index for a single
90
+ request; this effectively ignores the host_index
91
+ in the spec for a single request.
92
+ :type _host_index: int, optional
93
+ :return: Returns the result object.
94
+ """ # noqa: E501
95
+
96
+ _param = self._freedns_dns_activate_create_serialize(
97
+ activate_free_dns=activate_free_dns,
98
+ _request_auth=_request_auth,
99
+ _content_type=_content_type,
100
+ _headers=_headers,
101
+ _host_index=_host_index
102
+ )
103
+
104
+ _response_types_map: Dict[str, Optional[str]] = {
105
+ '200': "ActivateFreeDNSResponse",
106
+ }
107
+ response_data = self.api_client.call_api(
108
+ *_param,
109
+ _request_timeout=_request_timeout
110
+ )
111
+ response_data.read()
112
+ return self.api_client.response_deserialize(
113
+ response_data=response_data,
114
+ response_types_map=_response_types_map,
115
+ ).data
116
+
117
+
118
+ @validate_call
119
+ def freedns_dns_activate_create_with_http_info(
120
+ self,
121
+ activate_free_dns: ActivateFreeDNS,
122
+ _request_timeout: Union[
123
+ None,
124
+ Annotated[StrictFloat, Field(gt=0)],
125
+ Tuple[
126
+ Annotated[StrictFloat, Field(gt=0)],
127
+ Annotated[StrictFloat, Field(gt=0)]
128
+ ]
129
+ ] = None,
130
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
131
+ _content_type: Optional[StrictStr] = None,
132
+ _headers: Optional[Dict[StrictStr, Any]] = None,
133
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
134
+ ) -> ApiResponse[ActivateFreeDNSResponse]:
135
+ """freedns_dns_activate_create
136
+
137
+ Activate FreeDNS for a domain. For internal domains the nameservers are changed to PidginHost NS. A default zone is created on the cPanel node.
138
+
139
+ :param activate_free_dns: (required)
140
+ :type activate_free_dns: ActivateFreeDNS
141
+ :param _request_timeout: timeout setting for this request. If one
142
+ number provided, it will be total request
143
+ timeout. It can also be a pair (tuple) of
144
+ (connection, read) timeouts.
145
+ :type _request_timeout: int, tuple(int, int), optional
146
+ :param _request_auth: set to override the auth_settings for an a single
147
+ request; this effectively ignores the
148
+ authentication in the spec for a single request.
149
+ :type _request_auth: dict, optional
150
+ :param _content_type: force content-type for the request.
151
+ :type _content_type: str, Optional
152
+ :param _headers: set to override the headers for a single
153
+ request; this effectively ignores the headers
154
+ in the spec for a single request.
155
+ :type _headers: dict, optional
156
+ :param _host_index: set to override the host_index for a single
157
+ request; this effectively ignores the host_index
158
+ in the spec for a single request.
159
+ :type _host_index: int, optional
160
+ :return: Returns the result object.
161
+ """ # noqa: E501
162
+
163
+ _param = self._freedns_dns_activate_create_serialize(
164
+ activate_free_dns=activate_free_dns,
165
+ _request_auth=_request_auth,
166
+ _content_type=_content_type,
167
+ _headers=_headers,
168
+ _host_index=_host_index
169
+ )
170
+
171
+ _response_types_map: Dict[str, Optional[str]] = {
172
+ '200': "ActivateFreeDNSResponse",
173
+ }
174
+ response_data = self.api_client.call_api(
175
+ *_param,
176
+ _request_timeout=_request_timeout
177
+ )
178
+ response_data.read()
179
+ return self.api_client.response_deserialize(
180
+ response_data=response_data,
181
+ response_types_map=_response_types_map,
182
+ )
183
+
184
+
185
+ @validate_call
186
+ def freedns_dns_activate_create_without_preload_content(
187
+ self,
188
+ activate_free_dns: ActivateFreeDNS,
189
+ _request_timeout: Union[
190
+ None,
191
+ Annotated[StrictFloat, Field(gt=0)],
192
+ Tuple[
193
+ Annotated[StrictFloat, Field(gt=0)],
194
+ Annotated[StrictFloat, Field(gt=0)]
195
+ ]
196
+ ] = None,
197
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
198
+ _content_type: Optional[StrictStr] = None,
199
+ _headers: Optional[Dict[StrictStr, Any]] = None,
200
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
201
+ ) -> RESTResponseType:
202
+ """freedns_dns_activate_create
203
+
204
+ Activate FreeDNS for a domain. For internal domains the nameservers are changed to PidginHost NS. A default zone is created on the cPanel node.
205
+
206
+ :param activate_free_dns: (required)
207
+ :type activate_free_dns: ActivateFreeDNS
208
+ :param _request_timeout: timeout setting for this request. If one
209
+ number provided, it will be total request
210
+ timeout. It can also be a pair (tuple) of
211
+ (connection, read) timeouts.
212
+ :type _request_timeout: int, tuple(int, int), optional
213
+ :param _request_auth: set to override the auth_settings for an a single
214
+ request; this effectively ignores the
215
+ authentication in the spec for a single request.
216
+ :type _request_auth: dict, optional
217
+ :param _content_type: force content-type for the request.
218
+ :type _content_type: str, Optional
219
+ :param _headers: set to override the headers for a single
220
+ request; this effectively ignores the headers
221
+ in the spec for a single request.
222
+ :type _headers: dict, optional
223
+ :param _host_index: set to override the host_index for a single
224
+ request; this effectively ignores the host_index
225
+ in the spec for a single request.
226
+ :type _host_index: int, optional
227
+ :return: Returns the result object.
228
+ """ # noqa: E501
229
+
230
+ _param = self._freedns_dns_activate_create_serialize(
231
+ activate_free_dns=activate_free_dns,
232
+ _request_auth=_request_auth,
233
+ _content_type=_content_type,
234
+ _headers=_headers,
235
+ _host_index=_host_index
236
+ )
237
+
238
+ _response_types_map: Dict[str, Optional[str]] = {
239
+ '200': "ActivateFreeDNSResponse",
240
+ }
241
+ response_data = self.api_client.call_api(
242
+ *_param,
243
+ _request_timeout=_request_timeout
244
+ )
245
+ return response_data.response
246
+
247
+
248
+ def _freedns_dns_activate_create_serialize(
249
+ self,
250
+ activate_free_dns,
251
+ _request_auth,
252
+ _content_type,
253
+ _headers,
254
+ _host_index,
255
+ ) -> RequestSerialized:
256
+
257
+ _host = None
258
+
259
+ _collection_formats: Dict[str, str] = {
260
+ }
261
+
262
+ _path_params: Dict[str, str] = {}
263
+ _query_params: List[Tuple[str, str]] = []
264
+ _header_params: Dict[str, Optional[str]] = _headers or {}
265
+ _form_params: List[Tuple[str, str]] = []
266
+ _files: Dict[
267
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
268
+ ] = {}
269
+ _body_params: Optional[bytes] = None
270
+
271
+ # process the path parameters
272
+ # process the query parameters
273
+ # process the header parameters
274
+ # process the form parameters
275
+ # process the body parameter
276
+ if activate_free_dns is not None:
277
+ _body_params = activate_free_dns
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
+ # set the HTTP header `Content-Type`
289
+ if _content_type:
290
+ _header_params['Content-Type'] = _content_type
291
+ else:
292
+ _default_content_type = (
293
+ self.api_client.select_header_content_type(
294
+ [
295
+ 'application/json'
296
+ ]
297
+ )
298
+ )
299
+ if _default_content_type is not None:
300
+ _header_params['Content-Type'] = _default_content_type
301
+
302
+ # authentication setting
303
+ _auth_settings: List[str] = [
304
+ 'cookieAuth',
305
+ 'tokenAuth'
306
+ ]
307
+
308
+ return self.api_client.param_serialize(
309
+ method='POST',
310
+ resource_path='/api/freedns/dns/activate/',
311
+ path_params=_path_params,
312
+ query_params=_query_params,
313
+ header_params=_header_params,
314
+ body=_body_params,
315
+ post_params=_form_params,
316
+ files=_files,
317
+ auth_settings=_auth_settings,
318
+ collection_formats=_collection_formats,
319
+ _host=_host,
320
+ _request_auth=_request_auth
321
+ )
322
+
323
+
324
+
325
+
326
+ @validate_call
327
+ def freedns_dns_activate_create2(
328
+ self,
329
+ activate_free_dns: ActivateFreeDNS,
330
+ _request_timeout: Union[
331
+ None,
332
+ Annotated[StrictFloat, Field(gt=0)],
333
+ Tuple[
334
+ Annotated[StrictFloat, Field(gt=0)],
335
+ Annotated[StrictFloat, Field(gt=0)]
336
+ ]
337
+ ] = None,
338
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
339
+ _content_type: Optional[StrictStr] = None,
340
+ _headers: Optional[Dict[StrictStr, Any]] = None,
341
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
342
+ ) -> ActivateFreeDNSResponse:
343
+ """freedns_dns_activate_create2
344
+
345
+ Activate FreeDNS for a domain. For internal domains the nameservers are changed to PidginHost NS. A default zone is created on the cPanel node.
346
+
347
+ :param activate_free_dns: (required)
348
+ :type activate_free_dns: ActivateFreeDNS
349
+ :param _request_timeout: timeout setting for this request. If one
350
+ number provided, it will be total request
351
+ timeout. It can also be a pair (tuple) of
352
+ (connection, read) timeouts.
353
+ :type _request_timeout: int, tuple(int, int), optional
354
+ :param _request_auth: set to override the auth_settings for an a single
355
+ request; this effectively ignores the
356
+ authentication in the spec for a single request.
357
+ :type _request_auth: dict, optional
358
+ :param _content_type: force content-type for the request.
359
+ :type _content_type: str, Optional
360
+ :param _headers: set to override the headers for a single
361
+ request; this effectively ignores the headers
362
+ in the spec for a single request.
363
+ :type _headers: dict, optional
364
+ :param _host_index: set to override the host_index for a single
365
+ request; this effectively ignores the host_index
366
+ in the spec for a single request.
367
+ :type _host_index: int, optional
368
+ :return: Returns the result object.
369
+ """ # noqa: E501
370
+
371
+ _param = self._freedns_dns_activate_create2_serialize(
372
+ activate_free_dns=activate_free_dns,
373
+ _request_auth=_request_auth,
374
+ _content_type=_content_type,
375
+ _headers=_headers,
376
+ _host_index=_host_index
377
+ )
378
+
379
+ _response_types_map: Dict[str, Optional[str]] = {
380
+ '200': "ActivateFreeDNSResponse",
381
+ }
382
+ response_data = self.api_client.call_api(
383
+ *_param,
384
+ _request_timeout=_request_timeout
385
+ )
386
+ response_data.read()
387
+ return self.api_client.response_deserialize(
388
+ response_data=response_data,
389
+ response_types_map=_response_types_map,
390
+ ).data
391
+
392
+
393
+ @validate_call
394
+ def freedns_dns_activate_create2_with_http_info(
395
+ self,
396
+ activate_free_dns: ActivateFreeDNS,
397
+ _request_timeout: Union[
398
+ None,
399
+ Annotated[StrictFloat, Field(gt=0)],
400
+ Tuple[
401
+ Annotated[StrictFloat, Field(gt=0)],
402
+ Annotated[StrictFloat, Field(gt=0)]
403
+ ]
404
+ ] = None,
405
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
406
+ _content_type: Optional[StrictStr] = None,
407
+ _headers: Optional[Dict[StrictStr, Any]] = None,
408
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
409
+ ) -> ApiResponse[ActivateFreeDNSResponse]:
410
+ """freedns_dns_activate_create2
411
+
412
+ Activate FreeDNS for a domain. For internal domains the nameservers are changed to PidginHost NS. A default zone is created on the cPanel node.
413
+
414
+ :param activate_free_dns: (required)
415
+ :type activate_free_dns: ActivateFreeDNS
416
+ :param _request_timeout: timeout setting for this request. If one
417
+ number provided, it will be total request
418
+ timeout. It can also be a pair (tuple) of
419
+ (connection, read) timeouts.
420
+ :type _request_timeout: int, tuple(int, int), optional
421
+ :param _request_auth: set to override the auth_settings for an a single
422
+ request; this effectively ignores the
423
+ authentication in the spec for a single request.
424
+ :type _request_auth: dict, optional
425
+ :param _content_type: force content-type for the request.
426
+ :type _content_type: str, Optional
427
+ :param _headers: set to override the headers for a single
428
+ request; this effectively ignores the headers
429
+ in the spec for a single request.
430
+ :type _headers: dict, optional
431
+ :param _host_index: set to override the host_index for a single
432
+ request; this effectively ignores the host_index
433
+ in the spec for a single request.
434
+ :type _host_index: int, optional
435
+ :return: Returns the result object.
436
+ """ # noqa: E501
437
+
438
+ _param = self._freedns_dns_activate_create2_serialize(
439
+ activate_free_dns=activate_free_dns,
440
+ _request_auth=_request_auth,
441
+ _content_type=_content_type,
442
+ _headers=_headers,
443
+ _host_index=_host_index
444
+ )
445
+
446
+ _response_types_map: Dict[str, Optional[str]] = {
447
+ '200': "ActivateFreeDNSResponse",
448
+ }
449
+ response_data = self.api_client.call_api(
450
+ *_param,
451
+ _request_timeout=_request_timeout
452
+ )
453
+ response_data.read()
454
+ return self.api_client.response_deserialize(
455
+ response_data=response_data,
456
+ response_types_map=_response_types_map,
457
+ )
458
+
459
+
460
+ @validate_call
461
+ def freedns_dns_activate_create2_without_preload_content(
462
+ self,
463
+ activate_free_dns: ActivateFreeDNS,
464
+ _request_timeout: Union[
465
+ None,
466
+ Annotated[StrictFloat, Field(gt=0)],
467
+ Tuple[
468
+ Annotated[StrictFloat, Field(gt=0)],
469
+ Annotated[StrictFloat, Field(gt=0)]
470
+ ]
471
+ ] = None,
472
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
473
+ _content_type: Optional[StrictStr] = None,
474
+ _headers: Optional[Dict[StrictStr, Any]] = None,
475
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
476
+ ) -> RESTResponseType:
477
+ """freedns_dns_activate_create2
478
+
479
+ Activate FreeDNS for a domain. For internal domains the nameservers are changed to PidginHost NS. A default zone is created on the cPanel node.
480
+
481
+ :param activate_free_dns: (required)
482
+ :type activate_free_dns: ActivateFreeDNS
483
+ :param _request_timeout: timeout setting for this request. If one
484
+ number provided, it will be total request
485
+ timeout. It can also be a pair (tuple) of
486
+ (connection, read) timeouts.
487
+ :type _request_timeout: int, tuple(int, int), optional
488
+ :param _request_auth: set to override the auth_settings for an a single
489
+ request; this effectively ignores the
490
+ authentication in the spec for a single request.
491
+ :type _request_auth: dict, optional
492
+ :param _content_type: force content-type for the request.
493
+ :type _content_type: str, Optional
494
+ :param _headers: set to override the headers for a single
495
+ request; this effectively ignores the headers
496
+ in the spec for a single request.
497
+ :type _headers: dict, optional
498
+ :param _host_index: set to override the host_index for a single
499
+ request; this effectively ignores the host_index
500
+ in the spec for a single request.
501
+ :type _host_index: int, optional
502
+ :return: Returns the result object.
503
+ """ # noqa: E501
504
+
505
+ _param = self._freedns_dns_activate_create2_serialize(
506
+ activate_free_dns=activate_free_dns,
507
+ _request_auth=_request_auth,
508
+ _content_type=_content_type,
509
+ _headers=_headers,
510
+ _host_index=_host_index
511
+ )
512
+
513
+ _response_types_map: Dict[str, Optional[str]] = {
514
+ '200': "ActivateFreeDNSResponse",
515
+ }
516
+ response_data = self.api_client.call_api(
517
+ *_param,
518
+ _request_timeout=_request_timeout
519
+ )
520
+ return response_data.response
521
+
522
+
523
+ def _freedns_dns_activate_create2_serialize(
524
+ self,
525
+ activate_free_dns,
526
+ _request_auth,
527
+ _content_type,
528
+ _headers,
529
+ _host_index,
530
+ ) -> RequestSerialized:
531
+
532
+ _host = None
533
+
534
+ _collection_formats: Dict[str, str] = {
535
+ }
536
+
537
+ _path_params: Dict[str, str] = {}
538
+ _query_params: List[Tuple[str, str]] = []
539
+ _header_params: Dict[str, Optional[str]] = _headers or {}
540
+ _form_params: List[Tuple[str, str]] = []
541
+ _files: Dict[
542
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
543
+ ] = {}
544
+ _body_params: Optional[bytes] = None
545
+
546
+ # process the path parameters
547
+ # process the query parameters
548
+ # process the header parameters
549
+ # process the form parameters
550
+ # process the body parameter
551
+ if activate_free_dns is not None:
552
+ _body_params = activate_free_dns
553
+
554
+
555
+ # set the HTTP header `Accept`
556
+ if 'Accept' not in _header_params:
557
+ _header_params['Accept'] = self.api_client.select_header_accept(
558
+ [
559
+ 'application/json'
560
+ ]
561
+ )
562
+
563
+ # set the HTTP header `Content-Type`
564
+ if _content_type:
565
+ _header_params['Content-Type'] = _content_type
566
+ else:
567
+ _default_content_type = (
568
+ self.api_client.select_header_content_type(
569
+ [
570
+ 'application/json'
571
+ ]
572
+ )
573
+ )
574
+ if _default_content_type is not None:
575
+ _header_params['Content-Type'] = _default_content_type
576
+
577
+ # authentication setting
578
+ _auth_settings: List[str] = [
579
+ 'cookieAuth',
580
+ 'tokenAuth'
581
+ ]
582
+
583
+ return self.api_client.param_serialize(
584
+ method='POST',
585
+ resource_path='/api/v1/freedns/dns/activate/',
586
+ path_params=_path_params,
587
+ query_params=_query_params,
588
+ header_params=_header_params,
589
+ body=_body_params,
590
+ post_params=_form_params,
591
+ files=_files,
592
+ auth_settings=_auth_settings,
593
+ collection_formats=_collection_formats,
594
+ _host=_host,
595
+ _request_auth=_request_auth
596
+ )
597
+
598
+
599
+
600
+
601
+ @validate_call
602
+ def freedns_dns_add_record_create(
603
+ self,
604
+ domain: Annotated[StrictStr, Field(description="Domain name or PK.")],
605
+ source: Annotated[StrictStr, Field(description="'internal' or 'external'.")],
606
+ dns_record_create: DNSRecordCreate,
607
+ _request_timeout: Union[
608
+ None,
609
+ Annotated[StrictFloat, Field(gt=0)],
610
+ Tuple[
611
+ Annotated[StrictFloat, Field(gt=0)],
612
+ Annotated[StrictFloat, Field(gt=0)]
613
+ ]
614
+ ] = None,
615
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
616
+ _content_type: Optional[StrictStr] = None,
617
+ _headers: Optional[Dict[StrictStr, Any]] = None,
618
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
619
+ ) -> DNSRecordMutateResponse:
620
+ """freedns_dns_add_record_create
621
+
622
+ Add or edit a DNS record. To edit an existing record, include the 'line' field with its line number. Required type-specific fields depend on 'type': A/AAAA → address; CNAME → cname; MX → preference, exchange; SRV → priority, weight, port, target; TXT → txtdata, unencoded; TYPE257 (CAA) → flag, tag, value.
623
+
624
+ :param domain: Domain name or PK. (required)
625
+ :type domain: str
626
+ :param source: 'internal' or 'external'. (required)
627
+ :type source: str
628
+ :param dns_record_create: (required)
629
+ :type dns_record_create: DNSRecordCreate
630
+ :param _request_timeout: timeout setting for this request. If one
631
+ number provided, it will be total request
632
+ timeout. It can also be a pair (tuple) of
633
+ (connection, read) timeouts.
634
+ :type _request_timeout: int, tuple(int, int), optional
635
+ :param _request_auth: set to override the auth_settings for an a single
636
+ request; this effectively ignores the
637
+ authentication in the spec for a single request.
638
+ :type _request_auth: dict, optional
639
+ :param _content_type: force content-type for the request.
640
+ :type _content_type: str, Optional
641
+ :param _headers: set to override the headers for a single
642
+ request; this effectively ignores the headers
643
+ in the spec for a single request.
644
+ :type _headers: dict, optional
645
+ :param _host_index: set to override the host_index for a single
646
+ request; this effectively ignores the host_index
647
+ in the spec for a single request.
648
+ :type _host_index: int, optional
649
+ :return: Returns the result object.
650
+ """ # noqa: E501
651
+
652
+ _param = self._freedns_dns_add_record_create_serialize(
653
+ domain=domain,
654
+ source=source,
655
+ dns_record_create=dns_record_create,
656
+ _request_auth=_request_auth,
657
+ _content_type=_content_type,
658
+ _headers=_headers,
659
+ _host_index=_host_index
660
+ )
661
+
662
+ _response_types_map: Dict[str, Optional[str]] = {
663
+ '200': "DNSRecordMutateResponse",
664
+ }
665
+ response_data = self.api_client.call_api(
666
+ *_param,
667
+ _request_timeout=_request_timeout
668
+ )
669
+ response_data.read()
670
+ return self.api_client.response_deserialize(
671
+ response_data=response_data,
672
+ response_types_map=_response_types_map,
673
+ ).data
674
+
675
+
676
+ @validate_call
677
+ def freedns_dns_add_record_create_with_http_info(
678
+ self,
679
+ domain: Annotated[StrictStr, Field(description="Domain name or PK.")],
680
+ source: Annotated[StrictStr, Field(description="'internal' or 'external'.")],
681
+ dns_record_create: DNSRecordCreate,
682
+ _request_timeout: Union[
683
+ None,
684
+ Annotated[StrictFloat, Field(gt=0)],
685
+ Tuple[
686
+ Annotated[StrictFloat, Field(gt=0)],
687
+ Annotated[StrictFloat, Field(gt=0)]
688
+ ]
689
+ ] = None,
690
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
691
+ _content_type: Optional[StrictStr] = None,
692
+ _headers: Optional[Dict[StrictStr, Any]] = None,
693
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
694
+ ) -> ApiResponse[DNSRecordMutateResponse]:
695
+ """freedns_dns_add_record_create
696
+
697
+ Add or edit a DNS record. To edit an existing record, include the 'line' field with its line number. Required type-specific fields depend on 'type': A/AAAA → address; CNAME → cname; MX → preference, exchange; SRV → priority, weight, port, target; TXT → txtdata, unencoded; TYPE257 (CAA) → flag, tag, value.
698
+
699
+ :param domain: Domain name or PK. (required)
700
+ :type domain: str
701
+ :param source: 'internal' or 'external'. (required)
702
+ :type source: str
703
+ :param dns_record_create: (required)
704
+ :type dns_record_create: DNSRecordCreate
705
+ :param _request_timeout: timeout setting for this request. If one
706
+ number provided, it will be total request
707
+ timeout. It can also be a pair (tuple) of
708
+ (connection, read) timeouts.
709
+ :type _request_timeout: int, tuple(int, int), optional
710
+ :param _request_auth: set to override the auth_settings for an a single
711
+ request; this effectively ignores the
712
+ authentication in the spec for a single request.
713
+ :type _request_auth: dict, optional
714
+ :param _content_type: force content-type for the request.
715
+ :type _content_type: str, Optional
716
+ :param _headers: set to override the headers for a single
717
+ request; this effectively ignores the headers
718
+ in the spec for a single request.
719
+ :type _headers: dict, optional
720
+ :param _host_index: set to override the host_index for a single
721
+ request; this effectively ignores the host_index
722
+ in the spec for a single request.
723
+ :type _host_index: int, optional
724
+ :return: Returns the result object.
725
+ """ # noqa: E501
726
+
727
+ _param = self._freedns_dns_add_record_create_serialize(
728
+ domain=domain,
729
+ source=source,
730
+ dns_record_create=dns_record_create,
731
+ _request_auth=_request_auth,
732
+ _content_type=_content_type,
733
+ _headers=_headers,
734
+ _host_index=_host_index
735
+ )
736
+
737
+ _response_types_map: Dict[str, Optional[str]] = {
738
+ '200': "DNSRecordMutateResponse",
739
+ }
740
+ response_data = self.api_client.call_api(
741
+ *_param,
742
+ _request_timeout=_request_timeout
743
+ )
744
+ response_data.read()
745
+ return self.api_client.response_deserialize(
746
+ response_data=response_data,
747
+ response_types_map=_response_types_map,
748
+ )
749
+
750
+
751
+ @validate_call
752
+ def freedns_dns_add_record_create_without_preload_content(
753
+ self,
754
+ domain: Annotated[StrictStr, Field(description="Domain name or PK.")],
755
+ source: Annotated[StrictStr, Field(description="'internal' or 'external'.")],
756
+ dns_record_create: DNSRecordCreate,
757
+ _request_timeout: Union[
758
+ None,
759
+ Annotated[StrictFloat, Field(gt=0)],
760
+ Tuple[
761
+ Annotated[StrictFloat, Field(gt=0)],
762
+ Annotated[StrictFloat, Field(gt=0)]
763
+ ]
764
+ ] = None,
765
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
766
+ _content_type: Optional[StrictStr] = None,
767
+ _headers: Optional[Dict[StrictStr, Any]] = None,
768
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
769
+ ) -> RESTResponseType:
770
+ """freedns_dns_add_record_create
771
+
772
+ Add or edit a DNS record. To edit an existing record, include the 'line' field with its line number. Required type-specific fields depend on 'type': A/AAAA → address; CNAME → cname; MX → preference, exchange; SRV → priority, weight, port, target; TXT → txtdata, unencoded; TYPE257 (CAA) → flag, tag, value.
773
+
774
+ :param domain: Domain name or PK. (required)
775
+ :type domain: str
776
+ :param source: 'internal' or 'external'. (required)
777
+ :type source: str
778
+ :param dns_record_create: (required)
779
+ :type dns_record_create: DNSRecordCreate
780
+ :param _request_timeout: timeout setting for this request. If one
781
+ number provided, it will be total request
782
+ timeout. It can also be a pair (tuple) of
783
+ (connection, read) timeouts.
784
+ :type _request_timeout: int, tuple(int, int), optional
785
+ :param _request_auth: set to override the auth_settings for an a single
786
+ request; this effectively ignores the
787
+ authentication in the spec for a single request.
788
+ :type _request_auth: dict, optional
789
+ :param _content_type: force content-type for the request.
790
+ :type _content_type: str, Optional
791
+ :param _headers: set to override the headers for a single
792
+ request; this effectively ignores the headers
793
+ in the spec for a single request.
794
+ :type _headers: dict, optional
795
+ :param _host_index: set to override the host_index for a single
796
+ request; this effectively ignores the host_index
797
+ in the spec for a single request.
798
+ :type _host_index: int, optional
799
+ :return: Returns the result object.
800
+ """ # noqa: E501
801
+
802
+ _param = self._freedns_dns_add_record_create_serialize(
803
+ domain=domain,
804
+ source=source,
805
+ dns_record_create=dns_record_create,
806
+ _request_auth=_request_auth,
807
+ _content_type=_content_type,
808
+ _headers=_headers,
809
+ _host_index=_host_index
810
+ )
811
+
812
+ _response_types_map: Dict[str, Optional[str]] = {
813
+ '200': "DNSRecordMutateResponse",
814
+ }
815
+ response_data = self.api_client.call_api(
816
+ *_param,
817
+ _request_timeout=_request_timeout
818
+ )
819
+ return response_data.response
820
+
821
+
822
+ def _freedns_dns_add_record_create_serialize(
823
+ self,
824
+ domain,
825
+ source,
826
+ dns_record_create,
827
+ _request_auth,
828
+ _content_type,
829
+ _headers,
830
+ _host_index,
831
+ ) -> RequestSerialized:
832
+
833
+ _host = None
834
+
835
+ _collection_formats: Dict[str, str] = {
836
+ }
837
+
838
+ _path_params: Dict[str, str] = {}
839
+ _query_params: List[Tuple[str, str]] = []
840
+ _header_params: Dict[str, Optional[str]] = _headers or {}
841
+ _form_params: List[Tuple[str, str]] = []
842
+ _files: Dict[
843
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
844
+ ] = {}
845
+ _body_params: Optional[bytes] = None
846
+
847
+ # process the path parameters
848
+ # process the query parameters
849
+ if domain is not None:
850
+
851
+ _query_params.append(('domain', domain))
852
+
853
+ if source is not None:
854
+
855
+ _query_params.append(('source', source))
856
+
857
+ # process the header parameters
858
+ # process the form parameters
859
+ # process the body parameter
860
+ if dns_record_create is not None:
861
+ _body_params = dns_record_create
862
+
863
+
864
+ # set the HTTP header `Accept`
865
+ if 'Accept' not in _header_params:
866
+ _header_params['Accept'] = self.api_client.select_header_accept(
867
+ [
868
+ 'application/json'
869
+ ]
870
+ )
871
+
872
+ # set the HTTP header `Content-Type`
873
+ if _content_type:
874
+ _header_params['Content-Type'] = _content_type
875
+ else:
876
+ _default_content_type = (
877
+ self.api_client.select_header_content_type(
878
+ [
879
+ 'application/json'
880
+ ]
881
+ )
882
+ )
883
+ if _default_content_type is not None:
884
+ _header_params['Content-Type'] = _default_content_type
885
+
886
+ # authentication setting
887
+ _auth_settings: List[str] = [
888
+ 'cookieAuth',
889
+ 'tokenAuth'
890
+ ]
891
+
892
+ return self.api_client.param_serialize(
893
+ method='POST',
894
+ resource_path='/api/freedns/dns/add-record/',
895
+ path_params=_path_params,
896
+ query_params=_query_params,
897
+ header_params=_header_params,
898
+ body=_body_params,
899
+ post_params=_form_params,
900
+ files=_files,
901
+ auth_settings=_auth_settings,
902
+ collection_formats=_collection_formats,
903
+ _host=_host,
904
+ _request_auth=_request_auth
905
+ )
906
+
907
+
908
+
909
+
910
+ @validate_call
911
+ def freedns_dns_add_record_create2(
912
+ self,
913
+ domain: Annotated[StrictStr, Field(description="Domain name or PK.")],
914
+ source: Annotated[StrictStr, Field(description="'internal' or 'external'.")],
915
+ dns_record_create: DNSRecordCreate,
916
+ _request_timeout: Union[
917
+ None,
918
+ Annotated[StrictFloat, Field(gt=0)],
919
+ Tuple[
920
+ Annotated[StrictFloat, Field(gt=0)],
921
+ Annotated[StrictFloat, Field(gt=0)]
922
+ ]
923
+ ] = None,
924
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
925
+ _content_type: Optional[StrictStr] = None,
926
+ _headers: Optional[Dict[StrictStr, Any]] = None,
927
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
928
+ ) -> DNSRecordMutateResponse:
929
+ """freedns_dns_add_record_create2
930
+
931
+ Add or edit a DNS record. To edit an existing record, include the 'line' field with its line number. Required type-specific fields depend on 'type': A/AAAA → address; CNAME → cname; MX → preference, exchange; SRV → priority, weight, port, target; TXT → txtdata, unencoded; TYPE257 (CAA) → flag, tag, value.
932
+
933
+ :param domain: Domain name or PK. (required)
934
+ :type domain: str
935
+ :param source: 'internal' or 'external'. (required)
936
+ :type source: str
937
+ :param dns_record_create: (required)
938
+ :type dns_record_create: DNSRecordCreate
939
+ :param _request_timeout: timeout setting for this request. If one
940
+ number provided, it will be total request
941
+ timeout. It can also be a pair (tuple) of
942
+ (connection, read) timeouts.
943
+ :type _request_timeout: int, tuple(int, int), optional
944
+ :param _request_auth: set to override the auth_settings for an a single
945
+ request; this effectively ignores the
946
+ authentication in the spec for a single request.
947
+ :type _request_auth: dict, optional
948
+ :param _content_type: force content-type for the request.
949
+ :type _content_type: str, Optional
950
+ :param _headers: set to override the headers for a single
951
+ request; this effectively ignores the headers
952
+ in the spec for a single request.
953
+ :type _headers: dict, optional
954
+ :param _host_index: set to override the host_index for a single
955
+ request; this effectively ignores the host_index
956
+ in the spec for a single request.
957
+ :type _host_index: int, optional
958
+ :return: Returns the result object.
959
+ """ # noqa: E501
960
+
961
+ _param = self._freedns_dns_add_record_create2_serialize(
962
+ domain=domain,
963
+ source=source,
964
+ dns_record_create=dns_record_create,
965
+ _request_auth=_request_auth,
966
+ _content_type=_content_type,
967
+ _headers=_headers,
968
+ _host_index=_host_index
969
+ )
970
+
971
+ _response_types_map: Dict[str, Optional[str]] = {
972
+ '200': "DNSRecordMutateResponse",
973
+ }
974
+ response_data = self.api_client.call_api(
975
+ *_param,
976
+ _request_timeout=_request_timeout
977
+ )
978
+ response_data.read()
979
+ return self.api_client.response_deserialize(
980
+ response_data=response_data,
981
+ response_types_map=_response_types_map,
982
+ ).data
983
+
984
+
985
+ @validate_call
986
+ def freedns_dns_add_record_create2_with_http_info(
987
+ self,
988
+ domain: Annotated[StrictStr, Field(description="Domain name or PK.")],
989
+ source: Annotated[StrictStr, Field(description="'internal' or 'external'.")],
990
+ dns_record_create: DNSRecordCreate,
991
+ _request_timeout: Union[
992
+ None,
993
+ Annotated[StrictFloat, Field(gt=0)],
994
+ Tuple[
995
+ Annotated[StrictFloat, Field(gt=0)],
996
+ Annotated[StrictFloat, Field(gt=0)]
997
+ ]
998
+ ] = None,
999
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1000
+ _content_type: Optional[StrictStr] = None,
1001
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1002
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1003
+ ) -> ApiResponse[DNSRecordMutateResponse]:
1004
+ """freedns_dns_add_record_create2
1005
+
1006
+ Add or edit a DNS record. To edit an existing record, include the 'line' field with its line number. Required type-specific fields depend on 'type': A/AAAA → address; CNAME → cname; MX → preference, exchange; SRV → priority, weight, port, target; TXT → txtdata, unencoded; TYPE257 (CAA) → flag, tag, value.
1007
+
1008
+ :param domain: Domain name or PK. (required)
1009
+ :type domain: str
1010
+ :param source: 'internal' or 'external'. (required)
1011
+ :type source: str
1012
+ :param dns_record_create: (required)
1013
+ :type dns_record_create: DNSRecordCreate
1014
+ :param _request_timeout: timeout setting for this request. If one
1015
+ number provided, it will be total request
1016
+ timeout. It can also be a pair (tuple) of
1017
+ (connection, read) timeouts.
1018
+ :type _request_timeout: int, tuple(int, int), optional
1019
+ :param _request_auth: set to override the auth_settings for an a single
1020
+ request; this effectively ignores the
1021
+ authentication in the spec for a single request.
1022
+ :type _request_auth: dict, optional
1023
+ :param _content_type: force content-type for the request.
1024
+ :type _content_type: str, Optional
1025
+ :param _headers: set to override the headers for a single
1026
+ request; this effectively ignores the headers
1027
+ in the spec for a single request.
1028
+ :type _headers: dict, optional
1029
+ :param _host_index: set to override the host_index for a single
1030
+ request; this effectively ignores the host_index
1031
+ in the spec for a single request.
1032
+ :type _host_index: int, optional
1033
+ :return: Returns the result object.
1034
+ """ # noqa: E501
1035
+
1036
+ _param = self._freedns_dns_add_record_create2_serialize(
1037
+ domain=domain,
1038
+ source=source,
1039
+ dns_record_create=dns_record_create,
1040
+ _request_auth=_request_auth,
1041
+ _content_type=_content_type,
1042
+ _headers=_headers,
1043
+ _host_index=_host_index
1044
+ )
1045
+
1046
+ _response_types_map: Dict[str, Optional[str]] = {
1047
+ '200': "DNSRecordMutateResponse",
1048
+ }
1049
+ response_data = self.api_client.call_api(
1050
+ *_param,
1051
+ _request_timeout=_request_timeout
1052
+ )
1053
+ response_data.read()
1054
+ return self.api_client.response_deserialize(
1055
+ response_data=response_data,
1056
+ response_types_map=_response_types_map,
1057
+ )
1058
+
1059
+
1060
+ @validate_call
1061
+ def freedns_dns_add_record_create2_without_preload_content(
1062
+ self,
1063
+ domain: Annotated[StrictStr, Field(description="Domain name or PK.")],
1064
+ source: Annotated[StrictStr, Field(description="'internal' or 'external'.")],
1065
+ dns_record_create: DNSRecordCreate,
1066
+ _request_timeout: Union[
1067
+ None,
1068
+ Annotated[StrictFloat, Field(gt=0)],
1069
+ Tuple[
1070
+ Annotated[StrictFloat, Field(gt=0)],
1071
+ Annotated[StrictFloat, Field(gt=0)]
1072
+ ]
1073
+ ] = None,
1074
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1075
+ _content_type: Optional[StrictStr] = None,
1076
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1077
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1078
+ ) -> RESTResponseType:
1079
+ """freedns_dns_add_record_create2
1080
+
1081
+ Add or edit a DNS record. To edit an existing record, include the 'line' field with its line number. Required type-specific fields depend on 'type': A/AAAA → address; CNAME → cname; MX → preference, exchange; SRV → priority, weight, port, target; TXT → txtdata, unencoded; TYPE257 (CAA) → flag, tag, value.
1082
+
1083
+ :param domain: Domain name or PK. (required)
1084
+ :type domain: str
1085
+ :param source: 'internal' or 'external'. (required)
1086
+ :type source: str
1087
+ :param dns_record_create: (required)
1088
+ :type dns_record_create: DNSRecordCreate
1089
+ :param _request_timeout: timeout setting for this request. If one
1090
+ number provided, it will be total request
1091
+ timeout. It can also be a pair (tuple) of
1092
+ (connection, read) timeouts.
1093
+ :type _request_timeout: int, tuple(int, int), optional
1094
+ :param _request_auth: set to override the auth_settings for an a single
1095
+ request; this effectively ignores the
1096
+ authentication in the spec for a single request.
1097
+ :type _request_auth: dict, optional
1098
+ :param _content_type: force content-type for the request.
1099
+ :type _content_type: str, Optional
1100
+ :param _headers: set to override the headers for a single
1101
+ request; this effectively ignores the headers
1102
+ in the spec for a single request.
1103
+ :type _headers: dict, optional
1104
+ :param _host_index: set to override the host_index for a single
1105
+ request; this effectively ignores the host_index
1106
+ in the spec for a single request.
1107
+ :type _host_index: int, optional
1108
+ :return: Returns the result object.
1109
+ """ # noqa: E501
1110
+
1111
+ _param = self._freedns_dns_add_record_create2_serialize(
1112
+ domain=domain,
1113
+ source=source,
1114
+ dns_record_create=dns_record_create,
1115
+ _request_auth=_request_auth,
1116
+ _content_type=_content_type,
1117
+ _headers=_headers,
1118
+ _host_index=_host_index
1119
+ )
1120
+
1121
+ _response_types_map: Dict[str, Optional[str]] = {
1122
+ '200': "DNSRecordMutateResponse",
1123
+ }
1124
+ response_data = self.api_client.call_api(
1125
+ *_param,
1126
+ _request_timeout=_request_timeout
1127
+ )
1128
+ return response_data.response
1129
+
1130
+
1131
+ def _freedns_dns_add_record_create2_serialize(
1132
+ self,
1133
+ domain,
1134
+ source,
1135
+ dns_record_create,
1136
+ _request_auth,
1137
+ _content_type,
1138
+ _headers,
1139
+ _host_index,
1140
+ ) -> RequestSerialized:
1141
+
1142
+ _host = None
1143
+
1144
+ _collection_formats: Dict[str, str] = {
1145
+ }
1146
+
1147
+ _path_params: Dict[str, str] = {}
1148
+ _query_params: List[Tuple[str, str]] = []
1149
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1150
+ _form_params: List[Tuple[str, str]] = []
1151
+ _files: Dict[
1152
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1153
+ ] = {}
1154
+ _body_params: Optional[bytes] = None
1155
+
1156
+ # process the path parameters
1157
+ # process the query parameters
1158
+ if domain is not None:
1159
+
1160
+ _query_params.append(('domain', domain))
1161
+
1162
+ if source is not None:
1163
+
1164
+ _query_params.append(('source', source))
1165
+
1166
+ # process the header parameters
1167
+ # process the form parameters
1168
+ # process the body parameter
1169
+ if dns_record_create is not None:
1170
+ _body_params = dns_record_create
1171
+
1172
+
1173
+ # set the HTTP header `Accept`
1174
+ if 'Accept' not in _header_params:
1175
+ _header_params['Accept'] = self.api_client.select_header_accept(
1176
+ [
1177
+ 'application/json'
1178
+ ]
1179
+ )
1180
+
1181
+ # set the HTTP header `Content-Type`
1182
+ if _content_type:
1183
+ _header_params['Content-Type'] = _content_type
1184
+ else:
1185
+ _default_content_type = (
1186
+ self.api_client.select_header_content_type(
1187
+ [
1188
+ 'application/json'
1189
+ ]
1190
+ )
1191
+ )
1192
+ if _default_content_type is not None:
1193
+ _header_params['Content-Type'] = _default_content_type
1194
+
1195
+ # authentication setting
1196
+ _auth_settings: List[str] = [
1197
+ 'cookieAuth',
1198
+ 'tokenAuth'
1199
+ ]
1200
+
1201
+ return self.api_client.param_serialize(
1202
+ method='POST',
1203
+ resource_path='/api/v1/freedns/dns/add-record/',
1204
+ path_params=_path_params,
1205
+ query_params=_query_params,
1206
+ header_params=_header_params,
1207
+ body=_body_params,
1208
+ post_params=_form_params,
1209
+ files=_files,
1210
+ auth_settings=_auth_settings,
1211
+ collection_formats=_collection_formats,
1212
+ _host=_host,
1213
+ _request_auth=_request_auth
1214
+ )
1215
+
1216
+
1217
+
1218
+
1219
+ @validate_call
1220
+ def freedns_dns_deactivate_create(
1221
+ self,
1222
+ deactivate_free_dns: DeactivateFreeDNS,
1223
+ _request_timeout: Union[
1224
+ None,
1225
+ Annotated[StrictFloat, Field(gt=0)],
1226
+ Tuple[
1227
+ Annotated[StrictFloat, Field(gt=0)],
1228
+ Annotated[StrictFloat, Field(gt=0)]
1229
+ ]
1230
+ ] = None,
1231
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1232
+ _content_type: Optional[StrictStr] = None,
1233
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1234
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1235
+ ) -> DeactivateFreeDNSResponse:
1236
+ """freedns_dns_deactivate_create
1237
+
1238
+ Deactivate FreeDNS for a domain. The DNS zone is removed from the cPanel node and, for internal domains, the original nameservers are restored.
1239
+
1240
+ :param deactivate_free_dns: (required)
1241
+ :type deactivate_free_dns: DeactivateFreeDNS
1242
+ :param _request_timeout: timeout setting for this request. If one
1243
+ number provided, it will be total request
1244
+ timeout. It can also be a pair (tuple) of
1245
+ (connection, read) timeouts.
1246
+ :type _request_timeout: int, tuple(int, int), optional
1247
+ :param _request_auth: set to override the auth_settings for an a single
1248
+ request; this effectively ignores the
1249
+ authentication in the spec for a single request.
1250
+ :type _request_auth: dict, optional
1251
+ :param _content_type: force content-type for the request.
1252
+ :type _content_type: str, Optional
1253
+ :param _headers: set to override the headers for a single
1254
+ request; this effectively ignores the headers
1255
+ in the spec for a single request.
1256
+ :type _headers: dict, optional
1257
+ :param _host_index: set to override the host_index for a single
1258
+ request; this effectively ignores the host_index
1259
+ in the spec for a single request.
1260
+ :type _host_index: int, optional
1261
+ :return: Returns the result object.
1262
+ """ # noqa: E501
1263
+
1264
+ _param = self._freedns_dns_deactivate_create_serialize(
1265
+ deactivate_free_dns=deactivate_free_dns,
1266
+ _request_auth=_request_auth,
1267
+ _content_type=_content_type,
1268
+ _headers=_headers,
1269
+ _host_index=_host_index
1270
+ )
1271
+
1272
+ _response_types_map: Dict[str, Optional[str]] = {
1273
+ '200': "DeactivateFreeDNSResponse",
1274
+ }
1275
+ response_data = self.api_client.call_api(
1276
+ *_param,
1277
+ _request_timeout=_request_timeout
1278
+ )
1279
+ response_data.read()
1280
+ return self.api_client.response_deserialize(
1281
+ response_data=response_data,
1282
+ response_types_map=_response_types_map,
1283
+ ).data
1284
+
1285
+
1286
+ @validate_call
1287
+ def freedns_dns_deactivate_create_with_http_info(
1288
+ self,
1289
+ deactivate_free_dns: DeactivateFreeDNS,
1290
+ _request_timeout: Union[
1291
+ None,
1292
+ Annotated[StrictFloat, Field(gt=0)],
1293
+ Tuple[
1294
+ Annotated[StrictFloat, Field(gt=0)],
1295
+ Annotated[StrictFloat, Field(gt=0)]
1296
+ ]
1297
+ ] = None,
1298
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1299
+ _content_type: Optional[StrictStr] = None,
1300
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1301
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1302
+ ) -> ApiResponse[DeactivateFreeDNSResponse]:
1303
+ """freedns_dns_deactivate_create
1304
+
1305
+ Deactivate FreeDNS for a domain. The DNS zone is removed from the cPanel node and, for internal domains, the original nameservers are restored.
1306
+
1307
+ :param deactivate_free_dns: (required)
1308
+ :type deactivate_free_dns: DeactivateFreeDNS
1309
+ :param _request_timeout: timeout setting for this request. If one
1310
+ number provided, it will be total request
1311
+ timeout. It can also be a pair (tuple) of
1312
+ (connection, read) timeouts.
1313
+ :type _request_timeout: int, tuple(int, int), optional
1314
+ :param _request_auth: set to override the auth_settings for an a single
1315
+ request; this effectively ignores the
1316
+ authentication in the spec for a single request.
1317
+ :type _request_auth: dict, optional
1318
+ :param _content_type: force content-type for the request.
1319
+ :type _content_type: str, Optional
1320
+ :param _headers: set to override the headers for a single
1321
+ request; this effectively ignores the headers
1322
+ in the spec for a single request.
1323
+ :type _headers: dict, optional
1324
+ :param _host_index: set to override the host_index for a single
1325
+ request; this effectively ignores the host_index
1326
+ in the spec for a single request.
1327
+ :type _host_index: int, optional
1328
+ :return: Returns the result object.
1329
+ """ # noqa: E501
1330
+
1331
+ _param = self._freedns_dns_deactivate_create_serialize(
1332
+ deactivate_free_dns=deactivate_free_dns,
1333
+ _request_auth=_request_auth,
1334
+ _content_type=_content_type,
1335
+ _headers=_headers,
1336
+ _host_index=_host_index
1337
+ )
1338
+
1339
+ _response_types_map: Dict[str, Optional[str]] = {
1340
+ '200': "DeactivateFreeDNSResponse",
1341
+ }
1342
+ response_data = self.api_client.call_api(
1343
+ *_param,
1344
+ _request_timeout=_request_timeout
1345
+ )
1346
+ response_data.read()
1347
+ return self.api_client.response_deserialize(
1348
+ response_data=response_data,
1349
+ response_types_map=_response_types_map,
1350
+ )
1351
+
1352
+
1353
+ @validate_call
1354
+ def freedns_dns_deactivate_create_without_preload_content(
1355
+ self,
1356
+ deactivate_free_dns: DeactivateFreeDNS,
1357
+ _request_timeout: Union[
1358
+ None,
1359
+ Annotated[StrictFloat, Field(gt=0)],
1360
+ Tuple[
1361
+ Annotated[StrictFloat, Field(gt=0)],
1362
+ Annotated[StrictFloat, Field(gt=0)]
1363
+ ]
1364
+ ] = None,
1365
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1366
+ _content_type: Optional[StrictStr] = None,
1367
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1368
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1369
+ ) -> RESTResponseType:
1370
+ """freedns_dns_deactivate_create
1371
+
1372
+ Deactivate FreeDNS for a domain. The DNS zone is removed from the cPanel node and, for internal domains, the original nameservers are restored.
1373
+
1374
+ :param deactivate_free_dns: (required)
1375
+ :type deactivate_free_dns: DeactivateFreeDNS
1376
+ :param _request_timeout: timeout setting for this request. If one
1377
+ number provided, it will be total request
1378
+ timeout. It can also be a pair (tuple) of
1379
+ (connection, read) timeouts.
1380
+ :type _request_timeout: int, tuple(int, int), optional
1381
+ :param _request_auth: set to override the auth_settings for an a single
1382
+ request; this effectively ignores the
1383
+ authentication in the spec for a single request.
1384
+ :type _request_auth: dict, optional
1385
+ :param _content_type: force content-type for the request.
1386
+ :type _content_type: str, Optional
1387
+ :param _headers: set to override the headers for a single
1388
+ request; this effectively ignores the headers
1389
+ in the spec for a single request.
1390
+ :type _headers: dict, optional
1391
+ :param _host_index: set to override the host_index for a single
1392
+ request; this effectively ignores the host_index
1393
+ in the spec for a single request.
1394
+ :type _host_index: int, optional
1395
+ :return: Returns the result object.
1396
+ """ # noqa: E501
1397
+
1398
+ _param = self._freedns_dns_deactivate_create_serialize(
1399
+ deactivate_free_dns=deactivate_free_dns,
1400
+ _request_auth=_request_auth,
1401
+ _content_type=_content_type,
1402
+ _headers=_headers,
1403
+ _host_index=_host_index
1404
+ )
1405
+
1406
+ _response_types_map: Dict[str, Optional[str]] = {
1407
+ '200': "DeactivateFreeDNSResponse",
1408
+ }
1409
+ response_data = self.api_client.call_api(
1410
+ *_param,
1411
+ _request_timeout=_request_timeout
1412
+ )
1413
+ return response_data.response
1414
+
1415
+
1416
+ def _freedns_dns_deactivate_create_serialize(
1417
+ self,
1418
+ deactivate_free_dns,
1419
+ _request_auth,
1420
+ _content_type,
1421
+ _headers,
1422
+ _host_index,
1423
+ ) -> RequestSerialized:
1424
+
1425
+ _host = None
1426
+
1427
+ _collection_formats: Dict[str, str] = {
1428
+ }
1429
+
1430
+ _path_params: Dict[str, str] = {}
1431
+ _query_params: List[Tuple[str, str]] = []
1432
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1433
+ _form_params: List[Tuple[str, str]] = []
1434
+ _files: Dict[
1435
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1436
+ ] = {}
1437
+ _body_params: Optional[bytes] = None
1438
+
1439
+ # process the path parameters
1440
+ # process the query parameters
1441
+ # process the header parameters
1442
+ # process the form parameters
1443
+ # process the body parameter
1444
+ if deactivate_free_dns is not None:
1445
+ _body_params = deactivate_free_dns
1446
+
1447
+
1448
+ # set the HTTP header `Accept`
1449
+ if 'Accept' not in _header_params:
1450
+ _header_params['Accept'] = self.api_client.select_header_accept(
1451
+ [
1452
+ 'application/json'
1453
+ ]
1454
+ )
1455
+
1456
+ # set the HTTP header `Content-Type`
1457
+ if _content_type:
1458
+ _header_params['Content-Type'] = _content_type
1459
+ else:
1460
+ _default_content_type = (
1461
+ self.api_client.select_header_content_type(
1462
+ [
1463
+ 'application/json'
1464
+ ]
1465
+ )
1466
+ )
1467
+ if _default_content_type is not None:
1468
+ _header_params['Content-Type'] = _default_content_type
1469
+
1470
+ # authentication setting
1471
+ _auth_settings: List[str] = [
1472
+ 'cookieAuth',
1473
+ 'tokenAuth'
1474
+ ]
1475
+
1476
+ return self.api_client.param_serialize(
1477
+ method='POST',
1478
+ resource_path='/api/freedns/dns/deactivate/',
1479
+ path_params=_path_params,
1480
+ query_params=_query_params,
1481
+ header_params=_header_params,
1482
+ body=_body_params,
1483
+ post_params=_form_params,
1484
+ files=_files,
1485
+ auth_settings=_auth_settings,
1486
+ collection_formats=_collection_formats,
1487
+ _host=_host,
1488
+ _request_auth=_request_auth
1489
+ )
1490
+
1491
+
1492
+
1493
+
1494
+ @validate_call
1495
+ def freedns_dns_deactivate_create2(
1496
+ self,
1497
+ deactivate_free_dns: DeactivateFreeDNS,
1498
+ _request_timeout: Union[
1499
+ None,
1500
+ Annotated[StrictFloat, Field(gt=0)],
1501
+ Tuple[
1502
+ Annotated[StrictFloat, Field(gt=0)],
1503
+ Annotated[StrictFloat, Field(gt=0)]
1504
+ ]
1505
+ ] = None,
1506
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1507
+ _content_type: Optional[StrictStr] = None,
1508
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1509
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1510
+ ) -> DeactivateFreeDNSResponse:
1511
+ """freedns_dns_deactivate_create2
1512
+
1513
+ Deactivate FreeDNS for a domain. The DNS zone is removed from the cPanel node and, for internal domains, the original nameservers are restored.
1514
+
1515
+ :param deactivate_free_dns: (required)
1516
+ :type deactivate_free_dns: DeactivateFreeDNS
1517
+ :param _request_timeout: timeout setting for this request. If one
1518
+ number provided, it will be total request
1519
+ timeout. It can also be a pair (tuple) of
1520
+ (connection, read) timeouts.
1521
+ :type _request_timeout: int, tuple(int, int), optional
1522
+ :param _request_auth: set to override the auth_settings for an a single
1523
+ request; this effectively ignores the
1524
+ authentication in the spec for a single request.
1525
+ :type _request_auth: dict, optional
1526
+ :param _content_type: force content-type for the request.
1527
+ :type _content_type: str, Optional
1528
+ :param _headers: set to override the headers for a single
1529
+ request; this effectively ignores the headers
1530
+ in the spec for a single request.
1531
+ :type _headers: dict, optional
1532
+ :param _host_index: set to override the host_index for a single
1533
+ request; this effectively ignores the host_index
1534
+ in the spec for a single request.
1535
+ :type _host_index: int, optional
1536
+ :return: Returns the result object.
1537
+ """ # noqa: E501
1538
+
1539
+ _param = self._freedns_dns_deactivate_create2_serialize(
1540
+ deactivate_free_dns=deactivate_free_dns,
1541
+ _request_auth=_request_auth,
1542
+ _content_type=_content_type,
1543
+ _headers=_headers,
1544
+ _host_index=_host_index
1545
+ )
1546
+
1547
+ _response_types_map: Dict[str, Optional[str]] = {
1548
+ '200': "DeactivateFreeDNSResponse",
1549
+ }
1550
+ response_data = self.api_client.call_api(
1551
+ *_param,
1552
+ _request_timeout=_request_timeout
1553
+ )
1554
+ response_data.read()
1555
+ return self.api_client.response_deserialize(
1556
+ response_data=response_data,
1557
+ response_types_map=_response_types_map,
1558
+ ).data
1559
+
1560
+
1561
+ @validate_call
1562
+ def freedns_dns_deactivate_create2_with_http_info(
1563
+ self,
1564
+ deactivate_free_dns: DeactivateFreeDNS,
1565
+ _request_timeout: Union[
1566
+ None,
1567
+ Annotated[StrictFloat, Field(gt=0)],
1568
+ Tuple[
1569
+ Annotated[StrictFloat, Field(gt=0)],
1570
+ Annotated[StrictFloat, Field(gt=0)]
1571
+ ]
1572
+ ] = None,
1573
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1574
+ _content_type: Optional[StrictStr] = None,
1575
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1576
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1577
+ ) -> ApiResponse[DeactivateFreeDNSResponse]:
1578
+ """freedns_dns_deactivate_create2
1579
+
1580
+ Deactivate FreeDNS for a domain. The DNS zone is removed from the cPanel node and, for internal domains, the original nameservers are restored.
1581
+
1582
+ :param deactivate_free_dns: (required)
1583
+ :type deactivate_free_dns: DeactivateFreeDNS
1584
+ :param _request_timeout: timeout setting for this request. If one
1585
+ number provided, it will be total request
1586
+ timeout. It can also be a pair (tuple) of
1587
+ (connection, read) timeouts.
1588
+ :type _request_timeout: int, tuple(int, int), optional
1589
+ :param _request_auth: set to override the auth_settings for an a single
1590
+ request; this effectively ignores the
1591
+ authentication in the spec for a single request.
1592
+ :type _request_auth: dict, optional
1593
+ :param _content_type: force content-type for the request.
1594
+ :type _content_type: str, Optional
1595
+ :param _headers: set to override the headers for a single
1596
+ request; this effectively ignores the headers
1597
+ in the spec for a single request.
1598
+ :type _headers: dict, optional
1599
+ :param _host_index: set to override the host_index for a single
1600
+ request; this effectively ignores the host_index
1601
+ in the spec for a single request.
1602
+ :type _host_index: int, optional
1603
+ :return: Returns the result object.
1604
+ """ # noqa: E501
1605
+
1606
+ _param = self._freedns_dns_deactivate_create2_serialize(
1607
+ deactivate_free_dns=deactivate_free_dns,
1608
+ _request_auth=_request_auth,
1609
+ _content_type=_content_type,
1610
+ _headers=_headers,
1611
+ _host_index=_host_index
1612
+ )
1613
+
1614
+ _response_types_map: Dict[str, Optional[str]] = {
1615
+ '200': "DeactivateFreeDNSResponse",
1616
+ }
1617
+ response_data = self.api_client.call_api(
1618
+ *_param,
1619
+ _request_timeout=_request_timeout
1620
+ )
1621
+ response_data.read()
1622
+ return self.api_client.response_deserialize(
1623
+ response_data=response_data,
1624
+ response_types_map=_response_types_map,
1625
+ )
1626
+
1627
+
1628
+ @validate_call
1629
+ def freedns_dns_deactivate_create2_without_preload_content(
1630
+ self,
1631
+ deactivate_free_dns: DeactivateFreeDNS,
1632
+ _request_timeout: Union[
1633
+ None,
1634
+ Annotated[StrictFloat, Field(gt=0)],
1635
+ Tuple[
1636
+ Annotated[StrictFloat, Field(gt=0)],
1637
+ Annotated[StrictFloat, Field(gt=0)]
1638
+ ]
1639
+ ] = None,
1640
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1641
+ _content_type: Optional[StrictStr] = None,
1642
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1643
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1644
+ ) -> RESTResponseType:
1645
+ """freedns_dns_deactivate_create2
1646
+
1647
+ Deactivate FreeDNS for a domain. The DNS zone is removed from the cPanel node and, for internal domains, the original nameservers are restored.
1648
+
1649
+ :param deactivate_free_dns: (required)
1650
+ :type deactivate_free_dns: DeactivateFreeDNS
1651
+ :param _request_timeout: timeout setting for this request. If one
1652
+ number provided, it will be total request
1653
+ timeout. It can also be a pair (tuple) of
1654
+ (connection, read) timeouts.
1655
+ :type _request_timeout: int, tuple(int, int), optional
1656
+ :param _request_auth: set to override the auth_settings for an a single
1657
+ request; this effectively ignores the
1658
+ authentication in the spec for a single request.
1659
+ :type _request_auth: dict, optional
1660
+ :param _content_type: force content-type for the request.
1661
+ :type _content_type: str, Optional
1662
+ :param _headers: set to override the headers for a single
1663
+ request; this effectively ignores the headers
1664
+ in the spec for a single request.
1665
+ :type _headers: dict, optional
1666
+ :param _host_index: set to override the host_index for a single
1667
+ request; this effectively ignores the host_index
1668
+ in the spec for a single request.
1669
+ :type _host_index: int, optional
1670
+ :return: Returns the result object.
1671
+ """ # noqa: E501
1672
+
1673
+ _param = self._freedns_dns_deactivate_create2_serialize(
1674
+ deactivate_free_dns=deactivate_free_dns,
1675
+ _request_auth=_request_auth,
1676
+ _content_type=_content_type,
1677
+ _headers=_headers,
1678
+ _host_index=_host_index
1679
+ )
1680
+
1681
+ _response_types_map: Dict[str, Optional[str]] = {
1682
+ '200': "DeactivateFreeDNSResponse",
1683
+ }
1684
+ response_data = self.api_client.call_api(
1685
+ *_param,
1686
+ _request_timeout=_request_timeout
1687
+ )
1688
+ return response_data.response
1689
+
1690
+
1691
+ def _freedns_dns_deactivate_create2_serialize(
1692
+ self,
1693
+ deactivate_free_dns,
1694
+ _request_auth,
1695
+ _content_type,
1696
+ _headers,
1697
+ _host_index,
1698
+ ) -> RequestSerialized:
1699
+
1700
+ _host = None
1701
+
1702
+ _collection_formats: Dict[str, str] = {
1703
+ }
1704
+
1705
+ _path_params: Dict[str, str] = {}
1706
+ _query_params: List[Tuple[str, str]] = []
1707
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1708
+ _form_params: List[Tuple[str, str]] = []
1709
+ _files: Dict[
1710
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1711
+ ] = {}
1712
+ _body_params: Optional[bytes] = None
1713
+
1714
+ # process the path parameters
1715
+ # process the query parameters
1716
+ # process the header parameters
1717
+ # process the form parameters
1718
+ # process the body parameter
1719
+ if deactivate_free_dns is not None:
1720
+ _body_params = deactivate_free_dns
1721
+
1722
+
1723
+ # set the HTTP header `Accept`
1724
+ if 'Accept' not in _header_params:
1725
+ _header_params['Accept'] = self.api_client.select_header_accept(
1726
+ [
1727
+ 'application/json'
1728
+ ]
1729
+ )
1730
+
1731
+ # set the HTTP header `Content-Type`
1732
+ if _content_type:
1733
+ _header_params['Content-Type'] = _content_type
1734
+ else:
1735
+ _default_content_type = (
1736
+ self.api_client.select_header_content_type(
1737
+ [
1738
+ 'application/json'
1739
+ ]
1740
+ )
1741
+ )
1742
+ if _default_content_type is not None:
1743
+ _header_params['Content-Type'] = _default_content_type
1744
+
1745
+ # authentication setting
1746
+ _auth_settings: List[str] = [
1747
+ 'cookieAuth',
1748
+ 'tokenAuth'
1749
+ ]
1750
+
1751
+ return self.api_client.param_serialize(
1752
+ method='POST',
1753
+ resource_path='/api/v1/freedns/dns/deactivate/',
1754
+ path_params=_path_params,
1755
+ query_params=_query_params,
1756
+ header_params=_header_params,
1757
+ body=_body_params,
1758
+ post_params=_form_params,
1759
+ files=_files,
1760
+ auth_settings=_auth_settings,
1761
+ collection_formats=_collection_formats,
1762
+ _host=_host,
1763
+ _request_auth=_request_auth
1764
+ )
1765
+
1766
+
1767
+
1768
+
1769
+ @validate_call
1770
+ def freedns_dns_delete_record_create(
1771
+ self,
1772
+ domain: Annotated[StrictStr, Field(description="Domain name or PK.")],
1773
+ source: Annotated[StrictStr, Field(description="'internal' or 'external'.")],
1774
+ delete_record: DeleteRecord,
1775
+ _request_timeout: Union[
1776
+ None,
1777
+ Annotated[StrictFloat, Field(gt=0)],
1778
+ Tuple[
1779
+ Annotated[StrictFloat, Field(gt=0)],
1780
+ Annotated[StrictFloat, Field(gt=0)]
1781
+ ]
1782
+ ] = None,
1783
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1784
+ _content_type: Optional[StrictStr] = None,
1785
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1786
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1787
+ ) -> DeleteRecordResponse:
1788
+ """freedns_dns_delete_record_create
1789
+
1790
+ Delete a DNS record by its line number.
1791
+
1792
+ :param domain: Domain name or PK. (required)
1793
+ :type domain: str
1794
+ :param source: 'internal' or 'external'. (required)
1795
+ :type source: str
1796
+ :param delete_record: (required)
1797
+ :type delete_record: DeleteRecord
1798
+ :param _request_timeout: timeout setting for this request. If one
1799
+ number provided, it will be total request
1800
+ timeout. It can also be a pair (tuple) of
1801
+ (connection, read) timeouts.
1802
+ :type _request_timeout: int, tuple(int, int), optional
1803
+ :param _request_auth: set to override the auth_settings for an a single
1804
+ request; this effectively ignores the
1805
+ authentication in the spec for a single request.
1806
+ :type _request_auth: dict, optional
1807
+ :param _content_type: force content-type for the request.
1808
+ :type _content_type: str, Optional
1809
+ :param _headers: set to override the headers for a single
1810
+ request; this effectively ignores the headers
1811
+ in the spec for a single request.
1812
+ :type _headers: dict, optional
1813
+ :param _host_index: set to override the host_index for a single
1814
+ request; this effectively ignores the host_index
1815
+ in the spec for a single request.
1816
+ :type _host_index: int, optional
1817
+ :return: Returns the result object.
1818
+ """ # noqa: E501
1819
+
1820
+ _param = self._freedns_dns_delete_record_create_serialize(
1821
+ domain=domain,
1822
+ source=source,
1823
+ delete_record=delete_record,
1824
+ _request_auth=_request_auth,
1825
+ _content_type=_content_type,
1826
+ _headers=_headers,
1827
+ _host_index=_host_index
1828
+ )
1829
+
1830
+ _response_types_map: Dict[str, Optional[str]] = {
1831
+ '200': "DeleteRecordResponse",
1832
+ }
1833
+ response_data = self.api_client.call_api(
1834
+ *_param,
1835
+ _request_timeout=_request_timeout
1836
+ )
1837
+ response_data.read()
1838
+ return self.api_client.response_deserialize(
1839
+ response_data=response_data,
1840
+ response_types_map=_response_types_map,
1841
+ ).data
1842
+
1843
+
1844
+ @validate_call
1845
+ def freedns_dns_delete_record_create_with_http_info(
1846
+ self,
1847
+ domain: Annotated[StrictStr, Field(description="Domain name or PK.")],
1848
+ source: Annotated[StrictStr, Field(description="'internal' or 'external'.")],
1849
+ delete_record: DeleteRecord,
1850
+ _request_timeout: Union[
1851
+ None,
1852
+ Annotated[StrictFloat, Field(gt=0)],
1853
+ Tuple[
1854
+ Annotated[StrictFloat, Field(gt=0)],
1855
+ Annotated[StrictFloat, Field(gt=0)]
1856
+ ]
1857
+ ] = None,
1858
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1859
+ _content_type: Optional[StrictStr] = None,
1860
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1861
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1862
+ ) -> ApiResponse[DeleteRecordResponse]:
1863
+ """freedns_dns_delete_record_create
1864
+
1865
+ Delete a DNS record by its line number.
1866
+
1867
+ :param domain: Domain name or PK. (required)
1868
+ :type domain: str
1869
+ :param source: 'internal' or 'external'. (required)
1870
+ :type source: str
1871
+ :param delete_record: (required)
1872
+ :type delete_record: DeleteRecord
1873
+ :param _request_timeout: timeout setting for this request. If one
1874
+ number provided, it will be total request
1875
+ timeout. It can also be a pair (tuple) of
1876
+ (connection, read) timeouts.
1877
+ :type _request_timeout: int, tuple(int, int), optional
1878
+ :param _request_auth: set to override the auth_settings for an a single
1879
+ request; this effectively ignores the
1880
+ authentication in the spec for a single request.
1881
+ :type _request_auth: dict, optional
1882
+ :param _content_type: force content-type for the request.
1883
+ :type _content_type: str, Optional
1884
+ :param _headers: set to override the headers for a single
1885
+ request; this effectively ignores the headers
1886
+ in the spec for a single request.
1887
+ :type _headers: dict, optional
1888
+ :param _host_index: set to override the host_index for a single
1889
+ request; this effectively ignores the host_index
1890
+ in the spec for a single request.
1891
+ :type _host_index: int, optional
1892
+ :return: Returns the result object.
1893
+ """ # noqa: E501
1894
+
1895
+ _param = self._freedns_dns_delete_record_create_serialize(
1896
+ domain=domain,
1897
+ source=source,
1898
+ delete_record=delete_record,
1899
+ _request_auth=_request_auth,
1900
+ _content_type=_content_type,
1901
+ _headers=_headers,
1902
+ _host_index=_host_index
1903
+ )
1904
+
1905
+ _response_types_map: Dict[str, Optional[str]] = {
1906
+ '200': "DeleteRecordResponse",
1907
+ }
1908
+ response_data = self.api_client.call_api(
1909
+ *_param,
1910
+ _request_timeout=_request_timeout
1911
+ )
1912
+ response_data.read()
1913
+ return self.api_client.response_deserialize(
1914
+ response_data=response_data,
1915
+ response_types_map=_response_types_map,
1916
+ )
1917
+
1918
+
1919
+ @validate_call
1920
+ def freedns_dns_delete_record_create_without_preload_content(
1921
+ self,
1922
+ domain: Annotated[StrictStr, Field(description="Domain name or PK.")],
1923
+ source: Annotated[StrictStr, Field(description="'internal' or 'external'.")],
1924
+ delete_record: DeleteRecord,
1925
+ _request_timeout: Union[
1926
+ None,
1927
+ Annotated[StrictFloat, Field(gt=0)],
1928
+ Tuple[
1929
+ Annotated[StrictFloat, Field(gt=0)],
1930
+ Annotated[StrictFloat, Field(gt=0)]
1931
+ ]
1932
+ ] = None,
1933
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1934
+ _content_type: Optional[StrictStr] = None,
1935
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1936
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1937
+ ) -> RESTResponseType:
1938
+ """freedns_dns_delete_record_create
1939
+
1940
+ Delete a DNS record by its line number.
1941
+
1942
+ :param domain: Domain name or PK. (required)
1943
+ :type domain: str
1944
+ :param source: 'internal' or 'external'. (required)
1945
+ :type source: str
1946
+ :param delete_record: (required)
1947
+ :type delete_record: DeleteRecord
1948
+ :param _request_timeout: timeout setting for this request. If one
1949
+ number provided, it will be total request
1950
+ timeout. It can also be a pair (tuple) of
1951
+ (connection, read) timeouts.
1952
+ :type _request_timeout: int, tuple(int, int), optional
1953
+ :param _request_auth: set to override the auth_settings for an a single
1954
+ request; this effectively ignores the
1955
+ authentication in the spec for a single request.
1956
+ :type _request_auth: dict, optional
1957
+ :param _content_type: force content-type for the request.
1958
+ :type _content_type: str, Optional
1959
+ :param _headers: set to override the headers for a single
1960
+ request; this effectively ignores the headers
1961
+ in the spec for a single request.
1962
+ :type _headers: dict, optional
1963
+ :param _host_index: set to override the host_index for a single
1964
+ request; this effectively ignores the host_index
1965
+ in the spec for a single request.
1966
+ :type _host_index: int, optional
1967
+ :return: Returns the result object.
1968
+ """ # noqa: E501
1969
+
1970
+ _param = self._freedns_dns_delete_record_create_serialize(
1971
+ domain=domain,
1972
+ source=source,
1973
+ delete_record=delete_record,
1974
+ _request_auth=_request_auth,
1975
+ _content_type=_content_type,
1976
+ _headers=_headers,
1977
+ _host_index=_host_index
1978
+ )
1979
+
1980
+ _response_types_map: Dict[str, Optional[str]] = {
1981
+ '200': "DeleteRecordResponse",
1982
+ }
1983
+ response_data = self.api_client.call_api(
1984
+ *_param,
1985
+ _request_timeout=_request_timeout
1986
+ )
1987
+ return response_data.response
1988
+
1989
+
1990
+ def _freedns_dns_delete_record_create_serialize(
1991
+ self,
1992
+ domain,
1993
+ source,
1994
+ delete_record,
1995
+ _request_auth,
1996
+ _content_type,
1997
+ _headers,
1998
+ _host_index,
1999
+ ) -> RequestSerialized:
2000
+
2001
+ _host = None
2002
+
2003
+ _collection_formats: Dict[str, str] = {
2004
+ }
2005
+
2006
+ _path_params: Dict[str, str] = {}
2007
+ _query_params: List[Tuple[str, str]] = []
2008
+ _header_params: Dict[str, Optional[str]] = _headers or {}
2009
+ _form_params: List[Tuple[str, str]] = []
2010
+ _files: Dict[
2011
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
2012
+ ] = {}
2013
+ _body_params: Optional[bytes] = None
2014
+
2015
+ # process the path parameters
2016
+ # process the query parameters
2017
+ if domain is not None:
2018
+
2019
+ _query_params.append(('domain', domain))
2020
+
2021
+ if source is not None:
2022
+
2023
+ _query_params.append(('source', source))
2024
+
2025
+ # process the header parameters
2026
+ # process the form parameters
2027
+ # process the body parameter
2028
+ if delete_record is not None:
2029
+ _body_params = delete_record
2030
+
2031
+
2032
+ # set the HTTP header `Accept`
2033
+ if 'Accept' not in _header_params:
2034
+ _header_params['Accept'] = self.api_client.select_header_accept(
2035
+ [
2036
+ 'application/json'
2037
+ ]
2038
+ )
2039
+
2040
+ # set the HTTP header `Content-Type`
2041
+ if _content_type:
2042
+ _header_params['Content-Type'] = _content_type
2043
+ else:
2044
+ _default_content_type = (
2045
+ self.api_client.select_header_content_type(
2046
+ [
2047
+ 'application/json'
2048
+ ]
2049
+ )
2050
+ )
2051
+ if _default_content_type is not None:
2052
+ _header_params['Content-Type'] = _default_content_type
2053
+
2054
+ # authentication setting
2055
+ _auth_settings: List[str] = [
2056
+ 'cookieAuth',
2057
+ 'tokenAuth'
2058
+ ]
2059
+
2060
+ return self.api_client.param_serialize(
2061
+ method='POST',
2062
+ resource_path='/api/freedns/dns/delete-record/',
2063
+ path_params=_path_params,
2064
+ query_params=_query_params,
2065
+ header_params=_header_params,
2066
+ body=_body_params,
2067
+ post_params=_form_params,
2068
+ files=_files,
2069
+ auth_settings=_auth_settings,
2070
+ collection_formats=_collection_formats,
2071
+ _host=_host,
2072
+ _request_auth=_request_auth
2073
+ )
2074
+
2075
+
2076
+
2077
+
2078
+ @validate_call
2079
+ def freedns_dns_delete_record_create2(
2080
+ self,
2081
+ domain: Annotated[StrictStr, Field(description="Domain name or PK.")],
2082
+ source: Annotated[StrictStr, Field(description="'internal' or 'external'.")],
2083
+ delete_record: DeleteRecord,
2084
+ _request_timeout: Union[
2085
+ None,
2086
+ Annotated[StrictFloat, Field(gt=0)],
2087
+ Tuple[
2088
+ Annotated[StrictFloat, Field(gt=0)],
2089
+ Annotated[StrictFloat, Field(gt=0)]
2090
+ ]
2091
+ ] = None,
2092
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2093
+ _content_type: Optional[StrictStr] = None,
2094
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2095
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2096
+ ) -> DeleteRecordResponse:
2097
+ """freedns_dns_delete_record_create2
2098
+
2099
+ Delete a DNS record by its line number.
2100
+
2101
+ :param domain: Domain name or PK. (required)
2102
+ :type domain: str
2103
+ :param source: 'internal' or 'external'. (required)
2104
+ :type source: str
2105
+ :param delete_record: (required)
2106
+ :type delete_record: DeleteRecord
2107
+ :param _request_timeout: timeout setting for this request. If one
2108
+ number provided, it will be total request
2109
+ timeout. It can also be a pair (tuple) of
2110
+ (connection, read) timeouts.
2111
+ :type _request_timeout: int, tuple(int, int), optional
2112
+ :param _request_auth: set to override the auth_settings for an a single
2113
+ request; this effectively ignores the
2114
+ authentication in the spec for a single request.
2115
+ :type _request_auth: dict, optional
2116
+ :param _content_type: force content-type for the request.
2117
+ :type _content_type: str, Optional
2118
+ :param _headers: set to override the headers for a single
2119
+ request; this effectively ignores the headers
2120
+ in the spec for a single request.
2121
+ :type _headers: dict, optional
2122
+ :param _host_index: set to override the host_index for a single
2123
+ request; this effectively ignores the host_index
2124
+ in the spec for a single request.
2125
+ :type _host_index: int, optional
2126
+ :return: Returns the result object.
2127
+ """ # noqa: E501
2128
+
2129
+ _param = self._freedns_dns_delete_record_create2_serialize(
2130
+ domain=domain,
2131
+ source=source,
2132
+ delete_record=delete_record,
2133
+ _request_auth=_request_auth,
2134
+ _content_type=_content_type,
2135
+ _headers=_headers,
2136
+ _host_index=_host_index
2137
+ )
2138
+
2139
+ _response_types_map: Dict[str, Optional[str]] = {
2140
+ '200': "DeleteRecordResponse",
2141
+ }
2142
+ response_data = self.api_client.call_api(
2143
+ *_param,
2144
+ _request_timeout=_request_timeout
2145
+ )
2146
+ response_data.read()
2147
+ return self.api_client.response_deserialize(
2148
+ response_data=response_data,
2149
+ response_types_map=_response_types_map,
2150
+ ).data
2151
+
2152
+
2153
+ @validate_call
2154
+ def freedns_dns_delete_record_create2_with_http_info(
2155
+ self,
2156
+ domain: Annotated[StrictStr, Field(description="Domain name or PK.")],
2157
+ source: Annotated[StrictStr, Field(description="'internal' or 'external'.")],
2158
+ delete_record: DeleteRecord,
2159
+ _request_timeout: Union[
2160
+ None,
2161
+ Annotated[StrictFloat, Field(gt=0)],
2162
+ Tuple[
2163
+ Annotated[StrictFloat, Field(gt=0)],
2164
+ Annotated[StrictFloat, Field(gt=0)]
2165
+ ]
2166
+ ] = None,
2167
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2168
+ _content_type: Optional[StrictStr] = None,
2169
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2170
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2171
+ ) -> ApiResponse[DeleteRecordResponse]:
2172
+ """freedns_dns_delete_record_create2
2173
+
2174
+ Delete a DNS record by its line number.
2175
+
2176
+ :param domain: Domain name or PK. (required)
2177
+ :type domain: str
2178
+ :param source: 'internal' or 'external'. (required)
2179
+ :type source: str
2180
+ :param delete_record: (required)
2181
+ :type delete_record: DeleteRecord
2182
+ :param _request_timeout: timeout setting for this request. If one
2183
+ number provided, it will be total request
2184
+ timeout. It can also be a pair (tuple) of
2185
+ (connection, read) timeouts.
2186
+ :type _request_timeout: int, tuple(int, int), optional
2187
+ :param _request_auth: set to override the auth_settings for an a single
2188
+ request; this effectively ignores the
2189
+ authentication in the spec for a single request.
2190
+ :type _request_auth: dict, optional
2191
+ :param _content_type: force content-type for the request.
2192
+ :type _content_type: str, Optional
2193
+ :param _headers: set to override the headers for a single
2194
+ request; this effectively ignores the headers
2195
+ in the spec for a single request.
2196
+ :type _headers: dict, optional
2197
+ :param _host_index: set to override the host_index for a single
2198
+ request; this effectively ignores the host_index
2199
+ in the spec for a single request.
2200
+ :type _host_index: int, optional
2201
+ :return: Returns the result object.
2202
+ """ # noqa: E501
2203
+
2204
+ _param = self._freedns_dns_delete_record_create2_serialize(
2205
+ domain=domain,
2206
+ source=source,
2207
+ delete_record=delete_record,
2208
+ _request_auth=_request_auth,
2209
+ _content_type=_content_type,
2210
+ _headers=_headers,
2211
+ _host_index=_host_index
2212
+ )
2213
+
2214
+ _response_types_map: Dict[str, Optional[str]] = {
2215
+ '200': "DeleteRecordResponse",
2216
+ }
2217
+ response_data = self.api_client.call_api(
2218
+ *_param,
2219
+ _request_timeout=_request_timeout
2220
+ )
2221
+ response_data.read()
2222
+ return self.api_client.response_deserialize(
2223
+ response_data=response_data,
2224
+ response_types_map=_response_types_map,
2225
+ )
2226
+
2227
+
2228
+ @validate_call
2229
+ def freedns_dns_delete_record_create2_without_preload_content(
2230
+ self,
2231
+ domain: Annotated[StrictStr, Field(description="Domain name or PK.")],
2232
+ source: Annotated[StrictStr, Field(description="'internal' or 'external'.")],
2233
+ delete_record: DeleteRecord,
2234
+ _request_timeout: Union[
2235
+ None,
2236
+ Annotated[StrictFloat, Field(gt=0)],
2237
+ Tuple[
2238
+ Annotated[StrictFloat, Field(gt=0)],
2239
+ Annotated[StrictFloat, Field(gt=0)]
2240
+ ]
2241
+ ] = None,
2242
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2243
+ _content_type: Optional[StrictStr] = None,
2244
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2245
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2246
+ ) -> RESTResponseType:
2247
+ """freedns_dns_delete_record_create2
2248
+
2249
+ Delete a DNS record by its line number.
2250
+
2251
+ :param domain: Domain name or PK. (required)
2252
+ :type domain: str
2253
+ :param source: 'internal' or 'external'. (required)
2254
+ :type source: str
2255
+ :param delete_record: (required)
2256
+ :type delete_record: DeleteRecord
2257
+ :param _request_timeout: timeout setting for this request. If one
2258
+ number provided, it will be total request
2259
+ timeout. It can also be a pair (tuple) of
2260
+ (connection, read) timeouts.
2261
+ :type _request_timeout: int, tuple(int, int), optional
2262
+ :param _request_auth: set to override the auth_settings for an a single
2263
+ request; this effectively ignores the
2264
+ authentication in the spec for a single request.
2265
+ :type _request_auth: dict, optional
2266
+ :param _content_type: force content-type for the request.
2267
+ :type _content_type: str, Optional
2268
+ :param _headers: set to override the headers for a single
2269
+ request; this effectively ignores the headers
2270
+ in the spec for a single request.
2271
+ :type _headers: dict, optional
2272
+ :param _host_index: set to override the host_index for a single
2273
+ request; this effectively ignores the host_index
2274
+ in the spec for a single request.
2275
+ :type _host_index: int, optional
2276
+ :return: Returns the result object.
2277
+ """ # noqa: E501
2278
+
2279
+ _param = self._freedns_dns_delete_record_create2_serialize(
2280
+ domain=domain,
2281
+ source=source,
2282
+ delete_record=delete_record,
2283
+ _request_auth=_request_auth,
2284
+ _content_type=_content_type,
2285
+ _headers=_headers,
2286
+ _host_index=_host_index
2287
+ )
2288
+
2289
+ _response_types_map: Dict[str, Optional[str]] = {
2290
+ '200': "DeleteRecordResponse",
2291
+ }
2292
+ response_data = self.api_client.call_api(
2293
+ *_param,
2294
+ _request_timeout=_request_timeout
2295
+ )
2296
+ return response_data.response
2297
+
2298
+
2299
+ def _freedns_dns_delete_record_create2_serialize(
2300
+ self,
2301
+ domain,
2302
+ source,
2303
+ delete_record,
2304
+ _request_auth,
2305
+ _content_type,
2306
+ _headers,
2307
+ _host_index,
2308
+ ) -> RequestSerialized:
2309
+
2310
+ _host = None
2311
+
2312
+ _collection_formats: Dict[str, str] = {
2313
+ }
2314
+
2315
+ _path_params: Dict[str, str] = {}
2316
+ _query_params: List[Tuple[str, str]] = []
2317
+ _header_params: Dict[str, Optional[str]] = _headers or {}
2318
+ _form_params: List[Tuple[str, str]] = []
2319
+ _files: Dict[
2320
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
2321
+ ] = {}
2322
+ _body_params: Optional[bytes] = None
2323
+
2324
+ # process the path parameters
2325
+ # process the query parameters
2326
+ if domain is not None:
2327
+
2328
+ _query_params.append(('domain', domain))
2329
+
2330
+ if source is not None:
2331
+
2332
+ _query_params.append(('source', source))
2333
+
2334
+ # process the header parameters
2335
+ # process the form parameters
2336
+ # process the body parameter
2337
+ if delete_record is not None:
2338
+ _body_params = delete_record
2339
+
2340
+
2341
+ # set the HTTP header `Accept`
2342
+ if 'Accept' not in _header_params:
2343
+ _header_params['Accept'] = self.api_client.select_header_accept(
2344
+ [
2345
+ 'application/json'
2346
+ ]
2347
+ )
2348
+
2349
+ # set the HTTP header `Content-Type`
2350
+ if _content_type:
2351
+ _header_params['Content-Type'] = _content_type
2352
+ else:
2353
+ _default_content_type = (
2354
+ self.api_client.select_header_content_type(
2355
+ [
2356
+ 'application/json'
2357
+ ]
2358
+ )
2359
+ )
2360
+ if _default_content_type is not None:
2361
+ _header_params['Content-Type'] = _default_content_type
2362
+
2363
+ # authentication setting
2364
+ _auth_settings: List[str] = [
2365
+ 'cookieAuth',
2366
+ 'tokenAuth'
2367
+ ]
2368
+
2369
+ return self.api_client.param_serialize(
2370
+ method='POST',
2371
+ resource_path='/api/v1/freedns/dns/delete-record/',
2372
+ path_params=_path_params,
2373
+ query_params=_query_params,
2374
+ header_params=_header_params,
2375
+ body=_body_params,
2376
+ post_params=_form_params,
2377
+ files=_files,
2378
+ auth_settings=_auth_settings,
2379
+ collection_formats=_collection_formats,
2380
+ _host=_host,
2381
+ _request_auth=_request_auth
2382
+ )
2383
+
2384
+
2385
+
2386
+
2387
+ @validate_call
2388
+ def freedns_dns_list(
2389
+ self,
2390
+ _request_timeout: Union[
2391
+ None,
2392
+ Annotated[StrictFloat, Field(gt=0)],
2393
+ Tuple[
2394
+ Annotated[StrictFloat, Field(gt=0)],
2395
+ Annotated[StrictFloat, Field(gt=0)]
2396
+ ]
2397
+ ] = None,
2398
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2399
+ _content_type: Optional[StrictStr] = None,
2400
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2401
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2402
+ ) -> List[FreeDNSDomain]:
2403
+ """freedns_dns_list
2404
+
2405
+ List all domains with active FreeDNS for the authenticated user.
2406
+
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._freedns_dns_list_serialize(
2430
+ _request_auth=_request_auth,
2431
+ _content_type=_content_type,
2432
+ _headers=_headers,
2433
+ _host_index=_host_index
2434
+ )
2435
+
2436
+ _response_types_map: Dict[str, Optional[str]] = {
2437
+ '200': "List[FreeDNSDomain]",
2438
+ }
2439
+ response_data = self.api_client.call_api(
2440
+ *_param,
2441
+ _request_timeout=_request_timeout
2442
+ )
2443
+ response_data.read()
2444
+ return self.api_client.response_deserialize(
2445
+ response_data=response_data,
2446
+ response_types_map=_response_types_map,
2447
+ ).data
2448
+
2449
+
2450
+ @validate_call
2451
+ def freedns_dns_list_with_http_info(
2452
+ self,
2453
+ _request_timeout: Union[
2454
+ None,
2455
+ Annotated[StrictFloat, Field(gt=0)],
2456
+ Tuple[
2457
+ Annotated[StrictFloat, Field(gt=0)],
2458
+ Annotated[StrictFloat, Field(gt=0)]
2459
+ ]
2460
+ ] = None,
2461
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2462
+ _content_type: Optional[StrictStr] = None,
2463
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2464
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2465
+ ) -> ApiResponse[List[FreeDNSDomain]]:
2466
+ """freedns_dns_list
2467
+
2468
+ List all domains with active FreeDNS for the authenticated user.
2469
+
2470
+ :param _request_timeout: timeout setting for this request. If one
2471
+ number provided, it will be total request
2472
+ timeout. It can also be a pair (tuple) of
2473
+ (connection, read) timeouts.
2474
+ :type _request_timeout: int, tuple(int, int), optional
2475
+ :param _request_auth: set to override the auth_settings for an a single
2476
+ request; this effectively ignores the
2477
+ authentication in the spec for a single request.
2478
+ :type _request_auth: dict, optional
2479
+ :param _content_type: force content-type for the request.
2480
+ :type _content_type: str, Optional
2481
+ :param _headers: set to override the headers for a single
2482
+ request; this effectively ignores the headers
2483
+ in the spec for a single request.
2484
+ :type _headers: dict, optional
2485
+ :param _host_index: set to override the host_index for a single
2486
+ request; this effectively ignores the host_index
2487
+ in the spec for a single request.
2488
+ :type _host_index: int, optional
2489
+ :return: Returns the result object.
2490
+ """ # noqa: E501
2491
+
2492
+ _param = self._freedns_dns_list_serialize(
2493
+ _request_auth=_request_auth,
2494
+ _content_type=_content_type,
2495
+ _headers=_headers,
2496
+ _host_index=_host_index
2497
+ )
2498
+
2499
+ _response_types_map: Dict[str, Optional[str]] = {
2500
+ '200': "List[FreeDNSDomain]",
2501
+ }
2502
+ response_data = self.api_client.call_api(
2503
+ *_param,
2504
+ _request_timeout=_request_timeout
2505
+ )
2506
+ response_data.read()
2507
+ return self.api_client.response_deserialize(
2508
+ response_data=response_data,
2509
+ response_types_map=_response_types_map,
2510
+ )
2511
+
2512
+
2513
+ @validate_call
2514
+ def freedns_dns_list_without_preload_content(
2515
+ self,
2516
+ _request_timeout: Union[
2517
+ None,
2518
+ Annotated[StrictFloat, Field(gt=0)],
2519
+ Tuple[
2520
+ Annotated[StrictFloat, Field(gt=0)],
2521
+ Annotated[StrictFloat, Field(gt=0)]
2522
+ ]
2523
+ ] = None,
2524
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2525
+ _content_type: Optional[StrictStr] = None,
2526
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2527
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2528
+ ) -> RESTResponseType:
2529
+ """freedns_dns_list
2530
+
2531
+ List all domains with active FreeDNS for the authenticated user.
2532
+
2533
+ :param _request_timeout: timeout setting for this request. If one
2534
+ number provided, it will be total request
2535
+ timeout. It can also be a pair (tuple) of
2536
+ (connection, read) timeouts.
2537
+ :type _request_timeout: int, tuple(int, int), optional
2538
+ :param _request_auth: set to override the auth_settings for an a single
2539
+ request; this effectively ignores the
2540
+ authentication in the spec for a single request.
2541
+ :type _request_auth: dict, optional
2542
+ :param _content_type: force content-type for the request.
2543
+ :type _content_type: str, Optional
2544
+ :param _headers: set to override the headers for a single
2545
+ request; this effectively ignores the headers
2546
+ in the spec for a single request.
2547
+ :type _headers: dict, optional
2548
+ :param _host_index: set to override the host_index for a single
2549
+ request; this effectively ignores the host_index
2550
+ in the spec for a single request.
2551
+ :type _host_index: int, optional
2552
+ :return: Returns the result object.
2553
+ """ # noqa: E501
2554
+
2555
+ _param = self._freedns_dns_list_serialize(
2556
+ _request_auth=_request_auth,
2557
+ _content_type=_content_type,
2558
+ _headers=_headers,
2559
+ _host_index=_host_index
2560
+ )
2561
+
2562
+ _response_types_map: Dict[str, Optional[str]] = {
2563
+ '200': "List[FreeDNSDomain]",
2564
+ }
2565
+ response_data = self.api_client.call_api(
2566
+ *_param,
2567
+ _request_timeout=_request_timeout
2568
+ )
2569
+ return response_data.response
2570
+
2571
+
2572
+ def _freedns_dns_list_serialize(
2573
+ self,
2574
+ _request_auth,
2575
+ _content_type,
2576
+ _headers,
2577
+ _host_index,
2578
+ ) -> RequestSerialized:
2579
+
2580
+ _host = None
2581
+
2582
+ _collection_formats: Dict[str, str] = {
2583
+ }
2584
+
2585
+ _path_params: Dict[str, str] = {}
2586
+ _query_params: List[Tuple[str, str]] = []
2587
+ _header_params: Dict[str, Optional[str]] = _headers or {}
2588
+ _form_params: List[Tuple[str, str]] = []
2589
+ _files: Dict[
2590
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
2591
+ ] = {}
2592
+ _body_params: Optional[bytes] = None
2593
+
2594
+ # process the path parameters
2595
+ # process the query parameters
2596
+ # process the header parameters
2597
+ # process the form parameters
2598
+ # process the body parameter
2599
+
2600
+
2601
+ # set the HTTP header `Accept`
2602
+ if 'Accept' not in _header_params:
2603
+ _header_params['Accept'] = self.api_client.select_header_accept(
2604
+ [
2605
+ 'application/json'
2606
+ ]
2607
+ )
2608
+
2609
+
2610
+ # authentication setting
2611
+ _auth_settings: List[str] = [
2612
+ 'cookieAuth',
2613
+ 'tokenAuth'
2614
+ ]
2615
+
2616
+ return self.api_client.param_serialize(
2617
+ method='GET',
2618
+ resource_path='/api/freedns/dns/',
2619
+ path_params=_path_params,
2620
+ query_params=_query_params,
2621
+ header_params=_header_params,
2622
+ body=_body_params,
2623
+ post_params=_form_params,
2624
+ files=_files,
2625
+ auth_settings=_auth_settings,
2626
+ collection_formats=_collection_formats,
2627
+ _host=_host,
2628
+ _request_auth=_request_auth
2629
+ )
2630
+
2631
+
2632
+
2633
+
2634
+ @validate_call
2635
+ def freedns_dns_list2(
2636
+ self,
2637
+ _request_timeout: Union[
2638
+ None,
2639
+ Annotated[StrictFloat, Field(gt=0)],
2640
+ Tuple[
2641
+ Annotated[StrictFloat, Field(gt=0)],
2642
+ Annotated[StrictFloat, Field(gt=0)]
2643
+ ]
2644
+ ] = None,
2645
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2646
+ _content_type: Optional[StrictStr] = None,
2647
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2648
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2649
+ ) -> List[FreeDNSDomain]:
2650
+ """freedns_dns_list2
2651
+
2652
+ List all domains with active FreeDNS for the authenticated user.
2653
+
2654
+ :param _request_timeout: timeout setting for this request. If one
2655
+ number provided, it will be total request
2656
+ timeout. It can also be a pair (tuple) of
2657
+ (connection, read) timeouts.
2658
+ :type _request_timeout: int, tuple(int, int), optional
2659
+ :param _request_auth: set to override the auth_settings for an a single
2660
+ request; this effectively ignores the
2661
+ authentication in the spec for a single request.
2662
+ :type _request_auth: dict, optional
2663
+ :param _content_type: force content-type for the request.
2664
+ :type _content_type: str, Optional
2665
+ :param _headers: set to override the headers for a single
2666
+ request; this effectively ignores the headers
2667
+ in the spec for a single request.
2668
+ :type _headers: dict, optional
2669
+ :param _host_index: set to override the host_index for a single
2670
+ request; this effectively ignores the host_index
2671
+ in the spec for a single request.
2672
+ :type _host_index: int, optional
2673
+ :return: Returns the result object.
2674
+ """ # noqa: E501
2675
+
2676
+ _param = self._freedns_dns_list2_serialize(
2677
+ _request_auth=_request_auth,
2678
+ _content_type=_content_type,
2679
+ _headers=_headers,
2680
+ _host_index=_host_index
2681
+ )
2682
+
2683
+ _response_types_map: Dict[str, Optional[str]] = {
2684
+ '200': "List[FreeDNSDomain]",
2685
+ }
2686
+ response_data = self.api_client.call_api(
2687
+ *_param,
2688
+ _request_timeout=_request_timeout
2689
+ )
2690
+ response_data.read()
2691
+ return self.api_client.response_deserialize(
2692
+ response_data=response_data,
2693
+ response_types_map=_response_types_map,
2694
+ ).data
2695
+
2696
+
2697
+ @validate_call
2698
+ def freedns_dns_list2_with_http_info(
2699
+ self,
2700
+ _request_timeout: Union[
2701
+ None,
2702
+ Annotated[StrictFloat, Field(gt=0)],
2703
+ Tuple[
2704
+ Annotated[StrictFloat, Field(gt=0)],
2705
+ Annotated[StrictFloat, Field(gt=0)]
2706
+ ]
2707
+ ] = None,
2708
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2709
+ _content_type: Optional[StrictStr] = None,
2710
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2711
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2712
+ ) -> ApiResponse[List[FreeDNSDomain]]:
2713
+ """freedns_dns_list2
2714
+
2715
+ List all domains with active FreeDNS for the authenticated user.
2716
+
2717
+ :param _request_timeout: timeout setting for this request. If one
2718
+ number provided, it will be total request
2719
+ timeout. It can also be a pair (tuple) of
2720
+ (connection, read) timeouts.
2721
+ :type _request_timeout: int, tuple(int, int), optional
2722
+ :param _request_auth: set to override the auth_settings for an a single
2723
+ request; this effectively ignores the
2724
+ authentication in the spec for a single request.
2725
+ :type _request_auth: dict, optional
2726
+ :param _content_type: force content-type for the request.
2727
+ :type _content_type: str, Optional
2728
+ :param _headers: set to override the headers for a single
2729
+ request; this effectively ignores the headers
2730
+ in the spec for a single request.
2731
+ :type _headers: dict, optional
2732
+ :param _host_index: set to override the host_index for a single
2733
+ request; this effectively ignores the host_index
2734
+ in the spec for a single request.
2735
+ :type _host_index: int, optional
2736
+ :return: Returns the result object.
2737
+ """ # noqa: E501
2738
+
2739
+ _param = self._freedns_dns_list2_serialize(
2740
+ _request_auth=_request_auth,
2741
+ _content_type=_content_type,
2742
+ _headers=_headers,
2743
+ _host_index=_host_index
2744
+ )
2745
+
2746
+ _response_types_map: Dict[str, Optional[str]] = {
2747
+ '200': "List[FreeDNSDomain]",
2748
+ }
2749
+ response_data = self.api_client.call_api(
2750
+ *_param,
2751
+ _request_timeout=_request_timeout
2752
+ )
2753
+ response_data.read()
2754
+ return self.api_client.response_deserialize(
2755
+ response_data=response_data,
2756
+ response_types_map=_response_types_map,
2757
+ )
2758
+
2759
+
2760
+ @validate_call
2761
+ def freedns_dns_list2_without_preload_content(
2762
+ self,
2763
+ _request_timeout: Union[
2764
+ None,
2765
+ Annotated[StrictFloat, Field(gt=0)],
2766
+ Tuple[
2767
+ Annotated[StrictFloat, Field(gt=0)],
2768
+ Annotated[StrictFloat, Field(gt=0)]
2769
+ ]
2770
+ ] = None,
2771
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2772
+ _content_type: Optional[StrictStr] = None,
2773
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2774
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2775
+ ) -> RESTResponseType:
2776
+ """freedns_dns_list2
2777
+
2778
+ List all domains with active FreeDNS for the authenticated user.
2779
+
2780
+ :param _request_timeout: timeout setting for this request. If one
2781
+ number provided, it will be total request
2782
+ timeout. It can also be a pair (tuple) of
2783
+ (connection, read) timeouts.
2784
+ :type _request_timeout: int, tuple(int, int), optional
2785
+ :param _request_auth: set to override the auth_settings for an a single
2786
+ request; this effectively ignores the
2787
+ authentication in the spec for a single request.
2788
+ :type _request_auth: dict, optional
2789
+ :param _content_type: force content-type for the request.
2790
+ :type _content_type: str, Optional
2791
+ :param _headers: set to override the headers for a single
2792
+ request; this effectively ignores the headers
2793
+ in the spec for a single request.
2794
+ :type _headers: dict, optional
2795
+ :param _host_index: set to override the host_index for a single
2796
+ request; this effectively ignores the host_index
2797
+ in the spec for a single request.
2798
+ :type _host_index: int, optional
2799
+ :return: Returns the result object.
2800
+ """ # noqa: E501
2801
+
2802
+ _param = self._freedns_dns_list2_serialize(
2803
+ _request_auth=_request_auth,
2804
+ _content_type=_content_type,
2805
+ _headers=_headers,
2806
+ _host_index=_host_index
2807
+ )
2808
+
2809
+ _response_types_map: Dict[str, Optional[str]] = {
2810
+ '200': "List[FreeDNSDomain]",
2811
+ }
2812
+ response_data = self.api_client.call_api(
2813
+ *_param,
2814
+ _request_timeout=_request_timeout
2815
+ )
2816
+ return response_data.response
2817
+
2818
+
2819
+ def _freedns_dns_list2_serialize(
2820
+ self,
2821
+ _request_auth,
2822
+ _content_type,
2823
+ _headers,
2824
+ _host_index,
2825
+ ) -> RequestSerialized:
2826
+
2827
+ _host = None
2828
+
2829
+ _collection_formats: Dict[str, str] = {
2830
+ }
2831
+
2832
+ _path_params: Dict[str, str] = {}
2833
+ _query_params: List[Tuple[str, str]] = []
2834
+ _header_params: Dict[str, Optional[str]] = _headers or {}
2835
+ _form_params: List[Tuple[str, str]] = []
2836
+ _files: Dict[
2837
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
2838
+ ] = {}
2839
+ _body_params: Optional[bytes] = None
2840
+
2841
+ # process the path parameters
2842
+ # process the query parameters
2843
+ # process the header parameters
2844
+ # process the form parameters
2845
+ # process the body parameter
2846
+
2847
+
2848
+ # set the HTTP header `Accept`
2849
+ if 'Accept' not in _header_params:
2850
+ _header_params['Accept'] = self.api_client.select_header_accept(
2851
+ [
2852
+ 'application/json'
2853
+ ]
2854
+ )
2855
+
2856
+
2857
+ # authentication setting
2858
+ _auth_settings: List[str] = [
2859
+ 'cookieAuth',
2860
+ 'tokenAuth'
2861
+ ]
2862
+
2863
+ return self.api_client.param_serialize(
2864
+ method='GET',
2865
+ resource_path='/api/v1/freedns/dns/',
2866
+ path_params=_path_params,
2867
+ query_params=_query_params,
2868
+ header_params=_header_params,
2869
+ body=_body_params,
2870
+ post_params=_form_params,
2871
+ files=_files,
2872
+ auth_settings=_auth_settings,
2873
+ collection_formats=_collection_formats,
2874
+ _host=_host,
2875
+ _request_auth=_request_auth
2876
+ )
2877
+
2878
+
2879
+
2880
+
2881
+ @validate_call
2882
+ def freedns_dns_records_list(
2883
+ self,
2884
+ domain: Annotated[StrictStr, Field(description="Domain name or PK.")],
2885
+ source: Annotated[StrictStr, Field(description="'internal' or 'external'.")],
2886
+ _request_timeout: Union[
2887
+ None,
2888
+ Annotated[StrictFloat, Field(gt=0)],
2889
+ Tuple[
2890
+ Annotated[StrictFloat, Field(gt=0)],
2891
+ Annotated[StrictFloat, Field(gt=0)]
2892
+ ]
2893
+ ] = None,
2894
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2895
+ _content_type: Optional[StrictStr] = None,
2896
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2897
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2898
+ ) -> List[DNSRecord]:
2899
+ """freedns_dns_records_list
2900
+
2901
+ List all DNS records for a domain with active FreeDNS.
2902
+
2903
+ :param domain: Domain name or PK. (required)
2904
+ :type domain: str
2905
+ :param source: 'internal' or 'external'. (required)
2906
+ :type source: str
2907
+ :param _request_timeout: timeout setting for this request. If one
2908
+ number provided, it will be total request
2909
+ timeout. It can also be a pair (tuple) of
2910
+ (connection, read) timeouts.
2911
+ :type _request_timeout: int, tuple(int, int), optional
2912
+ :param _request_auth: set to override the auth_settings for an a single
2913
+ request; this effectively ignores the
2914
+ authentication in the spec for a single request.
2915
+ :type _request_auth: dict, optional
2916
+ :param _content_type: force content-type for the request.
2917
+ :type _content_type: str, Optional
2918
+ :param _headers: set to override the headers for a single
2919
+ request; this effectively ignores the headers
2920
+ in the spec for a single request.
2921
+ :type _headers: dict, optional
2922
+ :param _host_index: set to override the host_index for a single
2923
+ request; this effectively ignores the host_index
2924
+ in the spec for a single request.
2925
+ :type _host_index: int, optional
2926
+ :return: Returns the result object.
2927
+ """ # noqa: E501
2928
+
2929
+ _param = self._freedns_dns_records_list_serialize(
2930
+ domain=domain,
2931
+ source=source,
2932
+ _request_auth=_request_auth,
2933
+ _content_type=_content_type,
2934
+ _headers=_headers,
2935
+ _host_index=_host_index
2936
+ )
2937
+
2938
+ _response_types_map: Dict[str, Optional[str]] = {
2939
+ '200': "List[DNSRecord]",
2940
+ }
2941
+ response_data = self.api_client.call_api(
2942
+ *_param,
2943
+ _request_timeout=_request_timeout
2944
+ )
2945
+ response_data.read()
2946
+ return self.api_client.response_deserialize(
2947
+ response_data=response_data,
2948
+ response_types_map=_response_types_map,
2949
+ ).data
2950
+
2951
+
2952
+ @validate_call
2953
+ def freedns_dns_records_list_with_http_info(
2954
+ self,
2955
+ domain: Annotated[StrictStr, Field(description="Domain name or PK.")],
2956
+ source: Annotated[StrictStr, Field(description="'internal' or 'external'.")],
2957
+ _request_timeout: Union[
2958
+ None,
2959
+ Annotated[StrictFloat, Field(gt=0)],
2960
+ Tuple[
2961
+ Annotated[StrictFloat, Field(gt=0)],
2962
+ Annotated[StrictFloat, Field(gt=0)]
2963
+ ]
2964
+ ] = None,
2965
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2966
+ _content_type: Optional[StrictStr] = None,
2967
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2968
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2969
+ ) -> ApiResponse[List[DNSRecord]]:
2970
+ """freedns_dns_records_list
2971
+
2972
+ List all DNS records for a domain with active FreeDNS.
2973
+
2974
+ :param domain: Domain name or PK. (required)
2975
+ :type domain: str
2976
+ :param source: 'internal' or 'external'. (required)
2977
+ :type source: str
2978
+ :param _request_timeout: timeout setting for this request. If one
2979
+ number provided, it will be total request
2980
+ timeout. It can also be a pair (tuple) of
2981
+ (connection, read) timeouts.
2982
+ :type _request_timeout: int, tuple(int, int), optional
2983
+ :param _request_auth: set to override the auth_settings for an a single
2984
+ request; this effectively ignores the
2985
+ authentication in the spec for a single request.
2986
+ :type _request_auth: dict, optional
2987
+ :param _content_type: force content-type for the request.
2988
+ :type _content_type: str, Optional
2989
+ :param _headers: set to override the headers for a single
2990
+ request; this effectively ignores the headers
2991
+ in the spec for a single request.
2992
+ :type _headers: dict, optional
2993
+ :param _host_index: set to override the host_index for a single
2994
+ request; this effectively ignores the host_index
2995
+ in the spec for a single request.
2996
+ :type _host_index: int, optional
2997
+ :return: Returns the result object.
2998
+ """ # noqa: E501
2999
+
3000
+ _param = self._freedns_dns_records_list_serialize(
3001
+ domain=domain,
3002
+ source=source,
3003
+ _request_auth=_request_auth,
3004
+ _content_type=_content_type,
3005
+ _headers=_headers,
3006
+ _host_index=_host_index
3007
+ )
3008
+
3009
+ _response_types_map: Dict[str, Optional[str]] = {
3010
+ '200': "List[DNSRecord]",
3011
+ }
3012
+ response_data = self.api_client.call_api(
3013
+ *_param,
3014
+ _request_timeout=_request_timeout
3015
+ )
3016
+ response_data.read()
3017
+ return self.api_client.response_deserialize(
3018
+ response_data=response_data,
3019
+ response_types_map=_response_types_map,
3020
+ )
3021
+
3022
+
3023
+ @validate_call
3024
+ def freedns_dns_records_list_without_preload_content(
3025
+ self,
3026
+ domain: Annotated[StrictStr, Field(description="Domain name or PK.")],
3027
+ source: Annotated[StrictStr, Field(description="'internal' or 'external'.")],
3028
+ _request_timeout: Union[
3029
+ None,
3030
+ Annotated[StrictFloat, Field(gt=0)],
3031
+ Tuple[
3032
+ Annotated[StrictFloat, Field(gt=0)],
3033
+ Annotated[StrictFloat, Field(gt=0)]
3034
+ ]
3035
+ ] = None,
3036
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
3037
+ _content_type: Optional[StrictStr] = None,
3038
+ _headers: Optional[Dict[StrictStr, Any]] = None,
3039
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
3040
+ ) -> RESTResponseType:
3041
+ """freedns_dns_records_list
3042
+
3043
+ List all DNS records for a domain with active FreeDNS.
3044
+
3045
+ :param domain: Domain name or PK. (required)
3046
+ :type domain: str
3047
+ :param source: 'internal' or 'external'. (required)
3048
+ :type source: str
3049
+ :param _request_timeout: timeout setting for this request. If one
3050
+ number provided, it will be total request
3051
+ timeout. It can also be a pair (tuple) of
3052
+ (connection, read) timeouts.
3053
+ :type _request_timeout: int, tuple(int, int), optional
3054
+ :param _request_auth: set to override the auth_settings for an a single
3055
+ request; this effectively ignores the
3056
+ authentication in the spec for a single request.
3057
+ :type _request_auth: dict, optional
3058
+ :param _content_type: force content-type for the request.
3059
+ :type _content_type: str, Optional
3060
+ :param _headers: set to override the headers for a single
3061
+ request; this effectively ignores the headers
3062
+ in the spec for a single request.
3063
+ :type _headers: dict, optional
3064
+ :param _host_index: set to override the host_index for a single
3065
+ request; this effectively ignores the host_index
3066
+ in the spec for a single request.
3067
+ :type _host_index: int, optional
3068
+ :return: Returns the result object.
3069
+ """ # noqa: E501
3070
+
3071
+ _param = self._freedns_dns_records_list_serialize(
3072
+ domain=domain,
3073
+ source=source,
3074
+ _request_auth=_request_auth,
3075
+ _content_type=_content_type,
3076
+ _headers=_headers,
3077
+ _host_index=_host_index
3078
+ )
3079
+
3080
+ _response_types_map: Dict[str, Optional[str]] = {
3081
+ '200': "List[DNSRecord]",
3082
+ }
3083
+ response_data = self.api_client.call_api(
3084
+ *_param,
3085
+ _request_timeout=_request_timeout
3086
+ )
3087
+ return response_data.response
3088
+
3089
+
3090
+ def _freedns_dns_records_list_serialize(
3091
+ self,
3092
+ domain,
3093
+ source,
3094
+ _request_auth,
3095
+ _content_type,
3096
+ _headers,
3097
+ _host_index,
3098
+ ) -> RequestSerialized:
3099
+
3100
+ _host = None
3101
+
3102
+ _collection_formats: Dict[str, str] = {
3103
+ }
3104
+
3105
+ _path_params: Dict[str, str] = {}
3106
+ _query_params: List[Tuple[str, str]] = []
3107
+ _header_params: Dict[str, Optional[str]] = _headers or {}
3108
+ _form_params: List[Tuple[str, str]] = []
3109
+ _files: Dict[
3110
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
3111
+ ] = {}
3112
+ _body_params: Optional[bytes] = None
3113
+
3114
+ # process the path parameters
3115
+ # process the query parameters
3116
+ if domain is not None:
3117
+
3118
+ _query_params.append(('domain', domain))
3119
+
3120
+ if source is not None:
3121
+
3122
+ _query_params.append(('source', source))
3123
+
3124
+ # process the header parameters
3125
+ # process the form parameters
3126
+ # process the body parameter
3127
+
3128
+
3129
+ # set the HTTP header `Accept`
3130
+ if 'Accept' not in _header_params:
3131
+ _header_params['Accept'] = self.api_client.select_header_accept(
3132
+ [
3133
+ 'application/json'
3134
+ ]
3135
+ )
3136
+
3137
+
3138
+ # authentication setting
3139
+ _auth_settings: List[str] = [
3140
+ 'cookieAuth',
3141
+ 'tokenAuth'
3142
+ ]
3143
+
3144
+ return self.api_client.param_serialize(
3145
+ method='GET',
3146
+ resource_path='/api/freedns/dns/records/',
3147
+ path_params=_path_params,
3148
+ query_params=_query_params,
3149
+ header_params=_header_params,
3150
+ body=_body_params,
3151
+ post_params=_form_params,
3152
+ files=_files,
3153
+ auth_settings=_auth_settings,
3154
+ collection_formats=_collection_formats,
3155
+ _host=_host,
3156
+ _request_auth=_request_auth
3157
+ )
3158
+
3159
+
3160
+
3161
+
3162
+ @validate_call
3163
+ def freedns_dns_records_list2(
3164
+ self,
3165
+ domain: Annotated[StrictStr, Field(description="Domain name or PK.")],
3166
+ source: Annotated[StrictStr, Field(description="'internal' or 'external'.")],
3167
+ _request_timeout: Union[
3168
+ None,
3169
+ Annotated[StrictFloat, Field(gt=0)],
3170
+ Tuple[
3171
+ Annotated[StrictFloat, Field(gt=0)],
3172
+ Annotated[StrictFloat, Field(gt=0)]
3173
+ ]
3174
+ ] = None,
3175
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
3176
+ _content_type: Optional[StrictStr] = None,
3177
+ _headers: Optional[Dict[StrictStr, Any]] = None,
3178
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
3179
+ ) -> List[DNSRecord]:
3180
+ """freedns_dns_records_list2
3181
+
3182
+ List all DNS records for a domain with active FreeDNS.
3183
+
3184
+ :param domain: Domain name or PK. (required)
3185
+ :type domain: str
3186
+ :param source: 'internal' or 'external'. (required)
3187
+ :type source: str
3188
+ :param _request_timeout: timeout setting for this request. If one
3189
+ number provided, it will be total request
3190
+ timeout. It can also be a pair (tuple) of
3191
+ (connection, read) timeouts.
3192
+ :type _request_timeout: int, tuple(int, int), optional
3193
+ :param _request_auth: set to override the auth_settings for an a single
3194
+ request; this effectively ignores the
3195
+ authentication in the spec for a single request.
3196
+ :type _request_auth: dict, optional
3197
+ :param _content_type: force content-type for the request.
3198
+ :type _content_type: str, Optional
3199
+ :param _headers: set to override the headers for a single
3200
+ request; this effectively ignores the headers
3201
+ in the spec for a single request.
3202
+ :type _headers: dict, optional
3203
+ :param _host_index: set to override the host_index for a single
3204
+ request; this effectively ignores the host_index
3205
+ in the spec for a single request.
3206
+ :type _host_index: int, optional
3207
+ :return: Returns the result object.
3208
+ """ # noqa: E501
3209
+
3210
+ _param = self._freedns_dns_records_list2_serialize(
3211
+ domain=domain,
3212
+ source=source,
3213
+ _request_auth=_request_auth,
3214
+ _content_type=_content_type,
3215
+ _headers=_headers,
3216
+ _host_index=_host_index
3217
+ )
3218
+
3219
+ _response_types_map: Dict[str, Optional[str]] = {
3220
+ '200': "List[DNSRecord]",
3221
+ }
3222
+ response_data = self.api_client.call_api(
3223
+ *_param,
3224
+ _request_timeout=_request_timeout
3225
+ )
3226
+ response_data.read()
3227
+ return self.api_client.response_deserialize(
3228
+ response_data=response_data,
3229
+ response_types_map=_response_types_map,
3230
+ ).data
3231
+
3232
+
3233
+ @validate_call
3234
+ def freedns_dns_records_list2_with_http_info(
3235
+ self,
3236
+ domain: Annotated[StrictStr, Field(description="Domain name or PK.")],
3237
+ source: Annotated[StrictStr, Field(description="'internal' or 'external'.")],
3238
+ _request_timeout: Union[
3239
+ None,
3240
+ Annotated[StrictFloat, Field(gt=0)],
3241
+ Tuple[
3242
+ Annotated[StrictFloat, Field(gt=0)],
3243
+ Annotated[StrictFloat, Field(gt=0)]
3244
+ ]
3245
+ ] = None,
3246
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
3247
+ _content_type: Optional[StrictStr] = None,
3248
+ _headers: Optional[Dict[StrictStr, Any]] = None,
3249
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
3250
+ ) -> ApiResponse[List[DNSRecord]]:
3251
+ """freedns_dns_records_list2
3252
+
3253
+ List all DNS records for a domain with active FreeDNS.
3254
+
3255
+ :param domain: Domain name or PK. (required)
3256
+ :type domain: str
3257
+ :param source: 'internal' or 'external'. (required)
3258
+ :type source: str
3259
+ :param _request_timeout: timeout setting for this request. If one
3260
+ number provided, it will be total request
3261
+ timeout. It can also be a pair (tuple) of
3262
+ (connection, read) timeouts.
3263
+ :type _request_timeout: int, tuple(int, int), optional
3264
+ :param _request_auth: set to override the auth_settings for an a single
3265
+ request; this effectively ignores the
3266
+ authentication in the spec for a single request.
3267
+ :type _request_auth: dict, optional
3268
+ :param _content_type: force content-type for the request.
3269
+ :type _content_type: str, Optional
3270
+ :param _headers: set to override the headers for a single
3271
+ request; this effectively ignores the headers
3272
+ in the spec for a single request.
3273
+ :type _headers: dict, optional
3274
+ :param _host_index: set to override the host_index for a single
3275
+ request; this effectively ignores the host_index
3276
+ in the spec for a single request.
3277
+ :type _host_index: int, optional
3278
+ :return: Returns the result object.
3279
+ """ # noqa: E501
3280
+
3281
+ _param = self._freedns_dns_records_list2_serialize(
3282
+ domain=domain,
3283
+ source=source,
3284
+ _request_auth=_request_auth,
3285
+ _content_type=_content_type,
3286
+ _headers=_headers,
3287
+ _host_index=_host_index
3288
+ )
3289
+
3290
+ _response_types_map: Dict[str, Optional[str]] = {
3291
+ '200': "List[DNSRecord]",
3292
+ }
3293
+ response_data = self.api_client.call_api(
3294
+ *_param,
3295
+ _request_timeout=_request_timeout
3296
+ )
3297
+ response_data.read()
3298
+ return self.api_client.response_deserialize(
3299
+ response_data=response_data,
3300
+ response_types_map=_response_types_map,
3301
+ )
3302
+
3303
+
3304
+ @validate_call
3305
+ def freedns_dns_records_list2_without_preload_content(
3306
+ self,
3307
+ domain: Annotated[StrictStr, Field(description="Domain name or PK.")],
3308
+ source: Annotated[StrictStr, Field(description="'internal' or 'external'.")],
3309
+ _request_timeout: Union[
3310
+ None,
3311
+ Annotated[StrictFloat, Field(gt=0)],
3312
+ Tuple[
3313
+ Annotated[StrictFloat, Field(gt=0)],
3314
+ Annotated[StrictFloat, Field(gt=0)]
3315
+ ]
3316
+ ] = None,
3317
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
3318
+ _content_type: Optional[StrictStr] = None,
3319
+ _headers: Optional[Dict[StrictStr, Any]] = None,
3320
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
3321
+ ) -> RESTResponseType:
3322
+ """freedns_dns_records_list2
3323
+
3324
+ List all DNS records for a domain with active FreeDNS.
3325
+
3326
+ :param domain: Domain name or PK. (required)
3327
+ :type domain: str
3328
+ :param source: 'internal' or 'external'. (required)
3329
+ :type source: str
3330
+ :param _request_timeout: timeout setting for this request. If one
3331
+ number provided, it will be total request
3332
+ timeout. It can also be a pair (tuple) of
3333
+ (connection, read) timeouts.
3334
+ :type _request_timeout: int, tuple(int, int), optional
3335
+ :param _request_auth: set to override the auth_settings for an a single
3336
+ request; this effectively ignores the
3337
+ authentication in the spec for a single request.
3338
+ :type _request_auth: dict, optional
3339
+ :param _content_type: force content-type for the request.
3340
+ :type _content_type: str, Optional
3341
+ :param _headers: set to override the headers for a single
3342
+ request; this effectively ignores the headers
3343
+ in the spec for a single request.
3344
+ :type _headers: dict, optional
3345
+ :param _host_index: set to override the host_index for a single
3346
+ request; this effectively ignores the host_index
3347
+ in the spec for a single request.
3348
+ :type _host_index: int, optional
3349
+ :return: Returns the result object.
3350
+ """ # noqa: E501
3351
+
3352
+ _param = self._freedns_dns_records_list2_serialize(
3353
+ domain=domain,
3354
+ source=source,
3355
+ _request_auth=_request_auth,
3356
+ _content_type=_content_type,
3357
+ _headers=_headers,
3358
+ _host_index=_host_index
3359
+ )
3360
+
3361
+ _response_types_map: Dict[str, Optional[str]] = {
3362
+ '200': "List[DNSRecord]",
3363
+ }
3364
+ response_data = self.api_client.call_api(
3365
+ *_param,
3366
+ _request_timeout=_request_timeout
3367
+ )
3368
+ return response_data.response
3369
+
3370
+
3371
+ def _freedns_dns_records_list2_serialize(
3372
+ self,
3373
+ domain,
3374
+ source,
3375
+ _request_auth,
3376
+ _content_type,
3377
+ _headers,
3378
+ _host_index,
3379
+ ) -> RequestSerialized:
3380
+
3381
+ _host = None
3382
+
3383
+ _collection_formats: Dict[str, str] = {
3384
+ }
3385
+
3386
+ _path_params: Dict[str, str] = {}
3387
+ _query_params: List[Tuple[str, str]] = []
3388
+ _header_params: Dict[str, Optional[str]] = _headers or {}
3389
+ _form_params: List[Tuple[str, str]] = []
3390
+ _files: Dict[
3391
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
3392
+ ] = {}
3393
+ _body_params: Optional[bytes] = None
3394
+
3395
+ # process the path parameters
3396
+ # process the query parameters
3397
+ if domain is not None:
3398
+
3399
+ _query_params.append(('domain', domain))
3400
+
3401
+ if source is not None:
3402
+
3403
+ _query_params.append(('source', source))
3404
+
3405
+ # process the header parameters
3406
+ # process the form parameters
3407
+ # process the body parameter
3408
+
3409
+
3410
+ # set the HTTP header `Accept`
3411
+ if 'Accept' not in _header_params:
3412
+ _header_params['Accept'] = self.api_client.select_header_accept(
3413
+ [
3414
+ 'application/json'
3415
+ ]
3416
+ )
3417
+
3418
+
3419
+ # authentication setting
3420
+ _auth_settings: List[str] = [
3421
+ 'cookieAuth',
3422
+ 'tokenAuth'
3423
+ ]
3424
+
3425
+ return self.api_client.param_serialize(
3426
+ method='GET',
3427
+ resource_path='/api/v1/freedns/dns/records/',
3428
+ path_params=_path_params,
3429
+ query_params=_query_params,
3430
+ header_params=_header_params,
3431
+ body=_body_params,
3432
+ post_params=_form_params,
3433
+ files=_files,
3434
+ auth_settings=_auth_settings,
3435
+ collection_formats=_collection_formats,
3436
+ _host=_host,
3437
+ _request_auth=_request_auth
3438
+ )
3439
+
3440
+