cosmotech-api 3.2.0__2-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.

Potentially problematic release.


This version of cosmotech-api might be problematic. Click here for more details.

Files changed (255) hide show
  1. cosmotech_api/__init__.py +153 -0
  2. cosmotech_api/api/__init__.py +14 -0
  3. cosmotech_api/api/connector_api.py +1351 -0
  4. cosmotech_api/api/dataset_api.py +9148 -0
  5. cosmotech_api/api/organization_api.py +4692 -0
  6. cosmotech_api/api/run_api.py +2227 -0
  7. cosmotech_api/api/runner_api.py +4551 -0
  8. cosmotech_api/api/scenario_api.py +6688 -0
  9. cosmotech_api/api/scenariorun_api.py +4092 -0
  10. cosmotech_api/api/scenariorunresult_api.py +704 -0
  11. cosmotech_api/api/solution_api.py +6472 -0
  12. cosmotech_api/api/twingraph_api.py +4201 -0
  13. cosmotech_api/api/user_api.py +1291 -0
  14. cosmotech_api/api/validator_api.py +2566 -0
  15. cosmotech_api/api/workspace_api.py +6123 -0
  16. cosmotech_api/api_client.py +759 -0
  17. cosmotech_api/api_response.py +21 -0
  18. cosmotech_api/apis/__init__.py +28 -0
  19. cosmotech_api/configuration.py +453 -0
  20. cosmotech_api/exceptions.py +200 -0
  21. cosmotech_api/model/__init__.py +5 -0
  22. cosmotech_api/model/component_role_permissions.py +260 -0
  23. cosmotech_api/model/connector.py +330 -0
  24. cosmotech_api/model/connector_parameter.py +284 -0
  25. cosmotech_api/model/connector_parameter_group.py +280 -0
  26. cosmotech_api/model/container_resource_size_info.py +268 -0
  27. cosmotech_api/model/container_resource_sizing.py +274 -0
  28. cosmotech_api/model/dataset.py +376 -0
  29. cosmotech_api/model/dataset_access_control.py +268 -0
  30. cosmotech_api/model/dataset_compatibility.py +270 -0
  31. cosmotech_api/model/dataset_connector.py +268 -0
  32. cosmotech_api/model/dataset_copy_parameters.py +264 -0
  33. cosmotech_api/model/dataset_role.py +262 -0
  34. cosmotech_api/model/dataset_search.py +262 -0
  35. cosmotech_api/model/dataset_security.py +274 -0
  36. cosmotech_api/model/dataset_source_type.py +287 -0
  37. cosmotech_api/model/dataset_twin_graph_hash.py +256 -0
  38. cosmotech_api/model/dataset_twin_graph_info.py +264 -0
  39. cosmotech_api/model/dataset_twin_graph_query.py +262 -0
  40. cosmotech_api/model/delete_historical_data.py +272 -0
  41. cosmotech_api/model/file_upload_metadata.py +260 -0
  42. cosmotech_api/model/file_upload_validation.py +266 -0
  43. cosmotech_api/model/graph_properties.py +272 -0
  44. cosmotech_api/model/organization.py +282 -0
  45. cosmotech_api/model/organization_access_control.py +268 -0
  46. cosmotech_api/model/organization_role.py +262 -0
  47. cosmotech_api/model/organization_security.py +274 -0
  48. cosmotech_api/model/organization_service.py +272 -0
  49. cosmotech_api/model/organization_services.py +270 -0
  50. cosmotech_api/model/organization_user.py +277 -0
  51. cosmotech_api/model/resource_size_info.py +268 -0
  52. cosmotech_api/model/run.py +351 -0
  53. cosmotech_api/model/run_container.py +318 -0
  54. cosmotech_api/model/run_container_artifact.py +260 -0
  55. cosmotech_api/model/run_container_logs.py +272 -0
  56. cosmotech_api/model/run_logs.py +268 -0
  57. cosmotech_api/model/run_resource_requested.py +260 -0
  58. cosmotech_api/model/run_search.py +296 -0
  59. cosmotech_api/model/run_start_containers.py +286 -0
  60. cosmotech_api/model/run_state.py +285 -0
  61. cosmotech_api/model/run_status.py +316 -0
  62. cosmotech_api/model/run_status_node.py +307 -0
  63. cosmotech_api/model/run_template.py +408 -0
  64. cosmotech_api/model/run_template_handler_id.py +287 -0
  65. cosmotech_api/model/run_template_orchestrator.py +283 -0
  66. cosmotech_api/model/run_template_parameter.py +296 -0
  67. cosmotech_api/model/run_template_parameter_group.py +288 -0
  68. cosmotech_api/model/run_template_parameter_value.py +273 -0
  69. cosmotech_api/model/run_template_resource_sizing.py +274 -0
  70. cosmotech_api/model/run_template_step_source.py +285 -0
  71. cosmotech_api/model/runner.py +379 -0
  72. cosmotech_api/model/runner_access_control.py +268 -0
  73. cosmotech_api/model/runner_changed_parameter_value.py +272 -0
  74. cosmotech_api/model/runner_comparison_result.py +273 -0
  75. cosmotech_api/model/runner_data_download_info.py +267 -0
  76. cosmotech_api/model/runner_data_download_job.py +257 -0
  77. cosmotech_api/model/runner_job_state.py +287 -0
  78. cosmotech_api/model/runner_last_run.py +268 -0
  79. cosmotech_api/model/runner_resource_sizing.py +274 -0
  80. cosmotech_api/model/runner_role.py +262 -0
  81. cosmotech_api/model/runner_run_template_parameter_value.py +277 -0
  82. cosmotech_api/model/runner_security.py +274 -0
  83. cosmotech_api/model/runner_validation_status.py +285 -0
  84. cosmotech_api/model/scenario.py +379 -0
  85. cosmotech_api/model/scenario_access_control.py +268 -0
  86. cosmotech_api/model/scenario_changed_parameter_value.py +272 -0
  87. cosmotech_api/model/scenario_comparison_result.py +273 -0
  88. cosmotech_api/model/scenario_data_download_info.py +267 -0
  89. cosmotech_api/model/scenario_data_download_job.py +257 -0
  90. cosmotech_api/model/scenario_job_state.py +287 -0
  91. cosmotech_api/model/scenario_last_run.py +268 -0
  92. cosmotech_api/model/scenario_resource_sizing.py +274 -0
  93. cosmotech_api/model/scenario_role.py +262 -0
  94. cosmotech_api/model/scenario_run.py +369 -0
  95. cosmotech_api/model/scenario_run_container.py +318 -0
  96. cosmotech_api/model/scenario_run_container_artifact.py +260 -0
  97. cosmotech_api/model/scenario_run_container_logs.py +272 -0
  98. cosmotech_api/model/scenario_run_logs.py +268 -0
  99. cosmotech_api/model/scenario_run_resource_requested.py +260 -0
  100. cosmotech_api/model/scenario_run_result.py +260 -0
  101. cosmotech_api/model/scenario_run_search.py +296 -0
  102. cosmotech_api/model/scenario_run_start_containers.py +286 -0
  103. cosmotech_api/model/scenario_run_state.py +287 -0
  104. cosmotech_api/model/scenario_run_status.py +308 -0
  105. cosmotech_api/model/scenario_run_status_node.py +307 -0
  106. cosmotech_api/model/scenario_run_template_parameter_value.py +277 -0
  107. cosmotech_api/model/scenario_security.py +274 -0
  108. cosmotech_api/model/scenario_user.py +277 -0
  109. cosmotech_api/model/scenario_validation_status.py +285 -0
  110. cosmotech_api/model/solution.py +335 -0
  111. cosmotech_api/model/solution_access_control.py +268 -0
  112. cosmotech_api/model/solution_role.py +262 -0
  113. cosmotech_api/model/solution_security.py +274 -0
  114. cosmotech_api/model/source_info.py +274 -0
  115. cosmotech_api/model/sub_dataset_graph_query.py +268 -0
  116. cosmotech_api/model/translated_labels.py +252 -0
  117. cosmotech_api/model/twin_graph_batch_result.py +274 -0
  118. cosmotech_api/model/twin_graph_hash.py +256 -0
  119. cosmotech_api/model/twin_graph_import.py +278 -0
  120. cosmotech_api/model/twin_graph_import_info.py +260 -0
  121. cosmotech_api/model/twin_graph_query.py +266 -0
  122. cosmotech_api/model/user.py +281 -0
  123. cosmotech_api/model/user_organization.py +275 -0
  124. cosmotech_api/model/user_workspace.py +266 -0
  125. cosmotech_api/model/validator.py +295 -0
  126. cosmotech_api/model/validator_run.py +302 -0
  127. cosmotech_api/model/workspace.py +351 -0
  128. cosmotech_api/model/workspace_access_control.py +268 -0
  129. cosmotech_api/model/workspace_file.py +256 -0
  130. cosmotech_api/model/workspace_role.py +262 -0
  131. cosmotech_api/model/workspace_secret.py +256 -0
  132. cosmotech_api/model/workspace_security.py +274 -0
  133. cosmotech_api/model/workspace_solution.py +264 -0
  134. cosmotech_api/model/workspace_user.py +278 -0
  135. cosmotech_api/model/workspace_web_app.py +270 -0
  136. cosmotech_api/model_utils.py +2038 -0
  137. cosmotech_api/models/__init__.py +127 -0
  138. cosmotech_api/models/component_role_permissions.py +90 -0
  139. cosmotech_api/models/connector.py +135 -0
  140. cosmotech_api/models/connector_parameter.py +98 -0
  141. cosmotech_api/models/connector_parameter_group.py +100 -0
  142. cosmotech_api/models/container_resource_size_info.py +90 -0
  143. cosmotech_api/models/container_resource_sizing.py +97 -0
  144. cosmotech_api/models/dataset.py +195 -0
  145. cosmotech_api/models/dataset_access_control.py +90 -0
  146. cosmotech_api/models/dataset_compatibility.py +92 -0
  147. cosmotech_api/models/dataset_connector.py +94 -0
  148. cosmotech_api/models/dataset_copy_parameters.py +92 -0
  149. cosmotech_api/models/dataset_role.py +88 -0
  150. cosmotech_api/models/dataset_search.py +88 -0
  151. cosmotech_api/models/dataset_security.py +98 -0
  152. cosmotech_api/models/dataset_source_type.py +42 -0
  153. cosmotech_api/models/dataset_twin_graph_hash.py +88 -0
  154. cosmotech_api/models/dataset_twin_graph_info.py +92 -0
  155. cosmotech_api/models/dataset_twin_graph_query.py +88 -0
  156. cosmotech_api/models/delete_historical_data.py +92 -0
  157. cosmotech_api/models/file_upload_metadata.py +90 -0
  158. cosmotech_api/models/file_upload_validation.py +105 -0
  159. cosmotech_api/models/graph_properties.py +96 -0
  160. cosmotech_api/models/organization.py +108 -0
  161. cosmotech_api/models/organization_access_control.py +90 -0
  162. cosmotech_api/models/organization_role.py +88 -0
  163. cosmotech_api/models/organization_security.py +98 -0
  164. cosmotech_api/models/organization_service.py +96 -0
  165. cosmotech_api/models/organization_services.py +99 -0
  166. cosmotech_api/models/query_result.py +88 -0
  167. cosmotech_api/models/resource_size_info.py +90 -0
  168. cosmotech_api/models/run.py +167 -0
  169. cosmotech_api/models/run_container.py +126 -0
  170. cosmotech_api/models/run_container_artifact.py +90 -0
  171. cosmotech_api/models/run_container_logs.py +102 -0
  172. cosmotech_api/models/run_data.py +92 -0
  173. cosmotech_api/models/run_data_query.py +88 -0
  174. cosmotech_api/models/run_logs.py +107 -0
  175. cosmotech_api/models/run_resource_requested.py +90 -0
  176. cosmotech_api/models/run_search.py +112 -0
  177. cosmotech_api/models/run_start_containers.py +104 -0
  178. cosmotech_api/models/run_state.py +40 -0
  179. cosmotech_api/models/run_status.py +123 -0
  180. cosmotech_api/models/run_status_node.py +116 -0
  181. cosmotech_api/models/run_template.py +164 -0
  182. cosmotech_api/models/run_template_handler_id.py +42 -0
  183. cosmotech_api/models/run_template_orchestrator.py +38 -0
  184. cosmotech_api/models/run_template_parameter.py +102 -0
  185. cosmotech_api/models/run_template_parameter_group.py +98 -0
  186. cosmotech_api/models/run_template_parameter_value.py +94 -0
  187. cosmotech_api/models/run_template_resource_sizing.py +97 -0
  188. cosmotech_api/models/run_template_step_source.py +40 -0
  189. cosmotech_api/models/runner.py +188 -0
  190. cosmotech_api/models/runner_access_control.py +90 -0
  191. cosmotech_api/models/runner_changed_parameter_value.py +102 -0
  192. cosmotech_api/models/runner_comparison_result.py +106 -0
  193. cosmotech_api/models/runner_data_download_info.py +93 -0
  194. cosmotech_api/models/runner_data_download_job.py +90 -0
  195. cosmotech_api/models/runner_job_state.py +42 -0
  196. cosmotech_api/models/runner_last_run.py +94 -0
  197. cosmotech_api/models/runner_parent_last_run.py +94 -0
  198. cosmotech_api/models/runner_resource_sizing.py +97 -0
  199. cosmotech_api/models/runner_role.py +88 -0
  200. cosmotech_api/models/runner_root_last_run.py +94 -0
  201. cosmotech_api/models/runner_run_template_parameter_value.py +96 -0
  202. cosmotech_api/models/runner_security.py +98 -0
  203. cosmotech_api/models/runner_validation_status.py +40 -0
  204. cosmotech_api/models/scenario.py +186 -0
  205. cosmotech_api/models/scenario_access_control.py +90 -0
  206. cosmotech_api/models/scenario_changed_parameter_value.py +102 -0
  207. cosmotech_api/models/scenario_comparison_result.py +106 -0
  208. cosmotech_api/models/scenario_data_download_info.py +93 -0
  209. cosmotech_api/models/scenario_data_download_job.py +90 -0
  210. cosmotech_api/models/scenario_job_state.py +42 -0
  211. cosmotech_api/models/scenario_last_run.py +94 -0
  212. cosmotech_api/models/scenario_resource_sizing.py +97 -0
  213. cosmotech_api/models/scenario_role.py +88 -0
  214. cosmotech_api/models/scenario_run.py +179 -0
  215. cosmotech_api/models/scenario_run_container.py +126 -0
  216. cosmotech_api/models/scenario_run_container_artifact.py +90 -0
  217. cosmotech_api/models/scenario_run_container_logs.py +102 -0
  218. cosmotech_api/models/scenario_run_logs.py +107 -0
  219. cosmotech_api/models/scenario_run_resource_requested.py +90 -0
  220. cosmotech_api/models/scenario_run_result.py +90 -0
  221. cosmotech_api/models/scenario_run_search.py +112 -0
  222. cosmotech_api/models/scenario_run_start_containers.py +104 -0
  223. cosmotech_api/models/scenario_run_state.py +42 -0
  224. cosmotech_api/models/scenario_run_status.py +119 -0
  225. cosmotech_api/models/scenario_run_status_node.py +116 -0
  226. cosmotech_api/models/scenario_run_template_parameter_value.py +96 -0
  227. cosmotech_api/models/scenario_security.py +98 -0
  228. cosmotech_api/models/scenario_validation_status.py +40 -0
  229. cosmotech_api/models/send_run_data_request.py +90 -0
  230. cosmotech_api/models/solution.py +154 -0
  231. cosmotech_api/models/solution_access_control.py +90 -0
  232. cosmotech_api/models/solution_role.py +88 -0
  233. cosmotech_api/models/solution_security.py +98 -0
  234. cosmotech_api/models/source_info.py +94 -0
  235. cosmotech_api/models/sub_dataset_graph_query.py +94 -0
  236. cosmotech_api/models/twin_graph_batch_result.py +92 -0
  237. cosmotech_api/models/twin_graph_hash.py +88 -0
  238. cosmotech_api/models/twin_graph_query.py +90 -0
  239. cosmotech_api/models/validator.py +106 -0
  240. cosmotech_api/models/validator_run.py +126 -0
  241. cosmotech_api/models/workspace.py +142 -0
  242. cosmotech_api/models/workspace_access_control.py +90 -0
  243. cosmotech_api/models/workspace_file.py +88 -0
  244. cosmotech_api/models/workspace_role.py +88 -0
  245. cosmotech_api/models/workspace_secret.py +88 -0
  246. cosmotech_api/models/workspace_security.py +98 -0
  247. cosmotech_api/models/workspace_solution.py +92 -0
  248. cosmotech_api/models/workspace_web_app.py +92 -0
  249. cosmotech_api/py.typed +0 -0
  250. cosmotech_api/rest.py +256 -0
  251. cosmotech_api-3.2.0.dist-info/LICENSE +17 -0
  252. cosmotech_api-3.2.0.dist-info/METADATA +18 -0
  253. cosmotech_api-3.2.0.dist-info/RECORD +255 -0
  254. cosmotech_api-3.2.0.dist-info/WHEEL +5 -0
  255. cosmotech_api-3.2.0.dist-info/top_level.txt +1 -0
