ory-client 1.11.7__py3-none-any.whl → 1.11.11__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 (287) hide show
  1. ory_client/__init__.py +19 -9
  2. ory_client/api/__init__.py +1 -0
  3. ory_client/api/courier_api.py +1 -1
  4. ory_client/api/events_api.py +33 -21
  5. ory_client/api/frontend_api.py +1 -1
  6. ory_client/api/identity_api.py +7 -4
  7. ory_client/api/jwk_api.py +1 -1
  8. ory_client/api/metadata_api.py +1 -1
  9. ory_client/api/o_auth2_api.py +1 -1
  10. ory_client/api/oidc_api.py +1 -1
  11. ory_client/api/permission_api.py +1 -1
  12. ory_client/api/project_api.py +201 -967
  13. ory_client/api/relationship_api.py +1 -1
  14. ory_client/api/wellknown_api.py +1 -1
  15. ory_client/api/workspace_api.py +1463 -0
  16. ory_client/api_client.py +2 -2
  17. ory_client/configuration.py +34 -6
  18. ory_client/exceptions.py +1 -1
  19. ory_client/models/__init__.py +17 -8
  20. ory_client/models/accept_o_auth2_consent_request.py +1 -1
  21. ory_client/models/accept_o_auth2_consent_request_session.py +1 -1
  22. ory_client/models/accept_o_auth2_login_request.py +1 -1
  23. ory_client/models/account_experience_configuration.py +109 -0
  24. ory_client/models/account_experience_theme_variables.py +282 -0
  25. ory_client/models/active_project_in_console.py +1 -1
  26. ory_client/models/{migration_options.py → add_project_to_workspace_body.py} +5 -5
  27. ory_client/models/attribute.py +1 -1
  28. ory_client/models/attribute_filter.py +1 -1
  29. ory_client/models/attributes_count_datapoint.py +1 -1
  30. ory_client/models/authenticator_assurance_level.py +1 -1
  31. ory_client/models/batch_patch_identities_response.py +1 -1
  32. ory_client/models/billing_period_bucket.py +120 -0
  33. ory_client/models/check_opl_syntax_result.py +1 -1
  34. ory_client/models/check_permission_result.py +1 -1
  35. ory_client/models/cloud_account.py +1 -1
  36. ory_client/models/consistency_request_parameters.py +1 -1
  37. ory_client/models/continue_with.py +1 -1
  38. ory_client/models/continue_with_recovery_ui.py +1 -1
  39. ory_client/models/continue_with_recovery_ui_flow.py +1 -1
  40. ory_client/models/continue_with_set_ory_session_token.py +1 -1
  41. ory_client/models/continue_with_settings_ui.py +1 -1
  42. ory_client/models/continue_with_settings_ui_flow.py +1 -1
  43. ory_client/models/continue_with_verification_ui.py +1 -1
  44. ory_client/models/continue_with_verification_ui_flow.py +1 -1
  45. ory_client/models/courier_message_status.py +1 -1
  46. ory_client/models/courier_message_type.py +1 -1
  47. ory_client/models/create_custom_domain_body.py +1 -1
  48. ory_client/models/create_event_stream_body.py +1 -1
  49. ory_client/models/create_identity_body.py +1 -1
  50. ory_client/models/create_invite_response.py +1 -1
  51. ory_client/models/create_json_web_key_set.py +1 -1
  52. ory_client/models/create_project_api_key_request.py +1 -1
  53. ory_client/models/create_project_body.py +14 -2
  54. ory_client/models/create_project_branding.py +1 -1
  55. ory_client/models/create_project_member_invite_body.py +1 -1
  56. ory_client/models/create_project_normalized_payload.py +27 -3
  57. ory_client/models/create_recovery_code_for_identity_body.py +4 -2
  58. ory_client/models/create_recovery_link_for_identity_body.py +1 -1
  59. ory_client/models/create_relationship_body.py +1 -1
  60. ory_client/models/create_subscription_body.py +1 -1
  61. ory_client/models/create_subscription_common.py +1 -1
  62. ory_client/models/create_verifiable_credential_request_body.py +1 -1
  63. ory_client/models/{create_workspace_payload.py → create_workspace_body.py} +5 -5
  64. ory_client/models/create_workspace_member_invite_body.py +1 -1
  65. ory_client/models/create_workspace_subscription_body.py +1 -1
  66. ory_client/models/credential_supported_draft00.py +1 -1
  67. ory_client/models/custom_domain.py +1 -1
  68. ory_client/models/delete_my_sessions_count.py +1 -1
  69. ory_client/models/email_template_data.py +1 -1
  70. ory_client/models/email_template_data_body.py +1 -1
  71. ory_client/models/error_authenticator_assurance_level_not_satisfied.py +1 -1
  72. ory_client/models/error_browser_location_change_required.py +1 -1
  73. ory_client/models/error_flow_replaced.py +1 -1
  74. ory_client/models/error_generic.py +1 -1
  75. ory_client/models/error_o_auth2.py +1 -1
  76. ory_client/models/event_stream.py +1 -1
  77. ory_client/models/expanded_permission_tree.py +1 -1
  78. ory_client/models/flow_error.py +1 -1
  79. ory_client/models/generic_error.py +1 -1
  80. ory_client/models/generic_error_content.py +1 -1
  81. ory_client/models/generic_usage.py +7 -3
  82. ory_client/models/get_attributes_count_response.py +1 -1
  83. ory_client/models/get_managed_identity_schema_location.py +1 -1
  84. ory_client/models/get_metrics_event_attributes_response.py +1 -1
  85. ory_client/models/get_metrics_event_types_response.py +1 -1
  86. ory_client/models/get_organization_response.py +1 -1
  87. ory_client/models/get_project_events_body.py +1 -1
  88. ory_client/models/get_project_events_response.py +1 -1
  89. ory_client/models/get_project_metrics_response.py +1 -1
  90. ory_client/models/get_session_activity_response.py +1 -1
  91. ory_client/models/get_version200_response.py +1 -1
  92. ory_client/models/health_not_ready_status.py +1 -1
  93. ory_client/models/health_status.py +1 -1
  94. ory_client/models/identity.py +1 -1
  95. ory_client/models/identity_credentials.py +1 -1
  96. ory_client/models/identity_credentials_code.py +1 -1
  97. ory_client/models/identity_credentials_oidc.py +1 -1
  98. ory_client/models/identity_credentials_oidc_provider.py +1 -1
  99. ory_client/models/identity_credentials_password.py +1 -1
  100. ory_client/models/identity_patch.py +1 -1
  101. ory_client/models/identity_patch_response.py +1 -1
  102. ory_client/models/identity_schema_container.py +1 -1
  103. ory_client/models/identity_schema_preset.py +1 -1
  104. ory_client/models/identity_with_credentials.py +1 -1
  105. ory_client/models/identity_with_credentials_oidc.py +1 -1
  106. ory_client/models/identity_with_credentials_oidc_config.py +1 -1
  107. ory_client/models/identity_with_credentials_oidc_config_provider.py +1 -1
  108. ory_client/models/identity_with_credentials_password.py +1 -1
  109. ory_client/models/identity_with_credentials_password_config.py +1 -1
  110. ory_client/models/internal_get_project_branding_body.py +1 -1
  111. ory_client/models/internal_is_ax_welcome_screen_enabled_for_project_body.py +1 -1
  112. ory_client/models/internal_is_owner_for_project_by_slug_body.py +1 -1
  113. ory_client/models/internal_is_owner_for_project_by_slug_response.py +1 -1
  114. ory_client/models/introspected_o_auth2_token.py +1 -1
  115. ory_client/models/{workspace_meta.py → invoice.py} +31 -28
  116. ory_client/models/invoice_data_v1.py +149 -0
  117. ory_client/models/is_owner_for_project_by_slug.py +1 -1
  118. ory_client/models/json_patch.py +1 -1
  119. ory_client/models/json_web_key.py +1 -1
  120. ory_client/models/json_web_key_set.py +1 -1
  121. ory_client/models/keto_namespace.py +1 -1
  122. ory_client/models/line_item_v1.py +120 -0
  123. ory_client/models/list_event_streams.py +1 -1
  124. ory_client/models/list_invoices_response.py +113 -0
  125. ory_client/models/list_organizations_response.py +8 -4
  126. ory_client/models/{list_workspace_projects_response.py → list_workspace_projects.py} +5 -5
  127. ory_client/models/{list_my_workspaces_response.py → list_workspaces.py} +8 -8
  128. ory_client/models/login_flow.py +1 -1
  129. ory_client/models/login_flow_state.py +1 -1
  130. ory_client/models/logout_flow.py +1 -1
  131. ory_client/models/managed_identity_schema.py +1 -1
  132. ory_client/models/managed_identity_schema_validation_result.py +1 -1
  133. ory_client/models/member_invite.py +1 -1
  134. ory_client/models/message.py +1 -1
  135. ory_client/models/message_dispatch.py +1 -1
  136. ory_client/models/metrics_datapoint.py +1 -1
  137. ory_client/models/money.py +105 -0
  138. ory_client/models/namespace.py +1 -1
  139. ory_client/models/needs_privileged_session_error.py +1 -1
  140. ory_client/models/normalized_project.py +13 -2
  141. ory_client/models/normalized_project_revision.py +15 -3
  142. ory_client/models/normalized_project_revision_courier_channel.py +1 -1
  143. ory_client/models/normalized_project_revision_hook.py +1 -1
  144. ory_client/models/normalized_project_revision_identity_schema.py +1 -1
  145. ory_client/models/normalized_project_revision_third_party_provider.py +1 -1
  146. ory_client/models/normalized_project_revision_tokenizer_template.py +1 -1
  147. ory_client/models/o_auth2_client.py +1 -1
  148. ory_client/models/o_auth2_client_token_lifespans.py +1 -1
  149. ory_client/models/o_auth2_consent_request.py +1 -1
  150. ory_client/models/o_auth2_consent_request_open_id_connect_context.py +1 -1
  151. ory_client/models/o_auth2_consent_session.py +1 -1
  152. ory_client/models/o_auth2_consent_session_expires_at.py +1 -1
  153. ory_client/models/o_auth2_login_request.py +1 -1
  154. ory_client/models/o_auth2_logout_request.py +1 -1
  155. ory_client/models/o_auth2_redirect_to.py +1 -1
  156. ory_client/models/o_auth2_token_exchange.py +1 -1
  157. ory_client/models/oidc_configuration.py +1 -1
  158. ory_client/models/oidc_user_info.py +1 -1
  159. ory_client/models/organization.py +1 -1
  160. ory_client/models/organization_body.py +1 -1
  161. ory_client/models/pagination.py +1 -1
  162. ory_client/models/pagination_headers.py +1 -1
  163. ory_client/models/parse_error.py +1 -1
  164. ory_client/models/patch_identities_body.py +1 -1
  165. ory_client/models/perform_native_logout_body.py +1 -1
  166. ory_client/models/{permissions_on_workpace_response.py → permissions_on_workspace.py} +4 -4
  167. ory_client/models/plan.py +1 -1
  168. ory_client/models/plan_details.py +1 -1
  169. ory_client/models/post_check_permission_body.py +1 -1
  170. ory_client/models/post_check_permission_or_error_body.py +1 -1
  171. ory_client/models/project.py +20 -2
  172. ory_client/models/project_api_key.py +1 -1
  173. ory_client/models/project_branding.py +1 -1
  174. ory_client/models/project_branding_colors.py +1 -1
  175. ory_client/models/project_branding_theme.py +14 -2
  176. ory_client/models/project_cors.py +1 -1
  177. ory_client/models/project_events_datapoint.py +1 -1
  178. ory_client/models/project_host.py +1 -1
  179. ory_client/models/project_member.py +1 -1
  180. ory_client/models/project_metadata.py +12 -3
  181. ory_client/models/project_service_identity.py +1 -1
  182. ory_client/models/project_service_o_auth2.py +1 -1
  183. ory_client/models/project_service_permission.py +1 -1
  184. ory_client/models/project_services.py +1 -1
  185. ory_client/models/quota_usage.py +5 -5
  186. ory_client/models/recovery_code_for_identity.py +1 -1
  187. ory_client/models/recovery_flow.py +1 -1
  188. ory_client/models/recovery_flow_state.py +1 -1
  189. ory_client/models/recovery_identity_address.py +1 -1
  190. ory_client/models/recovery_link_for_identity.py +1 -1
  191. ory_client/models/registration_flow.py +1 -1
  192. ory_client/models/registration_flow_state.py +1 -1
  193. ory_client/models/reject_o_auth2_request.py +1 -1
  194. ory_client/models/relation_query.py +1 -1
  195. ory_client/models/relationship.py +1 -1
  196. ory_client/models/relationship_namespaces.py +1 -1
  197. ory_client/models/relationship_patch.py +1 -1
  198. ory_client/models/relationships.py +1 -1
  199. ory_client/models/rfc6749_error_json.py +1 -1
  200. ory_client/models/schema_patch.py +1 -1
  201. ory_client/models/self_service_flow_expired_error.py +1 -1
  202. ory_client/models/session.py +1 -1
  203. ory_client/models/session_activity_datapoint.py +1 -1
  204. ory_client/models/session_authentication_method.py +1 -1
  205. ory_client/models/session_device.py +1 -1
  206. ory_client/models/set_active_project_in_console_body.py +1 -1
  207. ory_client/models/set_custom_domain_body.py +1 -1
  208. ory_client/models/set_event_stream_body.py +1 -1
  209. ory_client/models/set_project.py +1 -1
  210. ory_client/models/set_project_branding_theme_body.py +1 -1
  211. ory_client/models/settings_flow.py +1 -1
  212. ory_client/models/settings_flow_state.py +1 -1
  213. ory_client/models/source_position.py +1 -1
  214. ory_client/models/subject_set.py +1 -1
  215. ory_client/models/subscription.py +1 -1
  216. ory_client/models/successful_code_exchange_response.py +1 -1
  217. ory_client/models/successful_native_login.py +1 -1
  218. ory_client/models/successful_native_registration.py +1 -1
  219. ory_client/models/successful_project_update.py +1 -1
  220. ory_client/models/tax_line_item.py +103 -0
  221. ory_client/models/time_interval.py +104 -0
  222. ory_client/models/token_pagination.py +1 -1
  223. ory_client/models/token_pagination_headers.py +1 -1
  224. ory_client/models/token_pagination_request_parameters.py +1 -1
  225. ory_client/models/token_pagination_response_headers.py +1 -1
  226. ory_client/models/trust_o_auth2_jwt_grant_issuer.py +1 -1
  227. ory_client/models/trusted_o_auth2_jwt_grant_issuer.py +1 -1
  228. ory_client/models/trusted_o_auth2_jwt_grant_json_web_key.py +1 -1
  229. ory_client/models/ui_container.py +1 -1
  230. ory_client/models/ui_node.py +1 -1
  231. ory_client/models/ui_node_anchor_attributes.py +1 -1
  232. ory_client/models/ui_node_attributes.py +1 -1
  233. ory_client/models/ui_node_image_attributes.py +1 -1
  234. ory_client/models/ui_node_input_attributes.py +1 -1
  235. ory_client/models/ui_node_meta.py +1 -1
  236. ory_client/models/ui_node_script_attributes.py +1 -1
  237. ory_client/models/ui_node_text_attributes.py +1 -1
  238. ory_client/models/ui_text.py +1 -1
  239. ory_client/models/update_identity_body.py +1 -1
  240. ory_client/models/update_login_flow_body.py +1 -1
  241. ory_client/models/update_login_flow_with_code_method.py +1 -1
  242. ory_client/models/update_login_flow_with_lookup_secret_method.py +1 -1
  243. ory_client/models/update_login_flow_with_oidc_method.py +1 -1
  244. ory_client/models/update_login_flow_with_passkey_method.py +1 -1
  245. ory_client/models/update_login_flow_with_password_method.py +1 -1
  246. ory_client/models/update_login_flow_with_totp_method.py +1 -1
  247. ory_client/models/update_login_flow_with_web_authn_method.py +1 -1
  248. ory_client/models/update_recovery_flow_body.py +1 -1
  249. ory_client/models/update_recovery_flow_with_code_method.py +1 -1
  250. ory_client/models/update_recovery_flow_with_link_method.py +1 -1
  251. ory_client/models/update_registration_flow_body.py +1 -1
  252. ory_client/models/update_registration_flow_with_code_method.py +1 -1
  253. ory_client/models/update_registration_flow_with_oidc_method.py +1 -1
  254. ory_client/models/update_registration_flow_with_passkey_method.py +1 -1
  255. ory_client/models/update_registration_flow_with_password_method.py +1 -1
  256. ory_client/models/update_registration_flow_with_profile_method.py +1 -1
  257. ory_client/models/update_registration_flow_with_web_authn_method.py +1 -1
  258. ory_client/models/update_settings_flow_body.py +1 -1
  259. ory_client/models/update_settings_flow_with_lookup_method.py +1 -1
  260. ory_client/models/update_settings_flow_with_oidc_method.py +1 -1
  261. ory_client/models/update_settings_flow_with_passkey_method.py +1 -1
  262. ory_client/models/update_settings_flow_with_password_method.py +1 -1
  263. ory_client/models/update_settings_flow_with_profile_method.py +1 -1
  264. ory_client/models/update_settings_flow_with_totp_method.py +1 -1
  265. ory_client/models/update_settings_flow_with_web_authn_method.py +1 -1
  266. ory_client/models/update_subscription_body.py +1 -1
  267. ory_client/models/update_verification_flow_body.py +1 -1
  268. ory_client/models/update_verification_flow_with_code_method.py +1 -1
  269. ory_client/models/update_verification_flow_with_link_method.py +1 -1
  270. ory_client/models/{update_workspace_payload.py → update_workspace_body.py} +5 -5
  271. ory_client/models/usage.py +1 -1
  272. ory_client/models/verifiable_credential_priming_response.py +1 -1
  273. ory_client/models/verifiable_credential_proof.py +1 -1
  274. ory_client/models/verifiable_credential_response.py +1 -1
  275. ory_client/models/verifiable_identity_address.py +1 -1
  276. ory_client/models/verification_flow.py +1 -1
  277. ory_client/models/verification_flow_state.py +1 -1
  278. ory_client/models/version.py +1 -1
  279. ory_client/models/warning.py +1 -1
  280. ory_client/models/workspace.py +9 -2
  281. ory_client/rest.py +1 -1
  282. {ory_client-1.11.7.dist-info → ory_client-1.11.11.dist-info}/METADATA +1 -1
  283. ory_client-1.11.11.dist-info/RECORD +288 -0
  284. ory_client-1.11.7.dist-info/RECORD +0 -278
  285. {ory_client-1.11.7.dist-info → ory_client-1.11.11.dist-info}/LICENSE +0 -0
  286. {ory_client-1.11.7.dist-info → ory_client-1.11.11.dist-info}/WHEEL +0 -0
  287. {ory_client-1.11.7.dist-info → ory_client-1.11.11.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,1463 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ Ory APIs
5
+
6
+ Documentation for all public and administrative Ory APIs. Administrative APIs can only be accessed with a valid Personal Access Token. Public APIs are mostly used in browsers.
7
+
8
+ The version of the OpenAPI document: v1.11.11
9
+ Contact: support@ory.sh
10
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
11
+
12
+ Do not edit the class manually.
13
+ """ # noqa: E501
14
+
15
+ import warnings
16
+ from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt
17
+ from typing import Any, Dict, List, Optional, Tuple, Union
18
+ from typing_extensions import Annotated
19
+
20
+ from pydantic import Field, StrictStr
21
+ from typing import Optional
22
+ from typing_extensions import Annotated
23
+ from ory_client.models.create_workspace_body import CreateWorkspaceBody
24
+ from ory_client.models.list_workspace_projects import ListWorkspaceProjects
25
+ from ory_client.models.list_workspaces import ListWorkspaces
26
+ from ory_client.models.update_workspace_body import UpdateWorkspaceBody
27
+ from ory_client.models.workspace import Workspace
28
+
29
+ from ory_client.api_client import ApiClient, RequestSerialized
30
+ from ory_client.api_response import ApiResponse
31
+ from ory_client.rest import RESTResponseType
32
+
33
+
34
+ class WorkspaceApi:
35
+ """NOTE: This class is auto generated by OpenAPI Generator
36
+ Ref: https://openapi-generator.tech
37
+
38
+ Do not edit the class manually.
39
+ """
40
+
41
+ def __init__(self, api_client=None) -> None:
42
+ if api_client is None:
43
+ api_client = ApiClient.get_default()
44
+ self.api_client = api_client
45
+
46
+
47
+ @validate_call
48
+ def create_workspace(
49
+ self,
50
+ create_workspace_body: Optional[CreateWorkspaceBody] = None,
51
+ _request_timeout: Union[
52
+ None,
53
+ Annotated[StrictFloat, Field(gt=0)],
54
+ Tuple[
55
+ Annotated[StrictFloat, Field(gt=0)],
56
+ Annotated[StrictFloat, Field(gt=0)]
57
+ ]
58
+ ] = None,
59
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
60
+ _content_type: Optional[StrictStr] = None,
61
+ _headers: Optional[Dict[StrictStr, Any]] = None,
62
+ _host_index: Annotated[StrictInt, Field(ge=0, le=1)] = 0,
63
+ ) -> Workspace:
64
+ """Create a new workspace
65
+
66
+
67
+ :param create_workspace_body:
68
+ :type create_workspace_body: CreateWorkspaceBody
69
+ :param _request_timeout: timeout setting for this request. If one
70
+ number provided, it will be total request
71
+ timeout. It can also be a pair (tuple) of
72
+ (connection, read) timeouts.
73
+ :type _request_timeout: int, tuple(int, int), optional
74
+ :param _request_auth: set to override the auth_settings for an a single
75
+ request; this effectively ignores the
76
+ authentication in the spec for a single request.
77
+ :type _request_auth: dict, optional
78
+ :param _content_type: force content-type for the request.
79
+ :type _content_type: str, Optional
80
+ :param _headers: set to override the headers for a single
81
+ request; this effectively ignores the headers
82
+ in the spec for a single request.
83
+ :type _headers: dict, optional
84
+ :param _host_index: set to override the host_index for a single
85
+ request; this effectively ignores the host_index
86
+ in the spec for a single request.
87
+ :type _host_index: int, optional
88
+ :return: Returns the result object.
89
+ """ # noqa: E501
90
+
91
+ _param = self._create_workspace_serialize(
92
+ create_workspace_body=create_workspace_body,
93
+ _request_auth=_request_auth,
94
+ _content_type=_content_type,
95
+ _headers=_headers,
96
+ _host_index=_host_index
97
+ )
98
+
99
+ _response_types_map: Dict[str, Optional[str]] = {
100
+ '201': "Workspace",
101
+ '400': "ErrorGeneric",
102
+ '401': "ErrorGeneric",
103
+ '403': "ErrorGeneric",
104
+ '500': "ErrorGeneric",
105
+ }
106
+ response_data = self.api_client.call_api(
107
+ *_param,
108
+ _request_timeout=_request_timeout
109
+ )
110
+ response_data.read()
111
+ return self.api_client.response_deserialize(
112
+ response_data=response_data,
113
+ response_types_map=_response_types_map,
114
+ ).data
115
+
116
+
117
+ @validate_call
118
+ def create_workspace_with_http_info(
119
+ self,
120
+ create_workspace_body: Optional[CreateWorkspaceBody] = None,
121
+ _request_timeout: Union[
122
+ None,
123
+ Annotated[StrictFloat, Field(gt=0)],
124
+ Tuple[
125
+ Annotated[StrictFloat, Field(gt=0)],
126
+ Annotated[StrictFloat, Field(gt=0)]
127
+ ]
128
+ ] = None,
129
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
130
+ _content_type: Optional[StrictStr] = None,
131
+ _headers: Optional[Dict[StrictStr, Any]] = None,
132
+ _host_index: Annotated[StrictInt, Field(ge=0, le=1)] = 0,
133
+ ) -> ApiResponse[Workspace]:
134
+ """Create a new workspace
135
+
136
+
137
+ :param create_workspace_body:
138
+ :type create_workspace_body: CreateWorkspaceBody
139
+ :param _request_timeout: timeout setting for this request. If one
140
+ number provided, it will be total request
141
+ timeout. It can also be a pair (tuple) of
142
+ (connection, read) timeouts.
143
+ :type _request_timeout: int, tuple(int, int), optional
144
+ :param _request_auth: set to override the auth_settings for an a single
145
+ request; this effectively ignores the
146
+ authentication in the spec for a single request.
147
+ :type _request_auth: dict, optional
148
+ :param _content_type: force content-type for the request.
149
+ :type _content_type: str, Optional
150
+ :param _headers: set to override the headers for a single
151
+ request; this effectively ignores the headers
152
+ in the spec for a single request.
153
+ :type _headers: dict, optional
154
+ :param _host_index: set to override the host_index for a single
155
+ request; this effectively ignores the host_index
156
+ in the spec for a single request.
157
+ :type _host_index: int, optional
158
+ :return: Returns the result object.
159
+ """ # noqa: E501
160
+
161
+ _param = self._create_workspace_serialize(
162
+ create_workspace_body=create_workspace_body,
163
+ _request_auth=_request_auth,
164
+ _content_type=_content_type,
165
+ _headers=_headers,
166
+ _host_index=_host_index
167
+ )
168
+
169
+ _response_types_map: Dict[str, Optional[str]] = {
170
+ '201': "Workspace",
171
+ '400': "ErrorGeneric",
172
+ '401': "ErrorGeneric",
173
+ '403': "ErrorGeneric",
174
+ '500': "ErrorGeneric",
175
+ }
176
+ response_data = self.api_client.call_api(
177
+ *_param,
178
+ _request_timeout=_request_timeout
179
+ )
180
+ response_data.read()
181
+ return self.api_client.response_deserialize(
182
+ response_data=response_data,
183
+ response_types_map=_response_types_map,
184
+ )
185
+
186
+
187
+ @validate_call
188
+ def create_workspace_without_preload_content(
189
+ self,
190
+ create_workspace_body: Optional[CreateWorkspaceBody] = None,
191
+ _request_timeout: Union[
192
+ None,
193
+ Annotated[StrictFloat, Field(gt=0)],
194
+ Tuple[
195
+ Annotated[StrictFloat, Field(gt=0)],
196
+ Annotated[StrictFloat, Field(gt=0)]
197
+ ]
198
+ ] = None,
199
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
200
+ _content_type: Optional[StrictStr] = None,
201
+ _headers: Optional[Dict[StrictStr, Any]] = None,
202
+ _host_index: Annotated[StrictInt, Field(ge=0, le=1)] = 0,
203
+ ) -> RESTResponseType:
204
+ """Create a new workspace
205
+
206
+
207
+ :param create_workspace_body:
208
+ :type create_workspace_body: CreateWorkspaceBody
209
+ :param _request_timeout: timeout setting for this request. If one
210
+ number provided, it will be total request
211
+ timeout. It can also be a pair (tuple) of
212
+ (connection, read) timeouts.
213
+ :type _request_timeout: int, tuple(int, int), optional
214
+ :param _request_auth: set to override the auth_settings for an a single
215
+ request; this effectively ignores the
216
+ authentication in the spec for a single request.
217
+ :type _request_auth: dict, optional
218
+ :param _content_type: force content-type for the request.
219
+ :type _content_type: str, Optional
220
+ :param _headers: set to override the headers for a single
221
+ request; this effectively ignores the headers
222
+ in the spec for a single request.
223
+ :type _headers: dict, optional
224
+ :param _host_index: set to override the host_index for a single
225
+ request; this effectively ignores the host_index
226
+ in the spec for a single request.
227
+ :type _host_index: int, optional
228
+ :return: Returns the result object.
229
+ """ # noqa: E501
230
+
231
+ _param = self._create_workspace_serialize(
232
+ create_workspace_body=create_workspace_body,
233
+ _request_auth=_request_auth,
234
+ _content_type=_content_type,
235
+ _headers=_headers,
236
+ _host_index=_host_index
237
+ )
238
+
239
+ _response_types_map: Dict[str, Optional[str]] = {
240
+ '201': "Workspace",
241
+ '400': "ErrorGeneric",
242
+ '401': "ErrorGeneric",
243
+ '403': "ErrorGeneric",
244
+ '500': "ErrorGeneric",
245
+ }
246
+ response_data = self.api_client.call_api(
247
+ *_param,
248
+ _request_timeout=_request_timeout
249
+ )
250
+ return response_data.response
251
+
252
+
253
+ def _create_workspace_serialize(
254
+ self,
255
+ create_workspace_body,
256
+ _request_auth,
257
+ _content_type,
258
+ _headers,
259
+ _host_index,
260
+ ) -> RequestSerialized:
261
+
262
+ _hosts = [
263
+ 'https://api.console.ory.sh'
264
+ ]
265
+ _host = _hosts[_host_index]
266
+
267
+ _collection_formats: Dict[str, str] = {
268
+ }
269
+
270
+ _path_params: Dict[str, str] = {}
271
+ _query_params: List[Tuple[str, str]] = []
272
+ _header_params: Dict[str, Optional[str]] = _headers or {}
273
+ _form_params: List[Tuple[str, str]] = []
274
+ _files: Dict[str, str] = {}
275
+ _body_params: Optional[bytes] = None
276
+
277
+ # process the path parameters
278
+ # process the query parameters
279
+ # process the header parameters
280
+ # process the form parameters
281
+ # process the body parameter
282
+ if create_workspace_body is not None:
283
+ _body_params = create_workspace_body
284
+
285
+
286
+ # set the HTTP header `Accept`
287
+ _header_params['Accept'] = self.api_client.select_header_accept(
288
+ [
289
+ 'application/json'
290
+ ]
291
+ )
292
+
293
+ # set the HTTP header `Content-Type`
294
+ if _content_type:
295
+ _header_params['Content-Type'] = _content_type
296
+ else:
297
+ _default_content_type = (
298
+ self.api_client.select_header_content_type(
299
+ [
300
+ 'application/json'
301
+ ]
302
+ )
303
+ )
304
+ if _default_content_type is not None:
305
+ _header_params['Content-Type'] = _default_content_type
306
+
307
+ # authentication setting
308
+ _auth_settings: List[str] = [
309
+ 'oryNetworkCookie'
310
+ ]
311
+
312
+ return self.api_client.param_serialize(
313
+ method='POST',
314
+ resource_path='/workspaces',
315
+ path_params=_path_params,
316
+ query_params=_query_params,
317
+ header_params=_header_params,
318
+ body=_body_params,
319
+ post_params=_form_params,
320
+ files=_files,
321
+ auth_settings=_auth_settings,
322
+ collection_formats=_collection_formats,
323
+ _host=_host,
324
+ _request_auth=_request_auth
325
+ )
326
+
327
+
328
+
329
+
330
+ @validate_call
331
+ def get_workspace(
332
+ self,
333
+ workspace: StrictStr,
334
+ _request_timeout: Union[
335
+ None,
336
+ Annotated[StrictFloat, Field(gt=0)],
337
+ Tuple[
338
+ Annotated[StrictFloat, Field(gt=0)],
339
+ Annotated[StrictFloat, Field(gt=0)]
340
+ ]
341
+ ] = None,
342
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
343
+ _content_type: Optional[StrictStr] = None,
344
+ _headers: Optional[Dict[StrictStr, Any]] = None,
345
+ _host_index: Annotated[StrictInt, Field(ge=0, le=1)] = 0,
346
+ ) -> Workspace:
347
+ """Get a workspace
348
+
349
+ Any workspace member can access this endpoint.
350
+
351
+ :param workspace: (required)
352
+ :type workspace: str
353
+ :param _request_timeout: timeout setting for this request. If one
354
+ number provided, it will be total request
355
+ timeout. It can also be a pair (tuple) of
356
+ (connection, read) timeouts.
357
+ :type _request_timeout: int, tuple(int, int), optional
358
+ :param _request_auth: set to override the auth_settings for an a single
359
+ request; this effectively ignores the
360
+ authentication in the spec for a single request.
361
+ :type _request_auth: dict, optional
362
+ :param _content_type: force content-type for the request.
363
+ :type _content_type: str, Optional
364
+ :param _headers: set to override the headers for a single
365
+ request; this effectively ignores the headers
366
+ in the spec for a single request.
367
+ :type _headers: dict, optional
368
+ :param _host_index: set to override the host_index for a single
369
+ request; this effectively ignores the host_index
370
+ in the spec for a single request.
371
+ :type _host_index: int, optional
372
+ :return: Returns the result object.
373
+ """ # noqa: E501
374
+
375
+ _param = self._get_workspace_serialize(
376
+ workspace=workspace,
377
+ _request_auth=_request_auth,
378
+ _content_type=_content_type,
379
+ _headers=_headers,
380
+ _host_index=_host_index
381
+ )
382
+
383
+ _response_types_map: Dict[str, Optional[str]] = {
384
+ '200': "Workspace",
385
+ '400': "ErrorGeneric",
386
+ '401': "ErrorGeneric",
387
+ '403': "ErrorGeneric",
388
+ '500': "ErrorGeneric",
389
+ }
390
+ response_data = self.api_client.call_api(
391
+ *_param,
392
+ _request_timeout=_request_timeout
393
+ )
394
+ response_data.read()
395
+ return self.api_client.response_deserialize(
396
+ response_data=response_data,
397
+ response_types_map=_response_types_map,
398
+ ).data
399
+
400
+
401
+ @validate_call
402
+ def get_workspace_with_http_info(
403
+ self,
404
+ workspace: StrictStr,
405
+ _request_timeout: Union[
406
+ None,
407
+ Annotated[StrictFloat, Field(gt=0)],
408
+ Tuple[
409
+ Annotated[StrictFloat, Field(gt=0)],
410
+ Annotated[StrictFloat, Field(gt=0)]
411
+ ]
412
+ ] = None,
413
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
414
+ _content_type: Optional[StrictStr] = None,
415
+ _headers: Optional[Dict[StrictStr, Any]] = None,
416
+ _host_index: Annotated[StrictInt, Field(ge=0, le=1)] = 0,
417
+ ) -> ApiResponse[Workspace]:
418
+ """Get a workspace
419
+
420
+ Any workspace member can access this endpoint.
421
+
422
+ :param workspace: (required)
423
+ :type workspace: str
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._get_workspace_serialize(
447
+ workspace=workspace,
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
+ '200': "Workspace",
456
+ '400': "ErrorGeneric",
457
+ '401': "ErrorGeneric",
458
+ '403': "ErrorGeneric",
459
+ '500': "ErrorGeneric",
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 get_workspace_without_preload_content(
474
+ self,
475
+ workspace: StrictStr,
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=1)] = 0,
488
+ ) -> RESTResponseType:
489
+ """Get a workspace
490
+
491
+ Any workspace member can access this endpoint.
492
+
493
+ :param workspace: (required)
494
+ :type workspace: str
495
+ :param _request_timeout: timeout setting for this request. If one
496
+ number provided, it will be total request
497
+ timeout. It can also be a pair (tuple) of
498
+ (connection, read) timeouts.
499
+ :type _request_timeout: int, tuple(int, int), optional
500
+ :param _request_auth: set to override the auth_settings for an a single
501
+ request; this effectively ignores the
502
+ authentication in the spec for a single request.
503
+ :type _request_auth: dict, optional
504
+ :param _content_type: force content-type for the request.
505
+ :type _content_type: str, Optional
506
+ :param _headers: set to override the headers for a single
507
+ request; this effectively ignores the headers
508
+ in the spec for a single request.
509
+ :type _headers: dict, optional
510
+ :param _host_index: set to override the host_index for a single
511
+ request; this effectively ignores the host_index
512
+ in the spec for a single request.
513
+ :type _host_index: int, optional
514
+ :return: Returns the result object.
515
+ """ # noqa: E501
516
+
517
+ _param = self._get_workspace_serialize(
518
+ workspace=workspace,
519
+ _request_auth=_request_auth,
520
+ _content_type=_content_type,
521
+ _headers=_headers,
522
+ _host_index=_host_index
523
+ )
524
+
525
+ _response_types_map: Dict[str, Optional[str]] = {
526
+ '200': "Workspace",
527
+ '400': "ErrorGeneric",
528
+ '401': "ErrorGeneric",
529
+ '403': "ErrorGeneric",
530
+ '500': "ErrorGeneric",
531
+ }
532
+ response_data = self.api_client.call_api(
533
+ *_param,
534
+ _request_timeout=_request_timeout
535
+ )
536
+ return response_data.response
537
+
538
+
539
+ def _get_workspace_serialize(
540
+ self,
541
+ workspace,
542
+ _request_auth,
543
+ _content_type,
544
+ _headers,
545
+ _host_index,
546
+ ) -> RequestSerialized:
547
+
548
+ _hosts = [
549
+ 'https://api.console.ory.sh'
550
+ ]
551
+ _host = _hosts[_host_index]
552
+
553
+ _collection_formats: Dict[str, str] = {
554
+ }
555
+
556
+ _path_params: Dict[str, str] = {}
557
+ _query_params: List[Tuple[str, str]] = []
558
+ _header_params: Dict[str, Optional[str]] = _headers or {}
559
+ _form_params: List[Tuple[str, str]] = []
560
+ _files: Dict[str, str] = {}
561
+ _body_params: Optional[bytes] = None
562
+
563
+ # process the path parameters
564
+ if workspace is not None:
565
+ _path_params['workspace'] = workspace
566
+ # process the query parameters
567
+ # process the header parameters
568
+ # process the form parameters
569
+ # process the body parameter
570
+
571
+
572
+ # set the HTTP header `Accept`
573
+ _header_params['Accept'] = self.api_client.select_header_accept(
574
+ [
575
+ 'application/json'
576
+ ]
577
+ )
578
+
579
+
580
+ # authentication setting
581
+ _auth_settings: List[str] = [
582
+ 'oryNetworkCookie'
583
+ ]
584
+
585
+ return self.api_client.param_serialize(
586
+ method='GET',
587
+ resource_path='/workspaces/{workspace}',
588
+ path_params=_path_params,
589
+ query_params=_query_params,
590
+ header_params=_header_params,
591
+ body=_body_params,
592
+ post_params=_form_params,
593
+ files=_files,
594
+ auth_settings=_auth_settings,
595
+ collection_formats=_collection_formats,
596
+ _host=_host,
597
+ _request_auth=_request_auth
598
+ )
599
+
600
+
601
+
602
+
603
+ @validate_call
604
+ def list_workspace_projects(
605
+ self,
606
+ workspace: StrictStr,
607
+ _request_timeout: Union[
608
+ None,
609
+ Annotated[StrictFloat, Field(gt=0)],
610
+ Tuple[
611
+ Annotated[StrictFloat, Field(gt=0)],
612
+ Annotated[StrictFloat, Field(gt=0)]
613
+ ]
614
+ ] = None,
615
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
616
+ _content_type: Optional[StrictStr] = None,
617
+ _headers: Optional[Dict[StrictStr, Any]] = None,
618
+ _host_index: Annotated[StrictInt, Field(ge=0, le=1)] = 0,
619
+ ) -> ListWorkspaceProjects:
620
+ """List all projects of a workspace
621
+
622
+ Any workspace member can access this endpoint.
623
+
624
+ :param workspace: (required)
625
+ :type workspace: str
626
+ :param _request_timeout: timeout setting for this request. If one
627
+ number provided, it will be total request
628
+ timeout. It can also be a pair (tuple) of
629
+ (connection, read) timeouts.
630
+ :type _request_timeout: int, tuple(int, int), optional
631
+ :param _request_auth: set to override the auth_settings for an a single
632
+ request; this effectively ignores the
633
+ authentication in the spec for a single request.
634
+ :type _request_auth: dict, optional
635
+ :param _content_type: force content-type for the request.
636
+ :type _content_type: str, Optional
637
+ :param _headers: set to override the headers for a single
638
+ request; this effectively ignores the headers
639
+ in the spec for a single request.
640
+ :type _headers: dict, optional
641
+ :param _host_index: set to override the host_index for a single
642
+ request; this effectively ignores the host_index
643
+ in the spec for a single request.
644
+ :type _host_index: int, optional
645
+ :return: Returns the result object.
646
+ """ # noqa: E501
647
+
648
+ _param = self._list_workspace_projects_serialize(
649
+ workspace=workspace,
650
+ _request_auth=_request_auth,
651
+ _content_type=_content_type,
652
+ _headers=_headers,
653
+ _host_index=_host_index
654
+ )
655
+
656
+ _response_types_map: Dict[str, Optional[str]] = {
657
+ '200': "ListWorkspaceProjects",
658
+ '400': "ErrorGeneric",
659
+ '401': "ErrorGeneric",
660
+ '403': "ErrorGeneric",
661
+ '500': "ErrorGeneric",
662
+ }
663
+ response_data = self.api_client.call_api(
664
+ *_param,
665
+ _request_timeout=_request_timeout
666
+ )
667
+ response_data.read()
668
+ return self.api_client.response_deserialize(
669
+ response_data=response_data,
670
+ response_types_map=_response_types_map,
671
+ ).data
672
+
673
+
674
+ @validate_call
675
+ def list_workspace_projects_with_http_info(
676
+ self,
677
+ workspace: StrictStr,
678
+ _request_timeout: Union[
679
+ None,
680
+ Annotated[StrictFloat, Field(gt=0)],
681
+ Tuple[
682
+ Annotated[StrictFloat, Field(gt=0)],
683
+ Annotated[StrictFloat, Field(gt=0)]
684
+ ]
685
+ ] = None,
686
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
687
+ _content_type: Optional[StrictStr] = None,
688
+ _headers: Optional[Dict[StrictStr, Any]] = None,
689
+ _host_index: Annotated[StrictInt, Field(ge=0, le=1)] = 0,
690
+ ) -> ApiResponse[ListWorkspaceProjects]:
691
+ """List all projects of a workspace
692
+
693
+ Any workspace member can access this endpoint.
694
+
695
+ :param workspace: (required)
696
+ :type workspace: str
697
+ :param _request_timeout: timeout setting for this request. If one
698
+ number provided, it will be total request
699
+ timeout. It can also be a pair (tuple) of
700
+ (connection, read) timeouts.
701
+ :type _request_timeout: int, tuple(int, int), optional
702
+ :param _request_auth: set to override the auth_settings for an a single
703
+ request; this effectively ignores the
704
+ authentication in the spec for a single request.
705
+ :type _request_auth: dict, optional
706
+ :param _content_type: force content-type for the request.
707
+ :type _content_type: str, Optional
708
+ :param _headers: set to override the headers for a single
709
+ request; this effectively ignores the headers
710
+ in the spec for a single request.
711
+ :type _headers: dict, optional
712
+ :param _host_index: set to override the host_index for a single
713
+ request; this effectively ignores the host_index
714
+ in the spec for a single request.
715
+ :type _host_index: int, optional
716
+ :return: Returns the result object.
717
+ """ # noqa: E501
718
+
719
+ _param = self._list_workspace_projects_serialize(
720
+ workspace=workspace,
721
+ _request_auth=_request_auth,
722
+ _content_type=_content_type,
723
+ _headers=_headers,
724
+ _host_index=_host_index
725
+ )
726
+
727
+ _response_types_map: Dict[str, Optional[str]] = {
728
+ '200': "ListWorkspaceProjects",
729
+ '400': "ErrorGeneric",
730
+ '401': "ErrorGeneric",
731
+ '403': "ErrorGeneric",
732
+ '500': "ErrorGeneric",
733
+ }
734
+ response_data = self.api_client.call_api(
735
+ *_param,
736
+ _request_timeout=_request_timeout
737
+ )
738
+ response_data.read()
739
+ return self.api_client.response_deserialize(
740
+ response_data=response_data,
741
+ response_types_map=_response_types_map,
742
+ )
743
+
744
+
745
+ @validate_call
746
+ def list_workspace_projects_without_preload_content(
747
+ self,
748
+ workspace: StrictStr,
749
+ _request_timeout: Union[
750
+ None,
751
+ Annotated[StrictFloat, Field(gt=0)],
752
+ Tuple[
753
+ Annotated[StrictFloat, Field(gt=0)],
754
+ Annotated[StrictFloat, Field(gt=0)]
755
+ ]
756
+ ] = None,
757
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
758
+ _content_type: Optional[StrictStr] = None,
759
+ _headers: Optional[Dict[StrictStr, Any]] = None,
760
+ _host_index: Annotated[StrictInt, Field(ge=0, le=1)] = 0,
761
+ ) -> RESTResponseType:
762
+ """List all projects of a workspace
763
+
764
+ Any workspace member can access this endpoint.
765
+
766
+ :param workspace: (required)
767
+ :type workspace: str
768
+ :param _request_timeout: timeout setting for this request. If one
769
+ number provided, it will be total request
770
+ timeout. It can also be a pair (tuple) of
771
+ (connection, read) timeouts.
772
+ :type _request_timeout: int, tuple(int, int), optional
773
+ :param _request_auth: set to override the auth_settings for an a single
774
+ request; this effectively ignores the
775
+ authentication in the spec for a single request.
776
+ :type _request_auth: dict, optional
777
+ :param _content_type: force content-type for the request.
778
+ :type _content_type: str, Optional
779
+ :param _headers: set to override the headers for a single
780
+ request; this effectively ignores the headers
781
+ in the spec for a single request.
782
+ :type _headers: dict, optional
783
+ :param _host_index: set to override the host_index for a single
784
+ request; this effectively ignores the host_index
785
+ in the spec for a single request.
786
+ :type _host_index: int, optional
787
+ :return: Returns the result object.
788
+ """ # noqa: E501
789
+
790
+ _param = self._list_workspace_projects_serialize(
791
+ workspace=workspace,
792
+ _request_auth=_request_auth,
793
+ _content_type=_content_type,
794
+ _headers=_headers,
795
+ _host_index=_host_index
796
+ )
797
+
798
+ _response_types_map: Dict[str, Optional[str]] = {
799
+ '200': "ListWorkspaceProjects",
800
+ '400': "ErrorGeneric",
801
+ '401': "ErrorGeneric",
802
+ '403': "ErrorGeneric",
803
+ '500': "ErrorGeneric",
804
+ }
805
+ response_data = self.api_client.call_api(
806
+ *_param,
807
+ _request_timeout=_request_timeout
808
+ )
809
+ return response_data.response
810
+
811
+
812
+ def _list_workspace_projects_serialize(
813
+ self,
814
+ workspace,
815
+ _request_auth,
816
+ _content_type,
817
+ _headers,
818
+ _host_index,
819
+ ) -> RequestSerialized:
820
+
821
+ _hosts = [
822
+ 'https://api.console.ory.sh'
823
+ ]
824
+ _host = _hosts[_host_index]
825
+
826
+ _collection_formats: Dict[str, str] = {
827
+ }
828
+
829
+ _path_params: Dict[str, str] = {}
830
+ _query_params: List[Tuple[str, str]] = []
831
+ _header_params: Dict[str, Optional[str]] = _headers or {}
832
+ _form_params: List[Tuple[str, str]] = []
833
+ _files: Dict[str, str] = {}
834
+ _body_params: Optional[bytes] = None
835
+
836
+ # process the path parameters
837
+ if workspace is not None:
838
+ _path_params['workspace'] = workspace
839
+ # process the query parameters
840
+ # process the header parameters
841
+ # process the form parameters
842
+ # process the body parameter
843
+
844
+
845
+ # set the HTTP header `Accept`
846
+ _header_params['Accept'] = self.api_client.select_header_accept(
847
+ [
848
+ 'application/json'
849
+ ]
850
+ )
851
+
852
+
853
+ # authentication setting
854
+ _auth_settings: List[str] = [
855
+ 'oryNetworkCookie'
856
+ ]
857
+
858
+ return self.api_client.param_serialize(
859
+ method='GET',
860
+ resource_path='/workspaces/{workspace}/projects',
861
+ path_params=_path_params,
862
+ query_params=_query_params,
863
+ header_params=_header_params,
864
+ body=_body_params,
865
+ post_params=_form_params,
866
+ files=_files,
867
+ auth_settings=_auth_settings,
868
+ collection_formats=_collection_formats,
869
+ _host=_host,
870
+ _request_auth=_request_auth
871
+ )
872
+
873
+
874
+
875
+
876
+ @validate_call
877
+ def list_workspaces(
878
+ self,
879
+ page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Items per Page This is the number of items per page to return. For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination).")] = None,
880
+ page_token: Annotated[Optional[StrictStr], Field(description="Next Page Token The next page token. For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination).")] = None,
881
+ _request_timeout: Union[
882
+ None,
883
+ Annotated[StrictFloat, Field(gt=0)],
884
+ Tuple[
885
+ Annotated[StrictFloat, Field(gt=0)],
886
+ Annotated[StrictFloat, Field(gt=0)]
887
+ ]
888
+ ] = None,
889
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
890
+ _content_type: Optional[StrictStr] = None,
891
+ _headers: Optional[Dict[StrictStr, Any]] = None,
892
+ _host_index: Annotated[StrictInt, Field(ge=0, le=1)] = 0,
893
+ ) -> ListWorkspaces:
894
+ """List workspaces the user is a member of
895
+
896
+
897
+ :param page_size: Items per Page This is the number of items per page to return. For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination).
898
+ :type page_size: int
899
+ :param page_token: Next Page Token The next page token. For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination).
900
+ :type page_token: str
901
+ :param _request_timeout: timeout setting for this request. If one
902
+ number provided, it will be total request
903
+ timeout. It can also be a pair (tuple) of
904
+ (connection, read) timeouts.
905
+ :type _request_timeout: int, tuple(int, int), optional
906
+ :param _request_auth: set to override the auth_settings for an a single
907
+ request; this effectively ignores the
908
+ authentication in the spec for a single request.
909
+ :type _request_auth: dict, optional
910
+ :param _content_type: force content-type for the request.
911
+ :type _content_type: str, Optional
912
+ :param _headers: set to override the headers for a single
913
+ request; this effectively ignores the headers
914
+ in the spec for a single request.
915
+ :type _headers: dict, optional
916
+ :param _host_index: set to override the host_index for a single
917
+ request; this effectively ignores the host_index
918
+ in the spec for a single request.
919
+ :type _host_index: int, optional
920
+ :return: Returns the result object.
921
+ """ # noqa: E501
922
+
923
+ _param = self._list_workspaces_serialize(
924
+ page_size=page_size,
925
+ page_token=page_token,
926
+ _request_auth=_request_auth,
927
+ _content_type=_content_type,
928
+ _headers=_headers,
929
+ _host_index=_host_index
930
+ )
931
+
932
+ _response_types_map: Dict[str, Optional[str]] = {
933
+ '200': "ListWorkspaces",
934
+ '400': "ErrorGeneric",
935
+ '401': "ErrorGeneric",
936
+ '403': "ErrorGeneric",
937
+ '500': "ErrorGeneric",
938
+ }
939
+ response_data = self.api_client.call_api(
940
+ *_param,
941
+ _request_timeout=_request_timeout
942
+ )
943
+ response_data.read()
944
+ return self.api_client.response_deserialize(
945
+ response_data=response_data,
946
+ response_types_map=_response_types_map,
947
+ ).data
948
+
949
+
950
+ @validate_call
951
+ def list_workspaces_with_http_info(
952
+ self,
953
+ page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Items per Page This is the number of items per page to return. For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination).")] = None,
954
+ page_token: Annotated[Optional[StrictStr], Field(description="Next Page Token The next page token. For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination).")] = None,
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=1)] = 0,
967
+ ) -> ApiResponse[ListWorkspaces]:
968
+ """List workspaces the user is a member of
969
+
970
+
971
+ :param page_size: Items per Page This is the number of items per page to return. For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination).
972
+ :type page_size: int
973
+ :param page_token: Next Page Token The next page token. For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination).
974
+ :type page_token: str
975
+ :param _request_timeout: timeout setting for this request. If one
976
+ number provided, it will be total request
977
+ timeout. It can also be a pair (tuple) of
978
+ (connection, read) timeouts.
979
+ :type _request_timeout: int, tuple(int, int), optional
980
+ :param _request_auth: set to override the auth_settings for an a single
981
+ request; this effectively ignores the
982
+ authentication in the spec for a single request.
983
+ :type _request_auth: dict, optional
984
+ :param _content_type: force content-type for the request.
985
+ :type _content_type: str, Optional
986
+ :param _headers: set to override the headers for a single
987
+ request; this effectively ignores the headers
988
+ in the spec for a single request.
989
+ :type _headers: dict, optional
990
+ :param _host_index: set to override the host_index for a single
991
+ request; this effectively ignores the host_index
992
+ in the spec for a single request.
993
+ :type _host_index: int, optional
994
+ :return: Returns the result object.
995
+ """ # noqa: E501
996
+
997
+ _param = self._list_workspaces_serialize(
998
+ page_size=page_size,
999
+ page_token=page_token,
1000
+ _request_auth=_request_auth,
1001
+ _content_type=_content_type,
1002
+ _headers=_headers,
1003
+ _host_index=_host_index
1004
+ )
1005
+
1006
+ _response_types_map: Dict[str, Optional[str]] = {
1007
+ '200': "ListWorkspaces",
1008
+ '400': "ErrorGeneric",
1009
+ '401': "ErrorGeneric",
1010
+ '403': "ErrorGeneric",
1011
+ '500': "ErrorGeneric",
1012
+ }
1013
+ response_data = self.api_client.call_api(
1014
+ *_param,
1015
+ _request_timeout=_request_timeout
1016
+ )
1017
+ response_data.read()
1018
+ return self.api_client.response_deserialize(
1019
+ response_data=response_data,
1020
+ response_types_map=_response_types_map,
1021
+ )
1022
+
1023
+
1024
+ @validate_call
1025
+ def list_workspaces_without_preload_content(
1026
+ self,
1027
+ page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Items per Page This is the number of items per page to return. For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination).")] = None,
1028
+ page_token: Annotated[Optional[StrictStr], Field(description="Next Page Token The next page token. For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination).")] = None,
1029
+ _request_timeout: Union[
1030
+ None,
1031
+ Annotated[StrictFloat, Field(gt=0)],
1032
+ Tuple[
1033
+ Annotated[StrictFloat, Field(gt=0)],
1034
+ Annotated[StrictFloat, Field(gt=0)]
1035
+ ]
1036
+ ] = None,
1037
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1038
+ _content_type: Optional[StrictStr] = None,
1039
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1040
+ _host_index: Annotated[StrictInt, Field(ge=0, le=1)] = 0,
1041
+ ) -> RESTResponseType:
1042
+ """List workspaces the user is a member of
1043
+
1044
+
1045
+ :param page_size: Items per Page This is the number of items per page to return. For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination).
1046
+ :type page_size: int
1047
+ :param page_token: Next Page Token The next page token. For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination).
1048
+ :type page_token: str
1049
+ :param _request_timeout: timeout setting for this request. If one
1050
+ number provided, it will be total request
1051
+ timeout. It can also be a pair (tuple) of
1052
+ (connection, read) timeouts.
1053
+ :type _request_timeout: int, tuple(int, int), optional
1054
+ :param _request_auth: set to override the auth_settings for an a single
1055
+ request; this effectively ignores the
1056
+ authentication in the spec for a single request.
1057
+ :type _request_auth: dict, optional
1058
+ :param _content_type: force content-type for the request.
1059
+ :type _content_type: str, Optional
1060
+ :param _headers: set to override the headers for a single
1061
+ request; this effectively ignores the headers
1062
+ in the spec for a single request.
1063
+ :type _headers: dict, optional
1064
+ :param _host_index: set to override the host_index for a single
1065
+ request; this effectively ignores the host_index
1066
+ in the spec for a single request.
1067
+ :type _host_index: int, optional
1068
+ :return: Returns the result object.
1069
+ """ # noqa: E501
1070
+
1071
+ _param = self._list_workspaces_serialize(
1072
+ page_size=page_size,
1073
+ page_token=page_token,
1074
+ _request_auth=_request_auth,
1075
+ _content_type=_content_type,
1076
+ _headers=_headers,
1077
+ _host_index=_host_index
1078
+ )
1079
+
1080
+ _response_types_map: Dict[str, Optional[str]] = {
1081
+ '200': "ListWorkspaces",
1082
+ '400': "ErrorGeneric",
1083
+ '401': "ErrorGeneric",
1084
+ '403': "ErrorGeneric",
1085
+ '500': "ErrorGeneric",
1086
+ }
1087
+ response_data = self.api_client.call_api(
1088
+ *_param,
1089
+ _request_timeout=_request_timeout
1090
+ )
1091
+ return response_data.response
1092
+
1093
+
1094
+ def _list_workspaces_serialize(
1095
+ self,
1096
+ page_size,
1097
+ page_token,
1098
+ _request_auth,
1099
+ _content_type,
1100
+ _headers,
1101
+ _host_index,
1102
+ ) -> RequestSerialized:
1103
+
1104
+ _hosts = [
1105
+ 'https://api.console.ory.sh'
1106
+ ]
1107
+ _host = _hosts[_host_index]
1108
+
1109
+ _collection_formats: Dict[str, str] = {
1110
+ }
1111
+
1112
+ _path_params: Dict[str, str] = {}
1113
+ _query_params: List[Tuple[str, str]] = []
1114
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1115
+ _form_params: List[Tuple[str, str]] = []
1116
+ _files: Dict[str, str] = {}
1117
+ _body_params: Optional[bytes] = None
1118
+
1119
+ # process the path parameters
1120
+ # process the query parameters
1121
+ if page_size is not None:
1122
+
1123
+ _query_params.append(('page_size', page_size))
1124
+
1125
+ if page_token is not None:
1126
+
1127
+ _query_params.append(('page_token', page_token))
1128
+
1129
+ # process the header parameters
1130
+ # process the form parameters
1131
+ # process the body parameter
1132
+
1133
+
1134
+ # set the HTTP header `Accept`
1135
+ _header_params['Accept'] = self.api_client.select_header_accept(
1136
+ [
1137
+ 'application/json'
1138
+ ]
1139
+ )
1140
+
1141
+
1142
+ # authentication setting
1143
+ _auth_settings: List[str] = [
1144
+ 'oryNetworkCookie'
1145
+ ]
1146
+
1147
+ return self.api_client.param_serialize(
1148
+ method='GET',
1149
+ resource_path='/workspaces',
1150
+ path_params=_path_params,
1151
+ query_params=_query_params,
1152
+ header_params=_header_params,
1153
+ body=_body_params,
1154
+ post_params=_form_params,
1155
+ files=_files,
1156
+ auth_settings=_auth_settings,
1157
+ collection_formats=_collection_formats,
1158
+ _host=_host,
1159
+ _request_auth=_request_auth
1160
+ )
1161
+
1162
+
1163
+
1164
+
1165
+ @validate_call
1166
+ def update_workspace(
1167
+ self,
1168
+ workspace: StrictStr,
1169
+ update_workspace_body: Optional[UpdateWorkspaceBody] = None,
1170
+ _request_timeout: Union[
1171
+ None,
1172
+ Annotated[StrictFloat, Field(gt=0)],
1173
+ Tuple[
1174
+ Annotated[StrictFloat, Field(gt=0)],
1175
+ Annotated[StrictFloat, Field(gt=0)]
1176
+ ]
1177
+ ] = None,
1178
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1179
+ _content_type: Optional[StrictStr] = None,
1180
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1181
+ _host_index: Annotated[StrictInt, Field(ge=0, le=1)] = 0,
1182
+ ) -> Workspace:
1183
+ """Update an workspace
1184
+
1185
+ Workspace members with the role `OWNER` can access this endpoint.
1186
+
1187
+ :param workspace: (required)
1188
+ :type workspace: str
1189
+ :param update_workspace_body:
1190
+ :type update_workspace_body: UpdateWorkspaceBody
1191
+ :param _request_timeout: timeout setting for this request. If one
1192
+ number provided, it will be total request
1193
+ timeout. It can also be a pair (tuple) of
1194
+ (connection, read) timeouts.
1195
+ :type _request_timeout: int, tuple(int, int), optional
1196
+ :param _request_auth: set to override the auth_settings for an a single
1197
+ request; this effectively ignores the
1198
+ authentication in the spec for a single request.
1199
+ :type _request_auth: dict, optional
1200
+ :param _content_type: force content-type for the request.
1201
+ :type _content_type: str, Optional
1202
+ :param _headers: set to override the headers for a single
1203
+ request; this effectively ignores the headers
1204
+ in the spec for a single request.
1205
+ :type _headers: dict, optional
1206
+ :param _host_index: set to override the host_index for a single
1207
+ request; this effectively ignores the host_index
1208
+ in the spec for a single request.
1209
+ :type _host_index: int, optional
1210
+ :return: Returns the result object.
1211
+ """ # noqa: E501
1212
+
1213
+ _param = self._update_workspace_serialize(
1214
+ workspace=workspace,
1215
+ update_workspace_body=update_workspace_body,
1216
+ _request_auth=_request_auth,
1217
+ _content_type=_content_type,
1218
+ _headers=_headers,
1219
+ _host_index=_host_index
1220
+ )
1221
+
1222
+ _response_types_map: Dict[str, Optional[str]] = {
1223
+ '200': "Workspace",
1224
+ '400': "ErrorGeneric",
1225
+ '401': "ErrorGeneric",
1226
+ '403': "ErrorGeneric",
1227
+ '500': "ErrorGeneric",
1228
+ }
1229
+ response_data = self.api_client.call_api(
1230
+ *_param,
1231
+ _request_timeout=_request_timeout
1232
+ )
1233
+ response_data.read()
1234
+ return self.api_client.response_deserialize(
1235
+ response_data=response_data,
1236
+ response_types_map=_response_types_map,
1237
+ ).data
1238
+
1239
+
1240
+ @validate_call
1241
+ def update_workspace_with_http_info(
1242
+ self,
1243
+ workspace: StrictStr,
1244
+ update_workspace_body: Optional[UpdateWorkspaceBody] = None,
1245
+ _request_timeout: Union[
1246
+ None,
1247
+ Annotated[StrictFloat, Field(gt=0)],
1248
+ Tuple[
1249
+ Annotated[StrictFloat, Field(gt=0)],
1250
+ Annotated[StrictFloat, Field(gt=0)]
1251
+ ]
1252
+ ] = None,
1253
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1254
+ _content_type: Optional[StrictStr] = None,
1255
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1256
+ _host_index: Annotated[StrictInt, Field(ge=0, le=1)] = 0,
1257
+ ) -> ApiResponse[Workspace]:
1258
+ """Update an workspace
1259
+
1260
+ Workspace members with the role `OWNER` can access this endpoint.
1261
+
1262
+ :param workspace: (required)
1263
+ :type workspace: str
1264
+ :param update_workspace_body:
1265
+ :type update_workspace_body: UpdateWorkspaceBody
1266
+ :param _request_timeout: timeout setting for this request. If one
1267
+ number provided, it will be total request
1268
+ timeout. It can also be a pair (tuple) of
1269
+ (connection, read) timeouts.
1270
+ :type _request_timeout: int, tuple(int, int), optional
1271
+ :param _request_auth: set to override the auth_settings for an a single
1272
+ request; this effectively ignores the
1273
+ authentication in the spec for a single request.
1274
+ :type _request_auth: dict, optional
1275
+ :param _content_type: force content-type for the request.
1276
+ :type _content_type: str, Optional
1277
+ :param _headers: set to override the headers for a single
1278
+ request; this effectively ignores the headers
1279
+ in the spec for a single request.
1280
+ :type _headers: dict, optional
1281
+ :param _host_index: set to override the host_index for a single
1282
+ request; this effectively ignores the host_index
1283
+ in the spec for a single request.
1284
+ :type _host_index: int, optional
1285
+ :return: Returns the result object.
1286
+ """ # noqa: E501
1287
+
1288
+ _param = self._update_workspace_serialize(
1289
+ workspace=workspace,
1290
+ update_workspace_body=update_workspace_body,
1291
+ _request_auth=_request_auth,
1292
+ _content_type=_content_type,
1293
+ _headers=_headers,
1294
+ _host_index=_host_index
1295
+ )
1296
+
1297
+ _response_types_map: Dict[str, Optional[str]] = {
1298
+ '200': "Workspace",
1299
+ '400': "ErrorGeneric",
1300
+ '401': "ErrorGeneric",
1301
+ '403': "ErrorGeneric",
1302
+ '500': "ErrorGeneric",
1303
+ }
1304
+ response_data = self.api_client.call_api(
1305
+ *_param,
1306
+ _request_timeout=_request_timeout
1307
+ )
1308
+ response_data.read()
1309
+ return self.api_client.response_deserialize(
1310
+ response_data=response_data,
1311
+ response_types_map=_response_types_map,
1312
+ )
1313
+
1314
+
1315
+ @validate_call
1316
+ def update_workspace_without_preload_content(
1317
+ self,
1318
+ workspace: StrictStr,
1319
+ update_workspace_body: Optional[UpdateWorkspaceBody] = None,
1320
+ _request_timeout: Union[
1321
+ None,
1322
+ Annotated[StrictFloat, Field(gt=0)],
1323
+ Tuple[
1324
+ Annotated[StrictFloat, Field(gt=0)],
1325
+ Annotated[StrictFloat, Field(gt=0)]
1326
+ ]
1327
+ ] = None,
1328
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1329
+ _content_type: Optional[StrictStr] = None,
1330
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1331
+ _host_index: Annotated[StrictInt, Field(ge=0, le=1)] = 0,
1332
+ ) -> RESTResponseType:
1333
+ """Update an workspace
1334
+
1335
+ Workspace members with the role `OWNER` can access this endpoint.
1336
+
1337
+ :param workspace: (required)
1338
+ :type workspace: str
1339
+ :param update_workspace_body:
1340
+ :type update_workspace_body: UpdateWorkspaceBody
1341
+ :param _request_timeout: timeout setting for this request. If one
1342
+ number provided, it will be total request
1343
+ timeout. It can also be a pair (tuple) of
1344
+ (connection, read) timeouts.
1345
+ :type _request_timeout: int, tuple(int, int), optional
1346
+ :param _request_auth: set to override the auth_settings for an a single
1347
+ request; this effectively ignores the
1348
+ authentication in the spec for a single request.
1349
+ :type _request_auth: dict, optional
1350
+ :param _content_type: force content-type for the request.
1351
+ :type _content_type: str, Optional
1352
+ :param _headers: set to override the headers for a single
1353
+ request; this effectively ignores the headers
1354
+ in the spec for a single request.
1355
+ :type _headers: dict, optional
1356
+ :param _host_index: set to override the host_index for a single
1357
+ request; this effectively ignores the host_index
1358
+ in the spec for a single request.
1359
+ :type _host_index: int, optional
1360
+ :return: Returns the result object.
1361
+ """ # noqa: E501
1362
+
1363
+ _param = self._update_workspace_serialize(
1364
+ workspace=workspace,
1365
+ update_workspace_body=update_workspace_body,
1366
+ _request_auth=_request_auth,
1367
+ _content_type=_content_type,
1368
+ _headers=_headers,
1369
+ _host_index=_host_index
1370
+ )
1371
+
1372
+ _response_types_map: Dict[str, Optional[str]] = {
1373
+ '200': "Workspace",
1374
+ '400': "ErrorGeneric",
1375
+ '401': "ErrorGeneric",
1376
+ '403': "ErrorGeneric",
1377
+ '500': "ErrorGeneric",
1378
+ }
1379
+ response_data = self.api_client.call_api(
1380
+ *_param,
1381
+ _request_timeout=_request_timeout
1382
+ )
1383
+ return response_data.response
1384
+
1385
+
1386
+ def _update_workspace_serialize(
1387
+ self,
1388
+ workspace,
1389
+ update_workspace_body,
1390
+ _request_auth,
1391
+ _content_type,
1392
+ _headers,
1393
+ _host_index,
1394
+ ) -> RequestSerialized:
1395
+
1396
+ _hosts = [
1397
+ 'https://api.console.ory.sh'
1398
+ ]
1399
+ _host = _hosts[_host_index]
1400
+
1401
+ _collection_formats: Dict[str, str] = {
1402
+ }
1403
+
1404
+ _path_params: Dict[str, str] = {}
1405
+ _query_params: List[Tuple[str, str]] = []
1406
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1407
+ _form_params: List[Tuple[str, str]] = []
1408
+ _files: Dict[str, str] = {}
1409
+ _body_params: Optional[bytes] = None
1410
+
1411
+ # process the path parameters
1412
+ if workspace is not None:
1413
+ _path_params['workspace'] = workspace
1414
+ # process the query parameters
1415
+ # process the header parameters
1416
+ # process the form parameters
1417
+ # process the body parameter
1418
+ if update_workspace_body is not None:
1419
+ _body_params = update_workspace_body
1420
+
1421
+
1422
+ # set the HTTP header `Accept`
1423
+ _header_params['Accept'] = self.api_client.select_header_accept(
1424
+ [
1425
+ 'application/json'
1426
+ ]
1427
+ )
1428
+
1429
+ # set the HTTP header `Content-Type`
1430
+ if _content_type:
1431
+ _header_params['Content-Type'] = _content_type
1432
+ else:
1433
+ _default_content_type = (
1434
+ self.api_client.select_header_content_type(
1435
+ [
1436
+ 'application/json'
1437
+ ]
1438
+ )
1439
+ )
1440
+ if _default_content_type is not None:
1441
+ _header_params['Content-Type'] = _default_content_type
1442
+
1443
+ # authentication setting
1444
+ _auth_settings: List[str] = [
1445
+ 'oryNetworkCookie'
1446
+ ]
1447
+
1448
+ return self.api_client.param_serialize(
1449
+ method='PUT',
1450
+ resource_path='/workspaces/{workspace}',
1451
+ path_params=_path_params,
1452
+ query_params=_query_params,
1453
+ header_params=_header_params,
1454
+ body=_body_params,
1455
+ post_params=_form_params,
1456
+ files=_files,
1457
+ auth_settings=_auth_settings,
1458
+ collection_formats=_collection_formats,
1459
+ _host=_host,
1460
+ _request_auth=_request_auth
1461
+ )
1462
+
1463
+