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