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