@@ -0,0 +1,4692 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ Cosmo Tech Platform API
5
+
6
+ Cosmo Tech Platform API
7
+
8
+ The version of the OpenAPI document: 3.2.0
9
+ Contact: platform@cosmotech.com
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, StrictInt, StrictStr
21
+ from typing import Any, Dict, Optional
22
+ from typing_extensions import Annotated
23
+ from cosmotech_api.models.component_role_permissions import ComponentRolePermissions
24
+ from cosmotech_api.models.organization import Organization
25
+ from cosmotech_api.models.organization_access_control import OrganizationAccessControl
26
+ from cosmotech_api.models.organization_role import OrganizationRole
27
+ from cosmotech_api.models.organization_security import OrganizationSecurity
28
+ from cosmotech_api.models.organization_service import OrganizationService
29
+
30
+ from cosmotech_api.api_client import ApiClient, RequestSerialized
31
+ from cosmotech_api.api_response import ApiResponse
32
+ from cosmotech_api.rest import RESTResponseType
33
+
34
+
35
+ class OrganizationApi:
36
+ """NOTE: This class is auto generated by OpenAPI Generator
37
+ Ref: https://openapi-generator.tech
38
+
39
+ Do not edit the class manually.
40
+ """
41
+
42
+ def __init__(self, api_client=None) -> None:
43
+ if api_client is None:
44
+ api_client = ApiClient.get_default()
45
+ self.api_client = api_client
46
+
47
+
48
+ @validate_call
49
+ def add_organization_access_control(
50
+ self,
51
+ organization_id: Annotated[StrictStr, Field(description="the Organization identifier")],
52
+ organization_access_control: Annotated[OrganizationAccessControl, Field(description="the new Organization security access to add.")],
53
+ _request_timeout: Union[
54
+ None,
55
+ Annotated[StrictFloat, Field(gt=0)],
56
+ Tuple[
57
+ Annotated[StrictFloat, Field(gt=0)],
58
+ Annotated[StrictFloat, Field(gt=0)]
59
+ ]
60
+ ] = None,
61
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
62
+ _content_type: Optional[StrictStr] = None,
63
+ _headers: Optional[Dict[StrictStr, Any]] = None,
64
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
65
+ ) -> OrganizationAccessControl:
66
+ """Add a control access to the Organization
67
+
68
+
69
+ :param organization_id: the Organization identifier (required)
70
+ :type organization_id: str
71
+ :param organization_access_control: the new Organization security access to add. (required)
72
+ :type organization_access_control: OrganizationAccessControl
73
+ :param _request_timeout: timeout setting for this request. If one
74
+ number provided, it will be total request
75
+ timeout. It can also be a pair (tuple) of
76
+ (connection, read) timeouts.
77
+ :type _request_timeout: int, tuple(int, int), optional
78
+ :param _request_auth: set to override the auth_settings for an a single
79
+ request; this effectively ignores the
80
+ authentication in the spec for a single request.
81
+ :type _request_auth: dict, optional
82
+ :param _content_type: force content-type for the request.
83
+ :type _content_type: str, Optional
84
+ :param _headers: set to override the headers for a single
85
+ request; this effectively ignores the headers
86
+ in the spec for a single request.
87
+ :type _headers: dict, optional
88
+ :param _host_index: set to override the host_index for a single
89
+ request; this effectively ignores the host_index
90
+ in the spec for a single request.
91
+ :type _host_index: int, optional
92
+ :return: Returns the result object.
93
+ """ # noqa: E501
94
+
95
+ _param = self._add_organization_access_control_serialize(
96
+ organization_id=organization_id,
97
+ organization_access_control=organization_access_control,
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': "OrganizationAccessControl",
106
+ '404': None,
107
+ }
108
+ response_data = self.api_client.call_api(
109
+ *_param,
110
+ _request_timeout=_request_timeout
111
+ )
112
+ response_data.read()
113
+ return self.api_client.response_deserialize(
114
+ response_data=response_data,
115
+ response_types_map=_response_types_map,
116
+ ).data
117
+
118
+
119
+ @validate_call
120
+ def add_organization_access_control_with_http_info(
121
+ self,
122
+ organization_id: Annotated[StrictStr, Field(description="the Organization identifier")],
123
+ organization_access_control: Annotated[OrganizationAccessControl, Field(description="the new Organization security access to add.")],
124
+ _request_timeout: Union[
125
+ None,
126
+ Annotated[StrictFloat, Field(gt=0)],
127
+ Tuple[
128
+ Annotated[StrictFloat, Field(gt=0)],
129
+ Annotated[StrictFloat, Field(gt=0)]
130
+ ]
131
+ ] = None,
132
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
133
+ _content_type: Optional[StrictStr] = None,
134
+ _headers: Optional[Dict[StrictStr, Any]] = None,
135
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
136
+ ) -> ApiResponse[OrganizationAccessControl]:
137
+ """Add a control access to the Organization
138
+
139
+
140
+ :param organization_id: the Organization identifier (required)
141
+ :type organization_id: str
142
+ :param organization_access_control: the new Organization security access to add. (required)
143
+ :type organization_access_control: OrganizationAccessControl
144
+ :param _request_timeout: timeout setting for this request. If one
145
+ number provided, it will be total request
146
+ timeout. It can also be a pair (tuple) of
147
+ (connection, read) timeouts.
148
+ :type _request_timeout: int, tuple(int, int), optional
149
+ :param _request_auth: set to override the auth_settings for an a single
150
+ request; this effectively ignores the
151
+ authentication in the spec for a single request.
152
+ :type _request_auth: dict, optional
153
+ :param _content_type: force content-type for the request.
154
+ :type _content_type: str, Optional
155
+ :param _headers: set to override the headers for a single
156
+ request; this effectively ignores the headers
157
+ in the spec for a single request.
158
+ :type _headers: dict, optional
159
+ :param _host_index: set to override the host_index for a single
160
+ request; this effectively ignores the host_index
161
+ in the spec for a single request.
162
+ :type _host_index: int, optional
163
+ :return: Returns the result object.
164
+ """ # noqa: E501
165
+
166
+ _param = self._add_organization_access_control_serialize(
167
+ organization_id=organization_id,
168
+ organization_access_control=organization_access_control,
169
+ _request_auth=_request_auth,
170
+ _content_type=_content_type,
171
+ _headers=_headers,
172
+ _host_index=_host_index
173
+ )
174
+
175
+ _response_types_map: Dict[str, Optional[str]] = {
176
+ '201': "OrganizationAccessControl",
177
+ '404': 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 add_organization_access_control_without_preload_content(
192
+ self,
193
+ organization_id: Annotated[StrictStr, Field(description="the Organization identifier")],
194
+ organization_access_control: Annotated[OrganizationAccessControl, Field(description="the new Organization security access to add.")],
195
+ _request_timeout: Union[
196
+ None,
197
+ Annotated[StrictFloat, Field(gt=0)],
198
+ Tuple[
199
+ Annotated[StrictFloat, Field(gt=0)],
200
+ Annotated[StrictFloat, Field(gt=0)]
201
+ ]
202
+ ] = None,
203
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
204
+ _content_type: Optional[StrictStr] = None,
205
+ _headers: Optional[Dict[StrictStr, Any]] = None,
206
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
207
+ ) -> RESTResponseType:
208
+ """Add a control access to the Organization
209
+
210
+
211
+ :param organization_id: the Organization identifier (required)
212
+ :type organization_id: str
213
+ :param organization_access_control: the new Organization security access to add. (required)
214
+ :type organization_access_control: OrganizationAccessControl
215
+ :param _request_timeout: timeout setting for this request. If one
216
+ number provided, it will be total request
217
+ timeout. It can also be a pair (tuple) of
218
+ (connection, read) timeouts.
219
+ :type _request_timeout: int, tuple(int, int), optional
220
+ :param _request_auth: set to override the auth_settings for an a single
221
+ request; this effectively ignores the
222
+ authentication in the spec for a single request.
223
+ :type _request_auth: dict, optional
224
+ :param _content_type: force content-type for the request.
225
+ :type _content_type: str, Optional
226
+ :param _headers: set to override the headers for a single
227
+ request; this effectively ignores the headers
228
+ in the spec for a single request.
229
+ :type _headers: dict, optional
230
+ :param _host_index: set to override the host_index for a single
231
+ request; this effectively ignores the host_index
232
+ in the spec for a single request.
233
+ :type _host_index: int, optional
234
+ :return: Returns the result object.
235
+ """ # noqa: E501
236
+
237
+ _param = self._add_organization_access_control_serialize(
238
+ organization_id=organization_id,
239
+ organization_access_control=organization_access_control,
240
+ _request_auth=_request_auth,
241
+ _content_type=_content_type,
242
+ _headers=_headers,
243
+ _host_index=_host_index
244
+ )
245
+
246
+ _response_types_map: Dict[str, Optional[str]] = {
247
+ '201': "OrganizationAccessControl",
248
+ '404': None,
249
+ }
250
+ response_data = self.api_client.call_api(
251
+ *_param,
252
+ _request_timeout=_request_timeout
253
+ )
254
+ return response_data.response
255
+
256
+
257
+ def _add_organization_access_control_serialize(
258
+ self,
259
+ organization_id,
260
+ organization_access_control,
261
+ _request_auth,
262
+ _content_type,
263
+ _headers,
264
+ _host_index,
265
+ ) -> RequestSerialized:
266
+
267
+ _host = None
268
+
269
+ _collection_formats: Dict[str, str] = {
270
+ }
271
+
272
+ _path_params: Dict[str, str] = {}
273
+ _query_params: List[Tuple[str, str]] = []
274
+ _header_params: Dict[str, Optional[str]] = _headers or {}
275
+ _form_params: List[Tuple[str, str]] = []
276
+ _files: Dict[str, str] = {}
277
+ _body_params: Optional[bytes] = None
278
+
279
+ # process the path parameters
280
+ if organization_id is not None:
281
+ _path_params['organization_id'] = organization_id
282
+ # process the query parameters
283
+ # process the header parameters
284
+ # process the form parameters
285
+ # process the body parameter
286
+ if organization_access_control is not None:
287
+ _body_params = organization_access_control
288
+
289
+
290
+ # set the HTTP header `Accept`
291
+ _header_params['Accept'] = self.api_client.select_header_accept(
292
+ [
293
+ 'application/json'
294
+ ]
295
+ )
296
+
297
+ # set the HTTP header `Content-Type`
298
+ if _content_type:
299
+ _header_params['Content-Type'] = _content_type
300
+ else:
301
+ _default_content_type = (
302
+ self.api_client.select_header_content_type(
303
+ [
304
+ 'application/json',
305
+ 'application/yaml'
306
+ ]
307
+ )
308
+ )
309
+ if _default_content_type is not None:
310
+ _header_params['Content-Type'] = _default_content_type
311
+
312
+ # authentication setting
313
+ _auth_settings: List[str] = [
314
+ 'oAuth2AuthCode'
315
+ ]
316
+
317
+ return self.api_client.param_serialize(
318
+ method='POST',
319
+ resource_path='/organizations/{organization_id}/security/access',
320
+ path_params=_path_params,
321
+ query_params=_query_params,
322
+ header_params=_header_params,
323
+ body=_body_params,
324
+ post_params=_form_params,
325
+ files=_files,
326
+ auth_settings=_auth_settings,
327
+ collection_formats=_collection_formats,
328
+ _host=_host,
329
+ _request_auth=_request_auth
330
+ )
331
+
332
+
333
+
334
+
335
+ @validate_call
336
+ def find_all_organizations(
337
+ self,
338
+ page: Annotated[Optional[StrictInt], Field(description="page number to query")] = None,
339
+ size: Annotated[Optional[StrictInt], Field(description="amount of result by page")] = None,
340
+ _request_timeout: Union[
341
+ None,
342
+ Annotated[StrictFloat, Field(gt=0)],
343
+ Tuple[
344
+ Annotated[StrictFloat, Field(gt=0)],
345
+ Annotated[StrictFloat, Field(gt=0)]
346
+ ]
347
+ ] = None,
348
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
349
+ _content_type: Optional[StrictStr] = None,
350
+ _headers: Optional[Dict[StrictStr, Any]] = None,
351
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
352
+ ) -> List[Organization]:
353
+ """List all Organizations
354
+
355
+
356
+ :param page: page number to query
357
+ :type page: int
358
+ :param size: amount of result by page
359
+ :type size: int
360
+ :param _request_timeout: timeout setting for this request. If one
361
+ number provided, it will be total request
362
+ timeout. It can also be a pair (tuple) of
363
+ (connection, read) timeouts.
364
+ :type _request_timeout: int, tuple(int, int), optional
365
+ :param _request_auth: set to override the auth_settings for an a single
366
+ request; this effectively ignores the
367
+ authentication in the spec for a single request.
368
+ :type _request_auth: dict, optional
369
+ :param _content_type: force content-type for the request.
370
+ :type _content_type: str, Optional
371
+ :param _headers: set to override the headers for a single
372
+ request; this effectively ignores the headers
373
+ in the spec for a single request.
374
+ :type _headers: dict, optional
375
+ :param _host_index: set to override the host_index for a single
376
+ request; this effectively ignores the host_index
377
+ in the spec for a single request.
378
+ :type _host_index: int, optional
379
+ :return: Returns the result object.
380
+ """ # noqa: E501
381
+
382
+ _param = self._find_all_organizations_serialize(
383
+ page=page,
384
+ size=size,
385
+ _request_auth=_request_auth,
386
+ _content_type=_content_type,
387
+ _headers=_headers,
388
+ _host_index=_host_index
389
+ )
390
+
391
+ _response_types_map: Dict[str, Optional[str]] = {
392
+ '200': "List[Organization]",
393
+ }
394
+ response_data = self.api_client.call_api(
395
+ *_param,
396
+ _request_timeout=_request_timeout
397
+ )
398
+ response_data.read()
399
+ return self.api_client.response_deserialize(
400
+ response_data=response_data,
401
+ response_types_map=_response_types_map,
402
+ ).data
403
+
404
+
405
+ @validate_call
406
+ def find_all_organizations_with_http_info(
407
+ self,
408
+ page: Annotated[Optional[StrictInt], Field(description="page number to query")] = None,
409
+ size: Annotated[Optional[StrictInt], Field(description="amount of result by page")] = None,
410
+ _request_timeout: Union[
411
+ None,
412
+ Annotated[StrictFloat, Field(gt=0)],
413
+ Tuple[
414
+ Annotated[StrictFloat, Field(gt=0)],
415
+ Annotated[StrictFloat, Field(gt=0)]
416
+ ]
417
+ ] = None,
418
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
419
+ _content_type: Optional[StrictStr] = None,
420
+ _headers: Optional[Dict[StrictStr, Any]] = None,
421
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
422
+ ) -> ApiResponse[List[Organization]]:
423
+ """List all Organizations
424
+
425
+
426
+ :param page: page number to query
427
+ :type page: int
428
+ :param size: amount of result by page
429
+ :type size: int
430
+ :param _request_timeout: timeout setting for this request. If one
431
+ number provided, it will be total request
432
+ timeout. It can also be a pair (tuple) of
433
+ (connection, read) timeouts.
434
+ :type _request_timeout: int, tuple(int, int), optional
435
+ :param _request_auth: set to override the auth_settings for an a single
436
+ request; this effectively ignores the
437
+ authentication in the spec for a single request.
438
+ :type _request_auth: dict, optional
439
+ :param _content_type: force content-type for the request.
440
+ :type _content_type: str, Optional
441
+ :param _headers: set to override the headers for a single
442
+ request; this effectively ignores the headers
443
+ in the spec for a single request.
444
+ :type _headers: dict, optional
445
+ :param _host_index: set to override the host_index for a single
446
+ request; this effectively ignores the host_index
447
+ in the spec for a single request.
448
+ :type _host_index: int, optional
449
+ :return: Returns the result object.
450
+ """ # noqa: E501
451
+
452
+ _param = self._find_all_organizations_serialize(
453
+ page=page,
454
+ size=size,
455
+ _request_auth=_request_auth,
456
+ _content_type=_content_type,
457
+ _headers=_headers,
458
+ _host_index=_host_index
459
+ )
460
+
461
+ _response_types_map: Dict[str, Optional[str]] = {
462
+ '200': "List[Organization]",
463
+ }
464
+ response_data = self.api_client.call_api(
465
+ *_param,
466
+ _request_timeout=_request_timeout
467
+ )
468
+ response_data.read()
469
+ return self.api_client.response_deserialize(
470
+ response_data=response_data,
471
+ response_types_map=_response_types_map,
472
+ )
473
+
474
+
475
+ @validate_call
476
+ def find_all_organizations_without_preload_content(
477
+ self,
478
+ page: Annotated[Optional[StrictInt], Field(description="page number to query")] = None,
479
+ size: Annotated[Optional[StrictInt], Field(description="amount of result by page")] = None,
480
+ _request_timeout: Union[
481
+ None,
482
+ Annotated[StrictFloat, Field(gt=0)],
483
+ Tuple[
484
+ Annotated[StrictFloat, Field(gt=0)],
485
+ Annotated[StrictFloat, Field(gt=0)]
486
+ ]
487
+ ] = None,
488
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
489
+ _content_type: Optional[StrictStr] = None,
490
+ _headers: Optional[Dict[StrictStr, Any]] = None,
491
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
492
+ ) -> RESTResponseType:
493
+ """List all Organizations
494
+
495
+
496
+ :param page: page number to query
497
+ :type page: int
498
+ :param size: amount of result by page
499
+ :type size: int
500
+ :param _request_timeout: timeout setting for this request. If one
501
+ number provided, it will be total request
502
+ timeout. It can also be a pair (tuple) of
503
+ (connection, read) timeouts.
504
+ :type _request_timeout: int, tuple(int, int), optional
505
+ :param _request_auth: set to override the auth_settings for an a single
506
+ request; this effectively ignores the
507
+ authentication in the spec for a single request.
508
+ :type _request_auth: dict, optional
509
+ :param _content_type: force content-type for the request.
510
+ :type _content_type: str, Optional
511
+ :param _headers: set to override the headers for a single
512
+ request; this effectively ignores the headers
513
+ in the spec for a single request.
514
+ :type _headers: dict, optional
515
+ :param _host_index: set to override the host_index for a single
516
+ request; this effectively ignores the host_index
517
+ in the spec for a single request.
518
+ :type _host_index: int, optional
519
+ :return: Returns the result object.
520
+ """ # noqa: E501
521
+
522
+ _param = self._find_all_organizations_serialize(
523
+ page=page,
524
+ size=size,
525
+ _request_auth=_request_auth,
526
+ _content_type=_content_type,
527
+ _headers=_headers,
528
+ _host_index=_host_index
529
+ )
530
+
531
+ _response_types_map: Dict[str, Optional[str]] = {
532
+ '200': "List[Organization]",
533
+ }
534
+ response_data = self.api_client.call_api(
535
+ *_param,
536
+ _request_timeout=_request_timeout
537
+ )
538
+ return response_data.response
539
+
540
+
541
+ def _find_all_organizations_serialize(
542
+ self,
543
+ page,
544
+ size,
545
+ _request_auth,
546
+ _content_type,
547
+ _headers,
548
+ _host_index,
549
+ ) -> RequestSerialized:
550
+
551
+ _host = None
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
+ # process the query parameters
565
+ if page is not None:
566
+
567
+ _query_params.append(('page', page))
568
+
569
+ if size is not None:
570
+
571
+ _query_params.append(('size', size))
572
+
573
+ # process the header parameters
574
+ # process the form parameters
575
+ # process the body parameter
576
+
577
+
578
+ # set the HTTP header `Accept`
579
+ _header_params['Accept'] = self.api_client.select_header_accept(
580
+ [
581
+ 'application/json'
582
+ ]
583
+ )
584
+
585
+
586
+ # authentication setting
587
+ _auth_settings: List[str] = [
588
+ 'oAuth2AuthCode'
589
+ ]
590
+
591
+ return self.api_client.param_serialize(
592
+ method='GET',
593
+ resource_path='/organizations',
594
+ path_params=_path_params,
595
+ query_params=_query_params,
596
+ header_params=_header_params,
597
+ body=_body_params,
598
+ post_params=_form_params,
599
+ files=_files,
600
+ auth_settings=_auth_settings,
601
+ collection_formats=_collection_formats,
602
+ _host=_host,
603
+ _request_auth=_request_auth
604
+ )
605
+
606
+
607
+
608
+
609
+ @validate_call
610
+ def find_organization_by_id(
611
+ self,
612
+ organization_id: Annotated[StrictStr, Field(description="the Organization identifier")],
613
+ _request_timeout: Union[
614
+ None,
615
+ Annotated[StrictFloat, Field(gt=0)],
616
+ Tuple[
617
+ Annotated[StrictFloat, Field(gt=0)],
618
+ Annotated[StrictFloat, Field(gt=0)]
619
+ ]
620
+ ] = None,
621
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
622
+ _content_type: Optional[StrictStr] = None,
623
+ _headers: Optional[Dict[StrictStr, Any]] = None,
624
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
625
+ ) -> Organization:
626
+ """Get the details of an Organization
627
+
628
+
629
+ :param organization_id: the Organization identifier (required)
630
+ :type organization_id: str
631
+ :param _request_timeout: timeout setting for this request. If one
632
+ number provided, it will be total request
633
+ timeout. It can also be a pair (tuple) of
634
+ (connection, read) timeouts.
635
+ :type _request_timeout: int, tuple(int, int), optional
636
+ :param _request_auth: set to override the auth_settings for an a single
637
+ request; this effectively ignores the
638
+ authentication in the spec for a single request.
639
+ :type _request_auth: dict, optional
640
+ :param _content_type: force content-type for the request.
641
+ :type _content_type: str, Optional
642
+ :param _headers: set to override the headers for a single
643
+ request; this effectively ignores the headers
644
+ in the spec for a single request.
645
+ :type _headers: dict, optional
646
+ :param _host_index: set to override the host_index for a single
647
+ request; this effectively ignores the host_index
648
+ in the spec for a single request.
649
+ :type _host_index: int, optional
650
+ :return: Returns the result object.
651
+ """ # noqa: E501
652
+
653
+ _param = self._find_organization_by_id_serialize(
654
+ organization_id=organization_id,
655
+ _request_auth=_request_auth,
656
+ _content_type=_content_type,
657
+ _headers=_headers,
658
+ _host_index=_host_index
659
+ )
660
+
661
+ _response_types_map: Dict[str, Optional[str]] = {
662
+ '200': "Organization",
663
+ '404': None,
664
+ }
665
+ response_data = self.api_client.call_api(
666
+ *_param,
667
+ _request_timeout=_request_timeout
668
+ )
669
+ response_data.read()
670
+ return self.api_client.response_deserialize(
671
+ response_data=response_data,
672
+ response_types_map=_response_types_map,
673
+ ).data
674
+
675
+
676
+ @validate_call
677
+ def find_organization_by_id_with_http_info(
678
+ self,
679
+ organization_id: Annotated[StrictStr, Field(description="the Organization identifier")],
680
+ _request_timeout: Union[
681
+ None,
682
+ Annotated[StrictFloat, Field(gt=0)],
683
+ Tuple[
684
+ Annotated[StrictFloat, Field(gt=0)],
685
+ Annotated[StrictFloat, Field(gt=0)]
686
+ ]
687
+ ] = None,
688
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
689
+ _content_type: Optional[StrictStr] = None,
690
+ _headers: Optional[Dict[StrictStr, Any]] = None,
691
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
692
+ ) -> ApiResponse[Organization]:
693
+ """Get the details of an Organization
694
+
695
+
696
+ :param organization_id: the Organization identifier (required)
697
+ :type organization_id: str
698
+ :param _request_timeout: timeout setting for this request. If one
699
+ number provided, it will be total request
700
+ timeout. It can also be a pair (tuple) of
701
+ (connection, read) timeouts.
702
+ :type _request_timeout: int, tuple(int, int), optional
703
+ :param _request_auth: set to override the auth_settings for an a single
704
+ request; this effectively ignores the
705
+ authentication in the spec for a single request.
706
+ :type _request_auth: dict, optional
707
+ :param _content_type: force content-type for the request.
708
+ :type _content_type: str, Optional
709
+ :param _headers: set to override the headers for a single
710
+ request; this effectively ignores the headers
711
+ in the spec for a single request.
712
+ :type _headers: dict, optional
713
+ :param _host_index: set to override the host_index for a single
714
+ request; this effectively ignores the host_index
715
+ in the spec for a single request.
716
+ :type _host_index: int, optional
717
+ :return: Returns the result object.
718
+ """ # noqa: E501
719
+
720
+ _param = self._find_organization_by_id_serialize(
721
+ organization_id=organization_id,
722
+ _request_auth=_request_auth,
723
+ _content_type=_content_type,
724
+ _headers=_headers,
725
+ _host_index=_host_index
726
+ )
727
+
728
+ _response_types_map: Dict[str, Optional[str]] = {
729
+ '200': "Organization",
730
+ '404': None,
731
+ }
732
+ response_data = self.api_client.call_api(
733
+ *_param,
734
+ _request_timeout=_request_timeout
735
+ )
736
+ response_data.read()
737
+ return self.api_client.response_deserialize(
738
+ response_data=response_data,
739
+ response_types_map=_response_types_map,
740
+ )
741
+
742
+
743
+ @validate_call
744
+ def find_organization_by_id_without_preload_content(
745
+ self,
746
+ organization_id: Annotated[StrictStr, Field(description="the Organization identifier")],
747
+ _request_timeout: Union[
748
+ None,
749
+ Annotated[StrictFloat, Field(gt=0)],
750
+ Tuple[
751
+ Annotated[StrictFloat, Field(gt=0)],
752
+ Annotated[StrictFloat, Field(gt=0)]
753
+ ]
754
+ ] = None,
755
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
756
+ _content_type: Optional[StrictStr] = None,
757
+ _headers: Optional[Dict[StrictStr, Any]] = None,
758
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
759
+ ) -> RESTResponseType:
760
+ """Get the details of an Organization
761
+
762
+
763
+ :param organization_id: the Organization identifier (required)
764
+ :type organization_id: str
765
+ :param _request_timeout: timeout setting for this request. If one
766
+ number provided, it will be total request
767
+ timeout. It can also be a pair (tuple) of
768
+ (connection, read) timeouts.
769
+ :type _request_timeout: int, tuple(int, int), optional
770
+ :param _request_auth: set to override the auth_settings for an a single
771
+ request; this effectively ignores the
772
+ authentication in the spec for a single request.
773
+ :type _request_auth: dict, optional
774
+ :param _content_type: force content-type for the request.
775
+ :type _content_type: str, Optional
776
+ :param _headers: set to override the headers for a single
777
+ request; this effectively ignores the headers
778
+ in the spec for a single request.
779
+ :type _headers: dict, optional
780
+ :param _host_index: set to override the host_index for a single
781
+ request; this effectively ignores the host_index
782
+ in the spec for a single request.
783
+ :type _host_index: int, optional
784
+ :return: Returns the result object.
785
+ """ # noqa: E501
786
+
787
+ _param = self._find_organization_by_id_serialize(
788
+ organization_id=organization_id,
789
+ _request_auth=_request_auth,
790
+ _content_type=_content_type,
791
+ _headers=_headers,
792
+ _host_index=_host_index
793
+ )
794
+
795
+ _response_types_map: Dict[str, Optional[str]] = {
796
+ '200': "Organization",
797
+ '404': None,
798
+ }
799
+ response_data = self.api_client.call_api(
800
+ *_param,
801
+ _request_timeout=_request_timeout
802
+ )
803
+ return response_data.response
804
+
805
+
806
+ def _find_organization_by_id_serialize(
807
+ self,
808
+ organization_id,
809
+ _request_auth,
810
+ _content_type,
811
+ _headers,
812
+ _host_index,
813
+ ) -> RequestSerialized:
814
+
815
+ _host = None
816
+
817
+ _collection_formats: Dict[str, str] = {
818
+ }
819
+
820
+ _path_params: Dict[str, str] = {}
821
+ _query_params: List[Tuple[str, str]] = []
822
+ _header_params: Dict[str, Optional[str]] = _headers or {}
823
+ _form_params: List[Tuple[str, str]] = []
824
+ _files: Dict[str, str] = {}
825
+ _body_params: Optional[bytes] = None
826
+
827
+ # process the path parameters
828
+ if organization_id is not None:
829
+ _path_params['organization_id'] = organization_id
830
+ # process the query parameters
831
+ # process the header parameters
832
+ # process the form parameters
833
+ # process the body parameter
834
+
835
+
836
+ # set the HTTP header `Accept`
837
+ _header_params['Accept'] = self.api_client.select_header_accept(
838
+ [
839
+ 'application/json'
840
+ ]
841
+ )
842
+
843
+
844
+ # authentication setting
845
+ _auth_settings: List[str] = [
846
+ 'oAuth2AuthCode'
847
+ ]
848
+
849
+ return self.api_client.param_serialize(
850
+ method='GET',
851
+ resource_path='/organizations/{organization_id}',
852
+ path_params=_path_params,
853
+ query_params=_query_params,
854
+ header_params=_header_params,
855
+ body=_body_params,
856
+ post_params=_form_params,
857
+ files=_files,
858
+ auth_settings=_auth_settings,
859
+ collection_formats=_collection_formats,
860
+ _host=_host,
861
+ _request_auth=_request_auth
862
+ )
863
+
864
+
865
+
866
+
867
+ @validate_call
868
+ def get_all_permissions(
869
+ self,
870
+ _request_timeout: Union[
871
+ None,
872
+ Annotated[StrictFloat, Field(gt=0)],
873
+ Tuple[
874
+ Annotated[StrictFloat, Field(gt=0)],
875
+ Annotated[StrictFloat, Field(gt=0)]
876
+ ]
877
+ ] = None,
878
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
879
+ _content_type: Optional[StrictStr] = None,
880
+ _headers: Optional[Dict[StrictStr, Any]] = None,
881
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
882
+ ) -> List[ComponentRolePermissions]:
883
+ """Get all permissions per components
884
+
885
+
886
+ :param _request_timeout: timeout setting for this request. If one
887
+ number provided, it will be total request
888
+ timeout. It can also be a pair (tuple) of
889
+ (connection, read) timeouts.
890
+ :type _request_timeout: int, tuple(int, int), optional
891
+ :param _request_auth: set to override the auth_settings for an a single
892
+ request; this effectively ignores the
893
+ authentication in the spec for a single request.
894
+ :type _request_auth: dict, optional
895
+ :param _content_type: force content-type for the request.
896
+ :type _content_type: str, Optional
897
+ :param _headers: set to override the headers for a single
898
+ request; this effectively ignores the headers
899
+ in the spec for a single request.
900
+ :type _headers: dict, optional
901
+ :param _host_index: set to override the host_index for a single
902
+ request; this effectively ignores the host_index
903
+ in the spec for a single request.
904
+ :type _host_index: int, optional
905
+ :return: Returns the result object.
906
+ """ # noqa: E501
907
+
908
+ _param = self._get_all_permissions_serialize(
909
+ _request_auth=_request_auth,
910
+ _content_type=_content_type,
911
+ _headers=_headers,
912
+ _host_index=_host_index
913
+ )
914
+
915
+ _response_types_map: Dict[str, Optional[str]] = {
916
+ '200': "List[ComponentRolePermissions]",
917
+ }
918
+ response_data = self.api_client.call_api(
919
+ *_param,
920
+ _request_timeout=_request_timeout
921
+ )
922
+ response_data.read()
923
+ return self.api_client.response_deserialize(
924
+ response_data=response_data,
925
+ response_types_map=_response_types_map,
926
+ ).data
927
+
928
+
929
+ @validate_call
930
+ def get_all_permissions_with_http_info(
931
+ self,
932
+ _request_timeout: Union[
933
+ None,
934
+ Annotated[StrictFloat, Field(gt=0)],
935
+ Tuple[
936
+ Annotated[StrictFloat, Field(gt=0)],
937
+ Annotated[StrictFloat, Field(gt=0)]
938
+ ]
939
+ ] = None,
940
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
941
+ _content_type: Optional[StrictStr] = None,
942
+ _headers: Optional[Dict[StrictStr, Any]] = None,
943
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
944
+ ) -> ApiResponse[List[ComponentRolePermissions]]:
945
+ """Get all permissions per components
946
+
947
+
948
+ :param _request_timeout: timeout setting for this request. If one
949
+ number provided, it will be total request
950
+ timeout. It can also be a pair (tuple) of
951
+ (connection, read) timeouts.
952
+ :type _request_timeout: int, tuple(int, int), optional
953
+ :param _request_auth: set to override the auth_settings for an a single
954
+ request; this effectively ignores the
955
+ authentication in the spec for a single request.
956
+ :type _request_auth: dict, optional
957
+ :param _content_type: force content-type for the request.
958
+ :type _content_type: str, Optional
959
+ :param _headers: set to override the headers for a single
960
+ request; this effectively ignores the headers
961
+ in the spec for a single request.
962
+ :type _headers: dict, optional
963
+ :param _host_index: set to override the host_index for a single
964
+ request; this effectively ignores the host_index
965
+ in the spec for a single request.
966
+ :type _host_index: int, optional
967
+ :return: Returns the result object.
968
+ """ # noqa: E501
969
+
970
+ _param = self._get_all_permissions_serialize(
971
+ _request_auth=_request_auth,
972
+ _content_type=_content_type,
973
+ _headers=_headers,
974
+ _host_index=_host_index
975
+ )
976
+
977
+ _response_types_map: Dict[str, Optional[str]] = {
978
+ '200': "List[ComponentRolePermissions]",
979
+ }
980
+ response_data = self.api_client.call_api(
981
+ *_param,
982
+ _request_timeout=_request_timeout
983
+ )
984
+ response_data.read()
985
+ return self.api_client.response_deserialize(
986
+ response_data=response_data,
987
+ response_types_map=_response_types_map,
988
+ )
989
+
990
+
991
+ @validate_call
992
+ def get_all_permissions_without_preload_content(
993
+ self,
994
+ _request_timeout: Union[
995
+ None,
996
+ Annotated[StrictFloat, Field(gt=0)],
997
+ Tuple[
998
+ Annotated[StrictFloat, Field(gt=0)],
999
+ Annotated[StrictFloat, Field(gt=0)]
1000
+ ]
1001
+ ] = None,
1002
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1003
+ _content_type: Optional[StrictStr] = None,
1004
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1005
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1006
+ ) -> RESTResponseType:
1007
+ """Get all permissions per components
1008
+
1009
+
1010
+ :param _request_timeout: timeout setting for this request. If one
1011
+ number provided, it will be total request
1012
+ timeout. It can also be a pair (tuple) of
1013
+ (connection, read) timeouts.
1014
+ :type _request_timeout: int, tuple(int, int), optional
1015
+ :param _request_auth: set to override the auth_settings for an a single
1016
+ request; this effectively ignores the
1017
+ authentication in the spec for a single request.
1018
+ :type _request_auth: dict, optional
1019
+ :param _content_type: force content-type for the request.
1020
+ :type _content_type: str, Optional
1021
+ :param _headers: set to override the headers for a single
1022
+ request; this effectively ignores the headers
1023
+ in the spec for a single request.
1024
+ :type _headers: dict, optional
1025
+ :param _host_index: set to override the host_index for a single
1026
+ request; this effectively ignores the host_index
1027
+ in the spec for a single request.
1028
+ :type _host_index: int, optional
1029
+ :return: Returns the result object.
1030
+ """ # noqa: E501
1031
+
1032
+ _param = self._get_all_permissions_serialize(
1033
+ _request_auth=_request_auth,
1034
+ _content_type=_content_type,
1035
+ _headers=_headers,
1036
+ _host_index=_host_index
1037
+ )
1038
+
1039
+ _response_types_map: Dict[str, Optional[str]] = {
1040
+ '200': "List[ComponentRolePermissions]",
1041
+ }
1042
+ response_data = self.api_client.call_api(
1043
+ *_param,
1044
+ _request_timeout=_request_timeout
1045
+ )
1046
+ return response_data.response
1047
+
1048
+
1049
+ def _get_all_permissions_serialize(
1050
+ self,
1051
+ _request_auth,
1052
+ _content_type,
1053
+ _headers,
1054
+ _host_index,
1055
+ ) -> RequestSerialized:
1056
+
1057
+ _host = None
1058
+
1059
+ _collection_formats: Dict[str, str] = {
1060
+ }
1061
+
1062
+ _path_params: Dict[str, str] = {}
1063
+ _query_params: List[Tuple[str, str]] = []
1064
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1065
+ _form_params: List[Tuple[str, str]] = []
1066
+ _files: Dict[str, str] = {}
1067
+ _body_params: Optional[bytes] = None
1068
+
1069
+ # process the path parameters
1070
+ # process the query parameters
1071
+ # process the header parameters
1072
+ # process the form parameters
1073
+ # process the body parameter
1074
+
1075
+
1076
+ # set the HTTP header `Accept`
1077
+ _header_params['Accept'] = self.api_client.select_header_accept(
1078
+ [
1079
+ 'application/json'
1080
+ ]
1081
+ )
1082
+
1083
+
1084
+ # authentication setting
1085
+ _auth_settings: List[str] = [
1086
+ 'oAuth2AuthCode'
1087
+ ]
1088
+
1089
+ return self.api_client.param_serialize(
1090
+ method='GET',
1091
+ resource_path='/organizations/permissions',
1092
+ path_params=_path_params,
1093
+ query_params=_query_params,
1094
+ header_params=_header_params,
1095
+ body=_body_params,
1096
+ post_params=_form_params,
1097
+ files=_files,
1098
+ auth_settings=_auth_settings,
1099
+ collection_formats=_collection_formats,
1100
+ _host=_host,
1101
+ _request_auth=_request_auth
1102
+ )
1103
+
1104
+
1105
+
1106
+
1107
+ @validate_call
1108
+ def get_organization_access_control(
1109
+ self,
1110
+ organization_id: Annotated[StrictStr, Field(description="the Organization identifier")],
1111
+ identity_id: Annotated[StrictStr, Field(description="the User identifier")],
1112
+ _request_timeout: Union[
1113
+ None,
1114
+ Annotated[StrictFloat, Field(gt=0)],
1115
+ Tuple[
1116
+ Annotated[StrictFloat, Field(gt=0)],
1117
+ Annotated[StrictFloat, Field(gt=0)]
1118
+ ]
1119
+ ] = None,
1120
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1121
+ _content_type: Optional[StrictStr] = None,
1122
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1123
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1124
+ ) -> OrganizationAccessControl:
1125
+ """Get a control access for the Organization
1126
+
1127
+
1128
+ :param organization_id: the Organization identifier (required)
1129
+ :type organization_id: str
1130
+ :param identity_id: the User identifier (required)
1131
+ :type identity_id: str
1132
+ :param _request_timeout: timeout setting for this request. If one
1133
+ number provided, it will be total request
1134
+ timeout. It can also be a pair (tuple) of
1135
+ (connection, read) timeouts.
1136
+ :type _request_timeout: int, tuple(int, int), optional
1137
+ :param _request_auth: set to override the auth_settings for an a single
1138
+ request; this effectively ignores the
1139
+ authentication in the spec for a single request.
1140
+ :type _request_auth: dict, optional
1141
+ :param _content_type: force content-type for the request.
1142
+ :type _content_type: str, Optional
1143
+ :param _headers: set to override the headers for a single
1144
+ request; this effectively ignores the headers
1145
+ in the spec for a single request.
1146
+ :type _headers: dict, optional
1147
+ :param _host_index: set to override the host_index for a single
1148
+ request; this effectively ignores the host_index
1149
+ in the spec for a single request.
1150
+ :type _host_index: int, optional
1151
+ :return: Returns the result object.
1152
+ """ # noqa: E501
1153
+
1154
+ _param = self._get_organization_access_control_serialize(
1155
+ organization_id=organization_id,
1156
+ identity_id=identity_id,
1157
+ _request_auth=_request_auth,
1158
+ _content_type=_content_type,
1159
+ _headers=_headers,
1160
+ _host_index=_host_index
1161
+ )
1162
+
1163
+ _response_types_map: Dict[str, Optional[str]] = {
1164
+ '200': "OrganizationAccessControl",
1165
+ '404': None,
1166
+ }
1167
+ response_data = self.api_client.call_api(
1168
+ *_param,
1169
+ _request_timeout=_request_timeout
1170
+ )
1171
+ response_data.read()
1172
+ return self.api_client.response_deserialize(
1173
+ response_data=response_data,
1174
+ response_types_map=_response_types_map,
1175
+ ).data
1176
+
1177
+
1178
+ @validate_call
1179
+ def get_organization_access_control_with_http_info(
1180
+ self,
1181
+ organization_id: Annotated[StrictStr, Field(description="the Organization identifier")],
1182
+ identity_id: Annotated[StrictStr, Field(description="the User identifier")],
1183
+ _request_timeout: Union[
1184
+ None,
1185
+ Annotated[StrictFloat, Field(gt=0)],
1186
+ Tuple[
1187
+ Annotated[StrictFloat, Field(gt=0)],
1188
+ Annotated[StrictFloat, Field(gt=0)]
1189
+ ]
1190
+ ] = None,
1191
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1192
+ _content_type: Optional[StrictStr] = None,
1193
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1194
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1195
+ ) -> ApiResponse[OrganizationAccessControl]:
1196
+ """Get a control access for the Organization
1197
+
1198
+
1199
+ :param organization_id: the Organization identifier (required)
1200
+ :type organization_id: str
1201
+ :param identity_id: the User identifier (required)
1202
+ :type identity_id: str
1203
+ :param _request_timeout: timeout setting for this request. If one
1204
+ number provided, it will be total request
1205
+ timeout. It can also be a pair (tuple) of
1206
+ (connection, read) timeouts.
1207
+ :type _request_timeout: int, tuple(int, int), optional
1208
+ :param _request_auth: set to override the auth_settings for an a single
1209
+ request; this effectively ignores the
1210
+ authentication in the spec for a single request.
1211
+ :type _request_auth: dict, optional
1212
+ :param _content_type: force content-type for the request.
1213
+ :type _content_type: str, Optional
1214
+ :param _headers: set to override the headers for a single
1215
+ request; this effectively ignores the headers
1216
+ in the spec for a single request.
1217
+ :type _headers: dict, optional
1218
+ :param _host_index: set to override the host_index for a single
1219
+ request; this effectively ignores the host_index
1220
+ in the spec for a single request.
1221
+ :type _host_index: int, optional
1222
+ :return: Returns the result object.
1223
+ """ # noqa: E501
1224
+
1225
+ _param = self._get_organization_access_control_serialize(
1226
+ organization_id=organization_id,
1227
+ identity_id=identity_id,
1228
+ _request_auth=_request_auth,
1229
+ _content_type=_content_type,
1230
+ _headers=_headers,
1231
+ _host_index=_host_index
1232
+ )
1233
+
1234
+ _response_types_map: Dict[str, Optional[str]] = {
1235
+ '200': "OrganizationAccessControl",
1236
+ '404': None,
1237
+ }
1238
+ response_data = self.api_client.call_api(
1239
+ *_param,
1240
+ _request_timeout=_request_timeout
1241
+ )
1242
+ response_data.read()
1243
+ return self.api_client.response_deserialize(
1244
+ response_data=response_data,
1245
+ response_types_map=_response_types_map,
1246
+ )
1247
+
1248
+
1249
+ @validate_call
1250
+ def get_organization_access_control_without_preload_content(
1251
+ self,
1252
+ organization_id: Annotated[StrictStr, Field(description="the Organization identifier")],
1253
+ identity_id: Annotated[StrictStr, Field(description="the User identifier")],
1254
+ _request_timeout: Union[
1255
+ None,
1256
+ Annotated[StrictFloat, Field(gt=0)],
1257
+ Tuple[
1258
+ Annotated[StrictFloat, Field(gt=0)],
1259
+ Annotated[StrictFloat, Field(gt=0)]
1260
+ ]
1261
+ ] = None,
1262
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1263
+ _content_type: Optional[StrictStr] = None,
1264
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1265
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1266
+ ) -> RESTResponseType:
1267
+ """Get a control access for the Organization
1268
+
1269
+
1270
+ :param organization_id: the Organization identifier (required)
1271
+ :type organization_id: str
1272
+ :param identity_id: the User identifier (required)
1273
+ :type identity_id: str
1274
+ :param _request_timeout: timeout setting for this request. If one
1275
+ number provided, it will be total request
1276
+ timeout. It can also be a pair (tuple) of
1277
+ (connection, read) timeouts.
1278
+ :type _request_timeout: int, tuple(int, int), optional
1279
+ :param _request_auth: set to override the auth_settings for an a single
1280
+ request; this effectively ignores the
1281
+ authentication in the spec for a single request.
1282
+ :type _request_auth: dict, optional
1283
+ :param _content_type: force content-type for the request.
1284
+ :type _content_type: str, Optional
1285
+ :param _headers: set to override the headers for a single
1286
+ request; this effectively ignores the headers
1287
+ in the spec for a single request.
1288
+ :type _headers: dict, optional
1289
+ :param _host_index: set to override the host_index for a single
1290
+ request; this effectively ignores the host_index
1291
+ in the spec for a single request.
1292
+ :type _host_index: int, optional
1293
+ :return: Returns the result object.
1294
+ """ # noqa: E501
1295
+
1296
+ _param = self._get_organization_access_control_serialize(
1297
+ organization_id=organization_id,
1298
+ identity_id=identity_id,
1299
+ _request_auth=_request_auth,
1300
+ _content_type=_content_type,
1301
+ _headers=_headers,
1302
+ _host_index=_host_index
1303
+ )
1304
+
1305
+ _response_types_map: Dict[str, Optional[str]] = {
1306
+ '200': "OrganizationAccessControl",
1307
+ '404': None,
1308
+ }
1309
+ response_data = self.api_client.call_api(
1310
+ *_param,
1311
+ _request_timeout=_request_timeout
1312
+ )
1313
+ return response_data.response
1314
+
1315
+
1316
+ def _get_organization_access_control_serialize(
1317
+ self,
1318
+ organization_id,
1319
+ identity_id,
1320
+ _request_auth,
1321
+ _content_type,
1322
+ _headers,
1323
+ _host_index,
1324
+ ) -> RequestSerialized:
1325
+
1326
+ _host = None
1327
+
1328
+ _collection_formats: Dict[str, str] = {
1329
+ }
1330
+
1331
+ _path_params: Dict[str, str] = {}
1332
+ _query_params: List[Tuple[str, str]] = []
1333
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1334
+ _form_params: List[Tuple[str, str]] = []
1335
+ _files: Dict[str, str] = {}
1336
+ _body_params: Optional[bytes] = None
1337
+
1338
+ # process the path parameters
1339
+ if organization_id is not None:
1340
+ _path_params['organization_id'] = organization_id
1341
+ if identity_id is not None:
1342
+ _path_params['identity_id'] = identity_id
1343
+ # process the query parameters
1344
+ # process the header parameters
1345
+ # process the form parameters
1346
+ # process the body parameter
1347
+
1348
+
1349
+ # set the HTTP header `Accept`
1350
+ _header_params['Accept'] = self.api_client.select_header_accept(
1351
+ [
1352
+ 'application/json'
1353
+ ]
1354
+ )
1355
+
1356
+
1357
+ # authentication setting
1358
+ _auth_settings: List[str] = [
1359
+ 'oAuth2AuthCode'
1360
+ ]
1361
+
1362
+ return self.api_client.param_serialize(
1363
+ method='GET',
1364
+ resource_path='/organizations/{organization_id}/security/access/{identity_id}',
1365
+ path_params=_path_params,
1366
+ query_params=_query_params,
1367
+ header_params=_header_params,
1368
+ body=_body_params,
1369
+ post_params=_form_params,
1370
+ files=_files,
1371
+ auth_settings=_auth_settings,
1372
+ collection_formats=_collection_formats,
1373
+ _host=_host,
1374
+ _request_auth=_request_auth
1375
+ )
1376
+
1377
+
1378
+
1379
+
1380
+ @validate_call
1381
+ def get_organization_permissions(
1382
+ self,
1383
+ organization_id: Annotated[StrictStr, Field(description="the Organization identifier")],
1384
+ role: Annotated[StrictStr, Field(description="the Role")],
1385
+ _request_timeout: Union[
1386
+ None,
1387
+ Annotated[StrictFloat, Field(gt=0)],
1388
+ Tuple[
1389
+ Annotated[StrictFloat, Field(gt=0)],
1390
+ Annotated[StrictFloat, Field(gt=0)]
1391
+ ]
1392
+ ] = None,
1393
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1394
+ _content_type: Optional[StrictStr] = None,
1395
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1396
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1397
+ ) -> List[str]:
1398
+ """Get the Organization permissions by given role
1399
+
1400
+
1401
+ :param organization_id: the Organization identifier (required)
1402
+ :type organization_id: str
1403
+ :param role: the Role (required)
1404
+ :type role: str
1405
+ :param _request_timeout: timeout setting for this request. If one
1406
+ number provided, it will be total request
1407
+ timeout. It can also be a pair (tuple) of
1408
+ (connection, read) timeouts.
1409
+ :type _request_timeout: int, tuple(int, int), optional
1410
+ :param _request_auth: set to override the auth_settings for an a single
1411
+ request; this effectively ignores the
1412
+ authentication in the spec for a single request.
1413
+ :type _request_auth: dict, optional
1414
+ :param _content_type: force content-type for the request.
1415
+ :type _content_type: str, Optional
1416
+ :param _headers: set to override the headers for a single
1417
+ request; this effectively ignores the headers
1418
+ in the spec for a single request.
1419
+ :type _headers: dict, optional
1420
+ :param _host_index: set to override the host_index for a single
1421
+ request; this effectively ignores the host_index
1422
+ in the spec for a single request.
1423
+ :type _host_index: int, optional
1424
+ :return: Returns the result object.
1425
+ """ # noqa: E501
1426
+
1427
+ _param = self._get_organization_permissions_serialize(
1428
+ organization_id=organization_id,
1429
+ role=role,
1430
+ _request_auth=_request_auth,
1431
+ _content_type=_content_type,
1432
+ _headers=_headers,
1433
+ _host_index=_host_index
1434
+ )
1435
+
1436
+ _response_types_map: Dict[str, Optional[str]] = {
1437
+ '200': "List[str]",
1438
+ }
1439
+ response_data = self.api_client.call_api(
1440
+ *_param,
1441
+ _request_timeout=_request_timeout
1442
+ )
1443
+ response_data.read()
1444
+ return self.api_client.response_deserialize(
1445
+ response_data=response_data,
1446
+ response_types_map=_response_types_map,
1447
+ ).data
1448
+
1449
+
1450
+ @validate_call
1451
+ def get_organization_permissions_with_http_info(
1452
+ self,
1453
+ organization_id: Annotated[StrictStr, Field(description="the Organization identifier")],
1454
+ role: Annotated[StrictStr, Field(description="the Role")],
1455
+ _request_timeout: Union[
1456
+ None,
1457
+ Annotated[StrictFloat, Field(gt=0)],
1458
+ Tuple[
1459
+ Annotated[StrictFloat, Field(gt=0)],
1460
+ Annotated[StrictFloat, Field(gt=0)]
1461
+ ]
1462
+ ] = None,
1463
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1464
+ _content_type: Optional[StrictStr] = None,
1465
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1466
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1467
+ ) -> ApiResponse[List[str]]:
1468
+ """Get the Organization permissions by given role
1469
+
1470
+
1471
+ :param organization_id: the Organization identifier (required)
1472
+ :type organization_id: str
1473
+ :param role: the Role (required)
1474
+ :type role: str
1475
+ :param _request_timeout: timeout setting for this request. If one
1476
+ number provided, it will be total request
1477
+ timeout. It can also be a pair (tuple) of
1478
+ (connection, read) timeouts.
1479
+ :type _request_timeout: int, tuple(int, int), optional
1480
+ :param _request_auth: set to override the auth_settings for an a single
1481
+ request; this effectively ignores the
1482
+ authentication in the spec for a single request.
1483
+ :type _request_auth: dict, optional
1484
+ :param _content_type: force content-type for the request.
1485
+ :type _content_type: str, Optional
1486
+ :param _headers: set to override the headers for a single
1487
+ request; this effectively ignores the headers
1488
+ in the spec for a single request.
1489
+ :type _headers: dict, optional
1490
+ :param _host_index: set to override the host_index for a single
1491
+ request; this effectively ignores the host_index
1492
+ in the spec for a single request.
1493
+ :type _host_index: int, optional
1494
+ :return: Returns the result object.
1495
+ """ # noqa: E501
1496
+
1497
+ _param = self._get_organization_permissions_serialize(
1498
+ organization_id=organization_id,
1499
+ role=role,
1500
+ _request_auth=_request_auth,
1501
+ _content_type=_content_type,
1502
+ _headers=_headers,
1503
+ _host_index=_host_index
1504
+ )
1505
+
1506
+ _response_types_map: Dict[str, Optional[str]] = {
1507
+ '200': "List[str]",
1508
+ }
1509
+ response_data = self.api_client.call_api(
1510
+ *_param,
1511
+ _request_timeout=_request_timeout
1512
+ )
1513
+ response_data.read()
1514
+ return self.api_client.response_deserialize(
1515
+ response_data=response_data,
1516
+ response_types_map=_response_types_map,
1517
+ )
1518
+
1519
+
1520
+ @validate_call
1521
+ def get_organization_permissions_without_preload_content(
1522
+ self,
1523
+ organization_id: Annotated[StrictStr, Field(description="the Organization identifier")],
1524
+ role: Annotated[StrictStr, Field(description="the Role")],
1525
+ _request_timeout: Union[
1526
+ None,
1527
+ Annotated[StrictFloat, Field(gt=0)],
1528
+ Tuple[
1529
+ Annotated[StrictFloat, Field(gt=0)],
1530
+ Annotated[StrictFloat, Field(gt=0)]
1531
+ ]
1532
+ ] = None,
1533
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1534
+ _content_type: Optional[StrictStr] = None,
1535
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1536
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1537
+ ) -> RESTResponseType:
1538
+ """Get the Organization permissions by given role
1539
+
1540
+
1541
+ :param organization_id: the Organization identifier (required)
1542
+ :type organization_id: str
1543
+ :param role: the Role (required)
1544
+ :type role: str
1545
+ :param _request_timeout: timeout setting for this request. If one
1546
+ number provided, it will be total request
1547
+ timeout. It can also be a pair (tuple) of
1548
+ (connection, read) timeouts.
1549
+ :type _request_timeout: int, tuple(int, int), optional
1550
+ :param _request_auth: set to override the auth_settings for an a single
1551
+ request; this effectively ignores the
1552
+ authentication in the spec for a single request.
1553
+ :type _request_auth: dict, optional
1554
+ :param _content_type: force content-type for the request.
1555
+ :type _content_type: str, Optional
1556
+ :param _headers: set to override the headers for a single
1557
+ request; this effectively ignores the headers
1558
+ in the spec for a single request.
1559
+ :type _headers: dict, optional
1560
+ :param _host_index: set to override the host_index for a single
1561
+ request; this effectively ignores the host_index
1562
+ in the spec for a single request.
1563
+ :type _host_index: int, optional
1564
+ :return: Returns the result object.
1565
+ """ # noqa: E501
1566
+
1567
+ _param = self._get_organization_permissions_serialize(
1568
+ organization_id=organization_id,
1569
+ role=role,
1570
+ _request_auth=_request_auth,
1571
+ _content_type=_content_type,
1572
+ _headers=_headers,
1573
+ _host_index=_host_index
1574
+ )
1575
+
1576
+ _response_types_map: Dict[str, Optional[str]] = {
1577
+ '200': "List[str]",
1578
+ }
1579
+ response_data = self.api_client.call_api(
1580
+ *_param,
1581
+ _request_timeout=_request_timeout
1582
+ )
1583
+ return response_data.response
1584
+
1585
+
1586
+ def _get_organization_permissions_serialize(
1587
+ self,
1588
+ organization_id,
1589
+ role,
1590
+ _request_auth,
1591
+ _content_type,
1592
+ _headers,
1593
+ _host_index,
1594
+ ) -> RequestSerialized:
1595
+
1596
+ _host = None
1597
+
1598
+ _collection_formats: Dict[str, str] = {
1599
+ }
1600
+
1601
+ _path_params: Dict[str, str] = {}
1602
+ _query_params: List[Tuple[str, str]] = []
1603
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1604
+ _form_params: List[Tuple[str, str]] = []
1605
+ _files: Dict[str, str] = {}
1606
+ _body_params: Optional[bytes] = None
1607
+
1608
+ # process the path parameters
1609
+ if organization_id is not None:
1610
+ _path_params['organization_id'] = organization_id
1611
+ if role is not None:
1612
+ _path_params['role'] = role
1613
+ # process the query parameters
1614
+ # process the header parameters
1615
+ # process the form parameters
1616
+ # process the body parameter
1617
+
1618
+
1619
+ # set the HTTP header `Accept`
1620
+ _header_params['Accept'] = self.api_client.select_header_accept(
1621
+ [
1622
+ 'application/json'
1623
+ ]
1624
+ )
1625
+
1626
+
1627
+ # authentication setting
1628
+ _auth_settings: List[str] = [
1629
+ 'oAuth2AuthCode'
1630
+ ]
1631
+
1632
+ return self.api_client.param_serialize(
1633
+ method='GET',
1634
+ resource_path='/organizations/{organization_id}/permissions/{role}',
1635
+ path_params=_path_params,
1636
+ query_params=_query_params,
1637
+ header_params=_header_params,
1638
+ body=_body_params,
1639
+ post_params=_form_params,
1640
+ files=_files,
1641
+ auth_settings=_auth_settings,
1642
+ collection_formats=_collection_formats,
1643
+ _host=_host,
1644
+ _request_auth=_request_auth
1645
+ )
1646
+
1647
+
1648
+
1649
+
1650
+ @validate_call
1651
+ def get_organization_security(
1652
+ self,
1653
+ organization_id: Annotated[StrictStr, Field(description="the Organization identifier")],
1654
+ _request_timeout: Union[
1655
+ None,
1656
+ Annotated[StrictFloat, Field(gt=0)],
1657
+ Tuple[
1658
+ Annotated[StrictFloat, Field(gt=0)],
1659
+ Annotated[StrictFloat, Field(gt=0)]
1660
+ ]
1661
+ ] = None,
1662
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1663
+ _content_type: Optional[StrictStr] = None,
1664
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1665
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1666
+ ) -> OrganizationSecurity:
1667
+ """Get the Organization security information
1668
+
1669
+
1670
+ :param organization_id: the Organization identifier (required)
1671
+ :type organization_id: str
1672
+ :param _request_timeout: timeout setting for this request. If one
1673
+ number provided, it will be total request
1674
+ timeout. It can also be a pair (tuple) of
1675
+ (connection, read) timeouts.
1676
+ :type _request_timeout: int, tuple(int, int), optional
1677
+ :param _request_auth: set to override the auth_settings for an a single
1678
+ request; this effectively ignores the
1679
+ authentication in the spec for a single request.
1680
+ :type _request_auth: dict, optional
1681
+ :param _content_type: force content-type for the request.
1682
+ :type _content_type: str, Optional
1683
+ :param _headers: set to override the headers for a single
1684
+ request; this effectively ignores the headers
1685
+ in the spec for a single request.
1686
+ :type _headers: dict, optional
1687
+ :param _host_index: set to override the host_index for a single
1688
+ request; this effectively ignores the host_index
1689
+ in the spec for a single request.
1690
+ :type _host_index: int, optional
1691
+ :return: Returns the result object.
1692
+ """ # noqa: E501
1693
+
1694
+ _param = self._get_organization_security_serialize(
1695
+ organization_id=organization_id,
1696
+ _request_auth=_request_auth,
1697
+ _content_type=_content_type,
1698
+ _headers=_headers,
1699
+ _host_index=_host_index
1700
+ )
1701
+
1702
+ _response_types_map: Dict[str, Optional[str]] = {
1703
+ '200': "OrganizationSecurity",
1704
+ '404': None,
1705
+ }
1706
+ response_data = self.api_client.call_api(
1707
+ *_param,
1708
+ _request_timeout=_request_timeout
1709
+ )
1710
+ response_data.read()
1711
+ return self.api_client.response_deserialize(
1712
+ response_data=response_data,
1713
+ response_types_map=_response_types_map,
1714
+ ).data
1715
+
1716
+
1717
+ @validate_call
1718
+ def get_organization_security_with_http_info(
1719
+ self,
1720
+ organization_id: Annotated[StrictStr, Field(description="the Organization identifier")],
1721
+ _request_timeout: Union[
1722
+ None,
1723
+ Annotated[StrictFloat, Field(gt=0)],
1724
+ Tuple[
1725
+ Annotated[StrictFloat, Field(gt=0)],
1726
+ Annotated[StrictFloat, Field(gt=0)]
1727
+ ]
1728
+ ] = None,
1729
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1730
+ _content_type: Optional[StrictStr] = None,
1731
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1732
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1733
+ ) -> ApiResponse[OrganizationSecurity]:
1734
+ """Get the Organization security information
1735
+
1736
+
1737
+ :param organization_id: the Organization identifier (required)
1738
+ :type organization_id: str
1739
+ :param _request_timeout: timeout setting for this request. If one
1740
+ number provided, it will be total request
1741
+ timeout. It can also be a pair (tuple) of
1742
+ (connection, read) timeouts.
1743
+ :type _request_timeout: int, tuple(int, int), optional
1744
+ :param _request_auth: set to override the auth_settings for an a single
1745
+ request; this effectively ignores the
1746
+ authentication in the spec for a single request.
1747
+ :type _request_auth: dict, optional
1748
+ :param _content_type: force content-type for the request.
1749
+ :type _content_type: str, Optional
1750
+ :param _headers: set to override the headers for a single
1751
+ request; this effectively ignores the headers
1752
+ in the spec for a single request.
1753
+ :type _headers: dict, optional
1754
+ :param _host_index: set to override the host_index for a single
1755
+ request; this effectively ignores the host_index
1756
+ in the spec for a single request.
1757
+ :type _host_index: int, optional
1758
+ :return: Returns the result object.
1759
+ """ # noqa: E501
1760
+
1761
+ _param = self._get_organization_security_serialize(
1762
+ organization_id=organization_id,
1763
+ _request_auth=_request_auth,
1764
+ _content_type=_content_type,
1765
+ _headers=_headers,
1766
+ _host_index=_host_index
1767
+ )
1768
+
1769
+ _response_types_map: Dict[str, Optional[str]] = {
1770
+ '200': "OrganizationSecurity",
1771
+ '404': None,
1772
+ }
1773
+ response_data = self.api_client.call_api(
1774
+ *_param,
1775
+ _request_timeout=_request_timeout
1776
+ )
1777
+ response_data.read()
1778
+ return self.api_client.response_deserialize(
1779
+ response_data=response_data,
1780
+ response_types_map=_response_types_map,
1781
+ )
1782
+
1783
+
1784
+ @validate_call
1785
+ def get_organization_security_without_preload_content(
1786
+ self,
1787
+ organization_id: Annotated[StrictStr, Field(description="the Organization identifier")],
1788
+ _request_timeout: Union[
1789
+ None,
1790
+ Annotated[StrictFloat, Field(gt=0)],
1791
+ Tuple[
1792
+ Annotated[StrictFloat, Field(gt=0)],
1793
+ Annotated[StrictFloat, Field(gt=0)]
1794
+ ]
1795
+ ] = None,
1796
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1797
+ _content_type: Optional[StrictStr] = None,
1798
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1799
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1800
+ ) -> RESTResponseType:
1801
+ """Get the Organization security information
1802
+
1803
+
1804
+ :param organization_id: the Organization identifier (required)
1805
+ :type organization_id: str
1806
+ :param _request_timeout: timeout setting for this request. If one
1807
+ number provided, it will be total request
1808
+ timeout. It can also be a pair (tuple) of
1809
+ (connection, read) timeouts.
1810
+ :type _request_timeout: int, tuple(int, int), optional
1811
+ :param _request_auth: set to override the auth_settings for an a single
1812
+ request; this effectively ignores the
1813
+ authentication in the spec for a single request.
1814
+ :type _request_auth: dict, optional
1815
+ :param _content_type: force content-type for the request.
1816
+ :type _content_type: str, Optional
1817
+ :param _headers: set to override the headers for a single
1818
+ request; this effectively ignores the headers
1819
+ in the spec for a single request.
1820
+ :type _headers: dict, optional
1821
+ :param _host_index: set to override the host_index for a single
1822
+ request; this effectively ignores the host_index
1823
+ in the spec for a single request.
1824
+ :type _host_index: int, optional
1825
+ :return: Returns the result object.
1826
+ """ # noqa: E501
1827
+
1828
+ _param = self._get_organization_security_serialize(
1829
+ organization_id=organization_id,
1830
+ _request_auth=_request_auth,
1831
+ _content_type=_content_type,
1832
+ _headers=_headers,
1833
+ _host_index=_host_index
1834
+ )
1835
+
1836
+ _response_types_map: Dict[str, Optional[str]] = {
1837
+ '200': "OrganizationSecurity",
1838
+ '404': None,
1839
+ }
1840
+ response_data = self.api_client.call_api(
1841
+ *_param,
1842
+ _request_timeout=_request_timeout
1843
+ )
1844
+ return response_data.response
1845
+
1846
+
1847
+ def _get_organization_security_serialize(
1848
+ self,
1849
+ organization_id,
1850
+ _request_auth,
1851
+ _content_type,
1852
+ _headers,
1853
+ _host_index,
1854
+ ) -> RequestSerialized:
1855
+
1856
+ _host = None
1857
+
1858
+ _collection_formats: Dict[str, str] = {
1859
+ }
1860
+
1861
+ _path_params: Dict[str, str] = {}
1862
+ _query_params: List[Tuple[str, str]] = []
1863
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1864
+ _form_params: List[Tuple[str, str]] = []
1865
+ _files: Dict[str, str] = {}
1866
+ _body_params: Optional[bytes] = None
1867
+
1868
+ # process the path parameters
1869
+ if organization_id is not None:
1870
+ _path_params['organization_id'] = organization_id
1871
+ # process the query parameters
1872
+ # process the header parameters
1873
+ # process the form parameters
1874
+ # process the body parameter
1875
+
1876
+
1877
+ # set the HTTP header `Accept`
1878
+ _header_params['Accept'] = self.api_client.select_header_accept(
1879
+ [
1880
+ 'application/json'
1881
+ ]
1882
+ )
1883
+
1884
+
1885
+ # authentication setting
1886
+ _auth_settings: List[str] = [
1887
+ 'oAuth2AuthCode'
1888
+ ]
1889
+
1890
+ return self.api_client.param_serialize(
1891
+ method='GET',
1892
+ resource_path='/organizations/{organization_id}/security',
1893
+ path_params=_path_params,
1894
+ query_params=_query_params,
1895
+ header_params=_header_params,
1896
+ body=_body_params,
1897
+ post_params=_form_params,
1898
+ files=_files,
1899
+ auth_settings=_auth_settings,
1900
+ collection_formats=_collection_formats,
1901
+ _host=_host,
1902
+ _request_auth=_request_auth
1903
+ )
1904
+
1905
+
1906
+
1907
+
1908
+ @validate_call
1909
+ def get_organization_security_users(
1910
+ self,
1911
+ organization_id: Annotated[StrictStr, Field(description="The Organization identifier")],
1912
+ _request_timeout: Union[
1913
+ None,
1914
+ Annotated[StrictFloat, Field(gt=0)],
1915
+ Tuple[
1916
+ Annotated[StrictFloat, Field(gt=0)],
1917
+ Annotated[StrictFloat, Field(gt=0)]
1918
+ ]
1919
+ ] = None,
1920
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1921
+ _content_type: Optional[StrictStr] = None,
1922
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1923
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1924
+ ) -> List[str]:
1925
+ """Get the Organization security users list
1926
+
1927
+
1928
+ :param organization_id: The Organization identifier (required)
1929
+ :type organization_id: str
1930
+ :param _request_timeout: timeout setting for this request. If one
1931
+ number provided, it will be total request
1932
+ timeout. It can also be a pair (tuple) of
1933
+ (connection, read) timeouts.
1934
+ :type _request_timeout: int, tuple(int, int), optional
1935
+ :param _request_auth: set to override the auth_settings for an a single
1936
+ request; this effectively ignores the
1937
+ authentication in the spec for a single request.
1938
+ :type _request_auth: dict, optional
1939
+ :param _content_type: force content-type for the request.
1940
+ :type _content_type: str, Optional
1941
+ :param _headers: set to override the headers for a single
1942
+ request; this effectively ignores the headers
1943
+ in the spec for a single request.
1944
+ :type _headers: dict, optional
1945
+ :param _host_index: set to override the host_index for a single
1946
+ request; this effectively ignores the host_index
1947
+ in the spec for a single request.
1948
+ :type _host_index: int, optional
1949
+ :return: Returns the result object.
1950
+ """ # noqa: E501
1951
+
1952
+ _param = self._get_organization_security_users_serialize(
1953
+ organization_id=organization_id,
1954
+ _request_auth=_request_auth,
1955
+ _content_type=_content_type,
1956
+ _headers=_headers,
1957
+ _host_index=_host_index
1958
+ )
1959
+
1960
+ _response_types_map: Dict[str, Optional[str]] = {
1961
+ '200': "List[str]",
1962
+ '404': None,
1963
+ }
1964
+ response_data = self.api_client.call_api(
1965
+ *_param,
1966
+ _request_timeout=_request_timeout
1967
+ )
1968
+ response_data.read()
1969
+ return self.api_client.response_deserialize(
1970
+ response_data=response_data,
1971
+ response_types_map=_response_types_map,
1972
+ ).data
1973
+
1974
+
1975
+ @validate_call
1976
+ def get_organization_security_users_with_http_info(
1977
+ self,
1978
+ organization_id: Annotated[StrictStr, Field(description="The Organization identifier")],
1979
+ _request_timeout: Union[
1980
+ None,
1981
+ Annotated[StrictFloat, Field(gt=0)],
1982
+ Tuple[
1983
+ Annotated[StrictFloat, Field(gt=0)],
1984
+ Annotated[StrictFloat, Field(gt=0)]
1985
+ ]
1986
+ ] = None,
1987
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1988
+ _content_type: Optional[StrictStr] = None,
1989
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1990
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1991
+ ) -> ApiResponse[List[str]]:
1992
+ """Get the Organization security users list
1993
+
1994
+
1995
+ :param organization_id: The Organization identifier (required)
1996
+ :type organization_id: str
1997
+ :param _request_timeout: timeout setting for this request. If one
1998
+ number provided, it will be total request
1999
+ timeout. It can also be a pair (tuple) of
2000
+ (connection, read) timeouts.
2001
+ :type _request_timeout: int, tuple(int, int), optional
2002
+ :param _request_auth: set to override the auth_settings for an a single
2003
+ request; this effectively ignores the
2004
+ authentication in the spec for a single request.
2005
+ :type _request_auth: dict, optional
2006
+ :param _content_type: force content-type for the request.
2007
+ :type _content_type: str, Optional
2008
+ :param _headers: set to override the headers for a single
2009
+ request; this effectively ignores the headers
2010
+ in the spec for a single request.
2011
+ :type _headers: dict, optional
2012
+ :param _host_index: set to override the host_index for a single
2013
+ request; this effectively ignores the host_index
2014
+ in the spec for a single request.
2015
+ :type _host_index: int, optional
2016
+ :return: Returns the result object.
2017
+ """ # noqa: E501
2018
+
2019
+ _param = self._get_organization_security_users_serialize(
2020
+ organization_id=organization_id,
2021
+ _request_auth=_request_auth,
2022
+ _content_type=_content_type,
2023
+ _headers=_headers,
2024
+ _host_index=_host_index
2025
+ )
2026
+
2027
+ _response_types_map: Dict[str, Optional[str]] = {
2028
+ '200': "List[str]",
2029
+ '404': None,
2030
+ }
2031
+ response_data = self.api_client.call_api(
2032
+ *_param,
2033
+ _request_timeout=_request_timeout
2034
+ )
2035
+ response_data.read()
2036
+ return self.api_client.response_deserialize(
2037
+ response_data=response_data,
2038
+ response_types_map=_response_types_map,
2039
+ )
2040
+
2041
+
2042
+ @validate_call
2043
+ def get_organization_security_users_without_preload_content(
2044
+ self,
2045
+ organization_id: Annotated[StrictStr, Field(description="The Organization identifier")],
2046
+ _request_timeout: Union[
2047
+ None,
2048
+ Annotated[StrictFloat, Field(gt=0)],
2049
+ Tuple[
2050
+ Annotated[StrictFloat, Field(gt=0)],
2051
+ Annotated[StrictFloat, Field(gt=0)]
2052
+ ]
2053
+ ] = None,
2054
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2055
+ _content_type: Optional[StrictStr] = None,
2056
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2057
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2058
+ ) -> RESTResponseType:
2059
+ """Get the Organization security users list
2060
+
2061
+
2062
+ :param organization_id: The Organization identifier (required)
2063
+ :type organization_id: str
2064
+ :param _request_timeout: timeout setting for this request. If one
2065
+ number provided, it will be total request
2066
+ timeout. It can also be a pair (tuple) of
2067
+ (connection, read) timeouts.
2068
+ :type _request_timeout: int, tuple(int, int), optional
2069
+ :param _request_auth: set to override the auth_settings for an a single
2070
+ request; this effectively ignores the
2071
+ authentication in the spec for a single request.
2072
+ :type _request_auth: dict, optional
2073
+ :param _content_type: force content-type for the request.
2074
+ :type _content_type: str, Optional
2075
+ :param _headers: set to override the headers for a single
2076
+ request; this effectively ignores the headers
2077
+ in the spec for a single request.
2078
+ :type _headers: dict, optional
2079
+ :param _host_index: set to override the host_index for a single
2080
+ request; this effectively ignores the host_index
2081
+ in the spec for a single request.
2082
+ :type _host_index: int, optional
2083
+ :return: Returns the result object.
2084
+ """ # noqa: E501
2085
+
2086
+ _param = self._get_organization_security_users_serialize(
2087
+ organization_id=organization_id,
2088
+ _request_auth=_request_auth,
2089
+ _content_type=_content_type,
2090
+ _headers=_headers,
2091
+ _host_index=_host_index
2092
+ )
2093
+
2094
+ _response_types_map: Dict[str, Optional[str]] = {
2095
+ '200': "List[str]",
2096
+ '404': None,
2097
+ }
2098
+ response_data = self.api_client.call_api(
2099
+ *_param,
2100
+ _request_timeout=_request_timeout
2101
+ )
2102
+ return response_data.response
2103
+
2104
+
2105
+ def _get_organization_security_users_serialize(
2106
+ self,
2107
+ organization_id,
2108
+ _request_auth,
2109
+ _content_type,
2110
+ _headers,
2111
+ _host_index,
2112
+ ) -> RequestSerialized:
2113
+
2114
+ _host = None
2115
+
2116
+ _collection_formats: Dict[str, str] = {
2117
+ }
2118
+
2119
+ _path_params: Dict[str, str] = {}
2120
+ _query_params: List[Tuple[str, str]] = []
2121
+ _header_params: Dict[str, Optional[str]] = _headers or {}
2122
+ _form_params: List[Tuple[str, str]] = []
2123
+ _files: Dict[str, str] = {}
2124
+ _body_params: Optional[bytes] = None
2125
+
2126
+ # process the path parameters
2127
+ if organization_id is not None:
2128
+ _path_params['organization_id'] = organization_id
2129
+ # process the query parameters
2130
+ # process the header parameters
2131
+ # process the form parameters
2132
+ # process the body parameter
2133
+
2134
+
2135
+ # set the HTTP header `Accept`
2136
+ _header_params['Accept'] = self.api_client.select_header_accept(
2137
+ [
2138
+ 'application/json'
2139
+ ]
2140
+ )
2141
+
2142
+
2143
+ # authentication setting
2144
+ _auth_settings: List[str] = [
2145
+ 'oAuth2AuthCode'
2146
+ ]
2147
+
2148
+ return self.api_client.param_serialize(
2149
+ method='GET',
2150
+ resource_path='/organizations/{organization_id}/security/users',
2151
+ path_params=_path_params,
2152
+ query_params=_query_params,
2153
+ header_params=_header_params,
2154
+ body=_body_params,
2155
+ post_params=_form_params,
2156
+ files=_files,
2157
+ auth_settings=_auth_settings,
2158
+ collection_formats=_collection_formats,
2159
+ _host=_host,
2160
+ _request_auth=_request_auth
2161
+ )
2162
+
2163
+
2164
+
2165
+
2166
+ @validate_call
2167
+ def register_organization(
2168
+ self,
2169
+ organization: Annotated[Organization, Field(description="the Organization to register")],
2170
+ _request_timeout: Union[
2171
+ None,
2172
+ Annotated[StrictFloat, Field(gt=0)],
2173
+ Tuple[
2174
+ Annotated[StrictFloat, Field(gt=0)],
2175
+ Annotated[StrictFloat, Field(gt=0)]
2176
+ ]
2177
+ ] = None,
2178
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2179
+ _content_type: Optional[StrictStr] = None,
2180
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2181
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2182
+ ) -> Organization:
2183
+ """Register a new organization
2184
+
2185
+
2186
+ :param organization: the Organization to register (required)
2187
+ :type organization: Organization
2188
+ :param _request_timeout: timeout setting for this request. If one
2189
+ number provided, it will be total request
2190
+ timeout. It can also be a pair (tuple) of
2191
+ (connection, read) timeouts.
2192
+ :type _request_timeout: int, tuple(int, int), optional
2193
+ :param _request_auth: set to override the auth_settings for an a single
2194
+ request; this effectively ignores the
2195
+ authentication in the spec for a single request.
2196
+ :type _request_auth: dict, optional
2197
+ :param _content_type: force content-type for the request.
2198
+ :type _content_type: str, Optional
2199
+ :param _headers: set to override the headers for a single
2200
+ request; this effectively ignores the headers
2201
+ in the spec for a single request.
2202
+ :type _headers: dict, optional
2203
+ :param _host_index: set to override the host_index for a single
2204
+ request; this effectively ignores the host_index
2205
+ in the spec for a single request.
2206
+ :type _host_index: int, optional
2207
+ :return: Returns the result object.
2208
+ """ # noqa: E501
2209
+
2210
+ _param = self._register_organization_serialize(
2211
+ organization=organization,
2212
+ _request_auth=_request_auth,
2213
+ _content_type=_content_type,
2214
+ _headers=_headers,
2215
+ _host_index=_host_index
2216
+ )
2217
+
2218
+ _response_types_map: Dict[str, Optional[str]] = {
2219
+ '201': "Organization",
2220
+ '400': None,
2221
+ }
2222
+ response_data = self.api_client.call_api(
2223
+ *_param,
2224
+ _request_timeout=_request_timeout
2225
+ )
2226
+ response_data.read()
2227
+ return self.api_client.response_deserialize(
2228
+ response_data=response_data,
2229
+ response_types_map=_response_types_map,
2230
+ ).data
2231
+
2232
+
2233
+ @validate_call
2234
+ def register_organization_with_http_info(
2235
+ self,
2236
+ organization: Annotated[Organization, Field(description="the Organization to register")],
2237
+ _request_timeout: Union[
2238
+ None,
2239
+ Annotated[StrictFloat, Field(gt=0)],
2240
+ Tuple[
2241
+ Annotated[StrictFloat, Field(gt=0)],
2242
+ Annotated[StrictFloat, Field(gt=0)]
2243
+ ]
2244
+ ] = None,
2245
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2246
+ _content_type: Optional[StrictStr] = None,
2247
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2248
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2249
+ ) -> ApiResponse[Organization]:
2250
+ """Register a new organization
2251
+
2252
+
2253
+ :param organization: the Organization to register (required)
2254
+ :type organization: Organization
2255
+ :param _request_timeout: timeout setting for this request. If one
2256
+ number provided, it will be total request
2257
+ timeout. It can also be a pair (tuple) of
2258
+ (connection, read) timeouts.
2259
+ :type _request_timeout: int, tuple(int, int), optional
2260
+ :param _request_auth: set to override the auth_settings for an a single
2261
+ request; this effectively ignores the
2262
+ authentication in the spec for a single request.
2263
+ :type _request_auth: dict, optional
2264
+ :param _content_type: force content-type for the request.
2265
+ :type _content_type: str, Optional
2266
+ :param _headers: set to override the headers for a single
2267
+ request; this effectively ignores the headers
2268
+ in the spec for a single request.
2269
+ :type _headers: dict, optional
2270
+ :param _host_index: set to override the host_index for a single
2271
+ request; this effectively ignores the host_index
2272
+ in the spec for a single request.
2273
+ :type _host_index: int, optional
2274
+ :return: Returns the result object.
2275
+ """ # noqa: E501
2276
+
2277
+ _param = self._register_organization_serialize(
2278
+ organization=organization,
2279
+ _request_auth=_request_auth,
2280
+ _content_type=_content_type,
2281
+ _headers=_headers,
2282
+ _host_index=_host_index
2283
+ )
2284
+
2285
+ _response_types_map: Dict[str, Optional[str]] = {
2286
+ '201': "Organization",
2287
+ '400': None,
2288
+ }
2289
+ response_data = self.api_client.call_api(
2290
+ *_param,
2291
+ _request_timeout=_request_timeout
2292
+ )
2293
+ response_data.read()
2294
+ return self.api_client.response_deserialize(
2295
+ response_data=response_data,
2296
+ response_types_map=_response_types_map,
2297
+ )
2298
+
2299
+
2300
+ @validate_call
2301
+ def register_organization_without_preload_content(
2302
+ self,
2303
+ organization: Annotated[Organization, Field(description="the Organization to register")],
2304
+ _request_timeout: Union[
2305
+ None,
2306
+ Annotated[StrictFloat, Field(gt=0)],
2307
+ Tuple[
2308
+ Annotated[StrictFloat, Field(gt=0)],
2309
+ Annotated[StrictFloat, Field(gt=0)]
2310
+ ]
2311
+ ] = None,
2312
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2313
+ _content_type: Optional[StrictStr] = None,
2314
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2315
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2316
+ ) -> RESTResponseType:
2317
+ """Register a new organization
2318
+
2319
+
2320
+ :param organization: the Organization to register (required)
2321
+ :type organization: Organization
2322
+ :param _request_timeout: timeout setting for this request. If one
2323
+ number provided, it will be total request
2324
+ timeout. It can also be a pair (tuple) of
2325
+ (connection, read) timeouts.
2326
+ :type _request_timeout: int, tuple(int, int), optional
2327
+ :param _request_auth: set to override the auth_settings for an a single
2328
+ request; this effectively ignores the
2329
+ authentication in the spec for a single request.
2330
+ :type _request_auth: dict, optional
2331
+ :param _content_type: force content-type for the request.
2332
+ :type _content_type: str, Optional
2333
+ :param _headers: set to override the headers for a single
2334
+ request; this effectively ignores the headers
2335
+ in the spec for a single request.
2336
+ :type _headers: dict, optional
2337
+ :param _host_index: set to override the host_index for a single
2338
+ request; this effectively ignores the host_index
2339
+ in the spec for a single request.
2340
+ :type _host_index: int, optional
2341
+ :return: Returns the result object.
2342
+ """ # noqa: E501
2343
+
2344
+ _param = self._register_organization_serialize(
2345
+ organization=organization,
2346
+ _request_auth=_request_auth,
2347
+ _content_type=_content_type,
2348
+ _headers=_headers,
2349
+ _host_index=_host_index
2350
+ )
2351
+
2352
+ _response_types_map: Dict[str, Optional[str]] = {
2353
+ '201': "Organization",
2354
+ '400': None,
2355
+ }
2356
+ response_data = self.api_client.call_api(
2357
+ *_param,
2358
+ _request_timeout=_request_timeout
2359
+ )
2360
+ return response_data.response
2361
+
2362
+
2363
+ def _register_organization_serialize(
2364
+ self,
2365
+ organization,
2366
+ _request_auth,
2367
+ _content_type,
2368
+ _headers,
2369
+ _host_index,
2370
+ ) -> RequestSerialized:
2371
+
2372
+ _host = None
2373
+
2374
+ _collection_formats: Dict[str, str] = {
2375
+ }
2376
+
2377
+ _path_params: Dict[str, str] = {}
2378
+ _query_params: List[Tuple[str, str]] = []
2379
+ _header_params: Dict[str, Optional[str]] = _headers or {}
2380
+ _form_params: List[Tuple[str, str]] = []
2381
+ _files: Dict[str, str] = {}
2382
+ _body_params: Optional[bytes] = None
2383
+
2384
+ # process the path parameters
2385
+ # process the query parameters
2386
+ # process the header parameters
2387
+ # process the form parameters
2388
+ # process the body parameter
2389
+ if organization is not None:
2390
+ _body_params = organization
2391
+
2392
+
2393
+ # set the HTTP header `Accept`
2394
+ _header_params['Accept'] = self.api_client.select_header_accept(
2395
+ [
2396
+ 'application/json'
2397
+ ]
2398
+ )
2399
+
2400
+ # set the HTTP header `Content-Type`
2401
+ if _content_type:
2402
+ _header_params['Content-Type'] = _content_type
2403
+ else:
2404
+ _default_content_type = (
2405
+ self.api_client.select_header_content_type(
2406
+ [
2407
+ 'application/json',
2408
+ 'application/yaml'
2409
+ ]
2410
+ )
2411
+ )
2412
+ if _default_content_type is not None:
2413
+ _header_params['Content-Type'] = _default_content_type
2414
+
2415
+ # authentication setting
2416
+ _auth_settings: List[str] = [
2417
+ 'oAuth2AuthCode'
2418
+ ]
2419
+
2420
+ return self.api_client.param_serialize(
2421
+ method='POST',
2422
+ resource_path='/organizations',
2423
+ path_params=_path_params,
2424
+ query_params=_query_params,
2425
+ header_params=_header_params,
2426
+ body=_body_params,
2427
+ post_params=_form_params,
2428
+ files=_files,
2429
+ auth_settings=_auth_settings,
2430
+ collection_formats=_collection_formats,
2431
+ _host=_host,
2432
+ _request_auth=_request_auth
2433
+ )
2434
+
2435
+
2436
+
2437
+
2438
+ @validate_call
2439
+ def remove_organization_access_control(
2440
+ self,
2441
+ organization_id: Annotated[StrictStr, Field(description="the Organization identifier")],
2442
+ identity_id: Annotated[StrictStr, Field(description="the User identifier")],
2443
+ _request_timeout: Union[
2444
+ None,
2445
+ Annotated[StrictFloat, Field(gt=0)],
2446
+ Tuple[
2447
+ Annotated[StrictFloat, Field(gt=0)],
2448
+ Annotated[StrictFloat, Field(gt=0)]
2449
+ ]
2450
+ ] = None,
2451
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2452
+ _content_type: Optional[StrictStr] = None,
2453
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2454
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2455
+ ) -> None:
2456
+ """Remove the specified access from the given Organization
2457
+
2458
+
2459
+ :param organization_id: the Organization identifier (required)
2460
+ :type organization_id: str
2461
+ :param identity_id: the User identifier (required)
2462
+ :type identity_id: str
2463
+ :param _request_timeout: timeout setting for this request. If one
2464
+ number provided, it will be total request
2465
+ timeout. It can also be a pair (tuple) of
2466
+ (connection, read) timeouts.
2467
+ :type _request_timeout: int, tuple(int, int), optional
2468
+ :param _request_auth: set to override the auth_settings for an a single
2469
+ request; this effectively ignores the
2470
+ authentication in the spec for a single request.
2471
+ :type _request_auth: dict, optional
2472
+ :param _content_type: force content-type for the request.
2473
+ :type _content_type: str, Optional
2474
+ :param _headers: set to override the headers for a single
2475
+ request; this effectively ignores the headers
2476
+ in the spec for a single request.
2477
+ :type _headers: dict, optional
2478
+ :param _host_index: set to override the host_index for a single
2479
+ request; this effectively ignores the host_index
2480
+ in the spec for a single request.
2481
+ :type _host_index: int, optional
2482
+ :return: Returns the result object.
2483
+ """ # noqa: E501
2484
+
2485
+ _param = self._remove_organization_access_control_serialize(
2486
+ organization_id=organization_id,
2487
+ identity_id=identity_id,
2488
+ _request_auth=_request_auth,
2489
+ _content_type=_content_type,
2490
+ _headers=_headers,
2491
+ _host_index=_host_index
2492
+ )
2493
+
2494
+ _response_types_map: Dict[str, Optional[str]] = {
2495
+ '204': None,
2496
+ '404': None,
2497
+ }
2498
+ response_data = self.api_client.call_api(
2499
+ *_param,
2500
+ _request_timeout=_request_timeout
2501
+ )
2502
+ response_data.read()
2503
+ return self.api_client.response_deserialize(
2504
+ response_data=response_data,
2505
+ response_types_map=_response_types_map,
2506
+ ).data
2507
+
2508
+
2509
+ @validate_call
2510
+ def remove_organization_access_control_with_http_info(
2511
+ self,
2512
+ organization_id: Annotated[StrictStr, Field(description="the Organization identifier")],
2513
+ identity_id: Annotated[StrictStr, Field(description="the User identifier")],
2514
+ _request_timeout: Union[
2515
+ None,
2516
+ Annotated[StrictFloat, Field(gt=0)],
2517
+ Tuple[
2518
+ Annotated[StrictFloat, Field(gt=0)],
2519
+ Annotated[StrictFloat, Field(gt=0)]
2520
+ ]
2521
+ ] = None,
2522
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2523
+ _content_type: Optional[StrictStr] = None,
2524
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2525
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2526
+ ) -> ApiResponse[None]:
2527
+ """Remove the specified access from the given Organization
2528
+
2529
+
2530
+ :param organization_id: the Organization identifier (required)
2531
+ :type organization_id: str
2532
+ :param identity_id: the User identifier (required)
2533
+ :type identity_id: str
2534
+ :param _request_timeout: timeout setting for this request. If one
2535
+ number provided, it will be total request
2536
+ timeout. It can also be a pair (tuple) of
2537
+ (connection, read) timeouts.
2538
+ :type _request_timeout: int, tuple(int, int), optional
2539
+ :param _request_auth: set to override the auth_settings for an a single
2540
+ request; this effectively ignores the
2541
+ authentication in the spec for a single request.
2542
+ :type _request_auth: dict, optional
2543
+ :param _content_type: force content-type for the request.
2544
+ :type _content_type: str, Optional
2545
+ :param _headers: set to override the headers for a single
2546
+ request; this effectively ignores the headers
2547
+ in the spec for a single request.
2548
+ :type _headers: dict, optional
2549
+ :param _host_index: set to override the host_index for a single
2550
+ request; this effectively ignores the host_index
2551
+ in the spec for a single request.
2552
+ :type _host_index: int, optional
2553
+ :return: Returns the result object.
2554
+ """ # noqa: E501
2555
+
2556
+ _param = self._remove_organization_access_control_serialize(
2557
+ organization_id=organization_id,
2558
+ identity_id=identity_id,
2559
+ _request_auth=_request_auth,
2560
+ _content_type=_content_type,
2561
+ _headers=_headers,
2562
+ _host_index=_host_index
2563
+ )
2564
+
2565
+ _response_types_map: Dict[str, Optional[str]] = {
2566
+ '204': None,
2567
+ '404': None,
2568
+ }
2569
+ response_data = self.api_client.call_api(
2570
+ *_param,
2571
+ _request_timeout=_request_timeout
2572
+ )
2573
+ response_data.read()
2574
+ return self.api_client.response_deserialize(
2575
+ response_data=response_data,
2576
+ response_types_map=_response_types_map,
2577
+ )
2578
+
2579
+
2580
+ @validate_call
2581
+ def remove_organization_access_control_without_preload_content(
2582
+ self,
2583
+ organization_id: Annotated[StrictStr, Field(description="the Organization identifier")],
2584
+ identity_id: Annotated[StrictStr, Field(description="the User identifier")],
2585
+ _request_timeout: Union[
2586
+ None,
2587
+ Annotated[StrictFloat, Field(gt=0)],
2588
+ Tuple[
2589
+ Annotated[StrictFloat, Field(gt=0)],
2590
+ Annotated[StrictFloat, Field(gt=0)]
2591
+ ]
2592
+ ] = None,
2593
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2594
+ _content_type: Optional[StrictStr] = None,
2595
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2596
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2597
+ ) -> RESTResponseType:
2598
+ """Remove the specified access from the given Organization
2599
+
2600
+
2601
+ :param organization_id: the Organization identifier (required)
2602
+ :type organization_id: str
2603
+ :param identity_id: the User identifier (required)
2604
+ :type identity_id: str
2605
+ :param _request_timeout: timeout setting for this request. If one
2606
+ number provided, it will be total request
2607
+ timeout. It can also be a pair (tuple) of
2608
+ (connection, read) timeouts.
2609
+ :type _request_timeout: int, tuple(int, int), optional
2610
+ :param _request_auth: set to override the auth_settings for an a single
2611
+ request; this effectively ignores the
2612
+ authentication in the spec for a single request.
2613
+ :type _request_auth: dict, optional
2614
+ :param _content_type: force content-type for the request.
2615
+ :type _content_type: str, Optional
2616
+ :param _headers: set to override the headers for a single
2617
+ request; this effectively ignores the headers
2618
+ in the spec for a single request.
2619
+ :type _headers: dict, optional
2620
+ :param _host_index: set to override the host_index for a single
2621
+ request; this effectively ignores the host_index
2622
+ in the spec for a single request.
2623
+ :type _host_index: int, optional
2624
+ :return: Returns the result object.
2625
+ """ # noqa: E501
2626
+
2627
+ _param = self._remove_organization_access_control_serialize(
2628
+ organization_id=organization_id,
2629
+ identity_id=identity_id,
2630
+ _request_auth=_request_auth,
2631
+ _content_type=_content_type,
2632
+ _headers=_headers,
2633
+ _host_index=_host_index
2634
+ )
2635
+
2636
+ _response_types_map: Dict[str, Optional[str]] = {
2637
+ '204': None,
2638
+ '404': None,
2639
+ }
2640
+ response_data = self.api_client.call_api(
2641
+ *_param,
2642
+ _request_timeout=_request_timeout
2643
+ )
2644
+ return response_data.response
2645
+
2646
+
2647
+ def _remove_organization_access_control_serialize(
2648
+ self,
2649
+ organization_id,
2650
+ identity_id,
2651
+ _request_auth,
2652
+ _content_type,
2653
+ _headers,
2654
+ _host_index,
2655
+ ) -> RequestSerialized:
2656
+
2657
+ _host = None
2658
+
2659
+ _collection_formats: Dict[str, str] = {
2660
+ }
2661
+
2662
+ _path_params: Dict[str, str] = {}
2663
+ _query_params: List[Tuple[str, str]] = []
2664
+ _header_params: Dict[str, Optional[str]] = _headers or {}
2665
+ _form_params: List[Tuple[str, str]] = []
2666
+ _files: Dict[str, str] = {}
2667
+ _body_params: Optional[bytes] = None
2668
+
2669
+ # process the path parameters
2670
+ if organization_id is not None:
2671
+ _path_params['organization_id'] = organization_id
2672
+ if identity_id is not None:
2673
+ _path_params['identity_id'] = identity_id
2674
+ # process the query parameters
2675
+ # process the header parameters
2676
+ # process the form parameters
2677
+ # process the body parameter
2678
+
2679
+
2680
+
2681
+
2682
+ # authentication setting
2683
+ _auth_settings: List[str] = [
2684
+ 'oAuth2AuthCode'
2685
+ ]
2686
+
2687
+ return self.api_client.param_serialize(
2688
+ method='DELETE',
2689
+ resource_path='/organizations/{organization_id}/security/access/{identity_id}',
2690
+ path_params=_path_params,
2691
+ query_params=_query_params,
2692
+ header_params=_header_params,
2693
+ body=_body_params,
2694
+ post_params=_form_params,
2695
+ files=_files,
2696
+ auth_settings=_auth_settings,
2697
+ collection_formats=_collection_formats,
2698
+ _host=_host,
2699
+ _request_auth=_request_auth
2700
+ )
2701
+
2702
+
2703
+
2704
+
2705
+ @validate_call
2706
+ def set_organization_default_security(
2707
+ self,
2708
+ organization_id: Annotated[StrictStr, Field(description="the Organization identifier")],
2709
+ organization_role: Annotated[OrganizationRole, Field(description="This change the organization default security. The default security is the role assigned to any person not on the Access Control List. If the default security is None, then nobody outside of the ACL can access the organization.")],
2710
+ _request_timeout: Union[
2711
+ None,
2712
+ Annotated[StrictFloat, Field(gt=0)],
2713
+ Tuple[
2714
+ Annotated[StrictFloat, Field(gt=0)],
2715
+ Annotated[StrictFloat, Field(gt=0)]
2716
+ ]
2717
+ ] = None,
2718
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2719
+ _content_type: Optional[StrictStr] = None,
2720
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2721
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2722
+ ) -> OrganizationSecurity:
2723
+ """Set the Organization default security
2724
+
2725
+
2726
+ :param organization_id: the Organization identifier (required)
2727
+ :type organization_id: str
2728
+ :param organization_role: This change the organization default security. The default security is the role assigned to any person not on the Access Control List. If the default security is None, then nobody outside of the ACL can access the organization. (required)
2729
+ :type organization_role: OrganizationRole
2730
+ :param _request_timeout: timeout setting for this request. If one
2731
+ number provided, it will be total request
2732
+ timeout. It can also be a pair (tuple) of
2733
+ (connection, read) timeouts.
2734
+ :type _request_timeout: int, tuple(int, int), optional
2735
+ :param _request_auth: set to override the auth_settings for an a single
2736
+ request; this effectively ignores the
2737
+ authentication in the spec for a single request.
2738
+ :type _request_auth: dict, optional
2739
+ :param _content_type: force content-type for the request.
2740
+ :type _content_type: str, Optional
2741
+ :param _headers: set to override the headers for a single
2742
+ request; this effectively ignores the headers
2743
+ in the spec for a single request.
2744
+ :type _headers: dict, optional
2745
+ :param _host_index: set to override the host_index for a single
2746
+ request; this effectively ignores the host_index
2747
+ in the spec for a single request.
2748
+ :type _host_index: int, optional
2749
+ :return: Returns the result object.
2750
+ """ # noqa: E501
2751
+
2752
+ _param = self._set_organization_default_security_serialize(
2753
+ organization_id=organization_id,
2754
+ organization_role=organization_role,
2755
+ _request_auth=_request_auth,
2756
+ _content_type=_content_type,
2757
+ _headers=_headers,
2758
+ _host_index=_host_index
2759
+ )
2760
+
2761
+ _response_types_map: Dict[str, Optional[str]] = {
2762
+ '201': "OrganizationSecurity",
2763
+ '404': None,
2764
+ }
2765
+ response_data = self.api_client.call_api(
2766
+ *_param,
2767
+ _request_timeout=_request_timeout
2768
+ )
2769
+ response_data.read()
2770
+ return self.api_client.response_deserialize(
2771
+ response_data=response_data,
2772
+ response_types_map=_response_types_map,
2773
+ ).data
2774
+
2775
+
2776
+ @validate_call
2777
+ def set_organization_default_security_with_http_info(
2778
+ self,
2779
+ organization_id: Annotated[StrictStr, Field(description="the Organization identifier")],
2780
+ organization_role: Annotated[OrganizationRole, Field(description="This change the organization default security. The default security is the role assigned to any person not on the Access Control List. If the default security is None, then nobody outside of the ACL can access the organization.")],
2781
+ _request_timeout: Union[
2782
+ None,
2783
+ Annotated[StrictFloat, Field(gt=0)],
2784
+ Tuple[
2785
+ Annotated[StrictFloat, Field(gt=0)],
2786
+ Annotated[StrictFloat, Field(gt=0)]
2787
+ ]
2788
+ ] = None,
2789
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2790
+ _content_type: Optional[StrictStr] = None,
2791
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2792
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2793
+ ) -> ApiResponse[OrganizationSecurity]:
2794
+ """Set the Organization default security
2795
+
2796
+
2797
+ :param organization_id: the Organization identifier (required)
2798
+ :type organization_id: str
2799
+ :param organization_role: This change the organization default security. The default security is the role assigned to any person not on the Access Control List. If the default security is None, then nobody outside of the ACL can access the organization. (required)
2800
+ :type organization_role: OrganizationRole
2801
+ :param _request_timeout: timeout setting for this request. If one
2802
+ number provided, it will be total request
2803
+ timeout. It can also be a pair (tuple) of
2804
+ (connection, read) timeouts.
2805
+ :type _request_timeout: int, tuple(int, int), optional
2806
+ :param _request_auth: set to override the auth_settings for an a single
2807
+ request; this effectively ignores the
2808
+ authentication in the spec for a single request.
2809
+ :type _request_auth: dict, optional
2810
+ :param _content_type: force content-type for the request.
2811
+ :type _content_type: str, Optional
2812
+ :param _headers: set to override the headers for a single
2813
+ request; this effectively ignores the headers
2814
+ in the spec for a single request.
2815
+ :type _headers: dict, optional
2816
+ :param _host_index: set to override the host_index for a single
2817
+ request; this effectively ignores the host_index
2818
+ in the spec for a single request.
2819
+ :type _host_index: int, optional
2820
+ :return: Returns the result object.
2821
+ """ # noqa: E501
2822
+
2823
+ _param = self._set_organization_default_security_serialize(
2824
+ organization_id=organization_id,
2825
+ organization_role=organization_role,
2826
+ _request_auth=_request_auth,
2827
+ _content_type=_content_type,
2828
+ _headers=_headers,
2829
+ _host_index=_host_index
2830
+ )
2831
+
2832
+ _response_types_map: Dict[str, Optional[str]] = {
2833
+ '201': "OrganizationSecurity",
2834
+ '404': None,
2835
+ }
2836
+ response_data = self.api_client.call_api(
2837
+ *_param,
2838
+ _request_timeout=_request_timeout
2839
+ )
2840
+ response_data.read()
2841
+ return self.api_client.response_deserialize(
2842
+ response_data=response_data,
2843
+ response_types_map=_response_types_map,
2844
+ )
2845
+
2846
+
2847
+ @validate_call
2848
+ def set_organization_default_security_without_preload_content(
2849
+ self,
2850
+ organization_id: Annotated[StrictStr, Field(description="the Organization identifier")],
2851
+ organization_role: Annotated[OrganizationRole, Field(description="This change the organization default security. The default security is the role assigned to any person not on the Access Control List. If the default security is None, then nobody outside of the ACL can access the organization.")],
2852
+ _request_timeout: Union[
2853
+ None,
2854
+ Annotated[StrictFloat, Field(gt=0)],
2855
+ Tuple[
2856
+ Annotated[StrictFloat, Field(gt=0)],
2857
+ Annotated[StrictFloat, Field(gt=0)]
2858
+ ]
2859
+ ] = None,
2860
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2861
+ _content_type: Optional[StrictStr] = None,
2862
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2863
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2864
+ ) -> RESTResponseType:
2865
+ """Set the Organization default security
2866
+
2867
+
2868
+ :param organization_id: the Organization identifier (required)
2869
+ :type organization_id: str
2870
+ :param organization_role: This change the organization default security. The default security is the role assigned to any person not on the Access Control List. If the default security is None, then nobody outside of the ACL can access the organization. (required)
2871
+ :type organization_role: OrganizationRole
2872
+ :param _request_timeout: timeout setting for this request. If one
2873
+ number provided, it will be total request
2874
+ timeout. It can also be a pair (tuple) of
2875
+ (connection, read) timeouts.
2876
+ :type _request_timeout: int, tuple(int, int), optional
2877
+ :param _request_auth: set to override the auth_settings for an a single
2878
+ request; this effectively ignores the
2879
+ authentication in the spec for a single request.
2880
+ :type _request_auth: dict, optional
2881
+ :param _content_type: force content-type for the request.
2882
+ :type _content_type: str, Optional
2883
+ :param _headers: set to override the headers for a single
2884
+ request; this effectively ignores the headers
2885
+ in the spec for a single request.
2886
+ :type _headers: dict, optional
2887
+ :param _host_index: set to override the host_index for a single
2888
+ request; this effectively ignores the host_index
2889
+ in the spec for a single request.
2890
+ :type _host_index: int, optional
2891
+ :return: Returns the result object.
2892
+ """ # noqa: E501
2893
+
2894
+ _param = self._set_organization_default_security_serialize(
2895
+ organization_id=organization_id,
2896
+ organization_role=organization_role,
2897
+ _request_auth=_request_auth,
2898
+ _content_type=_content_type,
2899
+ _headers=_headers,
2900
+ _host_index=_host_index
2901
+ )
2902
+
2903
+ _response_types_map: Dict[str, Optional[str]] = {
2904
+ '201': "OrganizationSecurity",
2905
+ '404': None,
2906
+ }
2907
+ response_data = self.api_client.call_api(
2908
+ *_param,
2909
+ _request_timeout=_request_timeout
2910
+ )
2911
+ return response_data.response
2912
+
2913
+
2914
+ def _set_organization_default_security_serialize(
2915
+ self,
2916
+ organization_id,
2917
+ organization_role,
2918
+ _request_auth,
2919
+ _content_type,
2920
+ _headers,
2921
+ _host_index,
2922
+ ) -> RequestSerialized:
2923
+
2924
+ _host = None
2925
+
2926
+ _collection_formats: Dict[str, str] = {
2927
+ }
2928
+
2929
+ _path_params: Dict[str, str] = {}
2930
+ _query_params: List[Tuple[str, str]] = []
2931
+ _header_params: Dict[str, Optional[str]] = _headers or {}
2932
+ _form_params: List[Tuple[str, str]] = []
2933
+ _files: Dict[str, str] = {}
2934
+ _body_params: Optional[bytes] = None
2935
+
2936
+ # process the path parameters
2937
+ if organization_id is not None:
2938
+ _path_params['organization_id'] = organization_id
2939
+ # process the query parameters
2940
+ # process the header parameters
2941
+ # process the form parameters
2942
+ # process the body parameter
2943
+ if organization_role is not None:
2944
+ _body_params = organization_role
2945
+
2946
+
2947
+ # set the HTTP header `Accept`
2948
+ _header_params['Accept'] = self.api_client.select_header_accept(
2949
+ [
2950
+ 'application/json'
2951
+ ]
2952
+ )
2953
+
2954
+ # set the HTTP header `Content-Type`
2955
+ if _content_type:
2956
+ _header_params['Content-Type'] = _content_type
2957
+ else:
2958
+ _default_content_type = (
2959
+ self.api_client.select_header_content_type(
2960
+ [
2961
+ 'application/json',
2962
+ 'application/yaml'
2963
+ ]
2964
+ )
2965
+ )
2966
+ if _default_content_type is not None:
2967
+ _header_params['Content-Type'] = _default_content_type
2968
+
2969
+ # authentication setting
2970
+ _auth_settings: List[str] = [
2971
+ 'oAuth2AuthCode'
2972
+ ]
2973
+
2974
+ return self.api_client.param_serialize(
2975
+ method='POST',
2976
+ resource_path='/organizations/{organization_id}/security/default',
2977
+ path_params=_path_params,
2978
+ query_params=_query_params,
2979
+ header_params=_header_params,
2980
+ body=_body_params,
2981
+ post_params=_form_params,
2982
+ files=_files,
2983
+ auth_settings=_auth_settings,
2984
+ collection_formats=_collection_formats,
2985
+ _host=_host,
2986
+ _request_auth=_request_auth
2987
+ )
2988
+
2989
+
2990
+
2991
+
2992
+ @validate_call
2993
+ def unregister_organization(
2994
+ self,
2995
+ organization_id: Annotated[StrictStr, Field(description="the Organization identifier")],
2996
+ _request_timeout: Union[
2997
+ None,
2998
+ Annotated[StrictFloat, Field(gt=0)],
2999
+ Tuple[
3000
+ Annotated[StrictFloat, Field(gt=0)],
3001
+ Annotated[StrictFloat, Field(gt=0)]
3002
+ ]
3003
+ ] = None,
3004
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
3005
+ _content_type: Optional[StrictStr] = None,
3006
+ _headers: Optional[Dict[StrictStr, Any]] = None,
3007
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
3008
+ ) -> None:
3009
+ """Unregister an organization
3010
+
3011
+
3012
+ :param organization_id: the Organization identifier (required)
3013
+ :type organization_id: str
3014
+ :param _request_timeout: timeout setting for this request. If one
3015
+ number provided, it will be total request
3016
+ timeout. It can also be a pair (tuple) of
3017
+ (connection, read) timeouts.
3018
+ :type _request_timeout: int, tuple(int, int), optional
3019
+ :param _request_auth: set to override the auth_settings for an a single
3020
+ request; this effectively ignores the
3021
+ authentication in the spec for a single request.
3022
+ :type _request_auth: dict, optional
3023
+ :param _content_type: force content-type for the request.
3024
+ :type _content_type: str, Optional
3025
+ :param _headers: set to override the headers for a single
3026
+ request; this effectively ignores the headers
3027
+ in the spec for a single request.
3028
+ :type _headers: dict, optional
3029
+ :param _host_index: set to override the host_index for a single
3030
+ request; this effectively ignores the host_index
3031
+ in the spec for a single request.
3032
+ :type _host_index: int, optional
3033
+ :return: Returns the result object.
3034
+ """ # noqa: E501
3035
+
3036
+ _param = self._unregister_organization_serialize(
3037
+ organization_id=organization_id,
3038
+ _request_auth=_request_auth,
3039
+ _content_type=_content_type,
3040
+ _headers=_headers,
3041
+ _host_index=_host_index
3042
+ )
3043
+
3044
+ _response_types_map: Dict[str, Optional[str]] = {
3045
+ '204': None,
3046
+ '404': None,
3047
+ }
3048
+ response_data = self.api_client.call_api(
3049
+ *_param,
3050
+ _request_timeout=_request_timeout
3051
+ )
3052
+ response_data.read()
3053
+ return self.api_client.response_deserialize(
3054
+ response_data=response_data,
3055
+ response_types_map=_response_types_map,
3056
+ ).data
3057
+
3058
+
3059
+ @validate_call
3060
+ def unregister_organization_with_http_info(
3061
+ self,
3062
+ organization_id: Annotated[StrictStr, Field(description="the Organization identifier")],
3063
+ _request_timeout: Union[
3064
+ None,
3065
+ Annotated[StrictFloat, Field(gt=0)],
3066
+ Tuple[
3067
+ Annotated[StrictFloat, Field(gt=0)],
3068
+ Annotated[StrictFloat, Field(gt=0)]
3069
+ ]
3070
+ ] = None,
3071
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
3072
+ _content_type: Optional[StrictStr] = None,
3073
+ _headers: Optional[Dict[StrictStr, Any]] = None,
3074
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
3075
+ ) -> ApiResponse[None]:
3076
+ """Unregister an organization
3077
+
3078
+
3079
+ :param organization_id: the Organization identifier (required)
3080
+ :type organization_id: str
3081
+ :param _request_timeout: timeout setting for this request. If one
3082
+ number provided, it will be total request
3083
+ timeout. It can also be a pair (tuple) of
3084
+ (connection, read) timeouts.
3085
+ :type _request_timeout: int, tuple(int, int), optional
3086
+ :param _request_auth: set to override the auth_settings for an a single
3087
+ request; this effectively ignores the
3088
+ authentication in the spec for a single request.
3089
+ :type _request_auth: dict, optional
3090
+ :param _content_type: force content-type for the request.
3091
+ :type _content_type: str, Optional
3092
+ :param _headers: set to override the headers for a single
3093
+ request; this effectively ignores the headers
3094
+ in the spec for a single request.
3095
+ :type _headers: dict, optional
3096
+ :param _host_index: set to override the host_index for a single
3097
+ request; this effectively ignores the host_index
3098
+ in the spec for a single request.
3099
+ :type _host_index: int, optional
3100
+ :return: Returns the result object.
3101
+ """ # noqa: E501
3102
+
3103
+ _param = self._unregister_organization_serialize(
3104
+ organization_id=organization_id,
3105
+ _request_auth=_request_auth,
3106
+ _content_type=_content_type,
3107
+ _headers=_headers,
3108
+ _host_index=_host_index
3109
+ )
3110
+
3111
+ _response_types_map: Dict[str, Optional[str]] = {
3112
+ '204': None,
3113
+ '404': None,
3114
+ }
3115
+ response_data = self.api_client.call_api(
3116
+ *_param,
3117
+ _request_timeout=_request_timeout
3118
+ )
3119
+ response_data.read()
3120
+ return self.api_client.response_deserialize(
3121
+ response_data=response_data,
3122
+ response_types_map=_response_types_map,
3123
+ )
3124
+
3125
+
3126
+ @validate_call
3127
+ def unregister_organization_without_preload_content(
3128
+ self,
3129
+ organization_id: Annotated[StrictStr, Field(description="the Organization identifier")],
3130
+ _request_timeout: Union[
3131
+ None,
3132
+ Annotated[StrictFloat, Field(gt=0)],
3133
+ Tuple[
3134
+ Annotated[StrictFloat, Field(gt=0)],
3135
+ Annotated[StrictFloat, Field(gt=0)]
3136
+ ]
3137
+ ] = None,
3138
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
3139
+ _content_type: Optional[StrictStr] = None,
3140
+ _headers: Optional[Dict[StrictStr, Any]] = None,
3141
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
3142
+ ) -> RESTResponseType:
3143
+ """Unregister an organization
3144
+
3145
+
3146
+ :param organization_id: the Organization identifier (required)
3147
+ :type organization_id: str
3148
+ :param _request_timeout: timeout setting for this request. If one
3149
+ number provided, it will be total request
3150
+ timeout. It can also be a pair (tuple) of
3151
+ (connection, read) timeouts.
3152
+ :type _request_timeout: int, tuple(int, int), optional
3153
+ :param _request_auth: set to override the auth_settings for an a single
3154
+ request; this effectively ignores the
3155
+ authentication in the spec for a single request.
3156
+ :type _request_auth: dict, optional
3157
+ :param _content_type: force content-type for the request.
3158
+ :type _content_type: str, Optional
3159
+ :param _headers: set to override the headers for a single
3160
+ request; this effectively ignores the headers
3161
+ in the spec for a single request.
3162
+ :type _headers: dict, optional
3163
+ :param _host_index: set to override the host_index for a single
3164
+ request; this effectively ignores the host_index
3165
+ in the spec for a single request.
3166
+ :type _host_index: int, optional
3167
+ :return: Returns the result object.
3168
+ """ # noqa: E501
3169
+
3170
+ _param = self._unregister_organization_serialize(
3171
+ organization_id=organization_id,
3172
+ _request_auth=_request_auth,
3173
+ _content_type=_content_type,
3174
+ _headers=_headers,
3175
+ _host_index=_host_index
3176
+ )
3177
+
3178
+ _response_types_map: Dict[str, Optional[str]] = {
3179
+ '204': None,
3180
+ '404': None,
3181
+ }
3182
+ response_data = self.api_client.call_api(
3183
+ *_param,
3184
+ _request_timeout=_request_timeout
3185
+ )
3186
+ return response_data.response
3187
+
3188
+
3189
+ def _unregister_organization_serialize(
3190
+ self,
3191
+ organization_id,
3192
+ _request_auth,
3193
+ _content_type,
3194
+ _headers,
3195
+ _host_index,
3196
+ ) -> RequestSerialized:
3197
+
3198
+ _host = None
3199
+
3200
+ _collection_formats: Dict[str, str] = {
3201
+ }
3202
+
3203
+ _path_params: Dict[str, str] = {}
3204
+ _query_params: List[Tuple[str, str]] = []
3205
+ _header_params: Dict[str, Optional[str]] = _headers or {}
3206
+ _form_params: List[Tuple[str, str]] = []
3207
+ _files: Dict[str, str] = {}
3208
+ _body_params: Optional[bytes] = None
3209
+
3210
+ # process the path parameters
3211
+ if organization_id is not None:
3212
+ _path_params['organization_id'] = organization_id
3213
+ # process the query parameters
3214
+ # process the header parameters
3215
+ # process the form parameters
3216
+ # process the body parameter
3217
+
3218
+
3219
+
3220
+
3221
+ # authentication setting
3222
+ _auth_settings: List[str] = [
3223
+ 'oAuth2AuthCode'
3224
+ ]
3225
+
3226
+ return self.api_client.param_serialize(
3227
+ method='DELETE',
3228
+ resource_path='/organizations/{organization_id}',
3229
+ path_params=_path_params,
3230
+ query_params=_query_params,
3231
+ header_params=_header_params,
3232
+ body=_body_params,
3233
+ post_params=_form_params,
3234
+ files=_files,
3235
+ auth_settings=_auth_settings,
3236
+ collection_formats=_collection_formats,
3237
+ _host=_host,
3238
+ _request_auth=_request_auth
3239
+ )
3240
+
3241
+
3242
+
3243
+
3244
+ @validate_call
3245
+ def update_organization(
3246
+ self,
3247
+ organization_id: Annotated[StrictStr, Field(description="the Organization identifier")],
3248
+ organization: Annotated[Organization, Field(description="the new Organization details. This endpoint can't be used to update security")],
3249
+ _request_timeout: Union[
3250
+ None,
3251
+ Annotated[StrictFloat, Field(gt=0)],
3252
+ Tuple[
3253
+ Annotated[StrictFloat, Field(gt=0)],
3254
+ Annotated[StrictFloat, Field(gt=0)]
3255
+ ]
3256
+ ] = None,
3257
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
3258
+ _content_type: Optional[StrictStr] = None,
3259
+ _headers: Optional[Dict[StrictStr, Any]] = None,
3260
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
3261
+ ) -> Organization:
3262
+ """Update an Organization
3263
+
3264
+
3265
+ :param organization_id: the Organization identifier (required)
3266
+ :type organization_id: str
3267
+ :param organization: the new Organization details. This endpoint can't be used to update security (required)
3268
+ :type organization: Organization
3269
+ :param _request_timeout: timeout setting for this request. If one
3270
+ number provided, it will be total request
3271
+ timeout. It can also be a pair (tuple) of
3272
+ (connection, read) timeouts.
3273
+ :type _request_timeout: int, tuple(int, int), optional
3274
+ :param _request_auth: set to override the auth_settings for an a single
3275
+ request; this effectively ignores the
3276
+ authentication in the spec for a single request.
3277
+ :type _request_auth: dict, optional
3278
+ :param _content_type: force content-type for the request.
3279
+ :type _content_type: str, Optional
3280
+ :param _headers: set to override the headers for a single
3281
+ request; this effectively ignores the headers
3282
+ in the spec for a single request.
3283
+ :type _headers: dict, optional
3284
+ :param _host_index: set to override the host_index for a single
3285
+ request; this effectively ignores the host_index
3286
+ in the spec for a single request.
3287
+ :type _host_index: int, optional
3288
+ :return: Returns the result object.
3289
+ """ # noqa: E501
3290
+
3291
+ _param = self._update_organization_serialize(
3292
+ organization_id=organization_id,
3293
+ organization=organization,
3294
+ _request_auth=_request_auth,
3295
+ _content_type=_content_type,
3296
+ _headers=_headers,
3297
+ _host_index=_host_index
3298
+ )
3299
+
3300
+ _response_types_map: Dict[str, Optional[str]] = {
3301
+ '200': "Organization",
3302
+ '400': None,
3303
+ '404': None,
3304
+ }
3305
+ response_data = self.api_client.call_api(
3306
+ *_param,
3307
+ _request_timeout=_request_timeout
3308
+ )
3309
+ response_data.read()
3310
+ return self.api_client.response_deserialize(
3311
+ response_data=response_data,
3312
+ response_types_map=_response_types_map,
3313
+ ).data
3314
+
3315
+
3316
+ @validate_call
3317
+ def update_organization_with_http_info(
3318
+ self,
3319
+ organization_id: Annotated[StrictStr, Field(description="the Organization identifier")],
3320
+ organization: Annotated[Organization, Field(description="the new Organization details. This endpoint can't be used to update security")],
3321
+ _request_timeout: Union[
3322
+ None,
3323
+ Annotated[StrictFloat, Field(gt=0)],
3324
+ Tuple[
3325
+ Annotated[StrictFloat, Field(gt=0)],
3326
+ Annotated[StrictFloat, Field(gt=0)]
3327
+ ]
3328
+ ] = None,
3329
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
3330
+ _content_type: Optional[StrictStr] = None,
3331
+ _headers: Optional[Dict[StrictStr, Any]] = None,
3332
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
3333
+ ) -> ApiResponse[Organization]:
3334
+ """Update an Organization
3335
+
3336
+
3337
+ :param organization_id: the Organization identifier (required)
3338
+ :type organization_id: str
3339
+ :param organization: the new Organization details. This endpoint can't be used to update security (required)
3340
+ :type organization: Organization
3341
+ :param _request_timeout: timeout setting for this request. If one
3342
+ number provided, it will be total request
3343
+ timeout. It can also be a pair (tuple) of
3344
+ (connection, read) timeouts.
3345
+ :type _request_timeout: int, tuple(int, int), optional
3346
+ :param _request_auth: set to override the auth_settings for an a single
3347
+ request; this effectively ignores the
3348
+ authentication in the spec for a single request.
3349
+ :type _request_auth: dict, optional
3350
+ :param _content_type: force content-type for the request.
3351
+ :type _content_type: str, Optional
3352
+ :param _headers: set to override the headers for a single
3353
+ request; this effectively ignores the headers
3354
+ in the spec for a single request.
3355
+ :type _headers: dict, optional
3356
+ :param _host_index: set to override the host_index for a single
3357
+ request; this effectively ignores the host_index
3358
+ in the spec for a single request.
3359
+ :type _host_index: int, optional
3360
+ :return: Returns the result object.
3361
+ """ # noqa: E501
3362
+
3363
+ _param = self._update_organization_serialize(
3364
+ organization_id=organization_id,
3365
+ organization=organization,
3366
+ _request_auth=_request_auth,
3367
+ _content_type=_content_type,
3368
+ _headers=_headers,
3369
+ _host_index=_host_index
3370
+ )
3371
+
3372
+ _response_types_map: Dict[str, Optional[str]] = {
3373
+ '200': "Organization",
3374
+ '400': None,
3375
+ '404': None,
3376
+ }
3377
+ response_data = self.api_client.call_api(
3378
+ *_param,
3379
+ _request_timeout=_request_timeout
3380
+ )
3381
+ response_data.read()
3382
+ return self.api_client.response_deserialize(
3383
+ response_data=response_data,
3384
+ response_types_map=_response_types_map,
3385
+ )
3386
+
3387
+
3388
+ @validate_call
3389
+ def update_organization_without_preload_content(
3390
+ self,
3391
+ organization_id: Annotated[StrictStr, Field(description="the Organization identifier")],
3392
+ organization: Annotated[Organization, Field(description="the new Organization details. This endpoint can't be used to update security")],
3393
+ _request_timeout: Union[
3394
+ None,
3395
+ Annotated[StrictFloat, Field(gt=0)],
3396
+ Tuple[
3397
+ Annotated[StrictFloat, Field(gt=0)],
3398
+ Annotated[StrictFloat, Field(gt=0)]
3399
+ ]
3400
+ ] = None,
3401
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
3402
+ _content_type: Optional[StrictStr] = None,
3403
+ _headers: Optional[Dict[StrictStr, Any]] = None,
3404
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
3405
+ ) -> RESTResponseType:
3406
+ """Update an Organization
3407
+
3408
+
3409
+ :param organization_id: the Organization identifier (required)
3410
+ :type organization_id: str
3411
+ :param organization: the new Organization details. This endpoint can't be used to update security (required)
3412
+ :type organization: Organization
3413
+ :param _request_timeout: timeout setting for this request. If one
3414
+ number provided, it will be total request
3415
+ timeout. It can also be a pair (tuple) of
3416
+ (connection, read) timeouts.
3417
+ :type _request_timeout: int, tuple(int, int), optional
3418
+ :param _request_auth: set to override the auth_settings for an a single
3419
+ request; this effectively ignores the
3420
+ authentication in the spec for a single request.
3421
+ :type _request_auth: dict, optional
3422
+ :param _content_type: force content-type for the request.
3423
+ :type _content_type: str, Optional
3424
+ :param _headers: set to override the headers for a single
3425
+ request; this effectively ignores the headers
3426
+ in the spec for a single request.
3427
+ :type _headers: dict, optional
3428
+ :param _host_index: set to override the host_index for a single
3429
+ request; this effectively ignores the host_index
3430
+ in the spec for a single request.
3431
+ :type _host_index: int, optional
3432
+ :return: Returns the result object.
3433
+ """ # noqa: E501
3434
+
3435
+ _param = self._update_organization_serialize(
3436
+ organization_id=organization_id,
3437
+ organization=organization,
3438
+ _request_auth=_request_auth,
3439
+ _content_type=_content_type,
3440
+ _headers=_headers,
3441
+ _host_index=_host_index
3442
+ )
3443
+
3444
+ _response_types_map: Dict[str, Optional[str]] = {
3445
+ '200': "Organization",
3446
+ '400': None,
3447
+ '404': None,
3448
+ }
3449
+ response_data = self.api_client.call_api(
3450
+ *_param,
3451
+ _request_timeout=_request_timeout
3452
+ )
3453
+ return response_data.response
3454
+
3455
+
3456
+ def _update_organization_serialize(
3457
+ self,
3458
+ organization_id,
3459
+ organization,
3460
+ _request_auth,
3461
+ _content_type,
3462
+ _headers,
3463
+ _host_index,
3464
+ ) -> RequestSerialized:
3465
+
3466
+ _host = None
3467
+
3468
+ _collection_formats: Dict[str, str] = {
3469
+ }
3470
+
3471
+ _path_params: Dict[str, str] = {}
3472
+ _query_params: List[Tuple[str, str]] = []
3473
+ _header_params: Dict[str, Optional[str]] = _headers or {}
3474
+ _form_params: List[Tuple[str, str]] = []
3475
+ _files: Dict[str, str] = {}
3476
+ _body_params: Optional[bytes] = None
3477
+
3478
+ # process the path parameters
3479
+ if organization_id is not None:
3480
+ _path_params['organization_id'] = organization_id
3481
+ # process the query parameters
3482
+ # process the header parameters
3483
+ # process the form parameters
3484
+ # process the body parameter
3485
+ if organization is not None:
3486
+ _body_params = organization
3487
+
3488
+
3489
+ # set the HTTP header `Accept`
3490
+ _header_params['Accept'] = self.api_client.select_header_accept(
3491
+ [
3492
+ 'application/json'
3493
+ ]
3494
+ )
3495
+
3496
+ # set the HTTP header `Content-Type`
3497
+ if _content_type:
3498
+ _header_params['Content-Type'] = _content_type
3499
+ else:
3500
+ _default_content_type = (
3501
+ self.api_client.select_header_content_type(
3502
+ [
3503
+ 'application/json',
3504
+ 'application/yaml'
3505
+ ]
3506
+ )
3507
+ )
3508
+ if _default_content_type is not None:
3509
+ _header_params['Content-Type'] = _default_content_type
3510
+
3511
+ # authentication setting
3512
+ _auth_settings: List[str] = [
3513
+ 'oAuth2AuthCode'
3514
+ ]
3515
+
3516
+ return self.api_client.param_serialize(
3517
+ method='PATCH',
3518
+ resource_path='/organizations/{organization_id}',
3519
+ path_params=_path_params,
3520
+ query_params=_query_params,
3521
+ header_params=_header_params,
3522
+ body=_body_params,
3523
+ post_params=_form_params,
3524
+ files=_files,
3525
+ auth_settings=_auth_settings,
3526
+ collection_formats=_collection_formats,
3527
+ _host=_host,
3528
+ _request_auth=_request_auth
3529
+ )
3530
+
3531
+
3532
+
3533
+
3534
+ @validate_call
3535
+ def update_organization_access_control(
3536
+ self,
3537
+ organization_id: Annotated[StrictStr, Field(description="the Organization identifier")],
3538
+ identity_id: Annotated[StrictStr, Field(description="the User identifier")],
3539
+ organization_role: Annotated[OrganizationRole, Field(description="The new Organization Access Control")],
3540
+ _request_timeout: Union[
3541
+ None,
3542
+ Annotated[StrictFloat, Field(gt=0)],
3543
+ Tuple[
3544
+ Annotated[StrictFloat, Field(gt=0)],
3545
+ Annotated[StrictFloat, Field(gt=0)]
3546
+ ]
3547
+ ] = None,
3548
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
3549
+ _content_type: Optional[StrictStr] = None,
3550
+ _headers: Optional[Dict[StrictStr, Any]] = None,
3551
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
3552
+ ) -> OrganizationAccessControl:
3553
+ """Update the specified access to User for an Organization
3554
+
3555
+
3556
+ :param organization_id: the Organization identifier (required)
3557
+ :type organization_id: str
3558
+ :param identity_id: the User identifier (required)
3559
+ :type identity_id: str
3560
+ :param organization_role: The new Organization Access Control (required)
3561
+ :type organization_role: OrganizationRole
3562
+ :param _request_timeout: timeout setting for this request. If one
3563
+ number provided, it will be total request
3564
+ timeout. It can also be a pair (tuple) of
3565
+ (connection, read) timeouts.
3566
+ :type _request_timeout: int, tuple(int, int), optional
3567
+ :param _request_auth: set to override the auth_settings for an a single
3568
+ request; this effectively ignores the
3569
+ authentication in the spec for a single request.
3570
+ :type _request_auth: dict, optional
3571
+ :param _content_type: force content-type for the request.
3572
+ :type _content_type: str, Optional
3573
+ :param _headers: set to override the headers for a single
3574
+ request; this effectively ignores the headers
3575
+ in the spec for a single request.
3576
+ :type _headers: dict, optional
3577
+ :param _host_index: set to override the host_index for a single
3578
+ request; this effectively ignores the host_index
3579
+ in the spec for a single request.
3580
+ :type _host_index: int, optional
3581
+ :return: Returns the result object.
3582
+ """ # noqa: E501
3583
+
3584
+ _param = self._update_organization_access_control_serialize(
3585
+ organization_id=organization_id,
3586
+ identity_id=identity_id,
3587
+ organization_role=organization_role,
3588
+ _request_auth=_request_auth,
3589
+ _content_type=_content_type,
3590
+ _headers=_headers,
3591
+ _host_index=_host_index
3592
+ )
3593
+
3594
+ _response_types_map: Dict[str, Optional[str]] = {
3595
+ '200': "OrganizationAccessControl",
3596
+ '404': None,
3597
+ }
3598
+ response_data = self.api_client.call_api(
3599
+ *_param,
3600
+ _request_timeout=_request_timeout
3601
+ )
3602
+ response_data.read()
3603
+ return self.api_client.response_deserialize(
3604
+ response_data=response_data,
3605
+ response_types_map=_response_types_map,
3606
+ ).data
3607
+
3608
+
3609
+ @validate_call
3610
+ def update_organization_access_control_with_http_info(
3611
+ self,
3612
+ organization_id: Annotated[StrictStr, Field(description="the Organization identifier")],
3613
+ identity_id: Annotated[StrictStr, Field(description="the User identifier")],
3614
+ organization_role: Annotated[OrganizationRole, Field(description="The new Organization Access Control")],
3615
+ _request_timeout: Union[
3616
+ None,
3617
+ Annotated[StrictFloat, Field(gt=0)],
3618
+ Tuple[
3619
+ Annotated[StrictFloat, Field(gt=0)],
3620
+ Annotated[StrictFloat, Field(gt=0)]
3621
+ ]
3622
+ ] = None,
3623
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
3624
+ _content_type: Optional[StrictStr] = None,
3625
+ _headers: Optional[Dict[StrictStr, Any]] = None,
3626
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
3627
+ ) -> ApiResponse[OrganizationAccessControl]:
3628
+ """Update the specified access to User for an Organization
3629
+
3630
+
3631
+ :param organization_id: the Organization identifier (required)
3632
+ :type organization_id: str
3633
+ :param identity_id: the User identifier (required)
3634
+ :type identity_id: str
3635
+ :param organization_role: The new Organization Access Control (required)
3636
+ :type organization_role: OrganizationRole
3637
+ :param _request_timeout: timeout setting for this request. If one
3638
+ number provided, it will be total request
3639
+ timeout. It can also be a pair (tuple) of
3640
+ (connection, read) timeouts.
3641
+ :type _request_timeout: int, tuple(int, int), optional
3642
+ :param _request_auth: set to override the auth_settings for an a single
3643
+ request; this effectively ignores the
3644
+ authentication in the spec for a single request.
3645
+ :type _request_auth: dict, optional
3646
+ :param _content_type: force content-type for the request.
3647
+ :type _content_type: str, Optional
3648
+ :param _headers: set to override the headers for a single
3649
+ request; this effectively ignores the headers
3650
+ in the spec for a single request.
3651
+ :type _headers: dict, optional
3652
+ :param _host_index: set to override the host_index for a single
3653
+ request; this effectively ignores the host_index
3654
+ in the spec for a single request.
3655
+ :type _host_index: int, optional
3656
+ :return: Returns the result object.
3657
+ """ # noqa: E501
3658
+
3659
+ _param = self._update_organization_access_control_serialize(
3660
+ organization_id=organization_id,
3661
+ identity_id=identity_id,
3662
+ organization_role=organization_role,
3663
+ _request_auth=_request_auth,
3664
+ _content_type=_content_type,
3665
+ _headers=_headers,
3666
+ _host_index=_host_index
3667
+ )
3668
+
3669
+ _response_types_map: Dict[str, Optional[str]] = {
3670
+ '200': "OrganizationAccessControl",
3671
+ '404': None,
3672
+ }
3673
+ response_data = self.api_client.call_api(
3674
+ *_param,
3675
+ _request_timeout=_request_timeout
3676
+ )
3677
+ response_data.read()
3678
+ return self.api_client.response_deserialize(
3679
+ response_data=response_data,
3680
+ response_types_map=_response_types_map,
3681
+ )
3682
+
3683
+
3684
+ @validate_call
3685
+ def update_organization_access_control_without_preload_content(
3686
+ self,
3687
+ organization_id: Annotated[StrictStr, Field(description="the Organization identifier")],
3688
+ identity_id: Annotated[StrictStr, Field(description="the User identifier")],
3689
+ organization_role: Annotated[OrganizationRole, Field(description="The new Organization Access Control")],
3690
+ _request_timeout: Union[
3691
+ None,
3692
+ Annotated[StrictFloat, Field(gt=0)],
3693
+ Tuple[
3694
+ Annotated[StrictFloat, Field(gt=0)],
3695
+ Annotated[StrictFloat, Field(gt=0)]
3696
+ ]
3697
+ ] = None,
3698
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
3699
+ _content_type: Optional[StrictStr] = None,
3700
+ _headers: Optional[Dict[StrictStr, Any]] = None,
3701
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
3702
+ ) -> RESTResponseType:
3703
+ """Update the specified access to User for an Organization
3704
+
3705
+
3706
+ :param organization_id: the Organization identifier (required)
3707
+ :type organization_id: str
3708
+ :param identity_id: the User identifier (required)
3709
+ :type identity_id: str
3710
+ :param organization_role: The new Organization Access Control (required)
3711
+ :type organization_role: OrganizationRole
3712
+ :param _request_timeout: timeout setting for this request. If one
3713
+ number provided, it will be total request
3714
+ timeout. It can also be a pair (tuple) of
3715
+ (connection, read) timeouts.
3716
+ :type _request_timeout: int, tuple(int, int), optional
3717
+ :param _request_auth: set to override the auth_settings for an a single
3718
+ request; this effectively ignores the
3719
+ authentication in the spec for a single request.
3720
+ :type _request_auth: dict, optional
3721
+ :param _content_type: force content-type for the request.
3722
+ :type _content_type: str, Optional
3723
+ :param _headers: set to override the headers for a single
3724
+ request; this effectively ignores the headers
3725
+ in the spec for a single request.
3726
+ :type _headers: dict, optional
3727
+ :param _host_index: set to override the host_index for a single
3728
+ request; this effectively ignores the host_index
3729
+ in the spec for a single request.
3730
+ :type _host_index: int, optional
3731
+ :return: Returns the result object.
3732
+ """ # noqa: E501
3733
+
3734
+ _param = self._update_organization_access_control_serialize(
3735
+ organization_id=organization_id,
3736
+ identity_id=identity_id,
3737
+ organization_role=organization_role,
3738
+ _request_auth=_request_auth,
3739
+ _content_type=_content_type,
3740
+ _headers=_headers,
3741
+ _host_index=_host_index
3742
+ )
3743
+
3744
+ _response_types_map: Dict[str, Optional[str]] = {
3745
+ '200': "OrganizationAccessControl",
3746
+ '404': None,
3747
+ }
3748
+ response_data = self.api_client.call_api(
3749
+ *_param,
3750
+ _request_timeout=_request_timeout
3751
+ )
3752
+ return response_data.response
3753
+
3754
+
3755
+ def _update_organization_access_control_serialize(
3756
+ self,
3757
+ organization_id,
3758
+ identity_id,
3759
+ organization_role,
3760
+ _request_auth,
3761
+ _content_type,
3762
+ _headers,
3763
+ _host_index,
3764
+ ) -> RequestSerialized:
3765
+
3766
+ _host = None
3767
+
3768
+ _collection_formats: Dict[str, str] = {
3769
+ }
3770
+
3771
+ _path_params: Dict[str, str] = {}
3772
+ _query_params: List[Tuple[str, str]] = []
3773
+ _header_params: Dict[str, Optional[str]] = _headers or {}
3774
+ _form_params: List[Tuple[str, str]] = []
3775
+ _files: Dict[str, str] = {}
3776
+ _body_params: Optional[bytes] = None
3777
+
3778
+ # process the path parameters
3779
+ if organization_id is not None:
3780
+ _path_params['organization_id'] = organization_id
3781
+ if identity_id is not None:
3782
+ _path_params['identity_id'] = identity_id
3783
+ # process the query parameters
3784
+ # process the header parameters
3785
+ # process the form parameters
3786
+ # process the body parameter
3787
+ if organization_role is not None:
3788
+ _body_params = organization_role
3789
+
3790
+
3791
+ # set the HTTP header `Accept`
3792
+ _header_params['Accept'] = self.api_client.select_header_accept(
3793
+ [
3794
+ 'application/json'
3795
+ ]
3796
+ )
3797
+
3798
+ # set the HTTP header `Content-Type`
3799
+ if _content_type:
3800
+ _header_params['Content-Type'] = _content_type
3801
+ else:
3802
+ _default_content_type = (
3803
+ self.api_client.select_header_content_type(
3804
+ [
3805
+ 'application/json'
3806
+ ]
3807
+ )
3808
+ )
3809
+ if _default_content_type is not None:
3810
+ _header_params['Content-Type'] = _default_content_type
3811
+
3812
+ # authentication setting
3813
+ _auth_settings: List[str] = [
3814
+ 'oAuth2AuthCode'
3815
+ ]
3816
+
3817
+ return self.api_client.param_serialize(
3818
+ method='PATCH',
3819
+ resource_path='/organizations/{organization_id}/security/access/{identity_id}',
3820
+ path_params=_path_params,
3821
+ query_params=_query_params,
3822
+ header_params=_header_params,
3823
+ body=_body_params,
3824
+ post_params=_form_params,
3825
+ files=_files,
3826
+ auth_settings=_auth_settings,
3827
+ collection_formats=_collection_formats,
3828
+ _host=_host,
3829
+ _request_auth=_request_auth
3830
+ )
3831
+
3832
+
3833
+
3834
+
3835
+ @validate_call
3836
+ def update_solutions_container_registry_by_organization_id(
3837
+ self,
3838
+ organization_id: Annotated[StrictStr, Field(description="the Organization identifier")],
3839
+ organization_service: Annotated[OrganizationService, Field(description="the new solutions container registry configuration to use")],
3840
+ _request_timeout: Union[
3841
+ None,
3842
+ Annotated[StrictFloat, Field(gt=0)],
3843
+ Tuple[
3844
+ Annotated[StrictFloat, Field(gt=0)],
3845
+ Annotated[StrictFloat, Field(gt=0)]
3846
+ ]
3847
+ ] = None,
3848
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
3849
+ _content_type: Optional[StrictStr] = None,
3850
+ _headers: Optional[Dict[StrictStr, Any]] = None,
3851
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
3852
+ ) -> OrganizationService:
3853
+ """Update the solutions container registry configuration for the Organization specified
3854
+
3855
+
3856
+ :param organization_id: the Organization identifier (required)
3857
+ :type organization_id: str
3858
+ :param organization_service: the new solutions container registry configuration to use (required)
3859
+ :type organization_service: OrganizationService
3860
+ :param _request_timeout: timeout setting for this request. If one
3861
+ number provided, it will be total request
3862
+ timeout. It can also be a pair (tuple) of
3863
+ (connection, read) timeouts.
3864
+ :type _request_timeout: int, tuple(int, int), optional
3865
+ :param _request_auth: set to override the auth_settings for an a single
3866
+ request; this effectively ignores the
3867
+ authentication in the spec for a single request.
3868
+ :type _request_auth: dict, optional
3869
+ :param _content_type: force content-type for the request.
3870
+ :type _content_type: str, Optional
3871
+ :param _headers: set to override the headers for a single
3872
+ request; this effectively ignores the headers
3873
+ in the spec for a single request.
3874
+ :type _headers: dict, optional
3875
+ :param _host_index: set to override the host_index for a single
3876
+ request; this effectively ignores the host_index
3877
+ in the spec for a single request.
3878
+ :type _host_index: int, optional
3879
+ :return: Returns the result object.
3880
+ """ # noqa: E501
3881
+
3882
+ _param = self._update_solutions_container_registry_by_organization_id_serialize(
3883
+ organization_id=organization_id,
3884
+ organization_service=organization_service,
3885
+ _request_auth=_request_auth,
3886
+ _content_type=_content_type,
3887
+ _headers=_headers,
3888
+ _host_index=_host_index
3889
+ )
3890
+
3891
+ _response_types_map: Dict[str, Optional[str]] = {
3892
+ '200': "OrganizationService",
3893
+ '404': None,
3894
+ }
3895
+ response_data = self.api_client.call_api(
3896
+ *_param,
3897
+ _request_timeout=_request_timeout
3898
+ )
3899
+ response_data.read()
3900
+ return self.api_client.response_deserialize(
3901
+ response_data=response_data,
3902
+ response_types_map=_response_types_map,
3903
+ ).data
3904
+
3905
+
3906
+ @validate_call
3907
+ def update_solutions_container_registry_by_organization_id_with_http_info(
3908
+ self,
3909
+ organization_id: Annotated[StrictStr, Field(description="the Organization identifier")],
3910
+ organization_service: Annotated[OrganizationService, Field(description="the new solutions container registry configuration to use")],
3911
+ _request_timeout: Union[
3912
+ None,
3913
+ Annotated[StrictFloat, Field(gt=0)],
3914
+ Tuple[
3915
+ Annotated[StrictFloat, Field(gt=0)],
3916
+ Annotated[StrictFloat, Field(gt=0)]
3917
+ ]
3918
+ ] = None,
3919
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
3920
+ _content_type: Optional[StrictStr] = None,
3921
+ _headers: Optional[Dict[StrictStr, Any]] = None,
3922
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
3923
+ ) -> ApiResponse[OrganizationService]:
3924
+ """Update the solutions container registry configuration for the Organization specified
3925
+
3926
+
3927
+ :param organization_id: the Organization identifier (required)
3928
+ :type organization_id: str
3929
+ :param organization_service: the new solutions container registry configuration to use (required)
3930
+ :type organization_service: OrganizationService
3931
+ :param _request_timeout: timeout setting for this request. If one
3932
+ number provided, it will be total request
3933
+ timeout. It can also be a pair (tuple) of
3934
+ (connection, read) timeouts.
3935
+ :type _request_timeout: int, tuple(int, int), optional
3936
+ :param _request_auth: set to override the auth_settings for an a single
3937
+ request; this effectively ignores the
3938
+ authentication in the spec for a single request.
3939
+ :type _request_auth: dict, optional
3940
+ :param _content_type: force content-type for the request.
3941
+ :type _content_type: str, Optional
3942
+ :param _headers: set to override the headers for a single
3943
+ request; this effectively ignores the headers
3944
+ in the spec for a single request.
3945
+ :type _headers: dict, optional
3946
+ :param _host_index: set to override the host_index for a single
3947
+ request; this effectively ignores the host_index
3948
+ in the spec for a single request.
3949
+ :type _host_index: int, optional
3950
+ :return: Returns the result object.
3951
+ """ # noqa: E501
3952
+
3953
+ _param = self._update_solutions_container_registry_by_organization_id_serialize(
3954
+ organization_id=organization_id,
3955
+ organization_service=organization_service,
3956
+ _request_auth=_request_auth,
3957
+ _content_type=_content_type,
3958
+ _headers=_headers,
3959
+ _host_index=_host_index
3960
+ )
3961
+
3962
+ _response_types_map: Dict[str, Optional[str]] = {
3963
+ '200': "OrganizationService",
3964
+ '404': None,
3965
+ }
3966
+ response_data = self.api_client.call_api(
3967
+ *_param,
3968
+ _request_timeout=_request_timeout
3969
+ )
3970
+ response_data.read()
3971
+ return self.api_client.response_deserialize(
3972
+ response_data=response_data,
3973
+ response_types_map=_response_types_map,
3974
+ )
3975
+
3976
+
3977
+ @validate_call
3978
+ def update_solutions_container_registry_by_organization_id_without_preload_content(
3979
+ self,
3980
+ organization_id: Annotated[StrictStr, Field(description="the Organization identifier")],
3981
+ organization_service: Annotated[OrganizationService, Field(description="the new solutions container registry configuration to use")],
3982
+ _request_timeout: Union[
3983
+ None,
3984
+ Annotated[StrictFloat, Field(gt=0)],
3985
+ Tuple[
3986
+ Annotated[StrictFloat, Field(gt=0)],
3987
+ Annotated[StrictFloat, Field(gt=0)]
3988
+ ]
3989
+ ] = None,
3990
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
3991
+ _content_type: Optional[StrictStr] = None,
3992
+ _headers: Optional[Dict[StrictStr, Any]] = None,
3993
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
3994
+ ) -> RESTResponseType:
3995
+ """Update the solutions container registry configuration for the Organization specified
3996
+
3997
+
3998
+ :param organization_id: the Organization identifier (required)
3999
+ :type organization_id: str
4000
+ :param organization_service: the new solutions container registry configuration to use (required)
4001
+ :type organization_service: OrganizationService
4002
+ :param _request_timeout: timeout setting for this request. If one
4003
+ number provided, it will be total request
4004
+ timeout. It can also be a pair (tuple) of
4005
+ (connection, read) timeouts.
4006
+ :type _request_timeout: int, tuple(int, int), optional
4007
+ :param _request_auth: set to override the auth_settings for an a single
4008
+ request; this effectively ignores the
4009
+ authentication in the spec for a single request.
4010
+ :type _request_auth: dict, optional
4011
+ :param _content_type: force content-type for the request.
4012
+ :type _content_type: str, Optional
4013
+ :param _headers: set to override the headers for a single
4014
+ request; this effectively ignores the headers
4015
+ in the spec for a single request.
4016
+ :type _headers: dict, optional
4017
+ :param _host_index: set to override the host_index for a single
4018
+ request; this effectively ignores the host_index
4019
+ in the spec for a single request.
4020
+ :type _host_index: int, optional
4021
+ :return: Returns the result object.
4022
+ """ # noqa: E501
4023
+
4024
+ _param = self._update_solutions_container_registry_by_organization_id_serialize(
4025
+ organization_id=organization_id,
4026
+ organization_service=organization_service,
4027
+ _request_auth=_request_auth,
4028
+ _content_type=_content_type,
4029
+ _headers=_headers,
4030
+ _host_index=_host_index
4031
+ )
4032
+
4033
+ _response_types_map: Dict[str, Optional[str]] = {
4034
+ '200': "OrganizationService",
4035
+ '404': None,
4036
+ }
4037
+ response_data = self.api_client.call_api(
4038
+ *_param,
4039
+ _request_timeout=_request_timeout
4040
+ )
4041
+ return response_data.response
4042
+
4043
+
4044
+ def _update_solutions_container_registry_by_organization_id_serialize(
4045
+ self,
4046
+ organization_id,
4047
+ organization_service,
4048
+ _request_auth,
4049
+ _content_type,
4050
+ _headers,
4051
+ _host_index,
4052
+ ) -> RequestSerialized:
4053
+
4054
+ _host = None
4055
+
4056
+ _collection_formats: Dict[str, str] = {
4057
+ }
4058
+
4059
+ _path_params: Dict[str, str] = {}
4060
+ _query_params: List[Tuple[str, str]] = []
4061
+ _header_params: Dict[str, Optional[str]] = _headers or {}
4062
+ _form_params: List[Tuple[str, str]] = []
4063
+ _files: Dict[str, str] = {}
4064
+ _body_params: Optional[bytes] = None
4065
+
4066
+ # process the path parameters
4067
+ if organization_id is not None:
4068
+ _path_params['organization_id'] = organization_id
4069
+ # process the query parameters
4070
+ # process the header parameters
4071
+ # process the form parameters
4072
+ # process the body parameter
4073
+ if organization_service is not None:
4074
+ _body_params = organization_service
4075
+
4076
+
4077
+ # set the HTTP header `Accept`
4078
+ _header_params['Accept'] = self.api_client.select_header_accept(
4079
+ [
4080
+ 'application/json'
4081
+ ]
4082
+ )
4083
+
4084
+ # set the HTTP header `Content-Type`
4085
+ if _content_type:
4086
+ _header_params['Content-Type'] = _content_type
4087
+ else:
4088
+ _default_content_type = (
4089
+ self.api_client.select_header_content_type(
4090
+ [
4091
+ 'application/json',
4092
+ 'application/yaml'
4093
+ ]
4094
+ )
4095
+ )
4096
+ if _default_content_type is not None:
4097
+ _header_params['Content-Type'] = _default_content_type
4098
+
4099
+ # authentication setting
4100
+ _auth_settings: List[str] = [
4101
+ 'oAuth2AuthCode'
4102
+ ]
4103
+
4104
+ return self.api_client.param_serialize(
4105
+ method='PATCH',
4106
+ resource_path='/organizations/{organization_id}/services/solutionsContainerRegistry',
4107
+ path_params=_path_params,
4108
+ query_params=_query_params,
4109
+ header_params=_header_params,
4110
+ body=_body_params,
4111
+ post_params=_form_params,
4112
+ files=_files,
4113
+ auth_settings=_auth_settings,
4114
+ collection_formats=_collection_formats,
4115
+ _host=_host,
4116
+ _request_auth=_request_auth
4117
+ )
4118
+
4119
+
4120
+
4121
+
4122
+ @validate_call
4123
+ def update_storage_by_organization_id(
4124
+ self,
4125
+ organization_id: Annotated[StrictStr, Field(description="the Organization identifier")],
4126
+ organization_service: Annotated[OrganizationService, Field(description="the new Storage configuration to use")],
4127
+ _request_timeout: Union[
4128
+ None,
4129
+ Annotated[StrictFloat, Field(gt=0)],
4130
+ Tuple[
4131
+ Annotated[StrictFloat, Field(gt=0)],
4132
+ Annotated[StrictFloat, Field(gt=0)]
4133
+ ]
4134
+ ] = None,
4135
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
4136
+ _content_type: Optional[StrictStr] = None,
4137
+ _headers: Optional[Dict[StrictStr, Any]] = None,
4138
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
4139
+ ) -> OrganizationService:
4140
+ """Update storage configuration for the Organization specified
4141
+
4142
+
4143
+ :param organization_id: the Organization identifier (required)
4144
+ :type organization_id: str
4145
+ :param organization_service: the new Storage configuration to use (required)
4146
+ :type organization_service: OrganizationService
4147
+ :param _request_timeout: timeout setting for this request. If one
4148
+ number provided, it will be total request
4149
+ timeout. It can also be a pair (tuple) of
4150
+ (connection, read) timeouts.
4151
+ :type _request_timeout: int, tuple(int, int), optional
4152
+ :param _request_auth: set to override the auth_settings for an a single
4153
+ request; this effectively ignores the
4154
+ authentication in the spec for a single request.
4155
+ :type _request_auth: dict, optional
4156
+ :param _content_type: force content-type for the request.
4157
+ :type _content_type: str, Optional
4158
+ :param _headers: set to override the headers for a single
4159
+ request; this effectively ignores the headers
4160
+ in the spec for a single request.
4161
+ :type _headers: dict, optional
4162
+ :param _host_index: set to override the host_index for a single
4163
+ request; this effectively ignores the host_index
4164
+ in the spec for a single request.
4165
+ :type _host_index: int, optional
4166
+ :return: Returns the result object.
4167
+ """ # noqa: E501
4168
+
4169
+ _param = self._update_storage_by_organization_id_serialize(
4170
+ organization_id=organization_id,
4171
+ organization_service=organization_service,
4172
+ _request_auth=_request_auth,
4173
+ _content_type=_content_type,
4174
+ _headers=_headers,
4175
+ _host_index=_host_index
4176
+ )
4177
+
4178
+ _response_types_map: Dict[str, Optional[str]] = {
4179
+ '200': "OrganizationService",
4180
+ '404': None,
4181
+ }
4182
+ response_data = self.api_client.call_api(
4183
+ *_param,
4184
+ _request_timeout=_request_timeout
4185
+ )
4186
+ response_data.read()
4187
+ return self.api_client.response_deserialize(
4188
+ response_data=response_data,
4189
+ response_types_map=_response_types_map,
4190
+ ).data
4191
+
4192
+
4193
+ @validate_call
4194
+ def update_storage_by_organization_id_with_http_info(
4195
+ self,
4196
+ organization_id: Annotated[StrictStr, Field(description="the Organization identifier")],
4197
+ organization_service: Annotated[OrganizationService, Field(description="the new Storage configuration to use")],
4198
+ _request_timeout: Union[
4199
+ None,
4200
+ Annotated[StrictFloat, Field(gt=0)],
4201
+ Tuple[
4202
+ Annotated[StrictFloat, Field(gt=0)],
4203
+ Annotated[StrictFloat, Field(gt=0)]
4204
+ ]
4205
+ ] = None,
4206
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
4207
+ _content_type: Optional[StrictStr] = None,
4208
+ _headers: Optional[Dict[StrictStr, Any]] = None,
4209
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
4210
+ ) -> ApiResponse[OrganizationService]:
4211
+ """Update storage configuration for the Organization specified
4212
+
4213
+
4214
+ :param organization_id: the Organization identifier (required)
4215
+ :type organization_id: str
4216
+ :param organization_service: the new Storage configuration to use (required)
4217
+ :type organization_service: OrganizationService
4218
+ :param _request_timeout: timeout setting for this request. If one
4219
+ number provided, it will be total request
4220
+ timeout. It can also be a pair (tuple) of
4221
+ (connection, read) timeouts.
4222
+ :type _request_timeout: int, tuple(int, int), optional
4223
+ :param _request_auth: set to override the auth_settings for an a single
4224
+ request; this effectively ignores the
4225
+ authentication in the spec for a single request.
4226
+ :type _request_auth: dict, optional
4227
+ :param _content_type: force content-type for the request.
4228
+ :type _content_type: str, Optional
4229
+ :param _headers: set to override the headers for a single
4230
+ request; this effectively ignores the headers
4231
+ in the spec for a single request.
4232
+ :type _headers: dict, optional
4233
+ :param _host_index: set to override the host_index for a single
4234
+ request; this effectively ignores the host_index
4235
+ in the spec for a single request.
4236
+ :type _host_index: int, optional
4237
+ :return: Returns the result object.
4238
+ """ # noqa: E501
4239
+
4240
+ _param = self._update_storage_by_organization_id_serialize(
4241
+ organization_id=organization_id,
4242
+ organization_service=organization_service,
4243
+ _request_auth=_request_auth,
4244
+ _content_type=_content_type,
4245
+ _headers=_headers,
4246
+ _host_index=_host_index
4247
+ )
4248
+
4249
+ _response_types_map: Dict[str, Optional[str]] = {
4250
+ '200': "OrganizationService",
4251
+ '404': None,
4252
+ }
4253
+ response_data = self.api_client.call_api(
4254
+ *_param,
4255
+ _request_timeout=_request_timeout
4256
+ )
4257
+ response_data.read()
4258
+ return self.api_client.response_deserialize(
4259
+ response_data=response_data,
4260
+ response_types_map=_response_types_map,
4261
+ )
4262
+
4263
+
4264
+ @validate_call
4265
+ def update_storage_by_organization_id_without_preload_content(
4266
+ self,
4267
+ organization_id: Annotated[StrictStr, Field(description="the Organization identifier")],
4268
+ organization_service: Annotated[OrganizationService, Field(description="the new Storage configuration to use")],
4269
+ _request_timeout: Union[
4270
+ None,
4271
+ Annotated[StrictFloat, Field(gt=0)],
4272
+ Tuple[
4273
+ Annotated[StrictFloat, Field(gt=0)],
4274
+ Annotated[StrictFloat, Field(gt=0)]
4275
+ ]
4276
+ ] = None,
4277
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
4278
+ _content_type: Optional[StrictStr] = None,
4279
+ _headers: Optional[Dict[StrictStr, Any]] = None,
4280
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
4281
+ ) -> RESTResponseType:
4282
+ """Update storage configuration for the Organization specified
4283
+
4284
+
4285
+ :param organization_id: the Organization identifier (required)
4286
+ :type organization_id: str
4287
+ :param organization_service: the new Storage configuration to use (required)
4288
+ :type organization_service: OrganizationService
4289
+ :param _request_timeout: timeout setting for this request. If one
4290
+ number provided, it will be total request
4291
+ timeout. It can also be a pair (tuple) of
4292
+ (connection, read) timeouts.
4293
+ :type _request_timeout: int, tuple(int, int), optional
4294
+ :param _request_auth: set to override the auth_settings for an a single
4295
+ request; this effectively ignores the
4296
+ authentication in the spec for a single request.
4297
+ :type _request_auth: dict, optional
4298
+ :param _content_type: force content-type for the request.
4299
+ :type _content_type: str, Optional
4300
+ :param _headers: set to override the headers for a single
4301
+ request; this effectively ignores the headers
4302
+ in the spec for a single request.
4303
+ :type _headers: dict, optional
4304
+ :param _host_index: set to override the host_index for a single
4305
+ request; this effectively ignores the host_index
4306
+ in the spec for a single request.
4307
+ :type _host_index: int, optional
4308
+ :return: Returns the result object.
4309
+ """ # noqa: E501
4310
+
4311
+ _param = self._update_storage_by_organization_id_serialize(
4312
+ organization_id=organization_id,
4313
+ organization_service=organization_service,
4314
+ _request_auth=_request_auth,
4315
+ _content_type=_content_type,
4316
+ _headers=_headers,
4317
+ _host_index=_host_index
4318
+ )
4319
+
4320
+ _response_types_map: Dict[str, Optional[str]] = {
4321
+ '200': "OrganizationService",
4322
+ '404': None,
4323
+ }
4324
+ response_data = self.api_client.call_api(
4325
+ *_param,
4326
+ _request_timeout=_request_timeout
4327
+ )
4328
+ return response_data.response
4329
+
4330
+
4331
+ def _update_storage_by_organization_id_serialize(
4332
+ self,
4333
+ organization_id,
4334
+ organization_service,
4335
+ _request_auth,
4336
+ _content_type,
4337
+ _headers,
4338
+ _host_index,
4339
+ ) -> RequestSerialized:
4340
+
4341
+ _host = None
4342
+
4343
+ _collection_formats: Dict[str, str] = {
4344
+ }
4345
+
4346
+ _path_params: Dict[str, str] = {}
4347
+ _query_params: List[Tuple[str, str]] = []
4348
+ _header_params: Dict[str, Optional[str]] = _headers or {}
4349
+ _form_params: List[Tuple[str, str]] = []
4350
+ _files: Dict[str, str] = {}
4351
+ _body_params: Optional[bytes] = None
4352
+
4353
+ # process the path parameters
4354
+ if organization_id is not None:
4355
+ _path_params['organization_id'] = organization_id
4356
+ # process the query parameters
4357
+ # process the header parameters
4358
+ # process the form parameters
4359
+ # process the body parameter
4360
+ if organization_service is not None:
4361
+ _body_params = organization_service
4362
+
4363
+
4364
+ # set the HTTP header `Accept`
4365
+ _header_params['Accept'] = self.api_client.select_header_accept(
4366
+ [
4367
+ 'application/json'
4368
+ ]
4369
+ )
4370
+
4371
+ # set the HTTP header `Content-Type`
4372
+ if _content_type:
4373
+ _header_params['Content-Type'] = _content_type
4374
+ else:
4375
+ _default_content_type = (
4376
+ self.api_client.select_header_content_type(
4377
+ [
4378
+ 'application/json',
4379
+ 'application/yaml'
4380
+ ]
4381
+ )
4382
+ )
4383
+ if _default_content_type is not None:
4384
+ _header_params['Content-Type'] = _default_content_type
4385
+
4386
+ # authentication setting
4387
+ _auth_settings: List[str] = [
4388
+ 'oAuth2AuthCode'
4389
+ ]
4390
+
4391
+ return self.api_client.param_serialize(
4392
+ method='PATCH',
4393
+ resource_path='/organizations/{organization_id}/services/storage',
4394
+ path_params=_path_params,
4395
+ query_params=_query_params,
4396
+ header_params=_header_params,
4397
+ body=_body_params,
4398
+ post_params=_form_params,
4399
+ files=_files,
4400
+ auth_settings=_auth_settings,
4401
+ collection_formats=_collection_formats,
4402
+ _host=_host,
4403
+ _request_auth=_request_auth
4404
+ )
4405
+
4406
+
4407
+
4408
+
4409
+ @validate_call
4410
+ def update_tenant_credentials_by_organization_id(
4411
+ self,
4412
+ organization_id: Annotated[StrictStr, Field(description="the Organization identifier")],
4413
+ request_body: Annotated[Dict[str, Any], Field(description="the new Tenant Credentials to use")],
4414
+ _request_timeout: Union[
4415
+ None,
4416
+ Annotated[StrictFloat, Field(gt=0)],
4417
+ Tuple[
4418
+ Annotated[StrictFloat, Field(gt=0)],
4419
+ Annotated[StrictFloat, Field(gt=0)]
4420
+ ]
4421
+ ] = None,
4422
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
4423
+ _content_type: Optional[StrictStr] = None,
4424
+ _headers: Optional[Dict[StrictStr, Any]] = None,
4425
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
4426
+ ) -> Dict[str, object]:
4427
+ """Update tenant credentials for the Organization specified
4428
+
4429
+
4430
+ :param organization_id: the Organization identifier (required)
4431
+ :type organization_id: str
4432
+ :param request_body: the new Tenant Credentials to use (required)
4433
+ :type request_body: Dict[str, object]
4434
+ :param _request_timeout: timeout setting for this request. If one
4435
+ number provided, it will be total request
4436
+ timeout. It can also be a pair (tuple) of
4437
+ (connection, read) timeouts.
4438
+ :type _request_timeout: int, tuple(int, int), optional
4439
+ :param _request_auth: set to override the auth_settings for an a single
4440
+ request; this effectively ignores the
4441
+ authentication in the spec for a single request.
4442
+ :type _request_auth: dict, optional
4443
+ :param _content_type: force content-type for the request.
4444
+ :type _content_type: str, Optional
4445
+ :param _headers: set to override the headers for a single
4446
+ request; this effectively ignores the headers
4447
+ in the spec for a single request.
4448
+ :type _headers: dict, optional
4449
+ :param _host_index: set to override the host_index for a single
4450
+ request; this effectively ignores the host_index
4451
+ in the spec for a single request.
4452
+ :type _host_index: int, optional
4453
+ :return: Returns the result object.
4454
+ """ # noqa: E501
4455
+
4456
+ _param = self._update_tenant_credentials_by_organization_id_serialize(
4457
+ organization_id=organization_id,
4458
+ request_body=request_body,
4459
+ _request_auth=_request_auth,
4460
+ _content_type=_content_type,
4461
+ _headers=_headers,
4462
+ _host_index=_host_index
4463
+ )
4464
+
4465
+ _response_types_map: Dict[str, Optional[str]] = {
4466
+ '200': "Dict[str, object]",
4467
+ '404': None,
4468
+ }
4469
+ response_data = self.api_client.call_api(
4470
+ *_param,
4471
+ _request_timeout=_request_timeout
4472
+ )
4473
+ response_data.read()
4474
+ return self.api_client.response_deserialize(
4475
+ response_data=response_data,
4476
+ response_types_map=_response_types_map,
4477
+ ).data
4478
+
4479
+
4480
+ @validate_call
4481
+ def update_tenant_credentials_by_organization_id_with_http_info(
4482
+ self,
4483
+ organization_id: Annotated[StrictStr, Field(description="the Organization identifier")],
4484
+ request_body: Annotated[Dict[str, Any], Field(description="the new Tenant Credentials to use")],
4485
+ _request_timeout: Union[
4486
+ None,
4487
+ Annotated[StrictFloat, Field(gt=0)],
4488
+ Tuple[
4489
+ Annotated[StrictFloat, Field(gt=0)],
4490
+ Annotated[StrictFloat, Field(gt=0)]
4491
+ ]
4492
+ ] = None,
4493
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
4494
+ _content_type: Optional[StrictStr] = None,
4495
+ _headers: Optional[Dict[StrictStr, Any]] = None,
4496
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
4497
+ ) -> ApiResponse[Dict[str, object]]:
4498
+ """Update tenant credentials for the Organization specified
4499
+
4500
+
4501
+ :param organization_id: the Organization identifier (required)
4502
+ :type organization_id: str
4503
+ :param request_body: the new Tenant Credentials to use (required)
4504
+ :type request_body: Dict[str, object]
4505
+ :param _request_timeout: timeout setting for this request. If one
4506
+ number provided, it will be total request
4507
+ timeout. It can also be a pair (tuple) of
4508
+ (connection, read) timeouts.
4509
+ :type _request_timeout: int, tuple(int, int), optional
4510
+ :param _request_auth: set to override the auth_settings for an a single
4511
+ request; this effectively ignores the
4512
+ authentication in the spec for a single request.
4513
+ :type _request_auth: dict, optional
4514
+ :param _content_type: force content-type for the request.
4515
+ :type _content_type: str, Optional
4516
+ :param _headers: set to override the headers for a single
4517
+ request; this effectively ignores the headers
4518
+ in the spec for a single request.
4519
+ :type _headers: dict, optional
4520
+ :param _host_index: set to override the host_index for a single
4521
+ request; this effectively ignores the host_index
4522
+ in the spec for a single request.
4523
+ :type _host_index: int, optional
4524
+ :return: Returns the result object.
4525
+ """ # noqa: E501
4526
+
4527
+ _param = self._update_tenant_credentials_by_organization_id_serialize(
4528
+ organization_id=organization_id,
4529
+ request_body=request_body,
4530
+ _request_auth=_request_auth,
4531
+ _content_type=_content_type,
4532
+ _headers=_headers,
4533
+ _host_index=_host_index
4534
+ )
4535
+
4536
+ _response_types_map: Dict[str, Optional[str]] = {
4537
+ '200': "Dict[str, object]",
4538
+ '404': None,
4539
+ }
4540
+ response_data = self.api_client.call_api(
4541
+ *_param,
4542
+ _request_timeout=_request_timeout
4543
+ )
4544
+ response_data.read()
4545
+ return self.api_client.response_deserialize(
4546
+ response_data=response_data,
4547
+ response_types_map=_response_types_map,
4548
+ )
4549
+
4550
+
4551
+ @validate_call
4552
+ def update_tenant_credentials_by_organization_id_without_preload_content(
4553
+ self,
4554
+ organization_id: Annotated[StrictStr, Field(description="the Organization identifier")],
4555
+ request_body: Annotated[Dict[str, Any], Field(description="the new Tenant Credentials to use")],
4556
+ _request_timeout: Union[
4557
+ None,
4558
+ Annotated[StrictFloat, Field(gt=0)],
4559
+ Tuple[
4560
+ Annotated[StrictFloat, Field(gt=0)],
4561
+ Annotated[StrictFloat, Field(gt=0)]
4562
+ ]
4563
+ ] = None,
4564
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
4565
+ _content_type: Optional[StrictStr] = None,
4566
+ _headers: Optional[Dict[StrictStr, Any]] = None,
4567
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
4568
+ ) -> RESTResponseType:
4569
+ """Update tenant credentials for the Organization specified
4570
+
4571
+
4572
+ :param organization_id: the Organization identifier (required)
4573
+ :type organization_id: str
4574
+ :param request_body: the new Tenant Credentials to use (required)
4575
+ :type request_body: Dict[str, object]
4576
+ :param _request_timeout: timeout setting for this request. If one
4577
+ number provided, it will be total request
4578
+ timeout. It can also be a pair (tuple) of
4579
+ (connection, read) timeouts.
4580
+ :type _request_timeout: int, tuple(int, int), optional
4581
+ :param _request_auth: set to override the auth_settings for an a single
4582
+ request; this effectively ignores the
4583
+ authentication in the spec for a single request.
4584
+ :type _request_auth: dict, optional
4585
+ :param _content_type: force content-type for the request.
4586
+ :type _content_type: str, Optional
4587
+ :param _headers: set to override the headers for a single
4588
+ request; this effectively ignores the headers
4589
+ in the spec for a single request.
4590
+ :type _headers: dict, optional
4591
+ :param _host_index: set to override the host_index for a single
4592
+ request; this effectively ignores the host_index
4593
+ in the spec for a single request.
4594
+ :type _host_index: int, optional
4595
+ :return: Returns the result object.
4596
+ """ # noqa: E501
4597
+
4598
+ _param = self._update_tenant_credentials_by_organization_id_serialize(
4599
+ organization_id=organization_id,
4600
+ request_body=request_body,
4601
+ _request_auth=_request_auth,
4602
+ _content_type=_content_type,
4603
+ _headers=_headers,
4604
+ _host_index=_host_index
4605
+ )
4606
+
4607
+ _response_types_map: Dict[str, Optional[str]] = {
4608
+ '200': "Dict[str, object]",
4609
+ '404': None,
4610
+ }
4611
+ response_data = self.api_client.call_api(
4612
+ *_param,
4613
+ _request_timeout=_request_timeout
4614
+ )
4615
+ return response_data.response
4616
+
4617
+
4618
+ def _update_tenant_credentials_by_organization_id_serialize(
4619
+ self,
4620
+ organization_id,
4621
+ request_body,
4622
+ _request_auth,
4623
+ _content_type,
4624
+ _headers,
4625
+ _host_index,
4626
+ ) -> RequestSerialized:
4627
+
4628
+ _host = None
4629
+
4630
+ _collection_formats: Dict[str, str] = {
4631
+ }
4632
+
4633
+ _path_params: Dict[str, str] = {}
4634
+ _query_params: List[Tuple[str, str]] = []
4635
+ _header_params: Dict[str, Optional[str]] = _headers or {}
4636
+ _form_params: List[Tuple[str, str]] = []
4637
+ _files: Dict[str, str] = {}
4638
+ _body_params: Optional[bytes] = None
4639
+
4640
+ # process the path parameters
4641
+ if organization_id is not None:
4642
+ _path_params['organization_id'] = organization_id
4643
+ # process the query parameters
4644
+ # process the header parameters
4645
+ # process the form parameters
4646
+ # process the body parameter
4647
+ if request_body is not None:
4648
+ _body_params = request_body
4649
+
4650
+
4651
+ # set the HTTP header `Accept`
4652
+ _header_params['Accept'] = self.api_client.select_header_accept(
4653
+ [
4654
+ 'application/json'
4655
+ ]
4656
+ )
4657
+
4658
+ # set the HTTP header `Content-Type`
4659
+ if _content_type:
4660
+ _header_params['Content-Type'] = _content_type
4661
+ else:
4662
+ _default_content_type = (
4663
+ self.api_client.select_header_content_type(
4664
+ [
4665
+ 'application/json'
4666
+ ]
4667
+ )
4668
+ )
4669
+ if _default_content_type is not None:
4670
+ _header_params['Content-Type'] = _default_content_type
4671
+
4672
+ # authentication setting
4673
+ _auth_settings: List[str] = [
4674
+ 'oAuth2AuthCode'
4675
+ ]
4676
+
4677
+ return self.api_client.param_serialize(
4678
+ method='PATCH',
4679
+ resource_path='/organizations/{organization_id}/services/tenantCredentials',
4680
+ path_params=_path_params,
4681
+ query_params=_query_params,
4682
+ header_params=_header_params,
4683
+ body=_body_params,
4684
+ post_params=_form_params,
4685
+ files=_files,
4686
+ auth_settings=_auth_settings,
4687
+ collection_formats=_collection_formats,
4688
+ _host=_host,
4689
+ _request_auth=_request_auth
4690
+ )
4691
+
4692
+