scorable 1.6.4__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 scorable might be problematic. Click here for more details.

Files changed (228) hide show
  1. root/__about__.py +4 -0
  2. root/__init__.py +17 -0
  3. root/client.py +207 -0
  4. root/datasets.py +231 -0
  5. root/execution_logs.py +162 -0
  6. root/generated/__init__.py +0 -0
  7. root/generated/openapi_aclient/__init__.py +1 -0
  8. root/generated/openapi_aclient/api/__init__.py +1 -0
  9. root/generated/openapi_aclient/api/datasets_api.py +1274 -0
  10. root/generated/openapi_aclient/api/evaluators_api.py +3641 -0
  11. root/generated/openapi_aclient/api/execution_logs_api.py +751 -0
  12. root/generated/openapi_aclient/api/judges_api.py +3794 -0
  13. root/generated/openapi_aclient/api/models_api.py +1473 -0
  14. root/generated/openapi_aclient/api/objectives_api.py +1767 -0
  15. root/generated/openapi_aclient/api_client.py +662 -0
  16. root/generated/openapi_aclient/api_response.py +22 -0
  17. root/generated/openapi_aclient/configuration.py +470 -0
  18. root/generated/openapi_aclient/exceptions.py +197 -0
  19. root/generated/openapi_aclient/models/__init__.py +122 -0
  20. root/generated/openapi_aclient/models/data_set_create.py +118 -0
  21. root/generated/openapi_aclient/models/data_set_create_request.py +105 -0
  22. root/generated/openapi_aclient/models/data_set_list.py +129 -0
  23. root/generated/openapi_aclient/models/data_set_type.py +36 -0
  24. root/generated/openapi_aclient/models/dataset_range_request.py +93 -0
  25. root/generated/openapi_aclient/models/evaluator.py +273 -0
  26. root/generated/openapi_aclient/models/evaluator_calibration_output.py +101 -0
  27. root/generated/openapi_aclient/models/evaluator_calibration_result.py +134 -0
  28. root/generated/openapi_aclient/models/evaluator_demonstrations.py +107 -0
  29. root/generated/openapi_aclient/models/evaluator_demonstrations_request.py +107 -0
  30. root/generated/openapi_aclient/models/evaluator_execution_function_parameter_property_request.py +86 -0
  31. root/generated/openapi_aclient/models/evaluator_execution_function_parameter_request.py +109 -0
  32. root/generated/openapi_aclient/models/evaluator_execution_function_parameter_type_enum.py +35 -0
  33. root/generated/openapi_aclient/models/evaluator_execution_function_request.py +99 -0
  34. root/generated/openapi_aclient/models/evaluator_execution_functions_request.py +98 -0
  35. root/generated/openapi_aclient/models/evaluator_execution_functions_type_enum.py +35 -0
  36. root/generated/openapi_aclient/models/evaluator_execution_request.py +134 -0
  37. root/generated/openapi_aclient/models/evaluator_execution_result.py +114 -0
  38. root/generated/openapi_aclient/models/evaluator_inputs_value.py +100 -0
  39. root/generated/openapi_aclient/models/evaluator_inputs_value_items.py +89 -0
  40. root/generated/openapi_aclient/models/evaluator_list_output.py +198 -0
  41. root/generated/openapi_aclient/models/evaluator_reference.py +90 -0
  42. root/generated/openapi_aclient/models/evaluator_reference_request.py +90 -0
  43. root/generated/openapi_aclient/models/evaluator_request.py +194 -0
  44. root/generated/openapi_aclient/models/evaluator_result.py +110 -0
  45. root/generated/openapi_aclient/models/execution_log_details.py +291 -0
  46. root/generated/openapi_aclient/models/execution_log_details_evaluation_context.py +83 -0
  47. root/generated/openapi_aclient/models/execution_log_details_evaluator_latencies_inner.py +83 -0
  48. root/generated/openapi_aclient/models/execution_log_list.py +217 -0
  49. root/generated/openapi_aclient/models/execution_log_list_evaluation_context.py +83 -0
  50. root/generated/openapi_aclient/models/generation_model_params_request.py +93 -0
  51. root/generated/openapi_aclient/models/id.py +87 -0
  52. root/generated/openapi_aclient/models/input_variable.py +121 -0
  53. root/generated/openapi_aclient/models/input_variable_request.py +82 -0
  54. root/generated/openapi_aclient/models/judge.py +178 -0
  55. root/generated/openapi_aclient/models/judge_execution_request.py +114 -0
  56. root/generated/openapi_aclient/models/judge_execution_response.py +97 -0
  57. root/generated/openapi_aclient/models/judge_files_inner.py +84 -0
  58. root/generated/openapi_aclient/models/judge_generator_request.py +142 -0
  59. root/generated/openapi_aclient/models/judge_generator_response.py +88 -0
  60. root/generated/openapi_aclient/models/judge_invite_request.py +87 -0
  61. root/generated/openapi_aclient/models/judge_list.py +156 -0
  62. root/generated/openapi_aclient/models/judge_rectifier_request_request.py +114 -0
  63. root/generated/openapi_aclient/models/judge_rectifier_response.py +121 -0
  64. root/generated/openapi_aclient/models/judge_request.py +108 -0
  65. root/generated/openapi_aclient/models/model.py +126 -0
  66. root/generated/openapi_aclient/models/model_list.py +115 -0
  67. root/generated/openapi_aclient/models/model_params.py +89 -0
  68. root/generated/openapi_aclient/models/model_params_request.py +89 -0
  69. root/generated/openapi_aclient/models/model_request.py +118 -0
  70. root/generated/openapi_aclient/models/nested_evaluator.py +110 -0
  71. root/generated/openapi_aclient/models/nested_evaluator_objective.py +87 -0
  72. root/generated/openapi_aclient/models/nested_evaluator_request.py +92 -0
  73. root/generated/openapi_aclient/models/nested_objective_evaluator.py +105 -0
  74. root/generated/openapi_aclient/models/nested_objective_evaluator_request.py +92 -0
  75. root/generated/openapi_aclient/models/nested_objective_list.py +111 -0
  76. root/generated/openapi_aclient/models/nested_user_details.py +88 -0
  77. root/generated/openapi_aclient/models/nested_user_details_request.py +82 -0
  78. root/generated/openapi_aclient/models/nested_vector_objective.py +88 -0
  79. root/generated/openapi_aclient/models/nested_vector_objective_request.py +82 -0
  80. root/generated/openapi_aclient/models/objective.py +157 -0
  81. root/generated/openapi_aclient/models/objective_list.py +128 -0
  82. root/generated/openapi_aclient/models/objective_request.py +113 -0
  83. root/generated/openapi_aclient/models/objective_validator.py +100 -0
  84. root/generated/openapi_aclient/models/objective_validator_request.py +90 -0
  85. root/generated/openapi_aclient/models/paginated_data_set_list_list.py +111 -0
  86. root/generated/openapi_aclient/models/paginated_evaluator_list.py +111 -0
  87. root/generated/openapi_aclient/models/paginated_evaluator_list_output_list.py +111 -0
  88. root/generated/openapi_aclient/models/paginated_execution_log_list_list.py +111 -0
  89. root/generated/openapi_aclient/models/paginated_judge_list_list.py +111 -0
  90. root/generated/openapi_aclient/models/paginated_model_list_list.py +111 -0
  91. root/generated/openapi_aclient/models/paginated_objective_list.py +111 -0
  92. root/generated/openapi_aclient/models/paginated_objective_list_list.py +111 -0
  93. root/generated/openapi_aclient/models/patched_evaluator_request.py +194 -0
  94. root/generated/openapi_aclient/models/patched_judge_request.py +110 -0
  95. root/generated/openapi_aclient/models/patched_model_request.py +118 -0
  96. root/generated/openapi_aclient/models/patched_objective_request.py +113 -0
  97. root/generated/openapi_aclient/models/provider.py +99 -0
  98. root/generated/openapi_aclient/models/reference_variable.py +123 -0
  99. root/generated/openapi_aclient/models/reference_variable_request.py +83 -0
  100. root/generated/openapi_aclient/models/skill_execution_validator_result.py +130 -0
  101. root/generated/openapi_aclient/models/skill_test_data_request.py +107 -0
  102. root/generated/openapi_aclient/models/skill_test_data_request_dataset_range.py +93 -0
  103. root/generated/openapi_aclient/models/skill_test_input_request.py +171 -0
  104. root/generated/openapi_aclient/models/skill_type_enum.py +36 -0
  105. root/generated/openapi_aclient/models/status_change.py +84 -0
  106. root/generated/openapi_aclient/models/status_change_request.py +84 -0
  107. root/generated/openapi_aclient/models/status_change_status_enum.py +36 -0
  108. root/generated/openapi_aclient/models/status_enum.py +38 -0
  109. root/generated/openapi_aclient/models/validation_result_status.py +36 -0
  110. root/generated/openapi_aclient/models/visibility_enum.py +38 -0
  111. root/generated/openapi_aclient/rest.py +166 -0
  112. root/generated/openapi_aclient_README.md +239 -0
  113. root/generated/openapi_client/__init__.py +1 -0
  114. root/generated/openapi_client/api/__init__.py +1 -0
  115. root/generated/openapi_client/api/datasets_api.py +1274 -0
  116. root/generated/openapi_client/api/evaluators_api.py +3641 -0
  117. root/generated/openapi_client/api/execution_logs_api.py +751 -0
  118. root/generated/openapi_client/api/judges_api.py +3794 -0
  119. root/generated/openapi_client/api/models_api.py +1473 -0
  120. root/generated/openapi_client/api/objectives_api.py +1767 -0
  121. root/generated/openapi_client/api_client.py +659 -0
  122. root/generated/openapi_client/api_response.py +22 -0
  123. root/generated/openapi_client/configuration.py +474 -0
  124. root/generated/openapi_client/exceptions.py +197 -0
  125. root/generated/openapi_client/models/__init__.py +120 -0
  126. root/generated/openapi_client/models/data_set_create.py +118 -0
  127. root/generated/openapi_client/models/data_set_create_request.py +105 -0
  128. root/generated/openapi_client/models/data_set_list.py +129 -0
  129. root/generated/openapi_client/models/data_set_type.py +36 -0
  130. root/generated/openapi_client/models/dataset_range_request.py +93 -0
  131. root/generated/openapi_client/models/evaluator.py +273 -0
  132. root/generated/openapi_client/models/evaluator_calibration_output.py +101 -0
  133. root/generated/openapi_client/models/evaluator_calibration_result.py +134 -0
  134. root/generated/openapi_client/models/evaluator_demonstrations.py +107 -0
  135. root/generated/openapi_client/models/evaluator_demonstrations_request.py +107 -0
  136. root/generated/openapi_client/models/evaluator_execution_function_parameter_property_request.py +86 -0
  137. root/generated/openapi_client/models/evaluator_execution_function_parameter_request.py +109 -0
  138. root/generated/openapi_client/models/evaluator_execution_function_parameter_type_enum.py +35 -0
  139. root/generated/openapi_client/models/evaluator_execution_function_request.py +99 -0
  140. root/generated/openapi_client/models/evaluator_execution_functions_request.py +98 -0
  141. root/generated/openapi_client/models/evaluator_execution_functions_type_enum.py +35 -0
  142. root/generated/openapi_client/models/evaluator_execution_request.py +134 -0
  143. root/generated/openapi_client/models/evaluator_execution_result.py +114 -0
  144. root/generated/openapi_client/models/evaluator_inputs_value.py +100 -0
  145. root/generated/openapi_client/models/evaluator_inputs_value_items.py +89 -0
  146. root/generated/openapi_client/models/evaluator_list_output.py +198 -0
  147. root/generated/openapi_client/models/evaluator_reference.py +90 -0
  148. root/generated/openapi_client/models/evaluator_reference_request.py +90 -0
  149. root/generated/openapi_client/models/evaluator_request.py +194 -0
  150. root/generated/openapi_client/models/evaluator_result.py +110 -0
  151. root/generated/openapi_client/models/execution_log_details.py +291 -0
  152. root/generated/openapi_client/models/execution_log_details_evaluation_context.py +83 -0
  153. root/generated/openapi_client/models/execution_log_details_evaluator_latencies_inner.py +83 -0
  154. root/generated/openapi_client/models/execution_log_list.py +215 -0
  155. root/generated/openapi_client/models/execution_log_list_evaluation_context.py +83 -0
  156. root/generated/openapi_client/models/generation_model_params_request.py +93 -0
  157. root/generated/openapi_client/models/id.py +87 -0
  158. root/generated/openapi_client/models/input_variable.py +121 -0
  159. root/generated/openapi_client/models/input_variable_request.py +82 -0
  160. root/generated/openapi_client/models/judge.py +178 -0
  161. root/generated/openapi_client/models/judge_execution_request.py +114 -0
  162. root/generated/openapi_client/models/judge_execution_response.py +97 -0
  163. root/generated/openapi_client/models/judge_files_inner.py +84 -0
  164. root/generated/openapi_client/models/judge_generator_request.py +142 -0
  165. root/generated/openapi_client/models/judge_generator_response.py +88 -0
  166. root/generated/openapi_client/models/judge_invite_request.py +87 -0
  167. root/generated/openapi_client/models/judge_list.py +156 -0
  168. root/generated/openapi_client/models/judge_rectifier_request_request.py +114 -0
  169. root/generated/openapi_client/models/judge_rectifier_response.py +121 -0
  170. root/generated/openapi_client/models/judge_request.py +108 -0
  171. root/generated/openapi_client/models/model.py +126 -0
  172. root/generated/openapi_client/models/model_list.py +115 -0
  173. root/generated/openapi_client/models/model_params.py +89 -0
  174. root/generated/openapi_client/models/model_params_request.py +89 -0
  175. root/generated/openapi_client/models/model_request.py +118 -0
  176. root/generated/openapi_client/models/nested_evaluator.py +110 -0
  177. root/generated/openapi_client/models/nested_evaluator_objective.py +87 -0
  178. root/generated/openapi_client/models/nested_evaluator_request.py +92 -0
  179. root/generated/openapi_client/models/nested_objective_evaluator.py +105 -0
  180. root/generated/openapi_client/models/nested_objective_evaluator_request.py +92 -0
  181. root/generated/openapi_client/models/nested_objective_list.py +111 -0
  182. root/generated/openapi_client/models/nested_user_details.py +88 -0
  183. root/generated/openapi_client/models/nested_user_details_request.py +82 -0
  184. root/generated/openapi_client/models/nested_vector_objective.py +88 -0
  185. root/generated/openapi_client/models/nested_vector_objective_request.py +82 -0
  186. root/generated/openapi_client/models/objective.py +157 -0
  187. root/generated/openapi_client/models/objective_list.py +128 -0
  188. root/generated/openapi_client/models/objective_request.py +113 -0
  189. root/generated/openapi_client/models/objective_validator.py +100 -0
  190. root/generated/openapi_client/models/objective_validator_request.py +90 -0
  191. root/generated/openapi_client/models/paginated_data_set_list_list.py +111 -0
  192. root/generated/openapi_client/models/paginated_evaluator_list.py +111 -0
  193. root/generated/openapi_client/models/paginated_evaluator_list_output_list.py +111 -0
  194. root/generated/openapi_client/models/paginated_execution_log_list_list.py +111 -0
  195. root/generated/openapi_client/models/paginated_judge_list_list.py +111 -0
  196. root/generated/openapi_client/models/paginated_model_list_list.py +111 -0
  197. root/generated/openapi_client/models/paginated_objective_list.py +111 -0
  198. root/generated/openapi_client/models/paginated_objective_list_list.py +111 -0
  199. root/generated/openapi_client/models/patched_evaluator_request.py +194 -0
  200. root/generated/openapi_client/models/patched_judge_request.py +110 -0
  201. root/generated/openapi_client/models/patched_model_request.py +118 -0
  202. root/generated/openapi_client/models/patched_objective_request.py +113 -0
  203. root/generated/openapi_client/models/provider.py +99 -0
  204. root/generated/openapi_client/models/reference_variable.py +123 -0
  205. root/generated/openapi_client/models/reference_variable_request.py +83 -0
  206. root/generated/openapi_client/models/skill_execution_validator_result.py +130 -0
  207. root/generated/openapi_client/models/skill_test_data_request.py +107 -0
  208. root/generated/openapi_client/models/skill_test_data_request_dataset_range.py +93 -0
  209. root/generated/openapi_client/models/skill_test_input_request.py +171 -0
  210. root/generated/openapi_client/models/skill_type_enum.py +36 -0
  211. root/generated/openapi_client/models/status_change.py +84 -0
  212. root/generated/openapi_client/models/status_change_request.py +84 -0
  213. root/generated/openapi_client/models/status_change_status_enum.py +36 -0
  214. root/generated/openapi_client/models/status_enum.py +38 -0
  215. root/generated/openapi_client/models/validation_result_status.py +36 -0
  216. root/generated/openapi_client/models/visibility_enum.py +38 -0
  217. root/generated/openapi_client/rest.py +203 -0
  218. root/generated/openapi_client_README.md +238 -0
  219. root/judges.py +681 -0
  220. root/models.py +197 -0
  221. root/objectives.py +343 -0
  222. root/py.typed +0 -0
  223. root/skills.py +1707 -0
  224. root/utils.py +90 -0
  225. scorable-1.6.4.dist-info/METADATA +395 -0
  226. scorable-1.6.4.dist-info/RECORD +228 -0
  227. scorable-1.6.4.dist-info/WHEEL +4 -0
  228. scorable-1.6.4.dist-info/licenses/LICENSE +202 -0
