zrok2-build-debugging 22.0.2000008__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 (213) hide show
  1. test/__init__.py +0 -0
  2. test/test_access201_response.py +52 -0
  3. test/test_access_request.py +54 -0
  4. test/test_access_summary.py +60 -0
  5. test/test_accesses_list.py +63 -0
  6. test/test_account_api.py +79 -0
  7. test/test_add_frontend_grant_request.py +52 -0
  8. test/test_add_namespace_frontend_mapping_request.py +53 -0
  9. test/test_add_namespace_grant_request.py +52 -0
  10. test/test_add_organization_member_request.py +53 -0
  11. test/test_admin_api.py +199 -0
  12. test/test_agent_api.py +85 -0
  13. test/test_auth_user.py +52 -0
  14. test/test_change_password_request.py +53 -0
  15. test/test_client_version_check_request.py +51 -0
  16. test/test_configuration.py +56 -0
  17. test/test_create_frontend201_response.py +51 -0
  18. test/test_create_frontend_request.py +55 -0
  19. test/test_create_identity201_response.py +52 -0
  20. test/test_create_identity_request.py +51 -0
  21. test/test_create_namespace201_response.py +51 -0
  22. test/test_create_namespace_request.py +54 -0
  23. test/test_create_organization201_response.py +51 -0
  24. test/test_create_organization_request.py +51 -0
  25. test/test_create_share_name_request.py +52 -0
  26. test/test_delete_identity_request.py +51 -0
  27. test/test_disable_request.py +51 -0
  28. test/test_enable_request.py +52 -0
  29. test/test_enroll200_response.py +51 -0
  30. test/test_enroll_request.py +51 -0
  31. test/test_environment.py +63 -0
  32. test/test_environment_and_resources.py +96 -0
  33. test/test_environment_api.py +43 -0
  34. test/test_environment_summary.py +60 -0
  35. test/test_environments_list.py +63 -0
  36. test/test_frontend.py +59 -0
  37. test/test_get_sparklines200_response.py +62 -0
  38. test/test_get_sparklines_request.py +57 -0
  39. test/test_invite_request.py +52 -0
  40. test/test_invite_token_generate_request.py +53 -0
  41. test/test_list_frontend_namespace_mappings200_response_inner.py +54 -0
  42. test/test_list_frontends200_response_inner.py +58 -0
  43. test/test_list_memberships200_response.py +56 -0
  44. test/test_list_memberships200_response_memberships_inner.py +53 -0
  45. test/test_list_namespaces200_response_inner.py +56 -0
  46. test/test_list_organization_members200_response.py +55 -0
  47. test/test_list_organization_members200_response_members_inner.py +52 -0
  48. test/test_list_organizations200_response.py +55 -0
  49. test/test_list_organizations200_response_organizations_inner.py +52 -0
  50. test/test_list_share_namespaces200_response_inner.py +53 -0
  51. test/test_login_request.py +52 -0
  52. test/test_metadata_api.py +145 -0
  53. test/test_metrics.py +59 -0
  54. test/test_metrics_sample.py +53 -0
  55. test/test_name.py +56 -0
  56. test/test_name_selection.py +52 -0
  57. test/test_overview.py +110 -0
  58. test/test_overview_names_inner.py +56 -0
  59. test/test_ping200_response.py +51 -0
  60. test/test_principal.py +55 -0
  61. test/test_regenerate_account_token200_response.py +51 -0
  62. test/test_regenerate_account_token_request.py +51 -0
  63. test/test_register_request.py +52 -0
  64. test/test_remote_access_request.py +60 -0
  65. test/test_remote_share200_response.py +54 -0
  66. test/test_remote_share_request.py +74 -0
  67. test/test_remote_status200_response.py +82 -0
  68. test/test_remote_status200_response_accesses_inner.py +62 -0
  69. test/test_remote_status200_response_shares_inner.py +64 -0
  70. test/test_remote_status200_response_shares_inner_failure.py +54 -0
  71. test/test_remote_unaccess_request.py +52 -0
  72. test/test_remote_unshare_request.py +52 -0
  73. test/test_remove_namespace_frontend_mapping_request.py +52 -0
  74. test/test_remove_organization_member_request.py +52 -0
  75. test/test_reset_password_request.py +52 -0
  76. test/test_share.py +67 -0
  77. test/test_share_api.py +103 -0
  78. test/test_share_http_healthcheck200_response.py +52 -0
  79. test/test_share_http_healthcheck_request.py +56 -0
  80. test/test_share_request.py +75 -0
  81. test/test_share_response.py +54 -0
  82. test/test_share_summary.py +62 -0
  83. test/test_shares_list.py +65 -0
  84. test/test_spark_data_sample.py +52 -0
  85. test/test_unaccess_request.py +53 -0
  86. test/test_unshare_request.py +52 -0
  87. test/test_update_access_request.py +53 -0
  88. test/test_update_frontend_request.py +55 -0
  89. test/test_update_namespace_request.py +55 -0
  90. test/test_update_share_name_request.py +53 -0
  91. test/test_update_share_request.py +57 -0
  92. test/test_verify200_response.py +51 -0
  93. test/test_verify_request.py +51 -0
  94. test/test_version_inventory200_response.py +51 -0
  95. zrok/__init__.py +4 -0
  96. zrok/_version.py +21 -0
  97. zrok/access.py +58 -0
  98. zrok/decor.py +33 -0
  99. zrok/dialer.py +10 -0
  100. zrok/environment/__init__.py +1 -0
  101. zrok/environment/dirs.py +32 -0
  102. zrok/environment/root.py +182 -0
  103. zrok/listener.py +29 -0
  104. zrok/model.py +75 -0
  105. zrok/overview.py +77 -0
  106. zrok/proxy.py +203 -0
  107. zrok/share.py +199 -0
  108. zrok2_build_debugging-22.0.2000008.dist-info/METADATA +24 -0
  109. zrok2_build_debugging-22.0.2000008.dist-info/RECORD +213 -0
  110. zrok2_build_debugging-22.0.2000008.dist-info/WHEEL +5 -0
  111. zrok2_build_debugging-22.0.2000008.dist-info/top_level.txt +3 -0
  112. zrok_api/__init__.py +231 -0
  113. zrok_api/api/__init__.py +10 -0
  114. zrok_api/api/account_api.py +2261 -0
  115. zrok_api/api/admin_api.py +7673 -0
  116. zrok_api/api/agent_api.py +2547 -0
  117. zrok_api/api/environment_api.py +589 -0
  118. zrok_api/api/metadata_api.py +5614 -0
  119. zrok_api/api/share_api.py +3321 -0
  120. zrok_api/api_client.py +801 -0
  121. zrok_api/api_response.py +21 -0
  122. zrok_api/configuration.py +602 -0
  123. zrok_api/exceptions.py +216 -0
  124. zrok_api/models/__init__.py +103 -0
  125. zrok_api/models/access201_response.py +89 -0
  126. zrok_api/models/access_request.py +93 -0
  127. zrok_api/models/access_summary.py +105 -0
  128. zrok_api/models/accesses_list.py +95 -0
  129. zrok_api/models/add_frontend_grant_request.py +89 -0
  130. zrok_api/models/add_namespace_frontend_mapping_request.py +91 -0
  131. zrok_api/models/add_namespace_grant_request.py +89 -0
  132. zrok_api/models/add_organization_member_request.py +91 -0
  133. zrok_api/models/auth_user.py +89 -0
  134. zrok_api/models/change_password_request.py +91 -0
  135. zrok_api/models/client_version_check_request.py +87 -0
  136. zrok_api/models/configuration.py +97 -0
  137. zrok_api/models/create_frontend201_response.py +87 -0
  138. zrok_api/models/create_frontend_request.py +105 -0
  139. zrok_api/models/create_identity201_response.py +89 -0
  140. zrok_api/models/create_identity_request.py +87 -0
  141. zrok_api/models/create_namespace201_response.py +87 -0
  142. zrok_api/models/create_namespace_request.py +93 -0
  143. zrok_api/models/create_organization201_response.py +87 -0
  144. zrok_api/models/create_organization_request.py +87 -0
  145. zrok_api/models/create_share_name_request.py +89 -0
  146. zrok_api/models/delete_identity_request.py +87 -0
  147. zrok_api/models/disable_request.py +87 -0
  148. zrok_api/models/enable_request.py +89 -0
  149. zrok_api/models/enroll200_response.py +87 -0
  150. zrok_api/models/enroll_request.py +87 -0
  151. zrok_api/models/environment.py +111 -0
  152. zrok_api/models/environment_and_resources.py +111 -0
  153. zrok_api/models/environment_summary.py +105 -0
  154. zrok_api/models/environments_list.py +95 -0
  155. zrok_api/models/frontend.py +103 -0
  156. zrok_api/models/get_sparklines200_response.py +95 -0
  157. zrok_api/models/get_sparklines_request.py +91 -0
  158. zrok_api/models/invite_request.py +89 -0
  159. zrok_api/models/invite_token_generate_request.py +87 -0
  160. zrok_api/models/list_frontend_namespace_mappings200_response_inner.py +93 -0
  161. zrok_api/models/list_frontends200_response_inner.py +101 -0
  162. zrok_api/models/list_memberships200_response.py +95 -0
  163. zrok_api/models/list_memberships200_response_memberships_inner.py +91 -0
  164. zrok_api/models/list_namespaces200_response_inner.py +97 -0
  165. zrok_api/models/list_organization_members200_response.py +95 -0
  166. zrok_api/models/list_organization_members200_response_members_inner.py +89 -0
  167. zrok_api/models/list_organizations200_response.py +95 -0
  168. zrok_api/models/list_organizations200_response_organizations_inner.py +89 -0
  169. zrok_api/models/list_share_namespaces200_response_inner.py +91 -0
  170. zrok_api/models/login_request.py +89 -0
  171. zrok_api/models/metrics.py +101 -0
  172. zrok_api/models/metrics_sample.py +91 -0
  173. zrok_api/models/name.py +97 -0
  174. zrok_api/models/name_selection.py +89 -0
  175. zrok_api/models/overview.py +117 -0
  176. zrok_api/models/overview_names_inner.py +97 -0
  177. zrok_api/models/ping200_response.py +87 -0
  178. zrok_api/models/principal.py +95 -0
  179. zrok_api/models/regenerate_account_token200_response.py +87 -0
  180. zrok_api/models/regenerate_account_token_request.py +87 -0
  181. zrok_api/models/register_request.py +89 -0
  182. zrok_api/models/remote_access_request.py +102 -0
  183. zrok_api/models/remote_share200_response.py +89 -0
  184. zrok_api/models/remote_share_request.py +141 -0
  185. zrok_api/models/remote_status200_response.py +105 -0
  186. zrok_api/models/remote_status200_response_accesses_inner.py +101 -0
  187. zrok_api/models/remote_status200_response_shares_inner.py +105 -0
  188. zrok_api/models/remote_status200_response_shares_inner_failure.py +93 -0
  189. zrok_api/models/remote_unaccess_request.py +89 -0
  190. zrok_api/models/remote_unshare_request.py +89 -0
  191. zrok_api/models/remove_namespace_frontend_mapping_request.py +89 -0
  192. zrok_api/models/remove_organization_member_request.py +89 -0
  193. zrok_api/models/reset_password_request.py +89 -0
  194. zrok_api/models/share.py +115 -0
  195. zrok_api/models/share_http_healthcheck200_response.py +89 -0
  196. zrok_api/models/share_http_healthcheck_request.py +97 -0
  197. zrok_api/models/share_request.py +157 -0
  198. zrok_api/models/share_response.py +89 -0
  199. zrok_api/models/share_summary.py +105 -0
  200. zrok_api/models/shares_list.py +95 -0
  201. zrok_api/models/spark_data_sample.py +89 -0
  202. zrok_api/models/unaccess_request.py +91 -0
  203. zrok_api/models/unshare_request.py +89 -0
  204. zrok_api/models/update_access_request.py +91 -0
  205. zrok_api/models/update_frontend_request.py +95 -0
  206. zrok_api/models/update_namespace_request.py +95 -0
  207. zrok_api/models/update_share_name_request.py +91 -0
  208. zrok_api/models/update_share_request.py +91 -0
  209. zrok_api/models/verify200_response.py +87 -0
  210. zrok_api/models/verify_request.py +87 -0
  211. zrok_api/models/version_inventory200_response.py +87 -0
  212. zrok_api/py.typed +0 -0
  213. zrok_api/rest.py +258 -0