@@ -0,0 +1,1767 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ Root Signals API
5
+
6
+ Root Signals JSON API provides a way to access Root Signals using provisioned API token
7
+
8
+ The version of the OpenAPI document: 1.0.0 (latest)
9
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
10
+
11
+ Do not edit the class manually.
12
+ """ # noqa: E501
13
+
14
+ import warnings
15
+ from typing import Any, Dict, List, Optional, Tuple, Union
16
+
17
+ from pydantic import Field, StrictBool, StrictFloat, StrictInt, StrictStr, validate_call
18
+ from typing_extensions import Annotated
19
+
20
+ from root.generated.openapi_aclient.api_client import ApiClient, RequestSerialized
21
+ from root.generated.openapi_aclient.api_response import ApiResponse
22
+ from root.generated.openapi_aclient.models.id import ID
23
+ from root.generated.openapi_aclient.models.objective import Objective
24
+ from root.generated.openapi_aclient.models.objective_request import ObjectiveRequest
25
+ from root.generated.openapi_aclient.models.paginated_objective_list import PaginatedObjectiveList
26
+ from root.generated.openapi_aclient.models.paginated_objective_list_list import PaginatedObjectiveListList
27
+ from root.generated.openapi_aclient.models.patched_objective_request import PatchedObjectiveRequest
28
+ from root.generated.openapi_aclient.rest import RESTResponseType
29
+
30
+
31
+ class ObjectivesApi:
32
+ """NOTE: This class is auto generated by OpenAPI Generator
33
+ Ref: https://openapi-generator.tech
34
+
35
+ Do not edit the class manually.
36
+ """
37
+
38
+ def __init__(self, api_client=None) -> None:
39
+ if api_client is None:
40
+ api_client = ApiClient.get_default()
41
+ self.api_client = api_client
42
+
43
+ @validate_call
44
+ async def objectives_create(
45
+ self,
46
+ objective_request: Optional[ObjectiveRequest] = None,
47
+ _request_timeout: Union[
48
+ None,
49
+ Annotated[StrictFloat, Field(gt=0)],
50
+ Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]],
51
+ ] = None,
52
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
53
+ _content_type: Optional[StrictStr] = None,
54
+ _headers: Optional[Dict[StrictStr, Any]] = None,
55
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
56
+ ) -> ID:
57
+ """objectives_create
58
+
59
+ Create an Objective definition.
60
+
61
+ :param objective_request:
62
+ :type objective_request: ObjectiveRequest
63
+ :param _request_timeout: timeout setting for this request. If one
64
+ number provided, it will be total request
65
+ timeout. It can also be a pair (tuple) of
66
+ (connection, read) timeouts.
67
+ :type _request_timeout: int, tuple(int, int), optional
68
+ :param _request_auth: set to override the auth_settings for an a single
69
+ request; this effectively ignores the
70
+ authentication in the spec for a single request.
71
+ :type _request_auth: dict, optional
72
+ :param _content_type: force content-type for the request.
73
+ :type _content_type: str, Optional
74
+ :param _headers: set to override the headers for a single
75
+ request; this effectively ignores the headers
76
+ in the spec for a single request.
77
+ :type _headers: dict, optional
78
+ :param _host_index: set to override the host_index for a single
79
+ request; this effectively ignores the host_index
80
+ in the spec for a single request.
81
+ :type _host_index: int, optional
82
+ :return: Returns the result object.
83
+ """ # noqa: E501
84
+
85
+ _param = self._objectives_create_serialize(
86
+ objective_request=objective_request,
87
+ _request_auth=_request_auth,
88
+ _content_type=_content_type,
89
+ _headers=_headers,
90
+ _host_index=_host_index,
91
+ )
92
+
93
+ _response_types_map: Dict[str, Optional[str]] = {
94
+ "201": "ID",
95
+ }
96
+ response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout)
97
+ await response_data.read()
98
+ return self.api_client.response_deserialize(
99
+ response_data=response_data,
100
+ response_types_map=_response_types_map,
101
+ ).data
102
+
103
+ @validate_call
104
+ async def objectives_create_with_http_info(
105
+ self,
106
+ objective_request: Optional[ObjectiveRequest] = None,
107
+ _request_timeout: Union[
108
+ None,
109
+ Annotated[StrictFloat, Field(gt=0)],
110
+ Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]],
111
+ ] = None,
112
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
113
+ _content_type: Optional[StrictStr] = None,
114
+ _headers: Optional[Dict[StrictStr, Any]] = None,
115
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
116
+ ) -> ApiResponse[ID]:
117
+ """objectives_create
118
+
119
+ Create an Objective definition.
120
+
121
+ :param objective_request:
122
+ :type objective_request: ObjectiveRequest
123
+ :param _request_timeout: timeout setting for this request. If one
124
+ number provided, it will be total request
125
+ timeout. It can also be a pair (tuple) of
126
+ (connection, read) timeouts.
127
+ :type _request_timeout: int, tuple(int, int), optional
128
+ :param _request_auth: set to override the auth_settings for an a single
129
+ request; this effectively ignores the
130
+ authentication in the spec for a single request.
131
+ :type _request_auth: dict, optional
132
+ :param _content_type: force content-type for the request.
133
+ :type _content_type: str, Optional
134
+ :param _headers: set to override the headers for a single
135
+ request; this effectively ignores the headers
136
+ in the spec for a single request.
137
+ :type _headers: dict, optional
138
+ :param _host_index: set to override the host_index for a single
139
+ request; this effectively ignores the host_index
140
+ in the spec for a single request.
141
+ :type _host_index: int, optional
142
+ :return: Returns the result object.
143
+ """ # noqa: E501
144
+
145
+ _param = self._objectives_create_serialize(
146
+ objective_request=objective_request,
147
+ _request_auth=_request_auth,
148
+ _content_type=_content_type,
149
+ _headers=_headers,
150
+ _host_index=_host_index,
151
+ )
152
+
153
+ _response_types_map: Dict[str, Optional[str]] = {
154
+ "201": "ID",
155
+ }
156
+ response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout)
157
+ await response_data.read()
158
+ return self.api_client.response_deserialize(
159
+ response_data=response_data,
160
+ response_types_map=_response_types_map,
161
+ )
162
+
163
+ @validate_call
164
+ async def objectives_create_without_preload_content(
165
+ self,
166
+ objective_request: Optional[ObjectiveRequest] = None,
167
+ _request_timeout: Union[
168
+ None,
169
+ Annotated[StrictFloat, Field(gt=0)],
170
+ Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]],
171
+ ] = None,
172
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
173
+ _content_type: Optional[StrictStr] = None,
174
+ _headers: Optional[Dict[StrictStr, Any]] = None,
175
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
176
+ ) -> RESTResponseType:
177
+ """objectives_create
178
+
179
+ Create an Objective definition.
180
+
181
+ :param objective_request:
182
+ :type objective_request: ObjectiveRequest
183
+ :param _request_timeout: timeout setting for this request. If one
184
+ number provided, it will be total request
185
+ timeout. It can also be a pair (tuple) of
186
+ (connection, read) timeouts.
187
+ :type _request_timeout: int, tuple(int, int), optional
188
+ :param _request_auth: set to override the auth_settings for an a single
189
+ request; this effectively ignores the
190
+ authentication in the spec for a single request.
191
+ :type _request_auth: dict, optional
192
+ :param _content_type: force content-type for the request.
193
+ :type _content_type: str, Optional
194
+ :param _headers: set to override the headers for a single
195
+ request; this effectively ignores the headers
196
+ in the spec for a single request.
197
+ :type _headers: dict, optional
198
+ :param _host_index: set to override the host_index for a single
199
+ request; this effectively ignores the host_index
200
+ in the spec for a single request.
201
+ :type _host_index: int, optional
202
+ :return: Returns the result object.
203
+ """ # noqa: E501
204
+
205
+ _param = self._objectives_create_serialize(
206
+ objective_request=objective_request,
207
+ _request_auth=_request_auth,
208
+ _content_type=_content_type,
209
+ _headers=_headers,
210
+ _host_index=_host_index,
211
+ )
212
+
213
+ _response_types_map: Dict[str, Optional[str]] = {
214
+ "201": "ID",
215
+ }
216
+ response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout)
217
+ return response_data.response
218
+
219
+ def _objectives_create_serialize(
220
+ self,
221
+ objective_request,
222
+ _request_auth,
223
+ _content_type,
224
+ _headers,
225
+ _host_index,
226
+ ) -> RequestSerialized:
227
+ _host = None
228
+
229
+ _collection_formats: Dict[str, str] = {}
230
+
231
+ _path_params: Dict[str, str] = {}
232
+ _query_params: List[Tuple[str, str]] = []
233
+ _header_params: Dict[str, Optional[str]] = _headers or {}
234
+ _form_params: List[Tuple[str, str]] = []
235
+ _files: Dict[str, str] = {}
236
+ _body_params: Optional[bytes] = None
237
+
238
+ # process the path parameters
239
+ # process the query parameters
240
+ # process the header parameters
241
+ # process the form parameters
242
+ # process the body parameter
243
+ if objective_request is not None:
244
+ _body_params = objective_request
245
+
246
+ # set the HTTP header `Accept`
247
+ _header_params["Accept"] = self.api_client.select_header_accept(["application/json"])
248
+
249
+ # set the HTTP header `Content-Type`
250
+ if _content_type:
251
+ _header_params["Content-Type"] = _content_type
252
+ else:
253
+ _default_content_type = self.api_client.select_header_content_type(
254
+ ["application/json", "application/x-www-form-urlencoded", "multipart/form-data"]
255
+ )
256
+ if _default_content_type is not None:
257
+ _header_params["Content-Type"] = _default_content_type
258
+
259
+ # authentication setting
260
+ _auth_settings: List[str] = ["publicApiKey"]
261
+
262
+ return self.api_client.param_serialize(
263
+ method="POST",
264
+ resource_path="/v1/objectives/",
265
+ path_params=_path_params,
266
+ query_params=_query_params,
267
+ header_params=_header_params,
268
+ body=_body_params,
269
+ post_params=_form_params,
270
+ files=_files,
271
+ auth_settings=_auth_settings,
272
+ collection_formats=_collection_formats,
273
+ _host=_host,
274
+ _request_auth=_request_auth,
275
+ )
276
+
277
+ @validate_call
278
+ async def objectives_destroy(
279
+ self,
280
+ id: StrictStr,
281
+ _request_timeout: Union[
282
+ None,
283
+ Annotated[StrictFloat, Field(gt=0)],
284
+ Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]],
285
+ ] = None,
286
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
287
+ _content_type: Optional[StrictStr] = None,
288
+ _headers: Optional[Dict[StrictStr, Any]] = None,
289
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
290
+ ) -> None:
291
+ """objectives_destroy
292
+
293
+ Delete an Objective definition.
294
+
295
+ :param id: (required)
296
+ :type id: str
297
+ :param _request_timeout: timeout setting for this request. If one
298
+ number provided, it will be total request
299
+ timeout. It can also be a pair (tuple) of
300
+ (connection, read) timeouts.
301
+ :type _request_timeout: int, tuple(int, int), optional
302
+ :param _request_auth: set to override the auth_settings for an a single
303
+ request; this effectively ignores the
304
+ authentication in the spec for a single request.
305
+ :type _request_auth: dict, optional
306
+ :param _content_type: force content-type for the request.
307
+ :type _content_type: str, Optional
308
+ :param _headers: set to override the headers for a single
309
+ request; this effectively ignores the headers
310
+ in the spec for a single request.
311
+ :type _headers: dict, optional
312
+ :param _host_index: set to override the host_index for a single
313
+ request; this effectively ignores the host_index
314
+ in the spec for a single request.
315
+ :type _host_index: int, optional
316
+ :return: Returns the result object.
317
+ """ # noqa: E501
318
+
319
+ _param = self._objectives_destroy_serialize(
320
+ id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index
321
+ )
322
+
323
+ _response_types_map: Dict[str, Optional[str]] = {
324
+ "204": None,
325
+ }
326
+ response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout)
327
+ await response_data.read()
328
+ return self.api_client.response_deserialize(
329
+ response_data=response_data,
330
+ response_types_map=_response_types_map,
331
+ ).data
332
+
333
+ @validate_call
334
+ async def objectives_destroy_with_http_info(
335
+ self,
336
+ id: StrictStr,
337
+ _request_timeout: Union[
338
+ None,
339
+ Annotated[StrictFloat, Field(gt=0)],
340
+ Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]],
341
+ ] = None,
342
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
343
+ _content_type: Optional[StrictStr] = None,
344
+ _headers: Optional[Dict[StrictStr, Any]] = None,
345
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
346
+ ) -> ApiResponse[None]:
347
+ """objectives_destroy
348
+
349
+ Delete an Objective definition.
350
+
351
+ :param id: (required)
352
+ :type id: str
353
+ :param _request_timeout: timeout setting for this request. If one
354
+ number provided, it will be total request
355
+ timeout. It can also be a pair (tuple) of
356
+ (connection, read) timeouts.
357
+ :type _request_timeout: int, tuple(int, int), optional
358
+ :param _request_auth: set to override the auth_settings for an a single
359
+ request; this effectively ignores the
360
+ authentication in the spec for a single request.
361
+ :type _request_auth: dict, optional
362
+ :param _content_type: force content-type for the request.
363
+ :type _content_type: str, Optional
364
+ :param _headers: set to override the headers for a single
365
+ request; this effectively ignores the headers
366
+ in the spec for a single request.
367
+ :type _headers: dict, optional
368
+ :param _host_index: set to override the host_index for a single
369
+ request; this effectively ignores the host_index
370
+ in the spec for a single request.
371
+ :type _host_index: int, optional
372
+ :return: Returns the result object.
373
+ """ # noqa: E501
374
+
375
+ _param = self._objectives_destroy_serialize(
376
+ id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index
377
+ )
378
+
379
+ _response_types_map: Dict[str, Optional[str]] = {
380
+ "204": None,
381
+ }
382
+ response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout)
383
+ await response_data.read()
384
+ return self.api_client.response_deserialize(
385
+ response_data=response_data,
386
+ response_types_map=_response_types_map,
387
+ )
388
+
389
+ @validate_call
390
+ async def objectives_destroy_without_preload_content(
391
+ self,
392
+ id: StrictStr,
393
+ _request_timeout: Union[
394
+ None,
395
+ Annotated[StrictFloat, Field(gt=0)],
396
+ Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]],
397
+ ] = None,
398
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
399
+ _content_type: Optional[StrictStr] = None,
400
+ _headers: Optional[Dict[StrictStr, Any]] = None,
401
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
402
+ ) -> RESTResponseType:
403
+ """objectives_destroy
404
+
405
+ Delete an Objective definition.
406
+
407
+ :param id: (required)
408
+ :type id: str
409
+ :param _request_timeout: timeout setting for this request. If one
410
+ number provided, it will be total request
411
+ timeout. It can also be a pair (tuple) of
412
+ (connection, read) timeouts.
413
+ :type _request_timeout: int, tuple(int, int), optional
414
+ :param _request_auth: set to override the auth_settings for an a single
415
+ request; this effectively ignores the
416
+ authentication in the spec for a single request.
417
+ :type _request_auth: dict, optional
418
+ :param _content_type: force content-type for the request.
419
+ :type _content_type: str, Optional
420
+ :param _headers: set to override the headers for a single
421
+ request; this effectively ignores the headers
422
+ in the spec for a single request.
423
+ :type _headers: dict, optional
424
+ :param _host_index: set to override the host_index for a single
425
+ request; this effectively ignores the host_index
426
+ in the spec for a single request.
427
+ :type _host_index: int, optional
428
+ :return: Returns the result object.
429
+ """ # noqa: E501
430
+
431
+ _param = self._objectives_destroy_serialize(
432
+ id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index
433
+ )
434
+
435
+ _response_types_map: Dict[str, Optional[str]] = {
436
+ "204": None,
437
+ }
438
+ response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout)
439
+ return response_data.response
440
+
441
+ def _objectives_destroy_serialize(
442
+ self,
443
+ id,
444
+ _request_auth,
445
+ _content_type,
446
+ _headers,
447
+ _host_index,
448
+ ) -> RequestSerialized:
449
+ _host = None
450
+
451
+ _collection_formats: Dict[str, str] = {}
452
+
453
+ _path_params: Dict[str, str] = {}
454
+ _query_params: List[Tuple[str, str]] = []
455
+ _header_params: Dict[str, Optional[str]] = _headers or {}
456
+ _form_params: List[Tuple[str, str]] = []
457
+ _files: Dict[str, str] = {}
458
+ _body_params: Optional[bytes] = None
459
+
460
+ # process the path parameters
461
+ if id is not None:
462
+ _path_params["id"] = id
463
+ # process the query parameters
464
+ # process the header parameters
465
+ # process the form parameters
466
+ # process the body parameter
467
+
468
+ # authentication setting
469
+ _auth_settings: List[str] = ["publicApiKey"]
470
+
471
+ return self.api_client.param_serialize(
472
+ method="DELETE",
473
+ resource_path="/v1/objectives/{id}/",
474
+ path_params=_path_params,
475
+ query_params=_query_params,
476
+ header_params=_header_params,
477
+ body=_body_params,
478
+ post_params=_form_params,
479
+ files=_files,
480
+ auth_settings=_auth_settings,
481
+ collection_formats=_collection_formats,
482
+ _host=_host,
483
+ _request_auth=_request_auth,
484
+ )
485
+
486
+ @validate_call
487
+ async def objectives_list(
488
+ self,
489
+ cursor: Annotated[Optional[StrictStr], Field(description="The pagination cursor value.")] = None,
490
+ has_validators: Annotated[
491
+ Optional[StrictBool], Field(description="Filter objectives by whether they have validators.")
492
+ ] = None,
493
+ intent: Annotated[
494
+ Optional[StrictStr], Field(description="Search for objectives by intent (exact match).")
495
+ ] = None,
496
+ ordering: Annotated[
497
+ Optional[StrictStr], Field(description="Which field to use when ordering the results.")
498
+ ] = None,
499
+ page_size: Annotated[Optional[StrictInt], Field(description="Number of results to return per page.")] = None,
500
+ search: Annotated[Optional[StrictStr], Field(description="Search for objectives by intent.")] = None,
501
+ _request_timeout: Union[
502
+ None,
503
+ Annotated[StrictFloat, Field(gt=0)],
504
+ Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]],
505
+ ] = None,
506
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
507
+ _content_type: Optional[StrictStr] = None,
508
+ _headers: Optional[Dict[StrictStr, Any]] = None,
509
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
510
+ ) -> PaginatedObjectiveListList:
511
+ """objectives_list
512
+
513
+ List Objective definitions.
514
+
515
+ :param cursor: The pagination cursor value.
516
+ :type cursor: str
517
+ :param has_validators: Filter objectives by whether they have validators.
518
+ :type has_validators: bool
519
+ :param intent: Search for objectives by intent (exact match).
520
+ :type intent: str
521
+ :param ordering: Which field to use when ordering the results.
522
+ :type ordering: str
523
+ :param page_size: Number of results to return per page.
524
+ :type page_size: int
525
+ :param search: Search for objectives by intent.
526
+ :type search: str
527
+ :param _request_timeout: timeout setting for this request. If one
528
+ number provided, it will be total request
529
+ timeout. It can also be a pair (tuple) of
530
+ (connection, read) timeouts.
531
+ :type _request_timeout: int, tuple(int, int), optional
532
+ :param _request_auth: set to override the auth_settings for an a single
533
+ request; this effectively ignores the
534
+ authentication in the spec for a single request.
535
+ :type _request_auth: dict, optional
536
+ :param _content_type: force content-type for the request.
537
+ :type _content_type: str, Optional
538
+ :param _headers: set to override the headers for a single
539
+ request; this effectively ignores the headers
540
+ in the spec for a single request.
541
+ :type _headers: dict, optional
542
+ :param _host_index: set to override the host_index for a single
543
+ request; this effectively ignores the host_index
544
+ in the spec for a single request.
545
+ :type _host_index: int, optional
546
+ :return: Returns the result object.
547
+ """ # noqa: E501
548
+
549
+ _param = self._objectives_list_serialize(
550
+ cursor=cursor,
551
+ has_validators=has_validators,
552
+ intent=intent,
553
+ ordering=ordering,
554
+ page_size=page_size,
555
+ search=search,
556
+ _request_auth=_request_auth,
557
+ _content_type=_content_type,
558
+ _headers=_headers,
559
+ _host_index=_host_index,
560
+ )
561
+
562
+ _response_types_map: Dict[str, Optional[str]] = {
563
+ "200": "PaginatedObjectiveListList",
564
+ }
565
+ response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout)
566
+ await response_data.read()
567
+ return self.api_client.response_deserialize(
568
+ response_data=response_data,
569
+ response_types_map=_response_types_map,
570
+ ).data
571
+
572
+ @validate_call
573
+ async def objectives_list_with_http_info(
574
+ self,
575
+ cursor: Annotated[Optional[StrictStr], Field(description="The pagination cursor value.")] = None,
576
+ has_validators: Annotated[
577
+ Optional[StrictBool], Field(description="Filter objectives by whether they have validators.")
578
+ ] = None,
579
+ intent: Annotated[
580
+ Optional[StrictStr], Field(description="Search for objectives by intent (exact match).")
581
+ ] = None,
582
+ ordering: Annotated[
583
+ Optional[StrictStr], Field(description="Which field to use when ordering the results.")
584
+ ] = None,
585
+ page_size: Annotated[Optional[StrictInt], Field(description="Number of results to return per page.")] = None,
586
+ search: Annotated[Optional[StrictStr], Field(description="Search for objectives by intent.")] = None,
587
+ _request_timeout: Union[
588
+ None,
589
+ Annotated[StrictFloat, Field(gt=0)],
590
+ Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]],
591
+ ] = None,
592
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
593
+ _content_type: Optional[StrictStr] = None,
594
+ _headers: Optional[Dict[StrictStr, Any]] = None,
595
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
596
+ ) -> ApiResponse[PaginatedObjectiveListList]:
597
+ """objectives_list
598
+
599
+ List Objective definitions.
600
+
601
+ :param cursor: The pagination cursor value.
602
+ :type cursor: str
603
+ :param has_validators: Filter objectives by whether they have validators.
604
+ :type has_validators: bool
605
+ :param intent: Search for objectives by intent (exact match).
606
+ :type intent: str
607
+ :param ordering: Which field to use when ordering the results.
608
+ :type ordering: str
609
+ :param page_size: Number of results to return per page.
610
+ :type page_size: int
611
+ :param search: Search for objectives by intent.
612
+ :type search: str
613
+ :param _request_timeout: timeout setting for this request. If one
614
+ number provided, it will be total request
615
+ timeout. It can also be a pair (tuple) of
616
+ (connection, read) timeouts.
617
+ :type _request_timeout: int, tuple(int, int), optional
618
+ :param _request_auth: set to override the auth_settings for an a single
619
+ request; this effectively ignores the
620
+ authentication in the spec for a single request.
621
+ :type _request_auth: dict, optional
622
+ :param _content_type: force content-type for the request.
623
+ :type _content_type: str, Optional
624
+ :param _headers: set to override the headers for a single
625
+ request; this effectively ignores the headers
626
+ in the spec for a single request.
627
+ :type _headers: dict, optional
628
+ :param _host_index: set to override the host_index for a single
629
+ request; this effectively ignores the host_index
630
+ in the spec for a single request.
631
+ :type _host_index: int, optional
632
+ :return: Returns the result object.
633
+ """ # noqa: E501
634
+
635
+ _param = self._objectives_list_serialize(
636
+ cursor=cursor,
637
+ has_validators=has_validators,
638
+ intent=intent,
639
+ ordering=ordering,
640
+ page_size=page_size,
641
+ search=search,
642
+ _request_auth=_request_auth,
643
+ _content_type=_content_type,
644
+ _headers=_headers,
645
+ _host_index=_host_index,
646
+ )
647
+
648
+ _response_types_map: Dict[str, Optional[str]] = {
649
+ "200": "PaginatedObjectiveListList",
650
+ }
651
+ response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout)
652
+ await response_data.read()
653
+ return self.api_client.response_deserialize(
654
+ response_data=response_data,
655
+ response_types_map=_response_types_map,
656
+ )
657
+
658
+ @validate_call
659
+ async def objectives_list_without_preload_content(
660
+ self,
661
+ cursor: Annotated[Optional[StrictStr], Field(description="The pagination cursor value.")] = None,
662
+ has_validators: Annotated[
663
+ Optional[StrictBool], Field(description="Filter objectives by whether they have validators.")
664
+ ] = None,
665
+ intent: Annotated[
666
+ Optional[StrictStr], Field(description="Search for objectives by intent (exact match).")
667
+ ] = None,
668
+ ordering: Annotated[
669
+ Optional[StrictStr], Field(description="Which field to use when ordering the results.")
670
+ ] = None,
671
+ page_size: Annotated[Optional[StrictInt], Field(description="Number of results to return per page.")] = None,
672
+ search: Annotated[Optional[StrictStr], Field(description="Search for objectives by intent.")] = None,
673
+ _request_timeout: Union[
674
+ None,
675
+ Annotated[StrictFloat, Field(gt=0)],
676
+ Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]],
677
+ ] = None,
678
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
679
+ _content_type: Optional[StrictStr] = None,
680
+ _headers: Optional[Dict[StrictStr, Any]] = None,
681
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
682
+ ) -> RESTResponseType:
683
+ """objectives_list
684
+
685
+ List Objective definitions.
686
+
687
+ :param cursor: The pagination cursor value.
688
+ :type cursor: str
689
+ :param has_validators: Filter objectives by whether they have validators.
690
+ :type has_validators: bool
691
+ :param intent: Search for objectives by intent (exact match).
692
+ :type intent: str
693
+ :param ordering: Which field to use when ordering the results.
694
+ :type ordering: str
695
+ :param page_size: Number of results to return per page.
696
+ :type page_size: int
697
+ :param search: Search for objectives by intent.
698
+ :type search: str
699
+ :param _request_timeout: timeout setting for this request. If one
700
+ number provided, it will be total request
701
+ timeout. It can also be a pair (tuple) of
702
+ (connection, read) timeouts.
703
+ :type _request_timeout: int, tuple(int, int), optional
704
+ :param _request_auth: set to override the auth_settings for an a single
705
+ request; this effectively ignores the
706
+ authentication in the spec for a single request.
707
+ :type _request_auth: dict, optional
708
+ :param _content_type: force content-type for the request.
709
+ :type _content_type: str, Optional
710
+ :param _headers: set to override the headers for a single
711
+ request; this effectively ignores the headers
712
+ in the spec for a single request.
713
+ :type _headers: dict, optional
714
+ :param _host_index: set to override the host_index for a single
715
+ request; this effectively ignores the host_index
716
+ in the spec for a single request.
717
+ :type _host_index: int, optional
718
+ :return: Returns the result object.
719
+ """ # noqa: E501
720
+
721
+ _param = self._objectives_list_serialize(
722
+ cursor=cursor,
723
+ has_validators=has_validators,
724
+ intent=intent,
725
+ ordering=ordering,
726
+ page_size=page_size,
727
+ search=search,
728
+ _request_auth=_request_auth,
729
+ _content_type=_content_type,
730
+ _headers=_headers,
731
+ _host_index=_host_index,
732
+ )
733
+
734
+ _response_types_map: Dict[str, Optional[str]] = {
735
+ "200": "PaginatedObjectiveListList",
736
+ }
737
+ response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout)
738
+ return response_data.response
739
+
740
+ def _objectives_list_serialize(
741
+ self,
742
+ cursor,
743
+ has_validators,
744
+ intent,
745
+ ordering,
746
+ page_size,
747
+ search,
748
+ _request_auth,
749
+ _content_type,
750
+ _headers,
751
+ _host_index,
752
+ ) -> RequestSerialized:
753
+ _host = None
754
+
755
+ _collection_formats: Dict[str, str] = {}
756
+
757
+ _path_params: Dict[str, str] = {}
758
+ _query_params: List[Tuple[str, str]] = []
759
+ _header_params: Dict[str, Optional[str]] = _headers or {}
760
+ _form_params: List[Tuple[str, str]] = []
761
+ _files: Dict[str, str] = {}
762
+ _body_params: Optional[bytes] = None
763
+
764
+ # process the path parameters
765
+ # process the query parameters
766
+ if cursor is not None:
767
+ _query_params.append(("cursor", cursor))
768
+
769
+ if has_validators is not None:
770
+ _query_params.append(("has_validators", has_validators))
771
+
772
+ if intent is not None:
773
+ _query_params.append(("intent", intent))
774
+
775
+ if ordering is not None:
776
+ _query_params.append(("ordering", ordering))
777
+
778
+ if page_size is not None:
779
+ _query_params.append(("page_size", page_size))
780
+
781
+ if search is not None:
782
+ _query_params.append(("search", search))
783
+
784
+ # process the header parameters
785
+ # process the form parameters
786
+ # process the body parameter
787
+
788
+ # set the HTTP header `Accept`
789
+ _header_params["Accept"] = self.api_client.select_header_accept(["application/json"])
790
+
791
+ # authentication setting
792
+ _auth_settings: List[str] = ["publicApiKey"]
793
+
794
+ return self.api_client.param_serialize(
795
+ method="GET",
796
+ resource_path="/v1/objectives/",
797
+ path_params=_path_params,
798
+ query_params=_query_params,
799
+ header_params=_header_params,
800
+ body=_body_params,
801
+ post_params=_form_params,
802
+ files=_files,
803
+ auth_settings=_auth_settings,
804
+ collection_formats=_collection_formats,
805
+ _host=_host,
806
+ _request_auth=_request_auth,
807
+ )
808
+
809
+ @validate_call
810
+ async def objectives_partial_update(
811
+ self,
812
+ id: StrictStr,
813
+ patched_objective_request: Optional[PatchedObjectiveRequest] = None,
814
+ _request_timeout: Union[
815
+ None,
816
+ Annotated[StrictFloat, Field(gt=0)],
817
+ Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]],
818
+ ] = None,
819
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
820
+ _content_type: Optional[StrictStr] = None,
821
+ _headers: Optional[Dict[StrictStr, Any]] = None,
822
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
823
+ ) -> Objective:
824
+ """objectives_partial_update
825
+
826
+
827
+ :param id: (required)
828
+ :type id: str
829
+ :param patched_objective_request:
830
+ :type patched_objective_request: PatchedObjectiveRequest
831
+ :param _request_timeout: timeout setting for this request. If one
832
+ number provided, it will be total request
833
+ timeout. It can also be a pair (tuple) of
834
+ (connection, read) timeouts.
835
+ :type _request_timeout: int, tuple(int, int), optional
836
+ :param _request_auth: set to override the auth_settings for an a single
837
+ request; this effectively ignores the
838
+ authentication in the spec for a single request.
839
+ :type _request_auth: dict, optional
840
+ :param _content_type: force content-type for the request.
841
+ :type _content_type: str, Optional
842
+ :param _headers: set to override the headers for a single
843
+ request; this effectively ignores the headers
844
+ in the spec for a single request.
845
+ :type _headers: dict, optional
846
+ :param _host_index: set to override the host_index for a single
847
+ request; this effectively ignores the host_index
848
+ in the spec for a single request.
849
+ :type _host_index: int, optional
850
+ :return: Returns the result object.
851
+ """ # noqa: E501
852
+
853
+ _param = self._objectives_partial_update_serialize(
854
+ id=id,
855
+ patched_objective_request=patched_objective_request,
856
+ _request_auth=_request_auth,
857
+ _content_type=_content_type,
858
+ _headers=_headers,
859
+ _host_index=_host_index,
860
+ )
861
+
862
+ _response_types_map: Dict[str, Optional[str]] = {
863
+ "200": "Objective",
864
+ }
865
+ response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout)
866
+ await response_data.read()
867
+ return self.api_client.response_deserialize(
868
+ response_data=response_data,
869
+ response_types_map=_response_types_map,
870
+ ).data
871
+
872
+ @validate_call
873
+ async def objectives_partial_update_with_http_info(
874
+ self,
875
+ id: StrictStr,
876
+ patched_objective_request: Optional[PatchedObjectiveRequest] = None,
877
+ _request_timeout: Union[
878
+ None,
879
+ Annotated[StrictFloat, Field(gt=0)],
880
+ Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]],
881
+ ] = None,
882
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
883
+ _content_type: Optional[StrictStr] = None,
884
+ _headers: Optional[Dict[StrictStr, Any]] = None,
885
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
886
+ ) -> ApiResponse[Objective]:
887
+ """objectives_partial_update
888
+
889
+
890
+ :param id: (required)
891
+ :type id: str
892
+ :param patched_objective_request:
893
+ :type patched_objective_request: PatchedObjectiveRequest
894
+ :param _request_timeout: timeout setting for this request. If one
895
+ number provided, it will be total request
896
+ timeout. It can also be a pair (tuple) of
897
+ (connection, read) timeouts.
898
+ :type _request_timeout: int, tuple(int, int), optional
899
+ :param _request_auth: set to override the auth_settings for an a single
900
+ request; this effectively ignores the
901
+ authentication in the spec for a single request.
902
+ :type _request_auth: dict, optional
903
+ :param _content_type: force content-type for the request.
904
+ :type _content_type: str, Optional
905
+ :param _headers: set to override the headers for a single
906
+ request; this effectively ignores the headers
907
+ in the spec for a single request.
908
+ :type _headers: dict, optional
909
+ :param _host_index: set to override the host_index for a single
910
+ request; this effectively ignores the host_index
911
+ in the spec for a single request.
912
+ :type _host_index: int, optional
913
+ :return: Returns the result object.
914
+ """ # noqa: E501
915
+
916
+ _param = self._objectives_partial_update_serialize(
917
+ id=id,
918
+ patched_objective_request=patched_objective_request,
919
+ _request_auth=_request_auth,
920
+ _content_type=_content_type,
921
+ _headers=_headers,
922
+ _host_index=_host_index,
923
+ )
924
+
925
+ _response_types_map: Dict[str, Optional[str]] = {
926
+ "200": "Objective",
927
+ }
928
+ response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout)
929
+ await response_data.read()
930
+ return self.api_client.response_deserialize(
931
+ response_data=response_data,
932
+ response_types_map=_response_types_map,
933
+ )
934
+
935
+ @validate_call
936
+ async def objectives_partial_update_without_preload_content(
937
+ self,
938
+ id: StrictStr,
939
+ patched_objective_request: Optional[PatchedObjectiveRequest] = None,
940
+ _request_timeout: Union[
941
+ None,
942
+ Annotated[StrictFloat, Field(gt=0)],
943
+ Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]],
944
+ ] = None,
945
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
946
+ _content_type: Optional[StrictStr] = None,
947
+ _headers: Optional[Dict[StrictStr, Any]] = None,
948
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
949
+ ) -> RESTResponseType:
950
+ """objectives_partial_update
951
+
952
+
953
+ :param id: (required)
954
+ :type id: str
955
+ :param patched_objective_request:
956
+ :type patched_objective_request: PatchedObjectiveRequest
957
+ :param _request_timeout: timeout setting for this request. If one
958
+ number provided, it will be total request
959
+ timeout. It can also be a pair (tuple) of
960
+ (connection, read) timeouts.
961
+ :type _request_timeout: int, tuple(int, int), optional
962
+ :param _request_auth: set to override the auth_settings for an a single
963
+ request; this effectively ignores the
964
+ authentication in the spec for a single request.
965
+ :type _request_auth: dict, optional
966
+ :param _content_type: force content-type for the request.
967
+ :type _content_type: str, Optional
968
+ :param _headers: set to override the headers for a single
969
+ request; this effectively ignores the headers
970
+ in the spec for a single request.
971
+ :type _headers: dict, optional
972
+ :param _host_index: set to override the host_index for a single
973
+ request; this effectively ignores the host_index
974
+ in the spec for a single request.
975
+ :type _host_index: int, optional
976
+ :return: Returns the result object.
977
+ """ # noqa: E501
978
+
979
+ _param = self._objectives_partial_update_serialize(
980
+ id=id,
981
+ patched_objective_request=patched_objective_request,
982
+ _request_auth=_request_auth,
983
+ _content_type=_content_type,
984
+ _headers=_headers,
985
+ _host_index=_host_index,
986
+ )
987
+
988
+ _response_types_map: Dict[str, Optional[str]] = {
989
+ "200": "Objective",
990
+ }
991
+ response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout)
992
+ return response_data.response
993
+
994
+ def _objectives_partial_update_serialize(
995
+ self,
996
+ id,
997
+ patched_objective_request,
998
+ _request_auth,
999
+ _content_type,
1000
+ _headers,
1001
+ _host_index,
1002
+ ) -> RequestSerialized:
1003
+ _host = None
1004
+
1005
+ _collection_formats: Dict[str, str] = {}
1006
+
1007
+ _path_params: Dict[str, str] = {}
1008
+ _query_params: List[Tuple[str, str]] = []
1009
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1010
+ _form_params: List[Tuple[str, str]] = []
1011
+ _files: Dict[str, str] = {}
1012
+ _body_params: Optional[bytes] = None
1013
+
1014
+ # process the path parameters
1015
+ if id is not None:
1016
+ _path_params["id"] = id
1017
+ # process the query parameters
1018
+ # process the header parameters
1019
+ # process the form parameters
1020
+ # process the body parameter
1021
+ if patched_objective_request is not None:
1022
+ _body_params = patched_objective_request
1023
+
1024
+ # set the HTTP header `Accept`
1025
+ _header_params["Accept"] = self.api_client.select_header_accept(["application/json"])
1026
+
1027
+ # set the HTTP header `Content-Type`
1028
+ if _content_type:
1029
+ _header_params["Content-Type"] = _content_type
1030
+ else:
1031
+ _default_content_type = self.api_client.select_header_content_type(
1032
+ ["application/json", "application/x-www-form-urlencoded", "multipart/form-data"]
1033
+ )
1034
+ if _default_content_type is not None:
1035
+ _header_params["Content-Type"] = _default_content_type
1036
+
1037
+ # authentication setting
1038
+ _auth_settings: List[str] = ["publicApiKey"]
1039
+
1040
+ return self.api_client.param_serialize(
1041
+ method="PATCH",
1042
+ resource_path="/v1/objectives/{id}/",
1043
+ path_params=_path_params,
1044
+ query_params=_query_params,
1045
+ header_params=_header_params,
1046
+ body=_body_params,
1047
+ post_params=_form_params,
1048
+ files=_files,
1049
+ auth_settings=_auth_settings,
1050
+ collection_formats=_collection_formats,
1051
+ _host=_host,
1052
+ _request_auth=_request_auth,
1053
+ )
1054
+
1055
+ @validate_call
1056
+ async def objectives_retrieve(
1057
+ self,
1058
+ id: StrictStr,
1059
+ _request_timeout: Union[
1060
+ None,
1061
+ Annotated[StrictFloat, Field(gt=0)],
1062
+ Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]],
1063
+ ] = None,
1064
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1065
+ _content_type: Optional[StrictStr] = None,
1066
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1067
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1068
+ ) -> Objective:
1069
+ """objectives_retrieve
1070
+
1071
+ Get an Objective definition details.
1072
+
1073
+ :param id: (required)
1074
+ :type id: str
1075
+ :param _request_timeout: timeout setting for this request. If one
1076
+ number provided, it will be total request
1077
+ timeout. It can also be a pair (tuple) of
1078
+ (connection, read) timeouts.
1079
+ :type _request_timeout: int, tuple(int, int), optional
1080
+ :param _request_auth: set to override the auth_settings for an a single
1081
+ request; this effectively ignores the
1082
+ authentication in the spec for a single request.
1083
+ :type _request_auth: dict, optional
1084
+ :param _content_type: force content-type for the request.
1085
+ :type _content_type: str, Optional
1086
+ :param _headers: set to override the headers for a single
1087
+ request; this effectively ignores the headers
1088
+ in the spec for a single request.
1089
+ :type _headers: dict, optional
1090
+ :param _host_index: set to override the host_index for a single
1091
+ request; this effectively ignores the host_index
1092
+ in the spec for a single request.
1093
+ :type _host_index: int, optional
1094
+ :return: Returns the result object.
1095
+ """ # noqa: E501
1096
+
1097
+ _param = self._objectives_retrieve_serialize(
1098
+ id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index
1099
+ )
1100
+
1101
+ _response_types_map: Dict[str, Optional[str]] = {
1102
+ "200": "Objective",
1103
+ }
1104
+ response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout)
1105
+ await response_data.read()
1106
+ return self.api_client.response_deserialize(
1107
+ response_data=response_data,
1108
+ response_types_map=_response_types_map,
1109
+ ).data
1110
+
1111
+ @validate_call
1112
+ async def objectives_retrieve_with_http_info(
1113
+ self,
1114
+ id: StrictStr,
1115
+ _request_timeout: Union[
1116
+ None,
1117
+ Annotated[StrictFloat, Field(gt=0)],
1118
+ Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]],
1119
+ ] = None,
1120
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1121
+ _content_type: Optional[StrictStr] = None,
1122
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1123
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1124
+ ) -> ApiResponse[Objective]:
1125
+ """objectives_retrieve
1126
+
1127
+ Get an Objective definition details.
1128
+
1129
+ :param id: (required)
1130
+ :type id: str
1131
+ :param _request_timeout: timeout setting for this request. If one
1132
+ number provided, it will be total request
1133
+ timeout. It can also be a pair (tuple) of
1134
+ (connection, read) timeouts.
1135
+ :type _request_timeout: int, tuple(int, int), optional
1136
+ :param _request_auth: set to override the auth_settings for an a single
1137
+ request; this effectively ignores the
1138
+ authentication in the spec for a single request.
1139
+ :type _request_auth: dict, optional
1140
+ :param _content_type: force content-type for the request.
1141
+ :type _content_type: str, Optional
1142
+ :param _headers: set to override the headers for a single
1143
+ request; this effectively ignores the headers
1144
+ in the spec for a single request.
1145
+ :type _headers: dict, optional
1146
+ :param _host_index: set to override the host_index for a single
1147
+ request; this effectively ignores the host_index
1148
+ in the spec for a single request.
1149
+ :type _host_index: int, optional
1150
+ :return: Returns the result object.
1151
+ """ # noqa: E501
1152
+
1153
+ _param = self._objectives_retrieve_serialize(
1154
+ id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index
1155
+ )
1156
+
1157
+ _response_types_map: Dict[str, Optional[str]] = {
1158
+ "200": "Objective",
1159
+ }
1160
+ response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout)
1161
+ await response_data.read()
1162
+ return self.api_client.response_deserialize(
1163
+ response_data=response_data,
1164
+ response_types_map=_response_types_map,
1165
+ )
1166
+
1167
+ @validate_call
1168
+ async def objectives_retrieve_without_preload_content(
1169
+ self,
1170
+ id: StrictStr,
1171
+ _request_timeout: Union[
1172
+ None,
1173
+ Annotated[StrictFloat, Field(gt=0)],
1174
+ Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]],
1175
+ ] = None,
1176
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1177
+ _content_type: Optional[StrictStr] = None,
1178
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1179
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1180
+ ) -> RESTResponseType:
1181
+ """objectives_retrieve
1182
+
1183
+ Get an Objective definition details.
1184
+
1185
+ :param id: (required)
1186
+ :type id: str
1187
+ :param _request_timeout: timeout setting for this request. If one
1188
+ number provided, it will be total request
1189
+ timeout. It can also be a pair (tuple) of
1190
+ (connection, read) timeouts.
1191
+ :type _request_timeout: int, tuple(int, int), optional
1192
+ :param _request_auth: set to override the auth_settings for an a single
1193
+ request; this effectively ignores the
1194
+ authentication in the spec for a single request.
1195
+ :type _request_auth: dict, optional
1196
+ :param _content_type: force content-type for the request.
1197
+ :type _content_type: str, Optional
1198
+ :param _headers: set to override the headers for a single
1199
+ request; this effectively ignores the headers
1200
+ in the spec for a single request.
1201
+ :type _headers: dict, optional
1202
+ :param _host_index: set to override the host_index for a single
1203
+ request; this effectively ignores the host_index
1204
+ in the spec for a single request.
1205
+ :type _host_index: int, optional
1206
+ :return: Returns the result object.
1207
+ """ # noqa: E501
1208
+
1209
+ _param = self._objectives_retrieve_serialize(
1210
+ id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index
1211
+ )
1212
+
1213
+ _response_types_map: Dict[str, Optional[str]] = {
1214
+ "200": "Objective",
1215
+ }
1216
+ response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout)
1217
+ return response_data.response
1218
+
1219
+ def _objectives_retrieve_serialize(
1220
+ self,
1221
+ id,
1222
+ _request_auth,
1223
+ _content_type,
1224
+ _headers,
1225
+ _host_index,
1226
+ ) -> RequestSerialized:
1227
+ _host = None
1228
+
1229
+ _collection_formats: Dict[str, str] = {}
1230
+
1231
+ _path_params: Dict[str, str] = {}
1232
+ _query_params: List[Tuple[str, str]] = []
1233
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1234
+ _form_params: List[Tuple[str, str]] = []
1235
+ _files: Dict[str, str] = {}
1236
+ _body_params: Optional[bytes] = None
1237
+
1238
+ # process the path parameters
1239
+ if id is not None:
1240
+ _path_params["id"] = id
1241
+ # process the query parameters
1242
+ # process the header parameters
1243
+ # process the form parameters
1244
+ # process the body parameter
1245
+
1246
+ # set the HTTP header `Accept`
1247
+ _header_params["Accept"] = self.api_client.select_header_accept(["application/json"])
1248
+
1249
+ # authentication setting
1250
+ _auth_settings: List[str] = ["publicApiKey"]
1251
+
1252
+ return self.api_client.param_serialize(
1253
+ method="GET",
1254
+ resource_path="/v1/objectives/{id}/",
1255
+ path_params=_path_params,
1256
+ query_params=_query_params,
1257
+ header_params=_header_params,
1258
+ body=_body_params,
1259
+ post_params=_form_params,
1260
+ files=_files,
1261
+ auth_settings=_auth_settings,
1262
+ collection_formats=_collection_formats,
1263
+ _host=_host,
1264
+ _request_auth=_request_auth,
1265
+ )
1266
+
1267
+ @validate_call
1268
+ async def objectives_update(
1269
+ self,
1270
+ id: StrictStr,
1271
+ objective_request: Optional[ObjectiveRequest] = None,
1272
+ _request_timeout: Union[
1273
+ None,
1274
+ Annotated[StrictFloat, Field(gt=0)],
1275
+ Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]],
1276
+ ] = None,
1277
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1278
+ _content_type: Optional[StrictStr] = None,
1279
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1280
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1281
+ ) -> Objective:
1282
+ """objectives_update
1283
+
1284
+ Update an Objective definition.
1285
+
1286
+ :param id: (required)
1287
+ :type id: str
1288
+ :param objective_request:
1289
+ :type objective_request: ObjectiveRequest
1290
+ :param _request_timeout: timeout setting for this request. If one
1291
+ number provided, it will be total request
1292
+ timeout. It can also be a pair (tuple) of
1293
+ (connection, read) timeouts.
1294
+ :type _request_timeout: int, tuple(int, int), optional
1295
+ :param _request_auth: set to override the auth_settings for an a single
1296
+ request; this effectively ignores the
1297
+ authentication in the spec for a single request.
1298
+ :type _request_auth: dict, optional
1299
+ :param _content_type: force content-type for the request.
1300
+ :type _content_type: str, Optional
1301
+ :param _headers: set to override the headers for a single
1302
+ request; this effectively ignores the headers
1303
+ in the spec for a single request.
1304
+ :type _headers: dict, optional
1305
+ :param _host_index: set to override the host_index for a single
1306
+ request; this effectively ignores the host_index
1307
+ in the spec for a single request.
1308
+ :type _host_index: int, optional
1309
+ :return: Returns the result object.
1310
+ """ # noqa: E501
1311
+
1312
+ _param = self._objectives_update_serialize(
1313
+ id=id,
1314
+ objective_request=objective_request,
1315
+ _request_auth=_request_auth,
1316
+ _content_type=_content_type,
1317
+ _headers=_headers,
1318
+ _host_index=_host_index,
1319
+ )
1320
+
1321
+ _response_types_map: Dict[str, Optional[str]] = {
1322
+ "200": "Objective",
1323
+ }
1324
+ response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout)
1325
+ await response_data.read()
1326
+ return self.api_client.response_deserialize(
1327
+ response_data=response_data,
1328
+ response_types_map=_response_types_map,
1329
+ ).data
1330
+
1331
+ @validate_call
1332
+ async def objectives_update_with_http_info(
1333
+ self,
1334
+ id: StrictStr,
1335
+ objective_request: Optional[ObjectiveRequest] = None,
1336
+ _request_timeout: Union[
1337
+ None,
1338
+ Annotated[StrictFloat, Field(gt=0)],
1339
+ Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]],
1340
+ ] = None,
1341
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1342
+ _content_type: Optional[StrictStr] = None,
1343
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1344
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1345
+ ) -> ApiResponse[Objective]:
1346
+ """objectives_update
1347
+
1348
+ Update an Objective definition.
1349
+
1350
+ :param id: (required)
1351
+ :type id: str
1352
+ :param objective_request:
1353
+ :type objective_request: ObjectiveRequest
1354
+ :param _request_timeout: timeout setting for this request. If one
1355
+ number provided, it will be total request
1356
+ timeout. It can also be a pair (tuple) of
1357
+ (connection, read) timeouts.
1358
+ :type _request_timeout: int, tuple(int, int), optional
1359
+ :param _request_auth: set to override the auth_settings for an a single
1360
+ request; this effectively ignores the
1361
+ authentication in the spec for a single request.
1362
+ :type _request_auth: dict, optional
1363
+ :param _content_type: force content-type for the request.
1364
+ :type _content_type: str, Optional
1365
+ :param _headers: set to override the headers for a single
1366
+ request; this effectively ignores the headers
1367
+ in the spec for a single request.
1368
+ :type _headers: dict, optional
1369
+ :param _host_index: set to override the host_index for a single
1370
+ request; this effectively ignores the host_index
1371
+ in the spec for a single request.
1372
+ :type _host_index: int, optional
1373
+ :return: Returns the result object.
1374
+ """ # noqa: E501
1375
+
1376
+ _param = self._objectives_update_serialize(
1377
+ id=id,
1378
+ objective_request=objective_request,
1379
+ _request_auth=_request_auth,
1380
+ _content_type=_content_type,
1381
+ _headers=_headers,
1382
+ _host_index=_host_index,
1383
+ )
1384
+
1385
+ _response_types_map: Dict[str, Optional[str]] = {
1386
+ "200": "Objective",
1387
+ }
1388
+ response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout)
1389
+ await response_data.read()
1390
+ return self.api_client.response_deserialize(
1391
+ response_data=response_data,
1392
+ response_types_map=_response_types_map,
1393
+ )
1394
+
1395
+ @validate_call
1396
+ async def objectives_update_without_preload_content(
1397
+ self,
1398
+ id: StrictStr,
1399
+ objective_request: Optional[ObjectiveRequest] = None,
1400
+ _request_timeout: Union[
1401
+ None,
1402
+ Annotated[StrictFloat, Field(gt=0)],
1403
+ Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]],
1404
+ ] = None,
1405
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1406
+ _content_type: Optional[StrictStr] = None,
1407
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1408
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1409
+ ) -> RESTResponseType:
1410
+ """objectives_update
1411
+
1412
+ Update an Objective definition.
1413
+
1414
+ :param id: (required)
1415
+ :type id: str
1416
+ :param objective_request:
1417
+ :type objective_request: ObjectiveRequest
1418
+ :param _request_timeout: timeout setting for this request. If one
1419
+ number provided, it will be total request
1420
+ timeout. It can also be a pair (tuple) of
1421
+ (connection, read) timeouts.
1422
+ :type _request_timeout: int, tuple(int, int), optional
1423
+ :param _request_auth: set to override the auth_settings for an a single
1424
+ request; this effectively ignores the
1425
+ authentication in the spec for a single request.
1426
+ :type _request_auth: dict, optional
1427
+ :param _content_type: force content-type for the request.
1428
+ :type _content_type: str, Optional
1429
+ :param _headers: set to override the headers for a single
1430
+ request; this effectively ignores the headers
1431
+ in the spec for a single request.
1432
+ :type _headers: dict, optional
1433
+ :param _host_index: set to override the host_index for a single
1434
+ request; this effectively ignores the host_index
1435
+ in the spec for a single request.
1436
+ :type _host_index: int, optional
1437
+ :return: Returns the result object.
1438
+ """ # noqa: E501
1439
+
1440
+ _param = self._objectives_update_serialize(
1441
+ id=id,
1442
+ objective_request=objective_request,
1443
+ _request_auth=_request_auth,
1444
+ _content_type=_content_type,
1445
+ _headers=_headers,
1446
+ _host_index=_host_index,
1447
+ )
1448
+
1449
+ _response_types_map: Dict[str, Optional[str]] = {
1450
+ "200": "Objective",
1451
+ }
1452
+ response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout)
1453
+ return response_data.response
1454
+
1455
+ def _objectives_update_serialize(
1456
+ self,
1457
+ id,
1458
+ objective_request,
1459
+ _request_auth,
1460
+ _content_type,
1461
+ _headers,
1462
+ _host_index,
1463
+ ) -> RequestSerialized:
1464
+ _host = None
1465
+
1466
+ _collection_formats: Dict[str, str] = {}
1467
+
1468
+ _path_params: Dict[str, str] = {}
1469
+ _query_params: List[Tuple[str, str]] = []
1470
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1471
+ _form_params: List[Tuple[str, str]] = []
1472
+ _files: Dict[str, str] = {}
1473
+ _body_params: Optional[bytes] = None
1474
+
1475
+ # process the path parameters
1476
+ if id is not None:
1477
+ _path_params["id"] = id
1478
+ # process the query parameters
1479
+ # process the header parameters
1480
+ # process the form parameters
1481
+ # process the body parameter
1482
+ if objective_request is not None:
1483
+ _body_params = objective_request
1484
+
1485
+ # set the HTTP header `Accept`
1486
+ _header_params["Accept"] = self.api_client.select_header_accept(["application/json"])
1487
+
1488
+ # set the HTTP header `Content-Type`
1489
+ if _content_type:
1490
+ _header_params["Content-Type"] = _content_type
1491
+ else:
1492
+ _default_content_type = self.api_client.select_header_content_type(
1493
+ ["application/json", "application/x-www-form-urlencoded", "multipart/form-data"]
1494
+ )
1495
+ if _default_content_type is not None:
1496
+ _header_params["Content-Type"] = _default_content_type
1497
+
1498
+ # authentication setting
1499
+ _auth_settings: List[str] = ["publicApiKey"]
1500
+
1501
+ return self.api_client.param_serialize(
1502
+ method="PUT",
1503
+ resource_path="/v1/objectives/{id}/",
1504
+ path_params=_path_params,
1505
+ query_params=_query_params,
1506
+ header_params=_header_params,
1507
+ body=_body_params,
1508
+ post_params=_form_params,
1509
+ files=_files,
1510
+ auth_settings=_auth_settings,
1511
+ collection_formats=_collection_formats,
1512
+ _host=_host,
1513
+ _request_auth=_request_auth,
1514
+ )
1515
+
1516
+ @validate_call
1517
+ async def objectives_versions_list(
1518
+ self,
1519
+ id: StrictStr,
1520
+ cursor: Annotated[Optional[StrictStr], Field(description="The pagination cursor value.")] = None,
1521
+ page_size: Annotated[Optional[StrictInt], Field(description="Number of results to return per page.")] = None,
1522
+ _request_timeout: Union[
1523
+ None,
1524
+ Annotated[StrictFloat, Field(gt=0)],
1525
+ Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]],
1526
+ ] = None,
1527
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1528
+ _content_type: Optional[StrictStr] = None,
1529
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1530
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1531
+ ) -> PaginatedObjectiveList:
1532
+ """objectives_versions_list
1533
+
1534
+
1535
+ :param id: (required)
1536
+ :type id: str
1537
+ :param cursor: The pagination cursor value.
1538
+ :type cursor: str
1539
+ :param page_size: Number of results to return per page.
1540
+ :type page_size: int
1541
+ :param _request_timeout: timeout setting for this request. If one
1542
+ number provided, it will be total request
1543
+ timeout. It can also be a pair (tuple) of
1544
+ (connection, read) timeouts.
1545
+ :type _request_timeout: int, tuple(int, int), optional
1546
+ :param _request_auth: set to override the auth_settings for an a single
1547
+ request; this effectively ignores the
1548
+ authentication in the spec for a single request.
1549
+ :type _request_auth: dict, optional
1550
+ :param _content_type: force content-type for the request.
1551
+ :type _content_type: str, Optional
1552
+ :param _headers: set to override the headers for a single
1553
+ request; this effectively ignores the headers
1554
+ in the spec for a single request.
1555
+ :type _headers: dict, optional
1556
+ :param _host_index: set to override the host_index for a single
1557
+ request; this effectively ignores the host_index
1558
+ in the spec for a single request.
1559
+ :type _host_index: int, optional
1560
+ :return: Returns the result object.
1561
+ """ # noqa: E501
1562
+
1563
+ _param = self._objectives_versions_list_serialize(
1564
+ id=id,
1565
+ cursor=cursor,
1566
+ page_size=page_size,
1567
+ _request_auth=_request_auth,
1568
+ _content_type=_content_type,
1569
+ _headers=_headers,
1570
+ _host_index=_host_index,
1571
+ )
1572
+
1573
+ _response_types_map: Dict[str, Optional[str]] = {
1574
+ "200": "PaginatedObjectiveList",
1575
+ }
1576
+ response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout)
1577
+ await response_data.read()
1578
+ return self.api_client.response_deserialize(
1579
+ response_data=response_data,
1580
+ response_types_map=_response_types_map,
1581
+ ).data
1582
+
1583
+ @validate_call
1584
+ async def objectives_versions_list_with_http_info(
1585
+ self,
1586
+ id: StrictStr,
1587
+ cursor: Annotated[Optional[StrictStr], Field(description="The pagination cursor value.")] = None,
1588
+ page_size: Annotated[Optional[StrictInt], Field(description="Number of results to return per page.")] = None,
1589
+ _request_timeout: Union[
1590
+ None,
1591
+ Annotated[StrictFloat, Field(gt=0)],
1592
+ Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]],
1593
+ ] = None,
1594
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1595
+ _content_type: Optional[StrictStr] = None,
1596
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1597
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1598
+ ) -> ApiResponse[PaginatedObjectiveList]:
1599
+ """objectives_versions_list
1600
+
1601
+
1602
+ :param id: (required)
1603
+ :type id: str
1604
+ :param cursor: The pagination cursor value.
1605
+ :type cursor: str
1606
+ :param page_size: Number of results to return per page.
1607
+ :type page_size: int
1608
+ :param _request_timeout: timeout setting for this request. If one
1609
+ number provided, it will be total request
1610
+ timeout. It can also be a pair (tuple) of
1611
+ (connection, read) timeouts.
1612
+ :type _request_timeout: int, tuple(int, int), optional
1613
+ :param _request_auth: set to override the auth_settings for an a single
1614
+ request; this effectively ignores the
1615
+ authentication in the spec for a single request.
1616
+ :type _request_auth: dict, optional
1617
+ :param _content_type: force content-type for the request.
1618
+ :type _content_type: str, Optional
1619
+ :param _headers: set to override the headers for a single
1620
+ request; this effectively ignores the headers
1621
+ in the spec for a single request.
1622
+ :type _headers: dict, optional
1623
+ :param _host_index: set to override the host_index for a single
1624
+ request; this effectively ignores the host_index
1625
+ in the spec for a single request.
1626
+ :type _host_index: int, optional
1627
+ :return: Returns the result object.
1628
+ """ # noqa: E501
1629
+
1630
+ _param = self._objectives_versions_list_serialize(
1631
+ id=id,
1632
+ cursor=cursor,
1633
+ page_size=page_size,
1634
+ _request_auth=_request_auth,
1635
+ _content_type=_content_type,
1636
+ _headers=_headers,
1637
+ _host_index=_host_index,
1638
+ )
1639
+
1640
+ _response_types_map: Dict[str, Optional[str]] = {
1641
+ "200": "PaginatedObjectiveList",
1642
+ }
1643
+ response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout)
1644
+ await response_data.read()
1645
+ return self.api_client.response_deserialize(
1646
+ response_data=response_data,
1647
+ response_types_map=_response_types_map,
1648
+ )
1649
+
1650
+ @validate_call
1651
+ async def objectives_versions_list_without_preload_content(
1652
+ self,
1653
+ id: StrictStr,
1654
+ cursor: Annotated[Optional[StrictStr], Field(description="The pagination cursor value.")] = None,
1655
+ page_size: Annotated[Optional[StrictInt], Field(description="Number of results to return per page.")] = None,
1656
+ _request_timeout: Union[
1657
+ None,
1658
+ Annotated[StrictFloat, Field(gt=0)],
1659
+ Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]],
1660
+ ] = None,
1661
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1662
+ _content_type: Optional[StrictStr] = None,
1663
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1664
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1665
+ ) -> RESTResponseType:
1666
+ """objectives_versions_list
1667
+
1668
+
1669
+ :param id: (required)
1670
+ :type id: str
1671
+ :param cursor: The pagination cursor value.
1672
+ :type cursor: str
1673
+ :param page_size: Number of results to return per page.
1674
+ :type page_size: int
1675
+ :param _request_timeout: timeout setting for this request. If one
1676
+ number provided, it will be total request
1677
+ timeout. It can also be a pair (tuple) of
1678
+ (connection, read) timeouts.
1679
+ :type _request_timeout: int, tuple(int, int), optional
1680
+ :param _request_auth: set to override the auth_settings for an a single
1681
+ request; this effectively ignores the
1682
+ authentication in the spec for a single request.
1683
+ :type _request_auth: dict, optional
1684
+ :param _content_type: force content-type for the request.
1685
+ :type _content_type: str, Optional
1686
+ :param _headers: set to override the headers for a single
1687
+ request; this effectively ignores the headers
1688
+ in the spec for a single request.
1689
+ :type _headers: dict, optional
1690
+ :param _host_index: set to override the host_index for a single
1691
+ request; this effectively ignores the host_index
1692
+ in the spec for a single request.
1693
+ :type _host_index: int, optional
1694
+ :return: Returns the result object.
1695
+ """ # noqa: E501
1696
+
1697
+ _param = self._objectives_versions_list_serialize(
1698
+ id=id,
1699
+ cursor=cursor,
1700
+ page_size=page_size,
1701
+ _request_auth=_request_auth,
1702
+ _content_type=_content_type,
1703
+ _headers=_headers,
1704
+ _host_index=_host_index,
1705
+ )
1706
+
1707
+ _response_types_map: Dict[str, Optional[str]] = {
1708
+ "200": "PaginatedObjectiveList",
1709
+ }
1710
+ response_data = await self.api_client.call_api(*_param, _request_timeout=_request_timeout)
1711
+ return response_data.response
1712
+
1713
+ def _objectives_versions_list_serialize(
1714
+ self,
1715
+ id,
1716
+ cursor,
1717
+ page_size,
1718
+ _request_auth,
1719
+ _content_type,
1720
+ _headers,
1721
+ _host_index,
1722
+ ) -> RequestSerialized:
1723
+ _host = None
1724
+
1725
+ _collection_formats: Dict[str, str] = {}
1726
+
1727
+ _path_params: Dict[str, str] = {}
1728
+ _query_params: List[Tuple[str, str]] = []
1729
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1730
+ _form_params: List[Tuple[str, str]] = []
1731
+ _files: Dict[str, str] = {}
1732
+ _body_params: Optional[bytes] = None
1733
+
1734
+ # process the path parameters
1735
+ if id is not None:
1736
+ _path_params["id"] = id
1737
+ # process the query parameters
1738
+ if cursor is not None:
1739
+ _query_params.append(("cursor", cursor))
1740
+
1741
+ if page_size is not None:
1742
+ _query_params.append(("page_size", page_size))
1743
+
1744
+ # process the header parameters
1745
+ # process the form parameters
1746
+ # process the body parameter
1747
+
1748
+ # set the HTTP header `Accept`
1749
+ _header_params["Accept"] = self.api_client.select_header_accept(["application/json"])
1750
+
1751
+ # authentication setting
1752
+ _auth_settings: List[str] = ["publicApiKey"]
1753
+
1754
+ return self.api_client.param_serialize(
1755
+ method="GET",
1756
+ resource_path="/v1/objectives/versions/{id}/",
1757
+ path_params=_path_params,
1758
+ query_params=_query_params,
1759
+ header_params=_header_params,
1760
+ body=_body_params,
1761
+ post_params=_form_params,
1762
+ files=_files,
1763
+ auth_settings=_auth_settings,
1764
+ collection_formats=_collection_formats,
1765
+ _host=_host,
1766
+ _request_auth=_request_auth,
1767
+ )