@@ -0,0 +1,2547 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ zrok
5
+
6
+ zrok client access
7
+
8
+ The version of the OpenAPI document: 2.0.0
9
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
10
+
11
+ Do not edit the class manually.
12
+ """ # noqa: E501
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 typing import Optional
20
+ from zrok_api.models.create_frontend201_response import CreateFrontend201Response
21
+ from zrok_api.models.enroll200_response import Enroll200Response
22
+ from zrok_api.models.enroll_request import EnrollRequest
23
+ from zrok_api.models.ping200_response import Ping200Response
24
+ from zrok_api.models.remote_access_request import RemoteAccessRequest
25
+ from zrok_api.models.remote_share200_response import RemoteShare200Response
26
+ from zrok_api.models.remote_share_request import RemoteShareRequest
27
+ from zrok_api.models.remote_status200_response import RemoteStatus200Response
28
+ from zrok_api.models.remote_unaccess_request import RemoteUnaccessRequest
29
+ from zrok_api.models.remote_unshare_request import RemoteUnshareRequest
30
+ from zrok_api.models.share_http_healthcheck200_response import ShareHttpHealthcheck200Response
31
+ from zrok_api.models.share_http_healthcheck_request import ShareHttpHealthcheckRequest
32
+
33
+ from zrok_api.api_client import ApiClient, RequestSerialized
34
+ from zrok_api.api_response import ApiResponse
35
+ from zrok_api.rest import RESTResponseType
36
+
37
+
38
+ class AgentApi:
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 enroll(
53
+ self,
54
+ body: Optional[EnrollRequest] = None,
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
+ ) -> Enroll200Response:
68
+ """enroll
69
+
70
+
71
+ :param body:
72
+ :type body: EnrollRequest
73
+ :param _request_timeout: timeout setting for this request. If one
74
+ number provided, it will be total request
75
+ timeout. It can also be a pair (tuple) of
76
+ (connection, read) timeouts.
77
+ :type _request_timeout: int, tuple(int, int), optional
78
+ :param _request_auth: set to override the auth_settings for an a single
79
+ request; this effectively ignores the
80
+ authentication in the spec for a single request.
81
+ :type _request_auth: dict, optional
82
+ :param _content_type: force content-type for the request.
83
+ :type _content_type: str, Optional
84
+ :param _headers: set to override the headers for a single
85
+ request; this effectively ignores the headers
86
+ in the spec for a single request.
87
+ :type _headers: dict, optional
88
+ :param _host_index: set to override the host_index for a single
89
+ request; this effectively ignores the host_index
90
+ in the spec for a single request.
91
+ :type _host_index: int, optional
92
+ :return: Returns the result object.
93
+ """ # noqa: E501
94
+
95
+ _param = self._enroll_serialize(
96
+ body=body,
97
+ _request_auth=_request_auth,
98
+ _content_type=_content_type,
99
+ _headers=_headers,
100
+ _host_index=_host_index
101
+ )
102
+
103
+ _response_types_map: Dict[str, Optional[str]] = {
104
+ '200': "Enroll200Response",
105
+ '400': None,
106
+ '401': None,
107
+ '500': None,
108
+ }
109
+ response_data = self.api_client.call_api(
110
+ *_param,
111
+ _request_timeout=_request_timeout
112
+ )
113
+ response_data.read()
114
+ return self.api_client.response_deserialize(
115
+ response_data=response_data,
116
+ response_types_map=_response_types_map,
117
+ ).data
118
+
119
+
120
+ @validate_call
121
+ def enroll_with_http_info(
122
+ self,
123
+ body: Optional[EnrollRequest] = None,
124
+ _request_timeout: Union[
125
+ None,
126
+ Annotated[StrictFloat, Field(gt=0)],
127
+ Tuple[
128
+ Annotated[StrictFloat, Field(gt=0)],
129
+ Annotated[StrictFloat, Field(gt=0)]
130
+ ]
131
+ ] = None,
132
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
133
+ _content_type: Optional[StrictStr] = None,
134
+ _headers: Optional[Dict[StrictStr, Any]] = None,
135
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
136
+ ) -> ApiResponse[Enroll200Response]:
137
+ """enroll
138
+
139
+
140
+ :param body:
141
+ :type body: EnrollRequest
142
+ :param _request_timeout: timeout setting for this request. If one
143
+ number provided, it will be total request
144
+ timeout. It can also be a pair (tuple) of
145
+ (connection, read) timeouts.
146
+ :type _request_timeout: int, tuple(int, int), optional
147
+ :param _request_auth: set to override the auth_settings for an a single
148
+ request; this effectively ignores the
149
+ authentication in the spec for a single request.
150
+ :type _request_auth: dict, optional
151
+ :param _content_type: force content-type for the request.
152
+ :type _content_type: str, Optional
153
+ :param _headers: set to override the headers for a single
154
+ request; this effectively ignores the headers
155
+ in the spec for a single request.
156
+ :type _headers: dict, optional
157
+ :param _host_index: set to override the host_index for a single
158
+ request; this effectively ignores the host_index
159
+ in the spec for a single request.
160
+ :type _host_index: int, optional
161
+ :return: Returns the result object.
162
+ """ # noqa: E501
163
+
164
+ _param = self._enroll_serialize(
165
+ body=body,
166
+ _request_auth=_request_auth,
167
+ _content_type=_content_type,
168
+ _headers=_headers,
169
+ _host_index=_host_index
170
+ )
171
+
172
+ _response_types_map: Dict[str, Optional[str]] = {
173
+ '200': "Enroll200Response",
174
+ '400': None,
175
+ '401': None,
176
+ '500': None,
177
+ }
178
+ response_data = self.api_client.call_api(
179
+ *_param,
180
+ _request_timeout=_request_timeout
181
+ )
182
+ response_data.read()
183
+ return self.api_client.response_deserialize(
184
+ response_data=response_data,
185
+ response_types_map=_response_types_map,
186
+ )
187
+
188
+
189
+ @validate_call
190
+ def enroll_without_preload_content(
191
+ self,
192
+ body: Optional[EnrollRequest] = None,
193
+ _request_timeout: Union[
194
+ None,
195
+ Annotated[StrictFloat, Field(gt=0)],
196
+ Tuple[
197
+ Annotated[StrictFloat, Field(gt=0)],
198
+ Annotated[StrictFloat, Field(gt=0)]
199
+ ]
200
+ ] = None,
201
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
202
+ _content_type: Optional[StrictStr] = None,
203
+ _headers: Optional[Dict[StrictStr, Any]] = None,
204
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
205
+ ) -> RESTResponseType:
206
+ """enroll
207
+
208
+
209
+ :param body:
210
+ :type body: EnrollRequest
211
+ :param _request_timeout: timeout setting for this request. If one
212
+ number provided, it will be total request
213
+ timeout. It can also be a pair (tuple) of
214
+ (connection, read) timeouts.
215
+ :type _request_timeout: int, tuple(int, int), optional
216
+ :param _request_auth: set to override the auth_settings for an a single
217
+ request; this effectively ignores the
218
+ authentication in the spec for a single request.
219
+ :type _request_auth: dict, optional
220
+ :param _content_type: force content-type for the request.
221
+ :type _content_type: str, Optional
222
+ :param _headers: set to override the headers for a single
223
+ request; this effectively ignores the headers
224
+ in the spec for a single request.
225
+ :type _headers: dict, optional
226
+ :param _host_index: set to override the host_index for a single
227
+ request; this effectively ignores the host_index
228
+ in the spec for a single request.
229
+ :type _host_index: int, optional
230
+ :return: Returns the result object.
231
+ """ # noqa: E501
232
+
233
+ _param = self._enroll_serialize(
234
+ body=body,
235
+ _request_auth=_request_auth,
236
+ _content_type=_content_type,
237
+ _headers=_headers,
238
+ _host_index=_host_index
239
+ )
240
+
241
+ _response_types_map: Dict[str, Optional[str]] = {
242
+ '200': "Enroll200Response",
243
+ '400': None,
244
+ '401': None,
245
+ '500': None,
246
+ }
247
+ response_data = self.api_client.call_api(
248
+ *_param,
249
+ _request_timeout=_request_timeout
250
+ )
251
+ return response_data.response
252
+
253
+
254
+ def _enroll_serialize(
255
+ self,
256
+ body,
257
+ _request_auth,
258
+ _content_type,
259
+ _headers,
260
+ _host_index,
261
+ ) -> RequestSerialized:
262
+
263
+ _host = None
264
+
265
+ _collection_formats: Dict[str, str] = {
266
+ }
267
+
268
+ _path_params: Dict[str, str] = {}
269
+ _query_params: List[Tuple[str, str]] = []
270
+ _header_params: Dict[str, Optional[str]] = _headers or {}
271
+ _form_params: List[Tuple[str, str]] = []
272
+ _files: Dict[
273
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
274
+ ] = {}
275
+ _body_params: Optional[bytes] = None
276
+
277
+ # process the path parameters
278
+ # process the query parameters
279
+ # process the header parameters
280
+ # process the form parameters
281
+ # process the body parameter
282
+ if body is not None:
283
+ _body_params = body
284
+
285
+
286
+ # set the HTTP header `Accept`
287
+ if 'Accept' not in _header_params:
288
+ _header_params['Accept'] = self.api_client.select_header_accept(
289
+ [
290
+ 'application/zrok.v1+json'
291
+ ]
292
+ )
293
+
294
+ # set the HTTP header `Content-Type`
295
+ if _content_type:
296
+ _header_params['Content-Type'] = _content_type
297
+ else:
298
+ _default_content_type = (
299
+ self.api_client.select_header_content_type(
300
+ [
301
+ 'application/zrok.v1+json'
302
+ ]
303
+ )
304
+ )
305
+ if _default_content_type is not None:
306
+ _header_params['Content-Type'] = _default_content_type
307
+
308
+ # authentication setting
309
+ _auth_settings: List[str] = [
310
+ 'key'
311
+ ]
312
+
313
+ return self.api_client.param_serialize(
314
+ method='POST',
315
+ resource_path='/agent/enroll',
316
+ path_params=_path_params,
317
+ query_params=_query_params,
318
+ header_params=_header_params,
319
+ body=_body_params,
320
+ post_params=_form_params,
321
+ files=_files,
322
+ auth_settings=_auth_settings,
323
+ collection_formats=_collection_formats,
324
+ _host=_host,
325
+ _request_auth=_request_auth
326
+ )
327
+
328
+
329
+
330
+
331
+ @validate_call
332
+ def ping(
333
+ self,
334
+ body: Optional[EnrollRequest] = None,
335
+ _request_timeout: Union[
336
+ None,
337
+ Annotated[StrictFloat, Field(gt=0)],
338
+ Tuple[
339
+ Annotated[StrictFloat, Field(gt=0)],
340
+ Annotated[StrictFloat, Field(gt=0)]
341
+ ]
342
+ ] = None,
343
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
344
+ _content_type: Optional[StrictStr] = None,
345
+ _headers: Optional[Dict[StrictStr, Any]] = None,
346
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
347
+ ) -> Ping200Response:
348
+ """ping
349
+
350
+
351
+ :param body:
352
+ :type body: EnrollRequest
353
+ :param _request_timeout: timeout setting for this request. If one
354
+ number provided, it will be total request
355
+ timeout. It can also be a pair (tuple) of
356
+ (connection, read) timeouts.
357
+ :type _request_timeout: int, tuple(int, int), optional
358
+ :param _request_auth: set to override the auth_settings for an a single
359
+ request; this effectively ignores the
360
+ authentication in the spec for a single request.
361
+ :type _request_auth: dict, optional
362
+ :param _content_type: force content-type for the request.
363
+ :type _content_type: str, Optional
364
+ :param _headers: set to override the headers for a single
365
+ request; this effectively ignores the headers
366
+ in the spec for a single request.
367
+ :type _headers: dict, optional
368
+ :param _host_index: set to override the host_index for a single
369
+ request; this effectively ignores the host_index
370
+ in the spec for a single request.
371
+ :type _host_index: int, optional
372
+ :return: Returns the result object.
373
+ """ # noqa: E501
374
+
375
+ _param = self._ping_serialize(
376
+ body=body,
377
+ _request_auth=_request_auth,
378
+ _content_type=_content_type,
379
+ _headers=_headers,
380
+ _host_index=_host_index
381
+ )
382
+
383
+ _response_types_map: Dict[str, Optional[str]] = {
384
+ '200': "Ping200Response",
385
+ '401': None,
386
+ '500': None,
387
+ '502': None,
388
+ }
389
+ response_data = self.api_client.call_api(
390
+ *_param,
391
+ _request_timeout=_request_timeout
392
+ )
393
+ response_data.read()
394
+ return self.api_client.response_deserialize(
395
+ response_data=response_data,
396
+ response_types_map=_response_types_map,
397
+ ).data
398
+
399
+
400
+ @validate_call
401
+ def ping_with_http_info(
402
+ self,
403
+ body: Optional[EnrollRequest] = None,
404
+ _request_timeout: Union[
405
+ None,
406
+ Annotated[StrictFloat, Field(gt=0)],
407
+ Tuple[
408
+ Annotated[StrictFloat, Field(gt=0)],
409
+ Annotated[StrictFloat, Field(gt=0)]
410
+ ]
411
+ ] = None,
412
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
413
+ _content_type: Optional[StrictStr] = None,
414
+ _headers: Optional[Dict[StrictStr, Any]] = None,
415
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
416
+ ) -> ApiResponse[Ping200Response]:
417
+ """ping
418
+
419
+
420
+ :param body:
421
+ :type body: EnrollRequest
422
+ :param _request_timeout: timeout setting for this request. If one
423
+ number provided, it will be total request
424
+ timeout. It can also be a pair (tuple) of
425
+ (connection, read) timeouts.
426
+ :type _request_timeout: int, tuple(int, int), optional
427
+ :param _request_auth: set to override the auth_settings for an a single
428
+ request; this effectively ignores the
429
+ authentication in the spec for a single request.
430
+ :type _request_auth: dict, optional
431
+ :param _content_type: force content-type for the request.
432
+ :type _content_type: str, Optional
433
+ :param _headers: set to override the headers for a single
434
+ request; this effectively ignores the headers
435
+ in the spec for a single request.
436
+ :type _headers: dict, optional
437
+ :param _host_index: set to override the host_index for a single
438
+ request; this effectively ignores the host_index
439
+ in the spec for a single request.
440
+ :type _host_index: int, optional
441
+ :return: Returns the result object.
442
+ """ # noqa: E501
443
+
444
+ _param = self._ping_serialize(
445
+ body=body,
446
+ _request_auth=_request_auth,
447
+ _content_type=_content_type,
448
+ _headers=_headers,
449
+ _host_index=_host_index
450
+ )
451
+
452
+ _response_types_map: Dict[str, Optional[str]] = {
453
+ '200': "Ping200Response",
454
+ '401': None,
455
+ '500': None,
456
+ '502': None,
457
+ }
458
+ response_data = self.api_client.call_api(
459
+ *_param,
460
+ _request_timeout=_request_timeout
461
+ )
462
+ response_data.read()
463
+ return self.api_client.response_deserialize(
464
+ response_data=response_data,
465
+ response_types_map=_response_types_map,
466
+ )
467
+
468
+
469
+ @validate_call
470
+ def ping_without_preload_content(
471
+ self,
472
+ body: Optional[EnrollRequest] = None,
473
+ _request_timeout: Union[
474
+ None,
475
+ Annotated[StrictFloat, Field(gt=0)],
476
+ Tuple[
477
+ Annotated[StrictFloat, Field(gt=0)],
478
+ Annotated[StrictFloat, Field(gt=0)]
479
+ ]
480
+ ] = None,
481
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
482
+ _content_type: Optional[StrictStr] = None,
483
+ _headers: Optional[Dict[StrictStr, Any]] = None,
484
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
485
+ ) -> RESTResponseType:
486
+ """ping
487
+
488
+
489
+ :param body:
490
+ :type body: EnrollRequest
491
+ :param _request_timeout: timeout setting for this request. If one
492
+ number provided, it will be total request
493
+ timeout. It can also be a pair (tuple) of
494
+ (connection, read) timeouts.
495
+ :type _request_timeout: int, tuple(int, int), optional
496
+ :param _request_auth: set to override the auth_settings for an a single
497
+ request; this effectively ignores the
498
+ authentication in the spec for a single request.
499
+ :type _request_auth: dict, optional
500
+ :param _content_type: force content-type for the request.
501
+ :type _content_type: str, Optional
502
+ :param _headers: set to override the headers for a single
503
+ request; this effectively ignores the headers
504
+ in the spec for a single request.
505
+ :type _headers: dict, optional
506
+ :param _host_index: set to override the host_index for a single
507
+ request; this effectively ignores the host_index
508
+ in the spec for a single request.
509
+ :type _host_index: int, optional
510
+ :return: Returns the result object.
511
+ """ # noqa: E501
512
+
513
+ _param = self._ping_serialize(
514
+ body=body,
515
+ _request_auth=_request_auth,
516
+ _content_type=_content_type,
517
+ _headers=_headers,
518
+ _host_index=_host_index
519
+ )
520
+
521
+ _response_types_map: Dict[str, Optional[str]] = {
522
+ '200': "Ping200Response",
523
+ '401': None,
524
+ '500': None,
525
+ '502': None,
526
+ }
527
+ response_data = self.api_client.call_api(
528
+ *_param,
529
+ _request_timeout=_request_timeout
530
+ )
531
+ return response_data.response
532
+
533
+
534
+ def _ping_serialize(
535
+ self,
536
+ body,
537
+ _request_auth,
538
+ _content_type,
539
+ _headers,
540
+ _host_index,
541
+ ) -> RequestSerialized:
542
+
543
+ _host = None
544
+
545
+ _collection_formats: Dict[str, str] = {
546
+ }
547
+
548
+ _path_params: Dict[str, str] = {}
549
+ _query_params: List[Tuple[str, str]] = []
550
+ _header_params: Dict[str, Optional[str]] = _headers or {}
551
+ _form_params: List[Tuple[str, str]] = []
552
+ _files: Dict[
553
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
554
+ ] = {}
555
+ _body_params: Optional[bytes] = None
556
+
557
+ # process the path parameters
558
+ # process the query parameters
559
+ # process the header parameters
560
+ # process the form parameters
561
+ # process the body parameter
562
+ if body is not None:
563
+ _body_params = body
564
+
565
+
566
+ # set the HTTP header `Accept`
567
+ if 'Accept' not in _header_params:
568
+ _header_params['Accept'] = self.api_client.select_header_accept(
569
+ [
570
+ 'application/zrok.v1+json'
571
+ ]
572
+ )
573
+
574
+ # set the HTTP header `Content-Type`
575
+ if _content_type:
576
+ _header_params['Content-Type'] = _content_type
577
+ else:
578
+ _default_content_type = (
579
+ self.api_client.select_header_content_type(
580
+ [
581
+ 'application/zrok.v1+json'
582
+ ]
583
+ )
584
+ )
585
+ if _default_content_type is not None:
586
+ _header_params['Content-Type'] = _default_content_type
587
+
588
+ # authentication setting
589
+ _auth_settings: List[str] = [
590
+ 'key'
591
+ ]
592
+
593
+ return self.api_client.param_serialize(
594
+ method='POST',
595
+ resource_path='/agent/ping',
596
+ path_params=_path_params,
597
+ query_params=_query_params,
598
+ header_params=_header_params,
599
+ body=_body_params,
600
+ post_params=_form_params,
601
+ files=_files,
602
+ auth_settings=_auth_settings,
603
+ collection_formats=_collection_formats,
604
+ _host=_host,
605
+ _request_auth=_request_auth
606
+ )
607
+
608
+
609
+
610
+
611
+ @validate_call
612
+ def remote_access(
613
+ self,
614
+ body: Optional[RemoteAccessRequest] = None,
615
+ _request_timeout: Union[
616
+ None,
617
+ Annotated[StrictFloat, Field(gt=0)],
618
+ Tuple[
619
+ Annotated[StrictFloat, Field(gt=0)],
620
+ Annotated[StrictFloat, Field(gt=0)]
621
+ ]
622
+ ] = None,
623
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
624
+ _content_type: Optional[StrictStr] = None,
625
+ _headers: Optional[Dict[StrictStr, Any]] = None,
626
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
627
+ ) -> CreateFrontend201Response:
628
+ """remote_access
629
+
630
+
631
+ :param body:
632
+ :type body: RemoteAccessRequest
633
+ :param _request_timeout: timeout setting for this request. If one
634
+ number provided, it will be total request
635
+ timeout. It can also be a pair (tuple) of
636
+ (connection, read) timeouts.
637
+ :type _request_timeout: int, tuple(int, int), optional
638
+ :param _request_auth: set to override the auth_settings for an a single
639
+ request; this effectively ignores the
640
+ authentication in the spec for a single request.
641
+ :type _request_auth: dict, optional
642
+ :param _content_type: force content-type for the request.
643
+ :type _content_type: str, Optional
644
+ :param _headers: set to override the headers for a single
645
+ request; this effectively ignores the headers
646
+ in the spec for a single request.
647
+ :type _headers: dict, optional
648
+ :param _host_index: set to override the host_index for a single
649
+ request; this effectively ignores the host_index
650
+ in the spec for a single request.
651
+ :type _host_index: int, optional
652
+ :return: Returns the result object.
653
+ """ # noqa: E501
654
+
655
+ _param = self._remote_access_serialize(
656
+ body=body,
657
+ _request_auth=_request_auth,
658
+ _content_type=_content_type,
659
+ _headers=_headers,
660
+ _host_index=_host_index
661
+ )
662
+
663
+ _response_types_map: Dict[str, Optional[str]] = {
664
+ '200': "CreateFrontend201Response",
665
+ '401': None,
666
+ '500': None,
667
+ '502': None,
668
+ }
669
+ response_data = self.api_client.call_api(
670
+ *_param,
671
+ _request_timeout=_request_timeout
672
+ )
673
+ response_data.read()
674
+ return self.api_client.response_deserialize(
675
+ response_data=response_data,
676
+ response_types_map=_response_types_map,
677
+ ).data
678
+
679
+
680
+ @validate_call
681
+ def remote_access_with_http_info(
682
+ self,
683
+ body: Optional[RemoteAccessRequest] = None,
684
+ _request_timeout: Union[
685
+ None,
686
+ Annotated[StrictFloat, Field(gt=0)],
687
+ Tuple[
688
+ Annotated[StrictFloat, Field(gt=0)],
689
+ Annotated[StrictFloat, Field(gt=0)]
690
+ ]
691
+ ] = None,
692
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
693
+ _content_type: Optional[StrictStr] = None,
694
+ _headers: Optional[Dict[StrictStr, Any]] = None,
695
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
696
+ ) -> ApiResponse[CreateFrontend201Response]:
697
+ """remote_access
698
+
699
+
700
+ :param body:
701
+ :type body: RemoteAccessRequest
702
+ :param _request_timeout: timeout setting for this request. If one
703
+ number provided, it will be total request
704
+ timeout. It can also be a pair (tuple) of
705
+ (connection, read) timeouts.
706
+ :type _request_timeout: int, tuple(int, int), optional
707
+ :param _request_auth: set to override the auth_settings for an a single
708
+ request; this effectively ignores the
709
+ authentication in the spec for a single request.
710
+ :type _request_auth: dict, optional
711
+ :param _content_type: force content-type for the request.
712
+ :type _content_type: str, Optional
713
+ :param _headers: set to override the headers for a single
714
+ request; this effectively ignores the headers
715
+ in the spec for a single request.
716
+ :type _headers: dict, optional
717
+ :param _host_index: set to override the host_index for a single
718
+ request; this effectively ignores the host_index
719
+ in the spec for a single request.
720
+ :type _host_index: int, optional
721
+ :return: Returns the result object.
722
+ """ # noqa: E501
723
+
724
+ _param = self._remote_access_serialize(
725
+ body=body,
726
+ _request_auth=_request_auth,
727
+ _content_type=_content_type,
728
+ _headers=_headers,
729
+ _host_index=_host_index
730
+ )
731
+
732
+ _response_types_map: Dict[str, Optional[str]] = {
733
+ '200': "CreateFrontend201Response",
734
+ '401': None,
735
+ '500': None,
736
+ '502': None,
737
+ }
738
+ response_data = self.api_client.call_api(
739
+ *_param,
740
+ _request_timeout=_request_timeout
741
+ )
742
+ response_data.read()
743
+ return self.api_client.response_deserialize(
744
+ response_data=response_data,
745
+ response_types_map=_response_types_map,
746
+ )
747
+
748
+
749
+ @validate_call
750
+ def remote_access_without_preload_content(
751
+ self,
752
+ body: Optional[RemoteAccessRequest] = None,
753
+ _request_timeout: Union[
754
+ None,
755
+ Annotated[StrictFloat, Field(gt=0)],
756
+ Tuple[
757
+ Annotated[StrictFloat, Field(gt=0)],
758
+ Annotated[StrictFloat, Field(gt=0)]
759
+ ]
760
+ ] = None,
761
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
762
+ _content_type: Optional[StrictStr] = None,
763
+ _headers: Optional[Dict[StrictStr, Any]] = None,
764
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
765
+ ) -> RESTResponseType:
766
+ """remote_access
767
+
768
+
769
+ :param body:
770
+ :type body: RemoteAccessRequest
771
+ :param _request_timeout: timeout setting for this request. If one
772
+ number provided, it will be total request
773
+ timeout. It can also be a pair (tuple) of
774
+ (connection, read) timeouts.
775
+ :type _request_timeout: int, tuple(int, int), optional
776
+ :param _request_auth: set to override the auth_settings for an a single
777
+ request; this effectively ignores the
778
+ authentication in the spec for a single request.
779
+ :type _request_auth: dict, optional
780
+ :param _content_type: force content-type for the request.
781
+ :type _content_type: str, Optional
782
+ :param _headers: set to override the headers for a single
783
+ request; this effectively ignores the headers
784
+ in the spec for a single request.
785
+ :type _headers: dict, optional
786
+ :param _host_index: set to override the host_index for a single
787
+ request; this effectively ignores the host_index
788
+ in the spec for a single request.
789
+ :type _host_index: int, optional
790
+ :return: Returns the result object.
791
+ """ # noqa: E501
792
+
793
+ _param = self._remote_access_serialize(
794
+ body=body,
795
+ _request_auth=_request_auth,
796
+ _content_type=_content_type,
797
+ _headers=_headers,
798
+ _host_index=_host_index
799
+ )
800
+
801
+ _response_types_map: Dict[str, Optional[str]] = {
802
+ '200': "CreateFrontend201Response",
803
+ '401': None,
804
+ '500': None,
805
+ '502': None,
806
+ }
807
+ response_data = self.api_client.call_api(
808
+ *_param,
809
+ _request_timeout=_request_timeout
810
+ )
811
+ return response_data.response
812
+
813
+
814
+ def _remote_access_serialize(
815
+ self,
816
+ body,
817
+ _request_auth,
818
+ _content_type,
819
+ _headers,
820
+ _host_index,
821
+ ) -> RequestSerialized:
822
+
823
+ _host = None
824
+
825
+ _collection_formats: Dict[str, str] = {
826
+ }
827
+
828
+ _path_params: Dict[str, str] = {}
829
+ _query_params: List[Tuple[str, str]] = []
830
+ _header_params: Dict[str, Optional[str]] = _headers or {}
831
+ _form_params: List[Tuple[str, str]] = []
832
+ _files: Dict[
833
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
834
+ ] = {}
835
+ _body_params: Optional[bytes] = None
836
+
837
+ # process the path parameters
838
+ # process the query parameters
839
+ # process the header parameters
840
+ # process the form parameters
841
+ # process the body parameter
842
+ if body is not None:
843
+ _body_params = body
844
+
845
+
846
+ # set the HTTP header `Accept`
847
+ if 'Accept' not in _header_params:
848
+ _header_params['Accept'] = self.api_client.select_header_accept(
849
+ [
850
+ 'application/zrok.v1+json'
851
+ ]
852
+ )
853
+
854
+ # set the HTTP header `Content-Type`
855
+ if _content_type:
856
+ _header_params['Content-Type'] = _content_type
857
+ else:
858
+ _default_content_type = (
859
+ self.api_client.select_header_content_type(
860
+ [
861
+ 'application/zrok.v1+json'
862
+ ]
863
+ )
864
+ )
865
+ if _default_content_type is not None:
866
+ _header_params['Content-Type'] = _default_content_type
867
+
868
+ # authentication setting
869
+ _auth_settings: List[str] = [
870
+ 'key'
871
+ ]
872
+
873
+ return self.api_client.param_serialize(
874
+ method='POST',
875
+ resource_path='/agent/access',
876
+ path_params=_path_params,
877
+ query_params=_query_params,
878
+ header_params=_header_params,
879
+ body=_body_params,
880
+ post_params=_form_params,
881
+ files=_files,
882
+ auth_settings=_auth_settings,
883
+ collection_formats=_collection_formats,
884
+ _host=_host,
885
+ _request_auth=_request_auth
886
+ )
887
+
888
+
889
+
890
+
891
+ @validate_call
892
+ def remote_share(
893
+ self,
894
+ body: Optional[RemoteShareRequest] = None,
895
+ _request_timeout: Union[
896
+ None,
897
+ Annotated[StrictFloat, Field(gt=0)],
898
+ Tuple[
899
+ Annotated[StrictFloat, Field(gt=0)],
900
+ Annotated[StrictFloat, Field(gt=0)]
901
+ ]
902
+ ] = None,
903
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
904
+ _content_type: Optional[StrictStr] = None,
905
+ _headers: Optional[Dict[StrictStr, Any]] = None,
906
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
907
+ ) -> RemoteShare200Response:
908
+ """remote_share
909
+
910
+
911
+ :param body:
912
+ :type body: RemoteShareRequest
913
+ :param _request_timeout: timeout setting for this request. If one
914
+ number provided, it will be total request
915
+ timeout. It can also be a pair (tuple) of
916
+ (connection, read) timeouts.
917
+ :type _request_timeout: int, tuple(int, int), optional
918
+ :param _request_auth: set to override the auth_settings for an a single
919
+ request; this effectively ignores the
920
+ authentication in the spec for a single request.
921
+ :type _request_auth: dict, optional
922
+ :param _content_type: force content-type for the request.
923
+ :type _content_type: str, Optional
924
+ :param _headers: set to override the headers for a single
925
+ request; this effectively ignores the headers
926
+ in the spec for a single request.
927
+ :type _headers: dict, optional
928
+ :param _host_index: set to override the host_index for a single
929
+ request; this effectively ignores the host_index
930
+ in the spec for a single request.
931
+ :type _host_index: int, optional
932
+ :return: Returns the result object.
933
+ """ # noqa: E501
934
+
935
+ _param = self._remote_share_serialize(
936
+ body=body,
937
+ _request_auth=_request_auth,
938
+ _content_type=_content_type,
939
+ _headers=_headers,
940
+ _host_index=_host_index
941
+ )
942
+
943
+ _response_types_map: Dict[str, Optional[str]] = {
944
+ '200': "RemoteShare200Response",
945
+ '401': None,
946
+ '500': None,
947
+ '502': None,
948
+ }
949
+ response_data = self.api_client.call_api(
950
+ *_param,
951
+ _request_timeout=_request_timeout
952
+ )
953
+ response_data.read()
954
+ return self.api_client.response_deserialize(
955
+ response_data=response_data,
956
+ response_types_map=_response_types_map,
957
+ ).data
958
+
959
+
960
+ @validate_call
961
+ def remote_share_with_http_info(
962
+ self,
963
+ body: Optional[RemoteShareRequest] = None,
964
+ _request_timeout: Union[
965
+ None,
966
+ Annotated[StrictFloat, Field(gt=0)],
967
+ Tuple[
968
+ Annotated[StrictFloat, Field(gt=0)],
969
+ Annotated[StrictFloat, Field(gt=0)]
970
+ ]
971
+ ] = None,
972
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
973
+ _content_type: Optional[StrictStr] = None,
974
+ _headers: Optional[Dict[StrictStr, Any]] = None,
975
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
976
+ ) -> ApiResponse[RemoteShare200Response]:
977
+ """remote_share
978
+
979
+
980
+ :param body:
981
+ :type body: RemoteShareRequest
982
+ :param _request_timeout: timeout setting for this request. If one
983
+ number provided, it will be total request
984
+ timeout. It can also be a pair (tuple) of
985
+ (connection, read) timeouts.
986
+ :type _request_timeout: int, tuple(int, int), optional
987
+ :param _request_auth: set to override the auth_settings for an a single
988
+ request; this effectively ignores the
989
+ authentication in the spec for a single request.
990
+ :type _request_auth: dict, optional
991
+ :param _content_type: force content-type for the request.
992
+ :type _content_type: str, Optional
993
+ :param _headers: set to override the headers for a single
994
+ request; this effectively ignores the headers
995
+ in the spec for a single request.
996
+ :type _headers: dict, optional
997
+ :param _host_index: set to override the host_index for a single
998
+ request; this effectively ignores the host_index
999
+ in the spec for a single request.
1000
+ :type _host_index: int, optional
1001
+ :return: Returns the result object.
1002
+ """ # noqa: E501
1003
+
1004
+ _param = self._remote_share_serialize(
1005
+ body=body,
1006
+ _request_auth=_request_auth,
1007
+ _content_type=_content_type,
1008
+ _headers=_headers,
1009
+ _host_index=_host_index
1010
+ )
1011
+
1012
+ _response_types_map: Dict[str, Optional[str]] = {
1013
+ '200': "RemoteShare200Response",
1014
+ '401': None,
1015
+ '500': None,
1016
+ '502': None,
1017
+ }
1018
+ response_data = self.api_client.call_api(
1019
+ *_param,
1020
+ _request_timeout=_request_timeout
1021
+ )
1022
+ response_data.read()
1023
+ return self.api_client.response_deserialize(
1024
+ response_data=response_data,
1025
+ response_types_map=_response_types_map,
1026
+ )
1027
+
1028
+
1029
+ @validate_call
1030
+ def remote_share_without_preload_content(
1031
+ self,
1032
+ body: Optional[RemoteShareRequest] = None,
1033
+ _request_timeout: Union[
1034
+ None,
1035
+ Annotated[StrictFloat, Field(gt=0)],
1036
+ Tuple[
1037
+ Annotated[StrictFloat, Field(gt=0)],
1038
+ Annotated[StrictFloat, Field(gt=0)]
1039
+ ]
1040
+ ] = None,
1041
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1042
+ _content_type: Optional[StrictStr] = None,
1043
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1044
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1045
+ ) -> RESTResponseType:
1046
+ """remote_share
1047
+
1048
+
1049
+ :param body:
1050
+ :type body: RemoteShareRequest
1051
+ :param _request_timeout: timeout setting for this request. If one
1052
+ number provided, it will be total request
1053
+ timeout. It can also be a pair (tuple) of
1054
+ (connection, read) timeouts.
1055
+ :type _request_timeout: int, tuple(int, int), optional
1056
+ :param _request_auth: set to override the auth_settings for an a single
1057
+ request; this effectively ignores the
1058
+ authentication in the spec for a single request.
1059
+ :type _request_auth: dict, optional
1060
+ :param _content_type: force content-type for the request.
1061
+ :type _content_type: str, Optional
1062
+ :param _headers: set to override the headers for a single
1063
+ request; this effectively ignores the headers
1064
+ in the spec for a single request.
1065
+ :type _headers: dict, optional
1066
+ :param _host_index: set to override the host_index for a single
1067
+ request; this effectively ignores the host_index
1068
+ in the spec for a single request.
1069
+ :type _host_index: int, optional
1070
+ :return: Returns the result object.
1071
+ """ # noqa: E501
1072
+
1073
+ _param = self._remote_share_serialize(
1074
+ body=body,
1075
+ _request_auth=_request_auth,
1076
+ _content_type=_content_type,
1077
+ _headers=_headers,
1078
+ _host_index=_host_index
1079
+ )
1080
+
1081
+ _response_types_map: Dict[str, Optional[str]] = {
1082
+ '200': "RemoteShare200Response",
1083
+ '401': None,
1084
+ '500': None,
1085
+ '502': None,
1086
+ }
1087
+ response_data = self.api_client.call_api(
1088
+ *_param,
1089
+ _request_timeout=_request_timeout
1090
+ )
1091
+ return response_data.response
1092
+
1093
+
1094
+ def _remote_share_serialize(
1095
+ self,
1096
+ body,
1097
+ _request_auth,
1098
+ _content_type,
1099
+ _headers,
1100
+ _host_index,
1101
+ ) -> RequestSerialized:
1102
+
1103
+ _host = None
1104
+
1105
+ _collection_formats: Dict[str, str] = {
1106
+ }
1107
+
1108
+ _path_params: Dict[str, str] = {}
1109
+ _query_params: List[Tuple[str, str]] = []
1110
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1111
+ _form_params: List[Tuple[str, str]] = []
1112
+ _files: Dict[
1113
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1114
+ ] = {}
1115
+ _body_params: Optional[bytes] = None
1116
+
1117
+ # process the path parameters
1118
+ # process the query parameters
1119
+ # process the header parameters
1120
+ # process the form parameters
1121
+ # process the body parameter
1122
+ if body is not None:
1123
+ _body_params = body
1124
+
1125
+
1126
+ # set the HTTP header `Accept`
1127
+ if 'Accept' not in _header_params:
1128
+ _header_params['Accept'] = self.api_client.select_header_accept(
1129
+ [
1130
+ 'application/zrok.v1+json'
1131
+ ]
1132
+ )
1133
+
1134
+ # set the HTTP header `Content-Type`
1135
+ if _content_type:
1136
+ _header_params['Content-Type'] = _content_type
1137
+ else:
1138
+ _default_content_type = (
1139
+ self.api_client.select_header_content_type(
1140
+ [
1141
+ 'application/zrok.v1+json'
1142
+ ]
1143
+ )
1144
+ )
1145
+ if _default_content_type is not None:
1146
+ _header_params['Content-Type'] = _default_content_type
1147
+
1148
+ # authentication setting
1149
+ _auth_settings: List[str] = [
1150
+ 'key'
1151
+ ]
1152
+
1153
+ return self.api_client.param_serialize(
1154
+ method='POST',
1155
+ resource_path='/agent/share',
1156
+ path_params=_path_params,
1157
+ query_params=_query_params,
1158
+ header_params=_header_params,
1159
+ body=_body_params,
1160
+ post_params=_form_params,
1161
+ files=_files,
1162
+ auth_settings=_auth_settings,
1163
+ collection_formats=_collection_formats,
1164
+ _host=_host,
1165
+ _request_auth=_request_auth
1166
+ )
1167
+
1168
+
1169
+
1170
+
1171
+ @validate_call
1172
+ def remote_status(
1173
+ self,
1174
+ body: Optional[EnrollRequest] = None,
1175
+ _request_timeout: Union[
1176
+ None,
1177
+ Annotated[StrictFloat, Field(gt=0)],
1178
+ Tuple[
1179
+ Annotated[StrictFloat, Field(gt=0)],
1180
+ Annotated[StrictFloat, Field(gt=0)]
1181
+ ]
1182
+ ] = None,
1183
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1184
+ _content_type: Optional[StrictStr] = None,
1185
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1186
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1187
+ ) -> RemoteStatus200Response:
1188
+ """remote_status
1189
+
1190
+
1191
+ :param body:
1192
+ :type body: EnrollRequest
1193
+ :param _request_timeout: timeout setting for this request. If one
1194
+ number provided, it will be total request
1195
+ timeout. It can also be a pair (tuple) of
1196
+ (connection, read) timeouts.
1197
+ :type _request_timeout: int, tuple(int, int), optional
1198
+ :param _request_auth: set to override the auth_settings for an a single
1199
+ request; this effectively ignores the
1200
+ authentication in the spec for a single request.
1201
+ :type _request_auth: dict, optional
1202
+ :param _content_type: force content-type for the request.
1203
+ :type _content_type: str, Optional
1204
+ :param _headers: set to override the headers for a single
1205
+ request; this effectively ignores the headers
1206
+ in the spec for a single request.
1207
+ :type _headers: dict, optional
1208
+ :param _host_index: set to override the host_index for a single
1209
+ request; this effectively ignores the host_index
1210
+ in the spec for a single request.
1211
+ :type _host_index: int, optional
1212
+ :return: Returns the result object.
1213
+ """ # noqa: E501
1214
+
1215
+ _param = self._remote_status_serialize(
1216
+ body=body,
1217
+ _request_auth=_request_auth,
1218
+ _content_type=_content_type,
1219
+ _headers=_headers,
1220
+ _host_index=_host_index
1221
+ )
1222
+
1223
+ _response_types_map: Dict[str, Optional[str]] = {
1224
+ '200': "RemoteStatus200Response",
1225
+ '401': None,
1226
+ '500': None,
1227
+ '502': None,
1228
+ }
1229
+ response_data = self.api_client.call_api(
1230
+ *_param,
1231
+ _request_timeout=_request_timeout
1232
+ )
1233
+ response_data.read()
1234
+ return self.api_client.response_deserialize(
1235
+ response_data=response_data,
1236
+ response_types_map=_response_types_map,
1237
+ ).data
1238
+
1239
+
1240
+ @validate_call
1241
+ def remote_status_with_http_info(
1242
+ self,
1243
+ body: Optional[EnrollRequest] = None,
1244
+ _request_timeout: Union[
1245
+ None,
1246
+ Annotated[StrictFloat, Field(gt=0)],
1247
+ Tuple[
1248
+ Annotated[StrictFloat, Field(gt=0)],
1249
+ Annotated[StrictFloat, Field(gt=0)]
1250
+ ]
1251
+ ] = None,
1252
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1253
+ _content_type: Optional[StrictStr] = None,
1254
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1255
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1256
+ ) -> ApiResponse[RemoteStatus200Response]:
1257
+ """remote_status
1258
+
1259
+
1260
+ :param body:
1261
+ :type body: EnrollRequest
1262
+ :param _request_timeout: timeout setting for this request. If one
1263
+ number provided, it will be total request
1264
+ timeout. It can also be a pair (tuple) of
1265
+ (connection, read) timeouts.
1266
+ :type _request_timeout: int, tuple(int, int), optional
1267
+ :param _request_auth: set to override the auth_settings for an a single
1268
+ request; this effectively ignores the
1269
+ authentication in the spec for a single request.
1270
+ :type _request_auth: dict, optional
1271
+ :param _content_type: force content-type for the request.
1272
+ :type _content_type: str, Optional
1273
+ :param _headers: set to override the headers for a single
1274
+ request; this effectively ignores the headers
1275
+ in the spec for a single request.
1276
+ :type _headers: dict, optional
1277
+ :param _host_index: set to override the host_index for a single
1278
+ request; this effectively ignores the host_index
1279
+ in the spec for a single request.
1280
+ :type _host_index: int, optional
1281
+ :return: Returns the result object.
1282
+ """ # noqa: E501
1283
+
1284
+ _param = self._remote_status_serialize(
1285
+ body=body,
1286
+ _request_auth=_request_auth,
1287
+ _content_type=_content_type,
1288
+ _headers=_headers,
1289
+ _host_index=_host_index
1290
+ )
1291
+
1292
+ _response_types_map: Dict[str, Optional[str]] = {
1293
+ '200': "RemoteStatus200Response",
1294
+ '401': None,
1295
+ '500': None,
1296
+ '502': None,
1297
+ }
1298
+ response_data = self.api_client.call_api(
1299
+ *_param,
1300
+ _request_timeout=_request_timeout
1301
+ )
1302
+ response_data.read()
1303
+ return self.api_client.response_deserialize(
1304
+ response_data=response_data,
1305
+ response_types_map=_response_types_map,
1306
+ )
1307
+
1308
+
1309
+ @validate_call
1310
+ def remote_status_without_preload_content(
1311
+ self,
1312
+ body: Optional[EnrollRequest] = None,
1313
+ _request_timeout: Union[
1314
+ None,
1315
+ Annotated[StrictFloat, Field(gt=0)],
1316
+ Tuple[
1317
+ Annotated[StrictFloat, Field(gt=0)],
1318
+ Annotated[StrictFloat, Field(gt=0)]
1319
+ ]
1320
+ ] = None,
1321
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1322
+ _content_type: Optional[StrictStr] = None,
1323
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1324
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1325
+ ) -> RESTResponseType:
1326
+ """remote_status
1327
+
1328
+
1329
+ :param body:
1330
+ :type body: EnrollRequest
1331
+ :param _request_timeout: timeout setting for this request. If one
1332
+ number provided, it will be total request
1333
+ timeout. It can also be a pair (tuple) of
1334
+ (connection, read) timeouts.
1335
+ :type _request_timeout: int, tuple(int, int), optional
1336
+ :param _request_auth: set to override the auth_settings for an a single
1337
+ request; this effectively ignores the
1338
+ authentication in the spec for a single request.
1339
+ :type _request_auth: dict, optional
1340
+ :param _content_type: force content-type for the request.
1341
+ :type _content_type: str, Optional
1342
+ :param _headers: set to override the headers for a single
1343
+ request; this effectively ignores the headers
1344
+ in the spec for a single request.
1345
+ :type _headers: dict, optional
1346
+ :param _host_index: set to override the host_index for a single
1347
+ request; this effectively ignores the host_index
1348
+ in the spec for a single request.
1349
+ :type _host_index: int, optional
1350
+ :return: Returns the result object.
1351
+ """ # noqa: E501
1352
+
1353
+ _param = self._remote_status_serialize(
1354
+ body=body,
1355
+ _request_auth=_request_auth,
1356
+ _content_type=_content_type,
1357
+ _headers=_headers,
1358
+ _host_index=_host_index
1359
+ )
1360
+
1361
+ _response_types_map: Dict[str, Optional[str]] = {
1362
+ '200': "RemoteStatus200Response",
1363
+ '401': None,
1364
+ '500': None,
1365
+ '502': None,
1366
+ }
1367
+ response_data = self.api_client.call_api(
1368
+ *_param,
1369
+ _request_timeout=_request_timeout
1370
+ )
1371
+ return response_data.response
1372
+
1373
+
1374
+ def _remote_status_serialize(
1375
+ self,
1376
+ body,
1377
+ _request_auth,
1378
+ _content_type,
1379
+ _headers,
1380
+ _host_index,
1381
+ ) -> RequestSerialized:
1382
+
1383
+ _host = None
1384
+
1385
+ _collection_formats: Dict[str, str] = {
1386
+ }
1387
+
1388
+ _path_params: Dict[str, str] = {}
1389
+ _query_params: List[Tuple[str, str]] = []
1390
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1391
+ _form_params: List[Tuple[str, str]] = []
1392
+ _files: Dict[
1393
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1394
+ ] = {}
1395
+ _body_params: Optional[bytes] = None
1396
+
1397
+ # process the path parameters
1398
+ # process the query parameters
1399
+ # process the header parameters
1400
+ # process the form parameters
1401
+ # process the body parameter
1402
+ if body is not None:
1403
+ _body_params = body
1404
+
1405
+
1406
+ # set the HTTP header `Accept`
1407
+ if 'Accept' not in _header_params:
1408
+ _header_params['Accept'] = self.api_client.select_header_accept(
1409
+ [
1410
+ 'application/zrok.v1+json'
1411
+ ]
1412
+ )
1413
+
1414
+ # set the HTTP header `Content-Type`
1415
+ if _content_type:
1416
+ _header_params['Content-Type'] = _content_type
1417
+ else:
1418
+ _default_content_type = (
1419
+ self.api_client.select_header_content_type(
1420
+ [
1421
+ 'application/zrok.v1+json'
1422
+ ]
1423
+ )
1424
+ )
1425
+ if _default_content_type is not None:
1426
+ _header_params['Content-Type'] = _default_content_type
1427
+
1428
+ # authentication setting
1429
+ _auth_settings: List[str] = [
1430
+ 'key'
1431
+ ]
1432
+
1433
+ return self.api_client.param_serialize(
1434
+ method='POST',
1435
+ resource_path='/agent/status',
1436
+ path_params=_path_params,
1437
+ query_params=_query_params,
1438
+ header_params=_header_params,
1439
+ body=_body_params,
1440
+ post_params=_form_params,
1441
+ files=_files,
1442
+ auth_settings=_auth_settings,
1443
+ collection_formats=_collection_formats,
1444
+ _host=_host,
1445
+ _request_auth=_request_auth
1446
+ )
1447
+
1448
+
1449
+
1450
+
1451
+ @validate_call
1452
+ def remote_unaccess(
1453
+ self,
1454
+ body: Optional[RemoteUnaccessRequest] = None,
1455
+ _request_timeout: Union[
1456
+ None,
1457
+ Annotated[StrictFloat, Field(gt=0)],
1458
+ Tuple[
1459
+ Annotated[StrictFloat, Field(gt=0)],
1460
+ Annotated[StrictFloat, Field(gt=0)]
1461
+ ]
1462
+ ] = None,
1463
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1464
+ _content_type: Optional[StrictStr] = None,
1465
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1466
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1467
+ ) -> None:
1468
+ """remote_unaccess
1469
+
1470
+
1471
+ :param body:
1472
+ :type body: RemoteUnaccessRequest
1473
+ :param _request_timeout: timeout setting for this request. If one
1474
+ number provided, it will be total request
1475
+ timeout. It can also be a pair (tuple) of
1476
+ (connection, read) timeouts.
1477
+ :type _request_timeout: int, tuple(int, int), optional
1478
+ :param _request_auth: set to override the auth_settings for an a single
1479
+ request; this effectively ignores the
1480
+ authentication in the spec for a single request.
1481
+ :type _request_auth: dict, optional
1482
+ :param _content_type: force content-type for the request.
1483
+ :type _content_type: str, Optional
1484
+ :param _headers: set to override the headers for a single
1485
+ request; this effectively ignores the headers
1486
+ in the spec for a single request.
1487
+ :type _headers: dict, optional
1488
+ :param _host_index: set to override the host_index for a single
1489
+ request; this effectively ignores the host_index
1490
+ in the spec for a single request.
1491
+ :type _host_index: int, optional
1492
+ :return: Returns the result object.
1493
+ """ # noqa: E501
1494
+
1495
+ _param = self._remote_unaccess_serialize(
1496
+ body=body,
1497
+ _request_auth=_request_auth,
1498
+ _content_type=_content_type,
1499
+ _headers=_headers,
1500
+ _host_index=_host_index
1501
+ )
1502
+
1503
+ _response_types_map: Dict[str, Optional[str]] = {
1504
+ '200': None,
1505
+ '401': None,
1506
+ '500': None,
1507
+ '502': None,
1508
+ }
1509
+ response_data = self.api_client.call_api(
1510
+ *_param,
1511
+ _request_timeout=_request_timeout
1512
+ )
1513
+ response_data.read()
1514
+ return self.api_client.response_deserialize(
1515
+ response_data=response_data,
1516
+ response_types_map=_response_types_map,
1517
+ ).data
1518
+
1519
+
1520
+ @validate_call
1521
+ def remote_unaccess_with_http_info(
1522
+ self,
1523
+ body: Optional[RemoteUnaccessRequest] = None,
1524
+ _request_timeout: Union[
1525
+ None,
1526
+ Annotated[StrictFloat, Field(gt=0)],
1527
+ Tuple[
1528
+ Annotated[StrictFloat, Field(gt=0)],
1529
+ Annotated[StrictFloat, Field(gt=0)]
1530
+ ]
1531
+ ] = None,
1532
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1533
+ _content_type: Optional[StrictStr] = None,
1534
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1535
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1536
+ ) -> ApiResponse[None]:
1537
+ """remote_unaccess
1538
+
1539
+
1540
+ :param body:
1541
+ :type body: RemoteUnaccessRequest
1542
+ :param _request_timeout: timeout setting for this request. If one
1543
+ number provided, it will be total request
1544
+ timeout. It can also be a pair (tuple) of
1545
+ (connection, read) timeouts.
1546
+ :type _request_timeout: int, tuple(int, int), optional
1547
+ :param _request_auth: set to override the auth_settings for an a single
1548
+ request; this effectively ignores the
1549
+ authentication in the spec for a single request.
1550
+ :type _request_auth: dict, optional
1551
+ :param _content_type: force content-type for the request.
1552
+ :type _content_type: str, Optional
1553
+ :param _headers: set to override the headers for a single
1554
+ request; this effectively ignores the headers
1555
+ in the spec for a single request.
1556
+ :type _headers: dict, optional
1557
+ :param _host_index: set to override the host_index for a single
1558
+ request; this effectively ignores the host_index
1559
+ in the spec for a single request.
1560
+ :type _host_index: int, optional
1561
+ :return: Returns the result object.
1562
+ """ # noqa: E501
1563
+
1564
+ _param = self._remote_unaccess_serialize(
1565
+ body=body,
1566
+ _request_auth=_request_auth,
1567
+ _content_type=_content_type,
1568
+ _headers=_headers,
1569
+ _host_index=_host_index
1570
+ )
1571
+
1572
+ _response_types_map: Dict[str, Optional[str]] = {
1573
+ '200': None,
1574
+ '401': None,
1575
+ '500': None,
1576
+ '502': None,
1577
+ }
1578
+ response_data = self.api_client.call_api(
1579
+ *_param,
1580
+ _request_timeout=_request_timeout
1581
+ )
1582
+ response_data.read()
1583
+ return self.api_client.response_deserialize(
1584
+ response_data=response_data,
1585
+ response_types_map=_response_types_map,
1586
+ )
1587
+
1588
+
1589
+ @validate_call
1590
+ def remote_unaccess_without_preload_content(
1591
+ self,
1592
+ body: Optional[RemoteUnaccessRequest] = None,
1593
+ _request_timeout: Union[
1594
+ None,
1595
+ Annotated[StrictFloat, Field(gt=0)],
1596
+ Tuple[
1597
+ Annotated[StrictFloat, Field(gt=0)],
1598
+ Annotated[StrictFloat, Field(gt=0)]
1599
+ ]
1600
+ ] = None,
1601
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1602
+ _content_type: Optional[StrictStr] = None,
1603
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1604
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1605
+ ) -> RESTResponseType:
1606
+ """remote_unaccess
1607
+
1608
+
1609
+ :param body:
1610
+ :type body: RemoteUnaccessRequest
1611
+ :param _request_timeout: timeout setting for this request. If one
1612
+ number provided, it will be total request
1613
+ timeout. It can also be a pair (tuple) of
1614
+ (connection, read) timeouts.
1615
+ :type _request_timeout: int, tuple(int, int), optional
1616
+ :param _request_auth: set to override the auth_settings for an a single
1617
+ request; this effectively ignores the
1618
+ authentication in the spec for a single request.
1619
+ :type _request_auth: dict, optional
1620
+ :param _content_type: force content-type for the request.
1621
+ :type _content_type: str, Optional
1622
+ :param _headers: set to override the headers for a single
1623
+ request; this effectively ignores the headers
1624
+ in the spec for a single request.
1625
+ :type _headers: dict, optional
1626
+ :param _host_index: set to override the host_index for a single
1627
+ request; this effectively ignores the host_index
1628
+ in the spec for a single request.
1629
+ :type _host_index: int, optional
1630
+ :return: Returns the result object.
1631
+ """ # noqa: E501
1632
+
1633
+ _param = self._remote_unaccess_serialize(
1634
+ body=body,
1635
+ _request_auth=_request_auth,
1636
+ _content_type=_content_type,
1637
+ _headers=_headers,
1638
+ _host_index=_host_index
1639
+ )
1640
+
1641
+ _response_types_map: Dict[str, Optional[str]] = {
1642
+ '200': None,
1643
+ '401': None,
1644
+ '500': None,
1645
+ '502': None,
1646
+ }
1647
+ response_data = self.api_client.call_api(
1648
+ *_param,
1649
+ _request_timeout=_request_timeout
1650
+ )
1651
+ return response_data.response
1652
+
1653
+
1654
+ def _remote_unaccess_serialize(
1655
+ self,
1656
+ body,
1657
+ _request_auth,
1658
+ _content_type,
1659
+ _headers,
1660
+ _host_index,
1661
+ ) -> RequestSerialized:
1662
+
1663
+ _host = None
1664
+
1665
+ _collection_formats: Dict[str, str] = {
1666
+ }
1667
+
1668
+ _path_params: Dict[str, str] = {}
1669
+ _query_params: List[Tuple[str, str]] = []
1670
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1671
+ _form_params: List[Tuple[str, str]] = []
1672
+ _files: Dict[
1673
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1674
+ ] = {}
1675
+ _body_params: Optional[bytes] = None
1676
+
1677
+ # process the path parameters
1678
+ # process the query parameters
1679
+ # process the header parameters
1680
+ # process the form parameters
1681
+ # process the body parameter
1682
+ if body is not None:
1683
+ _body_params = body
1684
+
1685
+
1686
+
1687
+ # set the HTTP header `Content-Type`
1688
+ if _content_type:
1689
+ _header_params['Content-Type'] = _content_type
1690
+ else:
1691
+ _default_content_type = (
1692
+ self.api_client.select_header_content_type(
1693
+ [
1694
+ 'application/zrok.v1+json'
1695
+ ]
1696
+ )
1697
+ )
1698
+ if _default_content_type is not None:
1699
+ _header_params['Content-Type'] = _default_content_type
1700
+
1701
+ # authentication setting
1702
+ _auth_settings: List[str] = [
1703
+ 'key'
1704
+ ]
1705
+
1706
+ return self.api_client.param_serialize(
1707
+ method='POST',
1708
+ resource_path='/agent/unaccess',
1709
+ path_params=_path_params,
1710
+ query_params=_query_params,
1711
+ header_params=_header_params,
1712
+ body=_body_params,
1713
+ post_params=_form_params,
1714
+ files=_files,
1715
+ auth_settings=_auth_settings,
1716
+ collection_formats=_collection_formats,
1717
+ _host=_host,
1718
+ _request_auth=_request_auth
1719
+ )
1720
+
1721
+
1722
+
1723
+
1724
+ @validate_call
1725
+ def remote_unshare(
1726
+ self,
1727
+ body: Optional[RemoteUnshareRequest] = None,
1728
+ _request_timeout: Union[
1729
+ None,
1730
+ Annotated[StrictFloat, Field(gt=0)],
1731
+ Tuple[
1732
+ Annotated[StrictFloat, Field(gt=0)],
1733
+ Annotated[StrictFloat, Field(gt=0)]
1734
+ ]
1735
+ ] = None,
1736
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1737
+ _content_type: Optional[StrictStr] = None,
1738
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1739
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1740
+ ) -> None:
1741
+ """remote_unshare
1742
+
1743
+
1744
+ :param body:
1745
+ :type body: RemoteUnshareRequest
1746
+ :param _request_timeout: timeout setting for this request. If one
1747
+ number provided, it will be total request
1748
+ timeout. It can also be a pair (tuple) of
1749
+ (connection, read) timeouts.
1750
+ :type _request_timeout: int, tuple(int, int), optional
1751
+ :param _request_auth: set to override the auth_settings for an a single
1752
+ request; this effectively ignores the
1753
+ authentication in the spec for a single request.
1754
+ :type _request_auth: dict, optional
1755
+ :param _content_type: force content-type for the request.
1756
+ :type _content_type: str, Optional
1757
+ :param _headers: set to override the headers for a single
1758
+ request; this effectively ignores the headers
1759
+ in the spec for a single request.
1760
+ :type _headers: dict, optional
1761
+ :param _host_index: set to override the host_index for a single
1762
+ request; this effectively ignores the host_index
1763
+ in the spec for a single request.
1764
+ :type _host_index: int, optional
1765
+ :return: Returns the result object.
1766
+ """ # noqa: E501
1767
+
1768
+ _param = self._remote_unshare_serialize(
1769
+ body=body,
1770
+ _request_auth=_request_auth,
1771
+ _content_type=_content_type,
1772
+ _headers=_headers,
1773
+ _host_index=_host_index
1774
+ )
1775
+
1776
+ _response_types_map: Dict[str, Optional[str]] = {
1777
+ '200': None,
1778
+ '401': None,
1779
+ '500': None,
1780
+ '502': None,
1781
+ }
1782
+ response_data = self.api_client.call_api(
1783
+ *_param,
1784
+ _request_timeout=_request_timeout
1785
+ )
1786
+ response_data.read()
1787
+ return self.api_client.response_deserialize(
1788
+ response_data=response_data,
1789
+ response_types_map=_response_types_map,
1790
+ ).data
1791
+
1792
+
1793
+ @validate_call
1794
+ def remote_unshare_with_http_info(
1795
+ self,
1796
+ body: Optional[RemoteUnshareRequest] = None,
1797
+ _request_timeout: Union[
1798
+ None,
1799
+ Annotated[StrictFloat, Field(gt=0)],
1800
+ Tuple[
1801
+ Annotated[StrictFloat, Field(gt=0)],
1802
+ Annotated[StrictFloat, Field(gt=0)]
1803
+ ]
1804
+ ] = None,
1805
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1806
+ _content_type: Optional[StrictStr] = None,
1807
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1808
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1809
+ ) -> ApiResponse[None]:
1810
+ """remote_unshare
1811
+
1812
+
1813
+ :param body:
1814
+ :type body: RemoteUnshareRequest
1815
+ :param _request_timeout: timeout setting for this request. If one
1816
+ number provided, it will be total request
1817
+ timeout. It can also be a pair (tuple) of
1818
+ (connection, read) timeouts.
1819
+ :type _request_timeout: int, tuple(int, int), optional
1820
+ :param _request_auth: set to override the auth_settings for an a single
1821
+ request; this effectively ignores the
1822
+ authentication in the spec for a single request.
1823
+ :type _request_auth: dict, optional
1824
+ :param _content_type: force content-type for the request.
1825
+ :type _content_type: str, Optional
1826
+ :param _headers: set to override the headers for a single
1827
+ request; this effectively ignores the headers
1828
+ in the spec for a single request.
1829
+ :type _headers: dict, optional
1830
+ :param _host_index: set to override the host_index for a single
1831
+ request; this effectively ignores the host_index
1832
+ in the spec for a single request.
1833
+ :type _host_index: int, optional
1834
+ :return: Returns the result object.
1835
+ """ # noqa: E501
1836
+
1837
+ _param = self._remote_unshare_serialize(
1838
+ body=body,
1839
+ _request_auth=_request_auth,
1840
+ _content_type=_content_type,
1841
+ _headers=_headers,
1842
+ _host_index=_host_index
1843
+ )
1844
+
1845
+ _response_types_map: Dict[str, Optional[str]] = {
1846
+ '200': None,
1847
+ '401': None,
1848
+ '500': None,
1849
+ '502': None,
1850
+ }
1851
+ response_data = self.api_client.call_api(
1852
+ *_param,
1853
+ _request_timeout=_request_timeout
1854
+ )
1855
+ response_data.read()
1856
+ return self.api_client.response_deserialize(
1857
+ response_data=response_data,
1858
+ response_types_map=_response_types_map,
1859
+ )
1860
+
1861
+
1862
+ @validate_call
1863
+ def remote_unshare_without_preload_content(
1864
+ self,
1865
+ body: Optional[RemoteUnshareRequest] = None,
1866
+ _request_timeout: Union[
1867
+ None,
1868
+ Annotated[StrictFloat, Field(gt=0)],
1869
+ Tuple[
1870
+ Annotated[StrictFloat, Field(gt=0)],
1871
+ Annotated[StrictFloat, Field(gt=0)]
1872
+ ]
1873
+ ] = None,
1874
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1875
+ _content_type: Optional[StrictStr] = None,
1876
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1877
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1878
+ ) -> RESTResponseType:
1879
+ """remote_unshare
1880
+
1881
+
1882
+ :param body:
1883
+ :type body: RemoteUnshareRequest
1884
+ :param _request_timeout: timeout setting for this request. If one
1885
+ number provided, it will be total request
1886
+ timeout. It can also be a pair (tuple) of
1887
+ (connection, read) timeouts.
1888
+ :type _request_timeout: int, tuple(int, int), optional
1889
+ :param _request_auth: set to override the auth_settings for an a single
1890
+ request; this effectively ignores the
1891
+ authentication in the spec for a single request.
1892
+ :type _request_auth: dict, optional
1893
+ :param _content_type: force content-type for the request.
1894
+ :type _content_type: str, Optional
1895
+ :param _headers: set to override the headers for a single
1896
+ request; this effectively ignores the headers
1897
+ in the spec for a single request.
1898
+ :type _headers: dict, optional
1899
+ :param _host_index: set to override the host_index for a single
1900
+ request; this effectively ignores the host_index
1901
+ in the spec for a single request.
1902
+ :type _host_index: int, optional
1903
+ :return: Returns the result object.
1904
+ """ # noqa: E501
1905
+
1906
+ _param = self._remote_unshare_serialize(
1907
+ body=body,
1908
+ _request_auth=_request_auth,
1909
+ _content_type=_content_type,
1910
+ _headers=_headers,
1911
+ _host_index=_host_index
1912
+ )
1913
+
1914
+ _response_types_map: Dict[str, Optional[str]] = {
1915
+ '200': None,
1916
+ '401': None,
1917
+ '500': None,
1918
+ '502': None,
1919
+ }
1920
+ response_data = self.api_client.call_api(
1921
+ *_param,
1922
+ _request_timeout=_request_timeout
1923
+ )
1924
+ return response_data.response
1925
+
1926
+
1927
+ def _remote_unshare_serialize(
1928
+ self,
1929
+ body,
1930
+ _request_auth,
1931
+ _content_type,
1932
+ _headers,
1933
+ _host_index,
1934
+ ) -> RequestSerialized:
1935
+
1936
+ _host = None
1937
+
1938
+ _collection_formats: Dict[str, str] = {
1939
+ }
1940
+
1941
+ _path_params: Dict[str, str] = {}
1942
+ _query_params: List[Tuple[str, str]] = []
1943
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1944
+ _form_params: List[Tuple[str, str]] = []
1945
+ _files: Dict[
1946
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1947
+ ] = {}
1948
+ _body_params: Optional[bytes] = None
1949
+
1950
+ # process the path parameters
1951
+ # process the query parameters
1952
+ # process the header parameters
1953
+ # process the form parameters
1954
+ # process the body parameter
1955
+ if body is not None:
1956
+ _body_params = body
1957
+
1958
+
1959
+
1960
+ # set the HTTP header `Content-Type`
1961
+ if _content_type:
1962
+ _header_params['Content-Type'] = _content_type
1963
+ else:
1964
+ _default_content_type = (
1965
+ self.api_client.select_header_content_type(
1966
+ [
1967
+ 'application/zrok.v1+json'
1968
+ ]
1969
+ )
1970
+ )
1971
+ if _default_content_type is not None:
1972
+ _header_params['Content-Type'] = _default_content_type
1973
+
1974
+ # authentication setting
1975
+ _auth_settings: List[str] = [
1976
+ 'key'
1977
+ ]
1978
+
1979
+ return self.api_client.param_serialize(
1980
+ method='POST',
1981
+ resource_path='/agent/unshare',
1982
+ path_params=_path_params,
1983
+ query_params=_query_params,
1984
+ header_params=_header_params,
1985
+ body=_body_params,
1986
+ post_params=_form_params,
1987
+ files=_files,
1988
+ auth_settings=_auth_settings,
1989
+ collection_formats=_collection_formats,
1990
+ _host=_host,
1991
+ _request_auth=_request_auth
1992
+ )
1993
+
1994
+
1995
+
1996
+
1997
+ @validate_call
1998
+ def share_http_healthcheck(
1999
+ self,
2000
+ body: Optional[ShareHttpHealthcheckRequest] = None,
2001
+ _request_timeout: Union[
2002
+ None,
2003
+ Annotated[StrictFloat, Field(gt=0)],
2004
+ Tuple[
2005
+ Annotated[StrictFloat, Field(gt=0)],
2006
+ Annotated[StrictFloat, Field(gt=0)]
2007
+ ]
2008
+ ] = None,
2009
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2010
+ _content_type: Optional[StrictStr] = None,
2011
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2012
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2013
+ ) -> ShareHttpHealthcheck200Response:
2014
+ """share_http_healthcheck
2015
+
2016
+
2017
+ :param body:
2018
+ :type body: ShareHttpHealthcheckRequest
2019
+ :param _request_timeout: timeout setting for this request. If one
2020
+ number provided, it will be total request
2021
+ timeout. It can also be a pair (tuple) of
2022
+ (connection, read) timeouts.
2023
+ :type _request_timeout: int, tuple(int, int), optional
2024
+ :param _request_auth: set to override the auth_settings for an a single
2025
+ request; this effectively ignores the
2026
+ authentication in the spec for a single request.
2027
+ :type _request_auth: dict, optional
2028
+ :param _content_type: force content-type for the request.
2029
+ :type _content_type: str, Optional
2030
+ :param _headers: set to override the headers for a single
2031
+ request; this effectively ignores the headers
2032
+ in the spec for a single request.
2033
+ :type _headers: dict, optional
2034
+ :param _host_index: set to override the host_index for a single
2035
+ request; this effectively ignores the host_index
2036
+ in the spec for a single request.
2037
+ :type _host_index: int, optional
2038
+ :return: Returns the result object.
2039
+ """ # noqa: E501
2040
+
2041
+ _param = self._share_http_healthcheck_serialize(
2042
+ body=body,
2043
+ _request_auth=_request_auth,
2044
+ _content_type=_content_type,
2045
+ _headers=_headers,
2046
+ _host_index=_host_index
2047
+ )
2048
+
2049
+ _response_types_map: Dict[str, Optional[str]] = {
2050
+ '200': "ShareHttpHealthcheck200Response",
2051
+ '401': None,
2052
+ '500': None,
2053
+ '502': None,
2054
+ }
2055
+ response_data = self.api_client.call_api(
2056
+ *_param,
2057
+ _request_timeout=_request_timeout
2058
+ )
2059
+ response_data.read()
2060
+ return self.api_client.response_deserialize(
2061
+ response_data=response_data,
2062
+ response_types_map=_response_types_map,
2063
+ ).data
2064
+
2065
+
2066
+ @validate_call
2067
+ def share_http_healthcheck_with_http_info(
2068
+ self,
2069
+ body: Optional[ShareHttpHealthcheckRequest] = None,
2070
+ _request_timeout: Union[
2071
+ None,
2072
+ Annotated[StrictFloat, Field(gt=0)],
2073
+ Tuple[
2074
+ Annotated[StrictFloat, Field(gt=0)],
2075
+ Annotated[StrictFloat, Field(gt=0)]
2076
+ ]
2077
+ ] = None,
2078
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2079
+ _content_type: Optional[StrictStr] = None,
2080
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2081
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2082
+ ) -> ApiResponse[ShareHttpHealthcheck200Response]:
2083
+ """share_http_healthcheck
2084
+
2085
+
2086
+ :param body:
2087
+ :type body: ShareHttpHealthcheckRequest
2088
+ :param _request_timeout: timeout setting for this request. If one
2089
+ number provided, it will be total request
2090
+ timeout. It can also be a pair (tuple) of
2091
+ (connection, read) timeouts.
2092
+ :type _request_timeout: int, tuple(int, int), optional
2093
+ :param _request_auth: set to override the auth_settings for an a single
2094
+ request; this effectively ignores the
2095
+ authentication in the spec for a single request.
2096
+ :type _request_auth: dict, optional
2097
+ :param _content_type: force content-type for the request.
2098
+ :type _content_type: str, Optional
2099
+ :param _headers: set to override the headers for a single
2100
+ request; this effectively ignores the headers
2101
+ in the spec for a single request.
2102
+ :type _headers: dict, optional
2103
+ :param _host_index: set to override the host_index for a single
2104
+ request; this effectively ignores the host_index
2105
+ in the spec for a single request.
2106
+ :type _host_index: int, optional
2107
+ :return: Returns the result object.
2108
+ """ # noqa: E501
2109
+
2110
+ _param = self._share_http_healthcheck_serialize(
2111
+ body=body,
2112
+ _request_auth=_request_auth,
2113
+ _content_type=_content_type,
2114
+ _headers=_headers,
2115
+ _host_index=_host_index
2116
+ )
2117
+
2118
+ _response_types_map: Dict[str, Optional[str]] = {
2119
+ '200': "ShareHttpHealthcheck200Response",
2120
+ '401': None,
2121
+ '500': None,
2122
+ '502': None,
2123
+ }
2124
+ response_data = self.api_client.call_api(
2125
+ *_param,
2126
+ _request_timeout=_request_timeout
2127
+ )
2128
+ response_data.read()
2129
+ return self.api_client.response_deserialize(
2130
+ response_data=response_data,
2131
+ response_types_map=_response_types_map,
2132
+ )
2133
+
2134
+
2135
+ @validate_call
2136
+ def share_http_healthcheck_without_preload_content(
2137
+ self,
2138
+ body: Optional[ShareHttpHealthcheckRequest] = None,
2139
+ _request_timeout: Union[
2140
+ None,
2141
+ Annotated[StrictFloat, Field(gt=0)],
2142
+ Tuple[
2143
+ Annotated[StrictFloat, Field(gt=0)],
2144
+ Annotated[StrictFloat, Field(gt=0)]
2145
+ ]
2146
+ ] = None,
2147
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2148
+ _content_type: Optional[StrictStr] = None,
2149
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2150
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2151
+ ) -> RESTResponseType:
2152
+ """share_http_healthcheck
2153
+
2154
+
2155
+ :param body:
2156
+ :type body: ShareHttpHealthcheckRequest
2157
+ :param _request_timeout: timeout setting for this request. If one
2158
+ number provided, it will be total request
2159
+ timeout. It can also be a pair (tuple) of
2160
+ (connection, read) timeouts.
2161
+ :type _request_timeout: int, tuple(int, int), optional
2162
+ :param _request_auth: set to override the auth_settings for an a single
2163
+ request; this effectively ignores the
2164
+ authentication in the spec for a single request.
2165
+ :type _request_auth: dict, optional
2166
+ :param _content_type: force content-type for the request.
2167
+ :type _content_type: str, Optional
2168
+ :param _headers: set to override the headers for a single
2169
+ request; this effectively ignores the headers
2170
+ in the spec for a single request.
2171
+ :type _headers: dict, optional
2172
+ :param _host_index: set to override the host_index for a single
2173
+ request; this effectively ignores the host_index
2174
+ in the spec for a single request.
2175
+ :type _host_index: int, optional
2176
+ :return: Returns the result object.
2177
+ """ # noqa: E501
2178
+
2179
+ _param = self._share_http_healthcheck_serialize(
2180
+ body=body,
2181
+ _request_auth=_request_auth,
2182
+ _content_type=_content_type,
2183
+ _headers=_headers,
2184
+ _host_index=_host_index
2185
+ )
2186
+
2187
+ _response_types_map: Dict[str, Optional[str]] = {
2188
+ '200': "ShareHttpHealthcheck200Response",
2189
+ '401': None,
2190
+ '500': None,
2191
+ '502': None,
2192
+ }
2193
+ response_data = self.api_client.call_api(
2194
+ *_param,
2195
+ _request_timeout=_request_timeout
2196
+ )
2197
+ return response_data.response
2198
+
2199
+
2200
+ def _share_http_healthcheck_serialize(
2201
+ self,
2202
+ body,
2203
+ _request_auth,
2204
+ _content_type,
2205
+ _headers,
2206
+ _host_index,
2207
+ ) -> RequestSerialized:
2208
+
2209
+ _host = None
2210
+
2211
+ _collection_formats: Dict[str, str] = {
2212
+ }
2213
+
2214
+ _path_params: Dict[str, str] = {}
2215
+ _query_params: List[Tuple[str, str]] = []
2216
+ _header_params: Dict[str, Optional[str]] = _headers or {}
2217
+ _form_params: List[Tuple[str, str]] = []
2218
+ _files: Dict[
2219
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
2220
+ ] = {}
2221
+ _body_params: Optional[bytes] = None
2222
+
2223
+ # process the path parameters
2224
+ # process the query parameters
2225
+ # process the header parameters
2226
+ # process the form parameters
2227
+ # process the body parameter
2228
+ if body is not None:
2229
+ _body_params = body
2230
+
2231
+
2232
+ # set the HTTP header `Accept`
2233
+ if 'Accept' not in _header_params:
2234
+ _header_params['Accept'] = self.api_client.select_header_accept(
2235
+ [
2236
+ 'application/zrok.v1+json'
2237
+ ]
2238
+ )
2239
+
2240
+ # set the HTTP header `Content-Type`
2241
+ if _content_type:
2242
+ _header_params['Content-Type'] = _content_type
2243
+ else:
2244
+ _default_content_type = (
2245
+ self.api_client.select_header_content_type(
2246
+ [
2247
+ 'application/zrok.v1+json'
2248
+ ]
2249
+ )
2250
+ )
2251
+ if _default_content_type is not None:
2252
+ _header_params['Content-Type'] = _default_content_type
2253
+
2254
+ # authentication setting
2255
+ _auth_settings: List[str] = [
2256
+ 'key'
2257
+ ]
2258
+
2259
+ return self.api_client.param_serialize(
2260
+ method='POST',
2261
+ resource_path='/agent/share/http-healthcheck',
2262
+ path_params=_path_params,
2263
+ query_params=_query_params,
2264
+ header_params=_header_params,
2265
+ body=_body_params,
2266
+ post_params=_form_params,
2267
+ files=_files,
2268
+ auth_settings=_auth_settings,
2269
+ collection_formats=_collection_formats,
2270
+ _host=_host,
2271
+ _request_auth=_request_auth
2272
+ )
2273
+
2274
+
2275
+
2276
+
2277
+ @validate_call
2278
+ def unenroll(
2279
+ self,
2280
+ body: Optional[EnrollRequest] = None,
2281
+ _request_timeout: Union[
2282
+ None,
2283
+ Annotated[StrictFloat, Field(gt=0)],
2284
+ Tuple[
2285
+ Annotated[StrictFloat, Field(gt=0)],
2286
+ Annotated[StrictFloat, Field(gt=0)]
2287
+ ]
2288
+ ] = None,
2289
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2290
+ _content_type: Optional[StrictStr] = None,
2291
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2292
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2293
+ ) -> None:
2294
+ """unenroll
2295
+
2296
+
2297
+ :param body:
2298
+ :type body: EnrollRequest
2299
+ :param _request_timeout: timeout setting for this request. If one
2300
+ number provided, it will be total request
2301
+ timeout. It can also be a pair (tuple) of
2302
+ (connection, read) timeouts.
2303
+ :type _request_timeout: int, tuple(int, int), optional
2304
+ :param _request_auth: set to override the auth_settings for an a single
2305
+ request; this effectively ignores the
2306
+ authentication in the spec for a single request.
2307
+ :type _request_auth: dict, optional
2308
+ :param _content_type: force content-type for the request.
2309
+ :type _content_type: str, Optional
2310
+ :param _headers: set to override the headers for a single
2311
+ request; this effectively ignores the headers
2312
+ in the spec for a single request.
2313
+ :type _headers: dict, optional
2314
+ :param _host_index: set to override the host_index for a single
2315
+ request; this effectively ignores the host_index
2316
+ in the spec for a single request.
2317
+ :type _host_index: int, optional
2318
+ :return: Returns the result object.
2319
+ """ # noqa: E501
2320
+
2321
+ _param = self._unenroll_serialize(
2322
+ body=body,
2323
+ _request_auth=_request_auth,
2324
+ _content_type=_content_type,
2325
+ _headers=_headers,
2326
+ _host_index=_host_index
2327
+ )
2328
+
2329
+ _response_types_map: Dict[str, Optional[str]] = {
2330
+ '200': None,
2331
+ '400': None,
2332
+ '401': None,
2333
+ '500': None,
2334
+ }
2335
+ response_data = self.api_client.call_api(
2336
+ *_param,
2337
+ _request_timeout=_request_timeout
2338
+ )
2339
+ response_data.read()
2340
+ return self.api_client.response_deserialize(
2341
+ response_data=response_data,
2342
+ response_types_map=_response_types_map,
2343
+ ).data
2344
+
2345
+
2346
+ @validate_call
2347
+ def unenroll_with_http_info(
2348
+ self,
2349
+ body: Optional[EnrollRequest] = None,
2350
+ _request_timeout: Union[
2351
+ None,
2352
+ Annotated[StrictFloat, Field(gt=0)],
2353
+ Tuple[
2354
+ Annotated[StrictFloat, Field(gt=0)],
2355
+ Annotated[StrictFloat, Field(gt=0)]
2356
+ ]
2357
+ ] = None,
2358
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2359
+ _content_type: Optional[StrictStr] = None,
2360
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2361
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2362
+ ) -> ApiResponse[None]:
2363
+ """unenroll
2364
+
2365
+
2366
+ :param body:
2367
+ :type body: EnrollRequest
2368
+ :param _request_timeout: timeout setting for this request. If one
2369
+ number provided, it will be total request
2370
+ timeout. It can also be a pair (tuple) of
2371
+ (connection, read) timeouts.
2372
+ :type _request_timeout: int, tuple(int, int), optional
2373
+ :param _request_auth: set to override the auth_settings for an a single
2374
+ request; this effectively ignores the
2375
+ authentication in the spec for a single request.
2376
+ :type _request_auth: dict, optional
2377
+ :param _content_type: force content-type for the request.
2378
+ :type _content_type: str, Optional
2379
+ :param _headers: set to override the headers for a single
2380
+ request; this effectively ignores the headers
2381
+ in the spec for a single request.
2382
+ :type _headers: dict, optional
2383
+ :param _host_index: set to override the host_index for a single
2384
+ request; this effectively ignores the host_index
2385
+ in the spec for a single request.
2386
+ :type _host_index: int, optional
2387
+ :return: Returns the result object.
2388
+ """ # noqa: E501
2389
+
2390
+ _param = self._unenroll_serialize(
2391
+ body=body,
2392
+ _request_auth=_request_auth,
2393
+ _content_type=_content_type,
2394
+ _headers=_headers,
2395
+ _host_index=_host_index
2396
+ )
2397
+
2398
+ _response_types_map: Dict[str, Optional[str]] = {
2399
+ '200': None,
2400
+ '400': None,
2401
+ '401': None,
2402
+ '500': None,
2403
+ }
2404
+ response_data = self.api_client.call_api(
2405
+ *_param,
2406
+ _request_timeout=_request_timeout
2407
+ )
2408
+ response_data.read()
2409
+ return self.api_client.response_deserialize(
2410
+ response_data=response_data,
2411
+ response_types_map=_response_types_map,
2412
+ )
2413
+
2414
+
2415
+ @validate_call
2416
+ def unenroll_without_preload_content(
2417
+ self,
2418
+ body: Optional[EnrollRequest] = None,
2419
+ _request_timeout: Union[
2420
+ None,
2421
+ Annotated[StrictFloat, Field(gt=0)],
2422
+ Tuple[
2423
+ Annotated[StrictFloat, Field(gt=0)],
2424
+ Annotated[StrictFloat, Field(gt=0)]
2425
+ ]
2426
+ ] = None,
2427
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2428
+ _content_type: Optional[StrictStr] = None,
2429
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2430
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2431
+ ) -> RESTResponseType:
2432
+ """unenroll
2433
+
2434
+
2435
+ :param body:
2436
+ :type body: EnrollRequest
2437
+ :param _request_timeout: timeout setting for this request. If one
2438
+ number provided, it will be total request
2439
+ timeout. It can also be a pair (tuple) of
2440
+ (connection, read) timeouts.
2441
+ :type _request_timeout: int, tuple(int, int), optional
2442
+ :param _request_auth: set to override the auth_settings for an a single
2443
+ request; this effectively ignores the
2444
+ authentication in the spec for a single request.
2445
+ :type _request_auth: dict, optional
2446
+ :param _content_type: force content-type for the request.
2447
+ :type _content_type: str, Optional
2448
+ :param _headers: set to override the headers for a single
2449
+ request; this effectively ignores the headers
2450
+ in the spec for a single request.
2451
+ :type _headers: dict, optional
2452
+ :param _host_index: set to override the host_index for a single
2453
+ request; this effectively ignores the host_index
2454
+ in the spec for a single request.
2455
+ :type _host_index: int, optional
2456
+ :return: Returns the result object.
2457
+ """ # noqa: E501
2458
+
2459
+ _param = self._unenroll_serialize(
2460
+ body=body,
2461
+ _request_auth=_request_auth,
2462
+ _content_type=_content_type,
2463
+ _headers=_headers,
2464
+ _host_index=_host_index
2465
+ )
2466
+
2467
+ _response_types_map: Dict[str, Optional[str]] = {
2468
+ '200': None,
2469
+ '400': None,
2470
+ '401': None,
2471
+ '500': None,
2472
+ }
2473
+ response_data = self.api_client.call_api(
2474
+ *_param,
2475
+ _request_timeout=_request_timeout
2476
+ )
2477
+ return response_data.response
2478
+
2479
+
2480
+ def _unenroll_serialize(
2481
+ self,
2482
+ body,
2483
+ _request_auth,
2484
+ _content_type,
2485
+ _headers,
2486
+ _host_index,
2487
+ ) -> RequestSerialized:
2488
+
2489
+ _host = None
2490
+
2491
+ _collection_formats: Dict[str, str] = {
2492
+ }
2493
+
2494
+ _path_params: Dict[str, str] = {}
2495
+ _query_params: List[Tuple[str, str]] = []
2496
+ _header_params: Dict[str, Optional[str]] = _headers or {}
2497
+ _form_params: List[Tuple[str, str]] = []
2498
+ _files: Dict[
2499
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
2500
+ ] = {}
2501
+ _body_params: Optional[bytes] = None
2502
+
2503
+ # process the path parameters
2504
+ # process the query parameters
2505
+ # process the header parameters
2506
+ # process the form parameters
2507
+ # process the body parameter
2508
+ if body is not None:
2509
+ _body_params = body
2510
+
2511
+
2512
+
2513
+ # set the HTTP header `Content-Type`
2514
+ if _content_type:
2515
+ _header_params['Content-Type'] = _content_type
2516
+ else:
2517
+ _default_content_type = (
2518
+ self.api_client.select_header_content_type(
2519
+ [
2520
+ 'application/zrok.v1+json'
2521
+ ]
2522
+ )
2523
+ )
2524
+ if _default_content_type is not None:
2525
+ _header_params['Content-Type'] = _default_content_type
2526
+
2527
+ # authentication setting
2528
+ _auth_settings: List[str] = [
2529
+ 'key'
2530
+ ]
2531
+
2532
+ return self.api_client.param_serialize(
2533
+ method='POST',
2534
+ resource_path='/agent/unenroll',
2535
+ path_params=_path_params,
2536
+ query_params=_query_params,
2537
+ header_params=_header_params,
2538
+ body=_body_params,
2539
+ post_params=_form_params,
2540
+ files=_files,
2541
+ auth_settings=_auth_settings,
2542
+ collection_formats=_collection_formats,
2543
+ _host=_host,
2544
+ _request_auth=_request_auth
2545
+ )
2546
+
2547
+