cribl-control-plane 0.0.13__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 cribl-control-plane might be problematic. Click here for more details.

Files changed (197) hide show
  1. cribl_control_plane/__init__.py +17 -0
  2. cribl_control_plane/_hooks/__init__.py +5 -0
  3. cribl_control_plane/_hooks/clientcredentials.py +211 -0
  4. cribl_control_plane/_hooks/registration.py +13 -0
  5. cribl_control_plane/_hooks/sdkhooks.py +81 -0
  6. cribl_control_plane/_hooks/types.py +112 -0
  7. cribl_control_plane/_version.py +15 -0
  8. cribl_control_plane/auth_sdk.py +184 -0
  9. cribl_control_plane/basesdk.py +358 -0
  10. cribl_control_plane/errors/__init__.py +60 -0
  11. cribl_control_plane/errors/apierror.py +38 -0
  12. cribl_control_plane/errors/criblcontrolplaneerror.py +26 -0
  13. cribl_control_plane/errors/error.py +24 -0
  14. cribl_control_plane/errors/healthstatus_error.py +38 -0
  15. cribl_control_plane/errors/no_response_error.py +13 -0
  16. cribl_control_plane/errors/responsevalidationerror.py +25 -0
  17. cribl_control_plane/health.py +166 -0
  18. cribl_control_plane/httpclient.py +126 -0
  19. cribl_control_plane/models/__init__.py +7305 -0
  20. cribl_control_plane/models/addhectokenrequest.py +34 -0
  21. cribl_control_plane/models/authtoken.py +13 -0
  22. cribl_control_plane/models/createinputhectokenbyidop.py +45 -0
  23. cribl_control_plane/models/createinputop.py +24 -0
  24. cribl_control_plane/models/createoutputop.py +24 -0
  25. cribl_control_plane/models/createoutputtestbyidop.py +46 -0
  26. cribl_control_plane/models/criblevent.py +14 -0
  27. cribl_control_plane/models/deleteinputbyidop.py +37 -0
  28. cribl_control_plane/models/deleteoutputbyidop.py +37 -0
  29. cribl_control_plane/models/deleteoutputpqbyidop.py +36 -0
  30. cribl_control_plane/models/getinputbyidop.py +37 -0
  31. cribl_control_plane/models/getoutputbyidop.py +37 -0
  32. cribl_control_plane/models/getoutputpqbyidop.py +36 -0
  33. cribl_control_plane/models/getoutputsamplesbyidop.py +37 -0
  34. cribl_control_plane/models/healthstatus.py +36 -0
  35. cribl_control_plane/models/input.py +199 -0
  36. cribl_control_plane/models/inputappscope.py +448 -0
  37. cribl_control_plane/models/inputazureblob.py +308 -0
  38. cribl_control_plane/models/inputcollection.py +208 -0
  39. cribl_control_plane/models/inputconfluentcloud.py +585 -0
  40. cribl_control_plane/models/inputcribl.py +165 -0
  41. cribl_control_plane/models/inputcriblhttp.py +341 -0
  42. cribl_control_plane/models/inputcribllakehttp.py +342 -0
  43. cribl_control_plane/models/inputcriblmetrics.py +175 -0
  44. cribl_control_plane/models/inputcribltcp.py +299 -0
  45. cribl_control_plane/models/inputcrowdstrike.py +410 -0
  46. cribl_control_plane/models/inputdatadogagent.py +364 -0
  47. cribl_control_plane/models/inputdatagen.py +180 -0
  48. cribl_control_plane/models/inputedgeprometheus.py +551 -0
  49. cribl_control_plane/models/inputelastic.py +494 -0
  50. cribl_control_plane/models/inputeventhub.py +360 -0
  51. cribl_control_plane/models/inputexec.py +213 -0
  52. cribl_control_plane/models/inputfile.py +259 -0
  53. cribl_control_plane/models/inputfirehose.py +341 -0
  54. cribl_control_plane/models/inputgooglepubsub.py +247 -0
  55. cribl_control_plane/models/inputgrafana_union.py +1247 -0
  56. cribl_control_plane/models/inputhttp.py +403 -0
  57. cribl_control_plane/models/inputhttpraw.py +407 -0
  58. cribl_control_plane/models/inputjournalfiles.py +208 -0
  59. cribl_control_plane/models/inputkafka.py +581 -0
  60. cribl_control_plane/models/inputkinesis.py +363 -0
  61. cribl_control_plane/models/inputkubeevents.py +182 -0
  62. cribl_control_plane/models/inputkubelogs.py +256 -0
  63. cribl_control_plane/models/inputkubemetrics.py +233 -0
  64. cribl_control_plane/models/inputloki.py +468 -0
  65. cribl_control_plane/models/inputmetrics.py +290 -0
  66. cribl_control_plane/models/inputmodeldriventelemetry.py +274 -0
  67. cribl_control_plane/models/inputmsk.py +654 -0
  68. cribl_control_plane/models/inputnetflow.py +224 -0
  69. cribl_control_plane/models/inputoffice365mgmt.py +384 -0
  70. cribl_control_plane/models/inputoffice365msgtrace.py +449 -0
  71. cribl_control_plane/models/inputoffice365service.py +377 -0
  72. cribl_control_plane/models/inputopentelemetry.py +516 -0
  73. cribl_control_plane/models/inputprometheus.py +464 -0
  74. cribl_control_plane/models/inputprometheusrw.py +470 -0
  75. cribl_control_plane/models/inputrawudp.py +207 -0
  76. cribl_control_plane/models/inputs3.py +416 -0
  77. cribl_control_plane/models/inputs3inventory.py +440 -0
  78. cribl_control_plane/models/inputsecuritylake.py +425 -0
  79. cribl_control_plane/models/inputsnmp.py +274 -0
  80. cribl_control_plane/models/inputsplunk.py +387 -0
  81. cribl_control_plane/models/inputsplunkhec.py +478 -0
  82. cribl_control_plane/models/inputsplunksearch.py +537 -0
  83. cribl_control_plane/models/inputsqs.py +320 -0
  84. cribl_control_plane/models/inputsyslog_union.py +759 -0
  85. cribl_control_plane/models/inputsystemmetrics.py +533 -0
  86. cribl_control_plane/models/inputsystemstate.py +417 -0
  87. cribl_control_plane/models/inputtcp.py +359 -0
  88. cribl_control_plane/models/inputtcpjson.py +334 -0
  89. cribl_control_plane/models/inputwef.py +498 -0
  90. cribl_control_plane/models/inputwindowsmetrics.py +457 -0
  91. cribl_control_plane/models/inputwineventlogs.py +222 -0
  92. cribl_control_plane/models/inputwiz.py +334 -0
  93. cribl_control_plane/models/inputzscalerhec.py +439 -0
  94. cribl_control_plane/models/listinputop.py +24 -0
  95. cribl_control_plane/models/listoutputop.py +24 -0
  96. cribl_control_plane/models/logininfo.py +16 -0
  97. cribl_control_plane/models/output.py +229 -0
  98. cribl_control_plane/models/outputazureblob.py +471 -0
  99. cribl_control_plane/models/outputazuredataexplorer.py +660 -0
  100. cribl_control_plane/models/outputazureeventhub.py +321 -0
  101. cribl_control_plane/models/outputazurelogs.py +386 -0
  102. cribl_control_plane/models/outputclickhouse.py +650 -0
  103. cribl_control_plane/models/outputcloudwatch.py +273 -0
  104. cribl_control_plane/models/outputconfluentcloud.py +591 -0
  105. cribl_control_plane/models/outputcriblhttp.py +494 -0
  106. cribl_control_plane/models/outputcribllake.py +396 -0
  107. cribl_control_plane/models/outputcribltcp.py +387 -0
  108. cribl_control_plane/models/outputcrowdstrikenextgensiem.py +410 -0
  109. cribl_control_plane/models/outputdatadog.py +472 -0
  110. cribl_control_plane/models/outputdataset.py +437 -0
  111. cribl_control_plane/models/outputdefault.py +55 -0
  112. cribl_control_plane/models/outputdevnull.py +50 -0
  113. cribl_control_plane/models/outputdiskspool.py +89 -0
  114. cribl_control_plane/models/outputdls3.py +560 -0
  115. cribl_control_plane/models/outputdynatracehttp.py +454 -0
  116. cribl_control_plane/models/outputdynatraceotlp.py +486 -0
  117. cribl_control_plane/models/outputelastic.py +494 -0
  118. cribl_control_plane/models/outputelasticcloud.py +407 -0
  119. cribl_control_plane/models/outputexabeam.py +297 -0
  120. cribl_control_plane/models/outputfilesystem.py +357 -0
  121. cribl_control_plane/models/outputgooglechronicle.py +486 -0
  122. cribl_control_plane/models/outputgooglecloudlogging.py +557 -0
  123. cribl_control_plane/models/outputgooglecloudstorage.py +499 -0
  124. cribl_control_plane/models/outputgooglepubsub.py +274 -0
  125. cribl_control_plane/models/outputgrafanacloud_union.py +1024 -0
  126. cribl_control_plane/models/outputgraphite.py +225 -0
  127. cribl_control_plane/models/outputhoneycomb.py +369 -0
  128. cribl_control_plane/models/outputhumiohec.py +389 -0
  129. cribl_control_plane/models/outputinfluxdb.py +523 -0
  130. cribl_control_plane/models/outputkafka.py +581 -0
  131. cribl_control_plane/models/outputkinesis.py +312 -0
  132. cribl_control_plane/models/outputloki.py +425 -0
  133. cribl_control_plane/models/outputminio.py +512 -0
  134. cribl_control_plane/models/outputmsk.py +654 -0
  135. cribl_control_plane/models/outputnetflow.py +80 -0
  136. cribl_control_plane/models/outputnewrelic.py +424 -0
  137. cribl_control_plane/models/outputnewrelicevents.py +401 -0
  138. cribl_control_plane/models/outputopentelemetry.py +669 -0
  139. cribl_control_plane/models/outputprometheus.py +485 -0
  140. cribl_control_plane/models/outputring.py +121 -0
  141. cribl_control_plane/models/outputrouter.py +83 -0
  142. cribl_control_plane/models/outputs3.py +556 -0
  143. cribl_control_plane/models/outputsamplesresponse.py +14 -0
  144. cribl_control_plane/models/outputsecuritylake.py +505 -0
  145. cribl_control_plane/models/outputsentinel.py +488 -0
  146. cribl_control_plane/models/outputsentineloneaisiem.py +505 -0
  147. cribl_control_plane/models/outputservicenow.py +543 -0
  148. cribl_control_plane/models/outputsignalfx.py +369 -0
  149. cribl_control_plane/models/outputsnmp.py +80 -0
  150. cribl_control_plane/models/outputsns.py +274 -0
  151. cribl_control_plane/models/outputsplunk.py +383 -0
  152. cribl_control_plane/models/outputsplunkhec.py +434 -0
  153. cribl_control_plane/models/outputsplunklb.py +558 -0
  154. cribl_control_plane/models/outputsqs.py +328 -0
  155. cribl_control_plane/models/outputstatsd.py +224 -0
  156. cribl_control_plane/models/outputstatsdext.py +225 -0
  157. cribl_control_plane/models/outputsumologic.py +378 -0
  158. cribl_control_plane/models/outputsyslog.py +415 -0
  159. cribl_control_plane/models/outputtcpjson.py +413 -0
  160. cribl_control_plane/models/outputtestrequest.py +15 -0
  161. cribl_control_plane/models/outputtestresponse.py +29 -0
  162. cribl_control_plane/models/outputwavefront.py +369 -0
  163. cribl_control_plane/models/outputwebhook.py +689 -0
  164. cribl_control_plane/models/outputxsiam.py +415 -0
  165. cribl_control_plane/models/schemeclientoauth.py +24 -0
  166. cribl_control_plane/models/security.py +36 -0
  167. cribl_control_plane/models/updatehectokenrequest.py +31 -0
  168. cribl_control_plane/models/updateinputbyidop.py +44 -0
  169. cribl_control_plane/models/updateinputhectokenbyidandtokenop.py +52 -0
  170. cribl_control_plane/models/updateoutputbyidop.py +44 -0
  171. cribl_control_plane/outputs.py +1615 -0
  172. cribl_control_plane/py.typed +1 -0
  173. cribl_control_plane/sdk.py +164 -0
  174. cribl_control_plane/sdkconfiguration.py +36 -0
  175. cribl_control_plane/sources.py +1355 -0
  176. cribl_control_plane/types/__init__.py +21 -0
  177. cribl_control_plane/types/basemodel.py +39 -0
  178. cribl_control_plane/utils/__init__.py +187 -0
  179. cribl_control_plane/utils/annotations.py +55 -0
  180. cribl_control_plane/utils/datetimes.py +23 -0
  181. cribl_control_plane/utils/enums.py +74 -0
  182. cribl_control_plane/utils/eventstreaming.py +238 -0
  183. cribl_control_plane/utils/forms.py +223 -0
  184. cribl_control_plane/utils/headers.py +136 -0
  185. cribl_control_plane/utils/logger.py +27 -0
  186. cribl_control_plane/utils/metadata.py +118 -0
  187. cribl_control_plane/utils/queryparams.py +205 -0
  188. cribl_control_plane/utils/requestbodies.py +66 -0
  189. cribl_control_plane/utils/retries.py +217 -0
  190. cribl_control_plane/utils/security.py +207 -0
  191. cribl_control_plane/utils/serializers.py +249 -0
  192. cribl_control_plane/utils/unmarshal_json_response.py +24 -0
  193. cribl_control_plane/utils/url.py +155 -0
  194. cribl_control_plane/utils/values.py +137 -0
  195. cribl_control_plane-0.0.13.dist-info/METADATA +489 -0
  196. cribl_control_plane-0.0.13.dist-info/RECORD +197 -0
  197. cribl_control_plane-0.0.13.dist-info/WHEEL +4 -0
@@ -0,0 +1,1615 @@
1
+ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
2
+
3
+ from .basesdk import BaseSDK
4
+ from cribl_control_plane import errors, models, utils
5
+ from cribl_control_plane._hooks import HookContext
6
+ from cribl_control_plane.types import BaseModel, OptionalNullable, UNSET
7
+ from cribl_control_plane.utils import get_security_from_env
8
+ from cribl_control_plane.utils.unmarshal_json_response import unmarshal_json_response
9
+ from typing import Any, List, Mapping, Optional, Union, cast
10
+
11
+
12
+ class Outputs(BaseSDK):
13
+ r"""Actions related to outputs"""
14
+
15
+ def list_output(
16
+ self,
17
+ *,
18
+ retries: OptionalNullable[utils.RetryConfig] = UNSET,
19
+ server_url: Optional[str] = None,
20
+ timeout_ms: Optional[int] = None,
21
+ http_headers: Optional[Mapping[str, str]] = None,
22
+ ) -> models.ListOutputResponse:
23
+ r"""Get a list of Output objects
24
+
25
+ Get a list of Output objects
26
+
27
+ :param retries: Override the default retry configuration for this method
28
+ :param server_url: Override the default server URL for this method
29
+ :param timeout_ms: Override the default request timeout configuration for this method in milliseconds
30
+ :param http_headers: Additional headers to set or replace on requests.
31
+ """
32
+ base_url = None
33
+ url_variables = None
34
+ if timeout_ms is None:
35
+ timeout_ms = self.sdk_configuration.timeout_ms
36
+
37
+ if server_url is not None:
38
+ base_url = server_url
39
+ else:
40
+ base_url = self._get_url(base_url, url_variables)
41
+ req = self._build_request(
42
+ method="GET",
43
+ path="/system/outputs",
44
+ base_url=base_url,
45
+ url_variables=url_variables,
46
+ request=None,
47
+ request_body_required=False,
48
+ request_has_path_params=False,
49
+ request_has_query_params=True,
50
+ user_agent_header="user-agent",
51
+ accept_header_value="application/json",
52
+ http_headers=http_headers,
53
+ security=self.sdk_configuration.security,
54
+ timeout_ms=timeout_ms,
55
+ )
56
+
57
+ if retries == UNSET:
58
+ if self.sdk_configuration.retry_config is not UNSET:
59
+ retries = self.sdk_configuration.retry_config
60
+
61
+ retry_config = None
62
+ if isinstance(retries, utils.RetryConfig):
63
+ retry_config = (retries, ["429", "500", "502", "503", "504"])
64
+
65
+ http_res = self.do_request(
66
+ hook_ctx=HookContext(
67
+ config=self.sdk_configuration,
68
+ base_url=base_url or "",
69
+ operation_id="listOutput",
70
+ oauth2_scopes=[],
71
+ security_source=get_security_from_env(
72
+ self.sdk_configuration.security, models.Security
73
+ ),
74
+ ),
75
+ request=req,
76
+ error_status_codes=["401", "4XX", "500", "5XX"],
77
+ retry_config=retry_config,
78
+ )
79
+
80
+ response_data: Any = None
81
+ if utils.match_response(http_res, "200", "application/json"):
82
+ return unmarshal_json_response(models.ListOutputResponse, http_res)
83
+ if utils.match_response(http_res, "500", "application/json"):
84
+ response_data = unmarshal_json_response(errors.ErrorData, http_res)
85
+ raise errors.Error(response_data, http_res)
86
+ if utils.match_response(http_res, ["401", "4XX"], "*"):
87
+ http_res_text = utils.stream_to_text(http_res)
88
+ raise errors.APIError("API error occurred", http_res, http_res_text)
89
+ if utils.match_response(http_res, "5XX", "*"):
90
+ http_res_text = utils.stream_to_text(http_res)
91
+ raise errors.APIError("API error occurred", http_res, http_res_text)
92
+
93
+ raise errors.APIError("Unexpected response received", http_res)
94
+
95
+ async def list_output_async(
96
+ self,
97
+ *,
98
+ retries: OptionalNullable[utils.RetryConfig] = UNSET,
99
+ server_url: Optional[str] = None,
100
+ timeout_ms: Optional[int] = None,
101
+ http_headers: Optional[Mapping[str, str]] = None,
102
+ ) -> models.ListOutputResponse:
103
+ r"""Get a list of Output objects
104
+
105
+ Get a list of Output objects
106
+
107
+ :param retries: Override the default retry configuration for this method
108
+ :param server_url: Override the default server URL for this method
109
+ :param timeout_ms: Override the default request timeout configuration for this method in milliseconds
110
+ :param http_headers: Additional headers to set or replace on requests.
111
+ """
112
+ base_url = None
113
+ url_variables = None
114
+ if timeout_ms is None:
115
+ timeout_ms = self.sdk_configuration.timeout_ms
116
+
117
+ if server_url is not None:
118
+ base_url = server_url
119
+ else:
120
+ base_url = self._get_url(base_url, url_variables)
121
+ req = self._build_request_async(
122
+ method="GET",
123
+ path="/system/outputs",
124
+ base_url=base_url,
125
+ url_variables=url_variables,
126
+ request=None,
127
+ request_body_required=False,
128
+ request_has_path_params=False,
129
+ request_has_query_params=True,
130
+ user_agent_header="user-agent",
131
+ accept_header_value="application/json",
132
+ http_headers=http_headers,
133
+ security=self.sdk_configuration.security,
134
+ timeout_ms=timeout_ms,
135
+ )
136
+
137
+ if retries == UNSET:
138
+ if self.sdk_configuration.retry_config is not UNSET:
139
+ retries = self.sdk_configuration.retry_config
140
+
141
+ retry_config = None
142
+ if isinstance(retries, utils.RetryConfig):
143
+ retry_config = (retries, ["429", "500", "502", "503", "504"])
144
+
145
+ http_res = await self.do_request_async(
146
+ hook_ctx=HookContext(
147
+ config=self.sdk_configuration,
148
+ base_url=base_url or "",
149
+ operation_id="listOutput",
150
+ oauth2_scopes=[],
151
+ security_source=get_security_from_env(
152
+ self.sdk_configuration.security, models.Security
153
+ ),
154
+ ),
155
+ request=req,
156
+ error_status_codes=["401", "4XX", "500", "5XX"],
157
+ retry_config=retry_config,
158
+ )
159
+
160
+ response_data: Any = None
161
+ if utils.match_response(http_res, "200", "application/json"):
162
+ return unmarshal_json_response(models.ListOutputResponse, http_res)
163
+ if utils.match_response(http_res, "500", "application/json"):
164
+ response_data = unmarshal_json_response(errors.ErrorData, http_res)
165
+ raise errors.Error(response_data, http_res)
166
+ if utils.match_response(http_res, ["401", "4XX"], "*"):
167
+ http_res_text = await utils.stream_to_text_async(http_res)
168
+ raise errors.APIError("API error occurred", http_res, http_res_text)
169
+ if utils.match_response(http_res, "5XX", "*"):
170
+ http_res_text = await utils.stream_to_text_async(http_res)
171
+ raise errors.APIError("API error occurred", http_res, http_res_text)
172
+
173
+ raise errors.APIError("Unexpected response received", http_res)
174
+
175
+ def create_output(
176
+ self,
177
+ *,
178
+ request: Union[models.Output, models.OutputTypedDict],
179
+ retries: OptionalNullable[utils.RetryConfig] = UNSET,
180
+ server_url: Optional[str] = None,
181
+ timeout_ms: Optional[int] = None,
182
+ http_headers: Optional[Mapping[str, str]] = None,
183
+ ) -> models.CreateOutputResponse:
184
+ r"""Create Output
185
+
186
+ Create Output
187
+
188
+ :param request: The request object to send.
189
+ :param retries: Override the default retry configuration for this method
190
+ :param server_url: Override the default server URL for this method
191
+ :param timeout_ms: Override the default request timeout configuration for this method in milliseconds
192
+ :param http_headers: Additional headers to set or replace on requests.
193
+ """
194
+ base_url = None
195
+ url_variables = None
196
+ if timeout_ms is None:
197
+ timeout_ms = self.sdk_configuration.timeout_ms
198
+
199
+ if server_url is not None:
200
+ base_url = server_url
201
+ else:
202
+ base_url = self._get_url(base_url, url_variables)
203
+
204
+ if not isinstance(request, BaseModel):
205
+ request = utils.unmarshal(request, models.Output)
206
+ request = cast(models.Output, request)
207
+
208
+ req = self._build_request(
209
+ method="POST",
210
+ path="/system/outputs",
211
+ base_url=base_url,
212
+ url_variables=url_variables,
213
+ request=request,
214
+ request_body_required=True,
215
+ request_has_path_params=False,
216
+ request_has_query_params=True,
217
+ user_agent_header="user-agent",
218
+ accept_header_value="application/json",
219
+ http_headers=http_headers,
220
+ security=self.sdk_configuration.security,
221
+ get_serialized_body=lambda: utils.serialize_request_body(
222
+ request, False, False, "json", models.Output
223
+ ),
224
+ timeout_ms=timeout_ms,
225
+ )
226
+
227
+ if retries == UNSET:
228
+ if self.sdk_configuration.retry_config is not UNSET:
229
+ retries = self.sdk_configuration.retry_config
230
+
231
+ retry_config = None
232
+ if isinstance(retries, utils.RetryConfig):
233
+ retry_config = (retries, ["429", "500", "502", "503", "504"])
234
+
235
+ http_res = self.do_request(
236
+ hook_ctx=HookContext(
237
+ config=self.sdk_configuration,
238
+ base_url=base_url or "",
239
+ operation_id="createOutput",
240
+ oauth2_scopes=[],
241
+ security_source=get_security_from_env(
242
+ self.sdk_configuration.security, models.Security
243
+ ),
244
+ ),
245
+ request=req,
246
+ error_status_codes=["401", "4XX", "500", "5XX"],
247
+ retry_config=retry_config,
248
+ )
249
+
250
+ response_data: Any = None
251
+ if utils.match_response(http_res, "200", "application/json"):
252
+ return unmarshal_json_response(models.CreateOutputResponse, http_res)
253
+ if utils.match_response(http_res, "500", "application/json"):
254
+ response_data = unmarshal_json_response(errors.ErrorData, http_res)
255
+ raise errors.Error(response_data, http_res)
256
+ if utils.match_response(http_res, ["401", "4XX"], "*"):
257
+ http_res_text = utils.stream_to_text(http_res)
258
+ raise errors.APIError("API error occurred", http_res, http_res_text)
259
+ if utils.match_response(http_res, "5XX", "*"):
260
+ http_res_text = utils.stream_to_text(http_res)
261
+ raise errors.APIError("API error occurred", http_res, http_res_text)
262
+
263
+ raise errors.APIError("Unexpected response received", http_res)
264
+
265
+ async def create_output_async(
266
+ self,
267
+ *,
268
+ request: Union[models.Output, models.OutputTypedDict],
269
+ retries: OptionalNullable[utils.RetryConfig] = UNSET,
270
+ server_url: Optional[str] = None,
271
+ timeout_ms: Optional[int] = None,
272
+ http_headers: Optional[Mapping[str, str]] = None,
273
+ ) -> models.CreateOutputResponse:
274
+ r"""Create Output
275
+
276
+ Create Output
277
+
278
+ :param request: The request object to send.
279
+ :param retries: Override the default retry configuration for this method
280
+ :param server_url: Override the default server URL for this method
281
+ :param timeout_ms: Override the default request timeout configuration for this method in milliseconds
282
+ :param http_headers: Additional headers to set or replace on requests.
283
+ """
284
+ base_url = None
285
+ url_variables = None
286
+ if timeout_ms is None:
287
+ timeout_ms = self.sdk_configuration.timeout_ms
288
+
289
+ if server_url is not None:
290
+ base_url = server_url
291
+ else:
292
+ base_url = self._get_url(base_url, url_variables)
293
+
294
+ if not isinstance(request, BaseModel):
295
+ request = utils.unmarshal(request, models.Output)
296
+ request = cast(models.Output, request)
297
+
298
+ req = self._build_request_async(
299
+ method="POST",
300
+ path="/system/outputs",
301
+ base_url=base_url,
302
+ url_variables=url_variables,
303
+ request=request,
304
+ request_body_required=True,
305
+ request_has_path_params=False,
306
+ request_has_query_params=True,
307
+ user_agent_header="user-agent",
308
+ accept_header_value="application/json",
309
+ http_headers=http_headers,
310
+ security=self.sdk_configuration.security,
311
+ get_serialized_body=lambda: utils.serialize_request_body(
312
+ request, False, False, "json", models.Output
313
+ ),
314
+ timeout_ms=timeout_ms,
315
+ )
316
+
317
+ if retries == UNSET:
318
+ if self.sdk_configuration.retry_config is not UNSET:
319
+ retries = self.sdk_configuration.retry_config
320
+
321
+ retry_config = None
322
+ if isinstance(retries, utils.RetryConfig):
323
+ retry_config = (retries, ["429", "500", "502", "503", "504"])
324
+
325
+ http_res = await self.do_request_async(
326
+ hook_ctx=HookContext(
327
+ config=self.sdk_configuration,
328
+ base_url=base_url or "",
329
+ operation_id="createOutput",
330
+ oauth2_scopes=[],
331
+ security_source=get_security_from_env(
332
+ self.sdk_configuration.security, models.Security
333
+ ),
334
+ ),
335
+ request=req,
336
+ error_status_codes=["401", "4XX", "500", "5XX"],
337
+ retry_config=retry_config,
338
+ )
339
+
340
+ response_data: Any = None
341
+ if utils.match_response(http_res, "200", "application/json"):
342
+ return unmarshal_json_response(models.CreateOutputResponse, http_res)
343
+ if utils.match_response(http_res, "500", "application/json"):
344
+ response_data = unmarshal_json_response(errors.ErrorData, http_res)
345
+ raise errors.Error(response_data, http_res)
346
+ if utils.match_response(http_res, ["401", "4XX"], "*"):
347
+ http_res_text = await utils.stream_to_text_async(http_res)
348
+ raise errors.APIError("API error occurred", http_res, http_res_text)
349
+ if utils.match_response(http_res, "5XX", "*"):
350
+ http_res_text = await utils.stream_to_text_async(http_res)
351
+ raise errors.APIError("API error occurred", http_res, http_res_text)
352
+
353
+ raise errors.APIError("Unexpected response received", http_res)
354
+
355
+ def get_output_by_id(
356
+ self,
357
+ *,
358
+ id: str,
359
+ retries: OptionalNullable[utils.RetryConfig] = UNSET,
360
+ server_url: Optional[str] = None,
361
+ timeout_ms: Optional[int] = None,
362
+ http_headers: Optional[Mapping[str, str]] = None,
363
+ ) -> models.GetOutputByIDResponse:
364
+ r"""Get Output by ID
365
+
366
+ Get Output by ID
367
+
368
+ :param id: Unique ID to GET
369
+ :param retries: Override the default retry configuration for this method
370
+ :param server_url: Override the default server URL for this method
371
+ :param timeout_ms: Override the default request timeout configuration for this method in milliseconds
372
+ :param http_headers: Additional headers to set or replace on requests.
373
+ """
374
+ base_url = None
375
+ url_variables = None
376
+ if timeout_ms is None:
377
+ timeout_ms = self.sdk_configuration.timeout_ms
378
+
379
+ if server_url is not None:
380
+ base_url = server_url
381
+ else:
382
+ base_url = self._get_url(base_url, url_variables)
383
+
384
+ request = models.GetOutputByIDRequest(
385
+ id=id,
386
+ )
387
+
388
+ req = self._build_request(
389
+ method="GET",
390
+ path="/system/outputs/{id}",
391
+ base_url=base_url,
392
+ url_variables=url_variables,
393
+ request=request,
394
+ request_body_required=False,
395
+ request_has_path_params=True,
396
+ request_has_query_params=True,
397
+ user_agent_header="user-agent",
398
+ accept_header_value="application/json",
399
+ http_headers=http_headers,
400
+ security=self.sdk_configuration.security,
401
+ timeout_ms=timeout_ms,
402
+ )
403
+
404
+ if retries == UNSET:
405
+ if self.sdk_configuration.retry_config is not UNSET:
406
+ retries = self.sdk_configuration.retry_config
407
+
408
+ retry_config = None
409
+ if isinstance(retries, utils.RetryConfig):
410
+ retry_config = (retries, ["429", "500", "502", "503", "504"])
411
+
412
+ http_res = self.do_request(
413
+ hook_ctx=HookContext(
414
+ config=self.sdk_configuration,
415
+ base_url=base_url or "",
416
+ operation_id="getOutputById",
417
+ oauth2_scopes=[],
418
+ security_source=get_security_from_env(
419
+ self.sdk_configuration.security, models.Security
420
+ ),
421
+ ),
422
+ request=req,
423
+ error_status_codes=["401", "4XX", "500", "5XX"],
424
+ retry_config=retry_config,
425
+ )
426
+
427
+ response_data: Any = None
428
+ if utils.match_response(http_res, "200", "application/json"):
429
+ return unmarshal_json_response(models.GetOutputByIDResponse, http_res)
430
+ if utils.match_response(http_res, "500", "application/json"):
431
+ response_data = unmarshal_json_response(errors.ErrorData, http_res)
432
+ raise errors.Error(response_data, http_res)
433
+ if utils.match_response(http_res, ["401", "4XX"], "*"):
434
+ http_res_text = utils.stream_to_text(http_res)
435
+ raise errors.APIError("API error occurred", http_res, http_res_text)
436
+ if utils.match_response(http_res, "5XX", "*"):
437
+ http_res_text = utils.stream_to_text(http_res)
438
+ raise errors.APIError("API error occurred", http_res, http_res_text)
439
+
440
+ raise errors.APIError("Unexpected response received", http_res)
441
+
442
+ async def get_output_by_id_async(
443
+ self,
444
+ *,
445
+ id: str,
446
+ retries: OptionalNullable[utils.RetryConfig] = UNSET,
447
+ server_url: Optional[str] = None,
448
+ timeout_ms: Optional[int] = None,
449
+ http_headers: Optional[Mapping[str, str]] = None,
450
+ ) -> models.GetOutputByIDResponse:
451
+ r"""Get Output by ID
452
+
453
+ Get Output by ID
454
+
455
+ :param id: Unique ID to GET
456
+ :param retries: Override the default retry configuration for this method
457
+ :param server_url: Override the default server URL for this method
458
+ :param timeout_ms: Override the default request timeout configuration for this method in milliseconds
459
+ :param http_headers: Additional headers to set or replace on requests.
460
+ """
461
+ base_url = None
462
+ url_variables = None
463
+ if timeout_ms is None:
464
+ timeout_ms = self.sdk_configuration.timeout_ms
465
+
466
+ if server_url is not None:
467
+ base_url = server_url
468
+ else:
469
+ base_url = self._get_url(base_url, url_variables)
470
+
471
+ request = models.GetOutputByIDRequest(
472
+ id=id,
473
+ )
474
+
475
+ req = self._build_request_async(
476
+ method="GET",
477
+ path="/system/outputs/{id}",
478
+ base_url=base_url,
479
+ url_variables=url_variables,
480
+ request=request,
481
+ request_body_required=False,
482
+ request_has_path_params=True,
483
+ request_has_query_params=True,
484
+ user_agent_header="user-agent",
485
+ accept_header_value="application/json",
486
+ http_headers=http_headers,
487
+ security=self.sdk_configuration.security,
488
+ timeout_ms=timeout_ms,
489
+ )
490
+
491
+ if retries == UNSET:
492
+ if self.sdk_configuration.retry_config is not UNSET:
493
+ retries = self.sdk_configuration.retry_config
494
+
495
+ retry_config = None
496
+ if isinstance(retries, utils.RetryConfig):
497
+ retry_config = (retries, ["429", "500", "502", "503", "504"])
498
+
499
+ http_res = await self.do_request_async(
500
+ hook_ctx=HookContext(
501
+ config=self.sdk_configuration,
502
+ base_url=base_url or "",
503
+ operation_id="getOutputById",
504
+ oauth2_scopes=[],
505
+ security_source=get_security_from_env(
506
+ self.sdk_configuration.security, models.Security
507
+ ),
508
+ ),
509
+ request=req,
510
+ error_status_codes=["401", "4XX", "500", "5XX"],
511
+ retry_config=retry_config,
512
+ )
513
+
514
+ response_data: Any = None
515
+ if utils.match_response(http_res, "200", "application/json"):
516
+ return unmarshal_json_response(models.GetOutputByIDResponse, http_res)
517
+ if utils.match_response(http_res, "500", "application/json"):
518
+ response_data = unmarshal_json_response(errors.ErrorData, http_res)
519
+ raise errors.Error(response_data, http_res)
520
+ if utils.match_response(http_res, ["401", "4XX"], "*"):
521
+ http_res_text = await utils.stream_to_text_async(http_res)
522
+ raise errors.APIError("API error occurred", http_res, http_res_text)
523
+ if utils.match_response(http_res, "5XX", "*"):
524
+ http_res_text = await utils.stream_to_text_async(http_res)
525
+ raise errors.APIError("API error occurred", http_res, http_res_text)
526
+
527
+ raise errors.APIError("Unexpected response received", http_res)
528
+
529
+ def update_output_by_id(
530
+ self,
531
+ *,
532
+ id: str,
533
+ output: Union[models.Output, models.OutputTypedDict],
534
+ retries: OptionalNullable[utils.RetryConfig] = UNSET,
535
+ server_url: Optional[str] = None,
536
+ timeout_ms: Optional[int] = None,
537
+ http_headers: Optional[Mapping[str, str]] = None,
538
+ ) -> models.UpdateOutputByIDResponse:
539
+ r"""Update Output
540
+
541
+ Update Output
542
+
543
+ :param id: Unique ID to PATCH
544
+ :param output: Output object to be updated
545
+ :param retries: Override the default retry configuration for this method
546
+ :param server_url: Override the default server URL for this method
547
+ :param timeout_ms: Override the default request timeout configuration for this method in milliseconds
548
+ :param http_headers: Additional headers to set or replace on requests.
549
+ """
550
+ base_url = None
551
+ url_variables = None
552
+ if timeout_ms is None:
553
+ timeout_ms = self.sdk_configuration.timeout_ms
554
+
555
+ if server_url is not None:
556
+ base_url = server_url
557
+ else:
558
+ base_url = self._get_url(base_url, url_variables)
559
+
560
+ request = models.UpdateOutputByIDRequest(
561
+ id=id,
562
+ output=utils.get_pydantic_model(output, models.Output),
563
+ )
564
+
565
+ req = self._build_request(
566
+ method="PATCH",
567
+ path="/system/outputs/{id}",
568
+ base_url=base_url,
569
+ url_variables=url_variables,
570
+ request=request,
571
+ request_body_required=True,
572
+ request_has_path_params=True,
573
+ request_has_query_params=True,
574
+ user_agent_header="user-agent",
575
+ accept_header_value="application/json",
576
+ http_headers=http_headers,
577
+ security=self.sdk_configuration.security,
578
+ get_serialized_body=lambda: utils.serialize_request_body(
579
+ request.output, False, False, "json", models.Output
580
+ ),
581
+ timeout_ms=timeout_ms,
582
+ )
583
+
584
+ if retries == UNSET:
585
+ if self.sdk_configuration.retry_config is not UNSET:
586
+ retries = self.sdk_configuration.retry_config
587
+
588
+ retry_config = None
589
+ if isinstance(retries, utils.RetryConfig):
590
+ retry_config = (retries, ["429", "500", "502", "503", "504"])
591
+
592
+ http_res = self.do_request(
593
+ hook_ctx=HookContext(
594
+ config=self.sdk_configuration,
595
+ base_url=base_url or "",
596
+ operation_id="updateOutputById",
597
+ oauth2_scopes=[],
598
+ security_source=get_security_from_env(
599
+ self.sdk_configuration.security, models.Security
600
+ ),
601
+ ),
602
+ request=req,
603
+ error_status_codes=["401", "4XX", "500", "5XX"],
604
+ retry_config=retry_config,
605
+ )
606
+
607
+ response_data: Any = None
608
+ if utils.match_response(http_res, "200", "application/json"):
609
+ return unmarshal_json_response(models.UpdateOutputByIDResponse, http_res)
610
+ if utils.match_response(http_res, "500", "application/json"):
611
+ response_data = unmarshal_json_response(errors.ErrorData, http_res)
612
+ raise errors.Error(response_data, http_res)
613
+ if utils.match_response(http_res, ["401", "4XX"], "*"):
614
+ http_res_text = utils.stream_to_text(http_res)
615
+ raise errors.APIError("API error occurred", http_res, http_res_text)
616
+ if utils.match_response(http_res, "5XX", "*"):
617
+ http_res_text = utils.stream_to_text(http_res)
618
+ raise errors.APIError("API error occurred", http_res, http_res_text)
619
+
620
+ raise errors.APIError("Unexpected response received", http_res)
621
+
622
+ async def update_output_by_id_async(
623
+ self,
624
+ *,
625
+ id: str,
626
+ output: Union[models.Output, models.OutputTypedDict],
627
+ retries: OptionalNullable[utils.RetryConfig] = UNSET,
628
+ server_url: Optional[str] = None,
629
+ timeout_ms: Optional[int] = None,
630
+ http_headers: Optional[Mapping[str, str]] = None,
631
+ ) -> models.UpdateOutputByIDResponse:
632
+ r"""Update Output
633
+
634
+ Update Output
635
+
636
+ :param id: Unique ID to PATCH
637
+ :param output: Output object to be updated
638
+ :param retries: Override the default retry configuration for this method
639
+ :param server_url: Override the default server URL for this method
640
+ :param timeout_ms: Override the default request timeout configuration for this method in milliseconds
641
+ :param http_headers: Additional headers to set or replace on requests.
642
+ """
643
+ base_url = None
644
+ url_variables = None
645
+ if timeout_ms is None:
646
+ timeout_ms = self.sdk_configuration.timeout_ms
647
+
648
+ if server_url is not None:
649
+ base_url = server_url
650
+ else:
651
+ base_url = self._get_url(base_url, url_variables)
652
+
653
+ request = models.UpdateOutputByIDRequest(
654
+ id=id,
655
+ output=utils.get_pydantic_model(output, models.Output),
656
+ )
657
+
658
+ req = self._build_request_async(
659
+ method="PATCH",
660
+ path="/system/outputs/{id}",
661
+ base_url=base_url,
662
+ url_variables=url_variables,
663
+ request=request,
664
+ request_body_required=True,
665
+ request_has_path_params=True,
666
+ request_has_query_params=True,
667
+ user_agent_header="user-agent",
668
+ accept_header_value="application/json",
669
+ http_headers=http_headers,
670
+ security=self.sdk_configuration.security,
671
+ get_serialized_body=lambda: utils.serialize_request_body(
672
+ request.output, False, False, "json", models.Output
673
+ ),
674
+ timeout_ms=timeout_ms,
675
+ )
676
+
677
+ if retries == UNSET:
678
+ if self.sdk_configuration.retry_config is not UNSET:
679
+ retries = self.sdk_configuration.retry_config
680
+
681
+ retry_config = None
682
+ if isinstance(retries, utils.RetryConfig):
683
+ retry_config = (retries, ["429", "500", "502", "503", "504"])
684
+
685
+ http_res = await self.do_request_async(
686
+ hook_ctx=HookContext(
687
+ config=self.sdk_configuration,
688
+ base_url=base_url or "",
689
+ operation_id="updateOutputById",
690
+ oauth2_scopes=[],
691
+ security_source=get_security_from_env(
692
+ self.sdk_configuration.security, models.Security
693
+ ),
694
+ ),
695
+ request=req,
696
+ error_status_codes=["401", "4XX", "500", "5XX"],
697
+ retry_config=retry_config,
698
+ )
699
+
700
+ response_data: Any = None
701
+ if utils.match_response(http_res, "200", "application/json"):
702
+ return unmarshal_json_response(models.UpdateOutputByIDResponse, http_res)
703
+ if utils.match_response(http_res, "500", "application/json"):
704
+ response_data = unmarshal_json_response(errors.ErrorData, http_res)
705
+ raise errors.Error(response_data, http_res)
706
+ if utils.match_response(http_res, ["401", "4XX"], "*"):
707
+ http_res_text = await utils.stream_to_text_async(http_res)
708
+ raise errors.APIError("API error occurred", http_res, http_res_text)
709
+ if utils.match_response(http_res, "5XX", "*"):
710
+ http_res_text = await utils.stream_to_text_async(http_res)
711
+ raise errors.APIError("API error occurred", http_res, http_res_text)
712
+
713
+ raise errors.APIError("Unexpected response received", http_res)
714
+
715
+ def delete_output_by_id(
716
+ self,
717
+ *,
718
+ id: str,
719
+ retries: OptionalNullable[utils.RetryConfig] = UNSET,
720
+ server_url: Optional[str] = None,
721
+ timeout_ms: Optional[int] = None,
722
+ http_headers: Optional[Mapping[str, str]] = None,
723
+ ) -> models.DeleteOutputByIDResponse:
724
+ r"""Delete Output
725
+
726
+ Delete Output
727
+
728
+ :param id: Unique ID to DELETE
729
+ :param retries: Override the default retry configuration for this method
730
+ :param server_url: Override the default server URL for this method
731
+ :param timeout_ms: Override the default request timeout configuration for this method in milliseconds
732
+ :param http_headers: Additional headers to set or replace on requests.
733
+ """
734
+ base_url = None
735
+ url_variables = None
736
+ if timeout_ms is None:
737
+ timeout_ms = self.sdk_configuration.timeout_ms
738
+
739
+ if server_url is not None:
740
+ base_url = server_url
741
+ else:
742
+ base_url = self._get_url(base_url, url_variables)
743
+
744
+ request = models.DeleteOutputByIDRequest(
745
+ id=id,
746
+ )
747
+
748
+ req = self._build_request(
749
+ method="DELETE",
750
+ path="/system/outputs/{id}",
751
+ base_url=base_url,
752
+ url_variables=url_variables,
753
+ request=request,
754
+ request_body_required=False,
755
+ request_has_path_params=True,
756
+ request_has_query_params=True,
757
+ user_agent_header="user-agent",
758
+ accept_header_value="application/json",
759
+ http_headers=http_headers,
760
+ security=self.sdk_configuration.security,
761
+ timeout_ms=timeout_ms,
762
+ )
763
+
764
+ if retries == UNSET:
765
+ if self.sdk_configuration.retry_config is not UNSET:
766
+ retries = self.sdk_configuration.retry_config
767
+
768
+ retry_config = None
769
+ if isinstance(retries, utils.RetryConfig):
770
+ retry_config = (retries, ["429", "500", "502", "503", "504"])
771
+
772
+ http_res = self.do_request(
773
+ hook_ctx=HookContext(
774
+ config=self.sdk_configuration,
775
+ base_url=base_url or "",
776
+ operation_id="deleteOutputById",
777
+ oauth2_scopes=[],
778
+ security_source=get_security_from_env(
779
+ self.sdk_configuration.security, models.Security
780
+ ),
781
+ ),
782
+ request=req,
783
+ error_status_codes=["401", "4XX", "500", "5XX"],
784
+ retry_config=retry_config,
785
+ )
786
+
787
+ response_data: Any = None
788
+ if utils.match_response(http_res, "200", "application/json"):
789
+ return unmarshal_json_response(models.DeleteOutputByIDResponse, http_res)
790
+ if utils.match_response(http_res, "500", "application/json"):
791
+ response_data = unmarshal_json_response(errors.ErrorData, http_res)
792
+ raise errors.Error(response_data, http_res)
793
+ if utils.match_response(http_res, ["401", "4XX"], "*"):
794
+ http_res_text = utils.stream_to_text(http_res)
795
+ raise errors.APIError("API error occurred", http_res, http_res_text)
796
+ if utils.match_response(http_res, "5XX", "*"):
797
+ http_res_text = utils.stream_to_text(http_res)
798
+ raise errors.APIError("API error occurred", http_res, http_res_text)
799
+
800
+ raise errors.APIError("Unexpected response received", http_res)
801
+
802
+ async def delete_output_by_id_async(
803
+ self,
804
+ *,
805
+ id: str,
806
+ retries: OptionalNullable[utils.RetryConfig] = UNSET,
807
+ server_url: Optional[str] = None,
808
+ timeout_ms: Optional[int] = None,
809
+ http_headers: Optional[Mapping[str, str]] = None,
810
+ ) -> models.DeleteOutputByIDResponse:
811
+ r"""Delete Output
812
+
813
+ Delete Output
814
+
815
+ :param id: Unique ID to DELETE
816
+ :param retries: Override the default retry configuration for this method
817
+ :param server_url: Override the default server URL for this method
818
+ :param timeout_ms: Override the default request timeout configuration for this method in milliseconds
819
+ :param http_headers: Additional headers to set or replace on requests.
820
+ """
821
+ base_url = None
822
+ url_variables = None
823
+ if timeout_ms is None:
824
+ timeout_ms = self.sdk_configuration.timeout_ms
825
+
826
+ if server_url is not None:
827
+ base_url = server_url
828
+ else:
829
+ base_url = self._get_url(base_url, url_variables)
830
+
831
+ request = models.DeleteOutputByIDRequest(
832
+ id=id,
833
+ )
834
+
835
+ req = self._build_request_async(
836
+ method="DELETE",
837
+ path="/system/outputs/{id}",
838
+ base_url=base_url,
839
+ url_variables=url_variables,
840
+ request=request,
841
+ request_body_required=False,
842
+ request_has_path_params=True,
843
+ request_has_query_params=True,
844
+ user_agent_header="user-agent",
845
+ accept_header_value="application/json",
846
+ http_headers=http_headers,
847
+ security=self.sdk_configuration.security,
848
+ timeout_ms=timeout_ms,
849
+ )
850
+
851
+ if retries == UNSET:
852
+ if self.sdk_configuration.retry_config is not UNSET:
853
+ retries = self.sdk_configuration.retry_config
854
+
855
+ retry_config = None
856
+ if isinstance(retries, utils.RetryConfig):
857
+ retry_config = (retries, ["429", "500", "502", "503", "504"])
858
+
859
+ http_res = await self.do_request_async(
860
+ hook_ctx=HookContext(
861
+ config=self.sdk_configuration,
862
+ base_url=base_url or "",
863
+ operation_id="deleteOutputById",
864
+ oauth2_scopes=[],
865
+ security_source=get_security_from_env(
866
+ self.sdk_configuration.security, models.Security
867
+ ),
868
+ ),
869
+ request=req,
870
+ error_status_codes=["401", "4XX", "500", "5XX"],
871
+ retry_config=retry_config,
872
+ )
873
+
874
+ response_data: Any = None
875
+ if utils.match_response(http_res, "200", "application/json"):
876
+ return unmarshal_json_response(models.DeleteOutputByIDResponse, http_res)
877
+ if utils.match_response(http_res, "500", "application/json"):
878
+ response_data = unmarshal_json_response(errors.ErrorData, http_res)
879
+ raise errors.Error(response_data, http_res)
880
+ if utils.match_response(http_res, ["401", "4XX"], "*"):
881
+ http_res_text = await utils.stream_to_text_async(http_res)
882
+ raise errors.APIError("API error occurred", http_res, http_res_text)
883
+ if utils.match_response(http_res, "5XX", "*"):
884
+ http_res_text = await utils.stream_to_text_async(http_res)
885
+ raise errors.APIError("API error occurred", http_res, http_res_text)
886
+
887
+ raise errors.APIError("Unexpected response received", http_res)
888
+
889
+ def delete_output_pq_by_id(
890
+ self,
891
+ *,
892
+ id: str,
893
+ retries: OptionalNullable[utils.RetryConfig] = UNSET,
894
+ server_url: Optional[str] = None,
895
+ timeout_ms: Optional[int] = None,
896
+ http_headers: Optional[Mapping[str, str]] = None,
897
+ ) -> models.DeleteOutputPqByIDResponse:
898
+ r"""Clears destination persistent queue
899
+
900
+ Clears destination persistent queue
901
+
902
+ :param id: Output Id
903
+ :param retries: Override the default retry configuration for this method
904
+ :param server_url: Override the default server URL for this method
905
+ :param timeout_ms: Override the default request timeout configuration for this method in milliseconds
906
+ :param http_headers: Additional headers to set or replace on requests.
907
+ """
908
+ base_url = None
909
+ url_variables = None
910
+ if timeout_ms is None:
911
+ timeout_ms = self.sdk_configuration.timeout_ms
912
+
913
+ if server_url is not None:
914
+ base_url = server_url
915
+ else:
916
+ base_url = self._get_url(base_url, url_variables)
917
+
918
+ request = models.DeleteOutputPqByIDRequest(
919
+ id=id,
920
+ )
921
+
922
+ req = self._build_request(
923
+ method="DELETE",
924
+ path="/system/outputs/{id}/pq",
925
+ base_url=base_url,
926
+ url_variables=url_variables,
927
+ request=request,
928
+ request_body_required=False,
929
+ request_has_path_params=True,
930
+ request_has_query_params=True,
931
+ user_agent_header="user-agent",
932
+ accept_header_value="application/json",
933
+ http_headers=http_headers,
934
+ security=self.sdk_configuration.security,
935
+ timeout_ms=timeout_ms,
936
+ )
937
+
938
+ if retries == UNSET:
939
+ if self.sdk_configuration.retry_config is not UNSET:
940
+ retries = self.sdk_configuration.retry_config
941
+
942
+ retry_config = None
943
+ if isinstance(retries, utils.RetryConfig):
944
+ retry_config = (retries, ["429", "500", "502", "503", "504"])
945
+
946
+ http_res = self.do_request(
947
+ hook_ctx=HookContext(
948
+ config=self.sdk_configuration,
949
+ base_url=base_url or "",
950
+ operation_id="deleteOutputPqById",
951
+ oauth2_scopes=[],
952
+ security_source=get_security_from_env(
953
+ self.sdk_configuration.security, models.Security
954
+ ),
955
+ ),
956
+ request=req,
957
+ error_status_codes=["401", "4XX", "500", "5XX"],
958
+ retry_config=retry_config,
959
+ )
960
+
961
+ response_data: Any = None
962
+ if utils.match_response(http_res, "200", "application/json"):
963
+ return unmarshal_json_response(models.DeleteOutputPqByIDResponse, http_res)
964
+ if utils.match_response(http_res, "500", "application/json"):
965
+ response_data = unmarshal_json_response(errors.ErrorData, http_res)
966
+ raise errors.Error(response_data, http_res)
967
+ if utils.match_response(http_res, ["401", "4XX"], "*"):
968
+ http_res_text = utils.stream_to_text(http_res)
969
+ raise errors.APIError("API error occurred", http_res, http_res_text)
970
+ if utils.match_response(http_res, "5XX", "*"):
971
+ http_res_text = utils.stream_to_text(http_res)
972
+ raise errors.APIError("API error occurred", http_res, http_res_text)
973
+
974
+ raise errors.APIError("Unexpected response received", http_res)
975
+
976
+ async def delete_output_pq_by_id_async(
977
+ self,
978
+ *,
979
+ id: str,
980
+ retries: OptionalNullable[utils.RetryConfig] = UNSET,
981
+ server_url: Optional[str] = None,
982
+ timeout_ms: Optional[int] = None,
983
+ http_headers: Optional[Mapping[str, str]] = None,
984
+ ) -> models.DeleteOutputPqByIDResponse:
985
+ r"""Clears destination persistent queue
986
+
987
+ Clears destination persistent queue
988
+
989
+ :param id: Output Id
990
+ :param retries: Override the default retry configuration for this method
991
+ :param server_url: Override the default server URL for this method
992
+ :param timeout_ms: Override the default request timeout configuration for this method in milliseconds
993
+ :param http_headers: Additional headers to set or replace on requests.
994
+ """
995
+ base_url = None
996
+ url_variables = None
997
+ if timeout_ms is None:
998
+ timeout_ms = self.sdk_configuration.timeout_ms
999
+
1000
+ if server_url is not None:
1001
+ base_url = server_url
1002
+ else:
1003
+ base_url = self._get_url(base_url, url_variables)
1004
+
1005
+ request = models.DeleteOutputPqByIDRequest(
1006
+ id=id,
1007
+ )
1008
+
1009
+ req = self._build_request_async(
1010
+ method="DELETE",
1011
+ path="/system/outputs/{id}/pq",
1012
+ base_url=base_url,
1013
+ url_variables=url_variables,
1014
+ request=request,
1015
+ request_body_required=False,
1016
+ request_has_path_params=True,
1017
+ request_has_query_params=True,
1018
+ user_agent_header="user-agent",
1019
+ accept_header_value="application/json",
1020
+ http_headers=http_headers,
1021
+ security=self.sdk_configuration.security,
1022
+ timeout_ms=timeout_ms,
1023
+ )
1024
+
1025
+ if retries == UNSET:
1026
+ if self.sdk_configuration.retry_config is not UNSET:
1027
+ retries = self.sdk_configuration.retry_config
1028
+
1029
+ retry_config = None
1030
+ if isinstance(retries, utils.RetryConfig):
1031
+ retry_config = (retries, ["429", "500", "502", "503", "504"])
1032
+
1033
+ http_res = await self.do_request_async(
1034
+ hook_ctx=HookContext(
1035
+ config=self.sdk_configuration,
1036
+ base_url=base_url or "",
1037
+ operation_id="deleteOutputPqById",
1038
+ oauth2_scopes=[],
1039
+ security_source=get_security_from_env(
1040
+ self.sdk_configuration.security, models.Security
1041
+ ),
1042
+ ),
1043
+ request=req,
1044
+ error_status_codes=["401", "4XX", "500", "5XX"],
1045
+ retry_config=retry_config,
1046
+ )
1047
+
1048
+ response_data: Any = None
1049
+ if utils.match_response(http_res, "200", "application/json"):
1050
+ return unmarshal_json_response(models.DeleteOutputPqByIDResponse, http_res)
1051
+ if utils.match_response(http_res, "500", "application/json"):
1052
+ response_data = unmarshal_json_response(errors.ErrorData, http_res)
1053
+ raise errors.Error(response_data, http_res)
1054
+ if utils.match_response(http_res, ["401", "4XX"], "*"):
1055
+ http_res_text = await utils.stream_to_text_async(http_res)
1056
+ raise errors.APIError("API error occurred", http_res, http_res_text)
1057
+ if utils.match_response(http_res, "5XX", "*"):
1058
+ http_res_text = await utils.stream_to_text_async(http_res)
1059
+ raise errors.APIError("API error occurred", http_res, http_res_text)
1060
+
1061
+ raise errors.APIError("Unexpected response received", http_res)
1062
+
1063
+ def get_output_pq_by_id(
1064
+ self,
1065
+ *,
1066
+ id: str,
1067
+ retries: OptionalNullable[utils.RetryConfig] = UNSET,
1068
+ server_url: Optional[str] = None,
1069
+ timeout_ms: Optional[int] = None,
1070
+ http_headers: Optional[Mapping[str, str]] = None,
1071
+ ) -> models.GetOutputPqByIDResponse:
1072
+ r"""Retrieves status of latest clear PQ job for an output
1073
+
1074
+ Retrieves status of latest clear PQ job for an output
1075
+
1076
+ :param id: Output Id
1077
+ :param retries: Override the default retry configuration for this method
1078
+ :param server_url: Override the default server URL for this method
1079
+ :param timeout_ms: Override the default request timeout configuration for this method in milliseconds
1080
+ :param http_headers: Additional headers to set or replace on requests.
1081
+ """
1082
+ base_url = None
1083
+ url_variables = None
1084
+ if timeout_ms is None:
1085
+ timeout_ms = self.sdk_configuration.timeout_ms
1086
+
1087
+ if server_url is not None:
1088
+ base_url = server_url
1089
+ else:
1090
+ base_url = self._get_url(base_url, url_variables)
1091
+
1092
+ request = models.GetOutputPqByIDRequest(
1093
+ id=id,
1094
+ )
1095
+
1096
+ req = self._build_request(
1097
+ method="GET",
1098
+ path="/system/outputs/{id}/pq",
1099
+ base_url=base_url,
1100
+ url_variables=url_variables,
1101
+ request=request,
1102
+ request_body_required=False,
1103
+ request_has_path_params=True,
1104
+ request_has_query_params=True,
1105
+ user_agent_header="user-agent",
1106
+ accept_header_value="application/json",
1107
+ http_headers=http_headers,
1108
+ security=self.sdk_configuration.security,
1109
+ timeout_ms=timeout_ms,
1110
+ )
1111
+
1112
+ if retries == UNSET:
1113
+ if self.sdk_configuration.retry_config is not UNSET:
1114
+ retries = self.sdk_configuration.retry_config
1115
+
1116
+ retry_config = None
1117
+ if isinstance(retries, utils.RetryConfig):
1118
+ retry_config = (retries, ["429", "500", "502", "503", "504"])
1119
+
1120
+ http_res = self.do_request(
1121
+ hook_ctx=HookContext(
1122
+ config=self.sdk_configuration,
1123
+ base_url=base_url or "",
1124
+ operation_id="getOutputPqById",
1125
+ oauth2_scopes=[],
1126
+ security_source=get_security_from_env(
1127
+ self.sdk_configuration.security, models.Security
1128
+ ),
1129
+ ),
1130
+ request=req,
1131
+ error_status_codes=["401", "4XX", "500", "5XX"],
1132
+ retry_config=retry_config,
1133
+ )
1134
+
1135
+ response_data: Any = None
1136
+ if utils.match_response(http_res, "200", "application/json"):
1137
+ return unmarshal_json_response(models.GetOutputPqByIDResponse, http_res)
1138
+ if utils.match_response(http_res, "500", "application/json"):
1139
+ response_data = unmarshal_json_response(errors.ErrorData, http_res)
1140
+ raise errors.Error(response_data, http_res)
1141
+ if utils.match_response(http_res, ["401", "4XX"], "*"):
1142
+ http_res_text = utils.stream_to_text(http_res)
1143
+ raise errors.APIError("API error occurred", http_res, http_res_text)
1144
+ if utils.match_response(http_res, "5XX", "*"):
1145
+ http_res_text = utils.stream_to_text(http_res)
1146
+ raise errors.APIError("API error occurred", http_res, http_res_text)
1147
+
1148
+ raise errors.APIError("Unexpected response received", http_res)
1149
+
1150
+ async def get_output_pq_by_id_async(
1151
+ self,
1152
+ *,
1153
+ id: str,
1154
+ retries: OptionalNullable[utils.RetryConfig] = UNSET,
1155
+ server_url: Optional[str] = None,
1156
+ timeout_ms: Optional[int] = None,
1157
+ http_headers: Optional[Mapping[str, str]] = None,
1158
+ ) -> models.GetOutputPqByIDResponse:
1159
+ r"""Retrieves status of latest clear PQ job for an output
1160
+
1161
+ Retrieves status of latest clear PQ job for an output
1162
+
1163
+ :param id: Output Id
1164
+ :param retries: Override the default retry configuration for this method
1165
+ :param server_url: Override the default server URL for this method
1166
+ :param timeout_ms: Override the default request timeout configuration for this method in milliseconds
1167
+ :param http_headers: Additional headers to set or replace on requests.
1168
+ """
1169
+ base_url = None
1170
+ url_variables = None
1171
+ if timeout_ms is None:
1172
+ timeout_ms = self.sdk_configuration.timeout_ms
1173
+
1174
+ if server_url is not None:
1175
+ base_url = server_url
1176
+ else:
1177
+ base_url = self._get_url(base_url, url_variables)
1178
+
1179
+ request = models.GetOutputPqByIDRequest(
1180
+ id=id,
1181
+ )
1182
+
1183
+ req = self._build_request_async(
1184
+ method="GET",
1185
+ path="/system/outputs/{id}/pq",
1186
+ base_url=base_url,
1187
+ url_variables=url_variables,
1188
+ request=request,
1189
+ request_body_required=False,
1190
+ request_has_path_params=True,
1191
+ request_has_query_params=True,
1192
+ user_agent_header="user-agent",
1193
+ accept_header_value="application/json",
1194
+ http_headers=http_headers,
1195
+ security=self.sdk_configuration.security,
1196
+ timeout_ms=timeout_ms,
1197
+ )
1198
+
1199
+ if retries == UNSET:
1200
+ if self.sdk_configuration.retry_config is not UNSET:
1201
+ retries = self.sdk_configuration.retry_config
1202
+
1203
+ retry_config = None
1204
+ if isinstance(retries, utils.RetryConfig):
1205
+ retry_config = (retries, ["429", "500", "502", "503", "504"])
1206
+
1207
+ http_res = await self.do_request_async(
1208
+ hook_ctx=HookContext(
1209
+ config=self.sdk_configuration,
1210
+ base_url=base_url or "",
1211
+ operation_id="getOutputPqById",
1212
+ oauth2_scopes=[],
1213
+ security_source=get_security_from_env(
1214
+ self.sdk_configuration.security, models.Security
1215
+ ),
1216
+ ),
1217
+ request=req,
1218
+ error_status_codes=["401", "4XX", "500", "5XX"],
1219
+ retry_config=retry_config,
1220
+ )
1221
+
1222
+ response_data: Any = None
1223
+ if utils.match_response(http_res, "200", "application/json"):
1224
+ return unmarshal_json_response(models.GetOutputPqByIDResponse, http_res)
1225
+ if utils.match_response(http_res, "500", "application/json"):
1226
+ response_data = unmarshal_json_response(errors.ErrorData, http_res)
1227
+ raise errors.Error(response_data, http_res)
1228
+ if utils.match_response(http_res, ["401", "4XX"], "*"):
1229
+ http_res_text = await utils.stream_to_text_async(http_res)
1230
+ raise errors.APIError("API error occurred", http_res, http_res_text)
1231
+ if utils.match_response(http_res, "5XX", "*"):
1232
+ http_res_text = await utils.stream_to_text_async(http_res)
1233
+ raise errors.APIError("API error occurred", http_res, http_res_text)
1234
+
1235
+ raise errors.APIError("Unexpected response received", http_res)
1236
+
1237
+ def get_output_samples_by_id(
1238
+ self,
1239
+ *,
1240
+ id: str,
1241
+ retries: OptionalNullable[utils.RetryConfig] = UNSET,
1242
+ server_url: Optional[str] = None,
1243
+ timeout_ms: Optional[int] = None,
1244
+ http_headers: Optional[Mapping[str, str]] = None,
1245
+ ) -> models.GetOutputSamplesByIDResponse:
1246
+ r"""Retrieve samples data for the specified output. Used to get sample data for the test action.
1247
+
1248
+ Retrieve samples data for the specified output. Used to get sample data for the test action.
1249
+
1250
+ :param id: Output Id
1251
+ :param retries: Override the default retry configuration for this method
1252
+ :param server_url: Override the default server URL for this method
1253
+ :param timeout_ms: Override the default request timeout configuration for this method in milliseconds
1254
+ :param http_headers: Additional headers to set or replace on requests.
1255
+ """
1256
+ base_url = None
1257
+ url_variables = None
1258
+ if timeout_ms is None:
1259
+ timeout_ms = self.sdk_configuration.timeout_ms
1260
+
1261
+ if server_url is not None:
1262
+ base_url = server_url
1263
+ else:
1264
+ base_url = self._get_url(base_url, url_variables)
1265
+
1266
+ request = models.GetOutputSamplesByIDRequest(
1267
+ id=id,
1268
+ )
1269
+
1270
+ req = self._build_request(
1271
+ method="GET",
1272
+ path="/system/outputs/{id}/samples",
1273
+ base_url=base_url,
1274
+ url_variables=url_variables,
1275
+ request=request,
1276
+ request_body_required=False,
1277
+ request_has_path_params=True,
1278
+ request_has_query_params=True,
1279
+ user_agent_header="user-agent",
1280
+ accept_header_value="application/json",
1281
+ http_headers=http_headers,
1282
+ security=self.sdk_configuration.security,
1283
+ timeout_ms=timeout_ms,
1284
+ )
1285
+
1286
+ if retries == UNSET:
1287
+ if self.sdk_configuration.retry_config is not UNSET:
1288
+ retries = self.sdk_configuration.retry_config
1289
+
1290
+ retry_config = None
1291
+ if isinstance(retries, utils.RetryConfig):
1292
+ retry_config = (retries, ["429", "500", "502", "503", "504"])
1293
+
1294
+ http_res = self.do_request(
1295
+ hook_ctx=HookContext(
1296
+ config=self.sdk_configuration,
1297
+ base_url=base_url or "",
1298
+ operation_id="getOutputSamplesById",
1299
+ oauth2_scopes=[],
1300
+ security_source=get_security_from_env(
1301
+ self.sdk_configuration.security, models.Security
1302
+ ),
1303
+ ),
1304
+ request=req,
1305
+ error_status_codes=["401", "4XX", "500", "5XX"],
1306
+ retry_config=retry_config,
1307
+ )
1308
+
1309
+ response_data: Any = None
1310
+ if utils.match_response(http_res, "200", "application/json"):
1311
+ return unmarshal_json_response(
1312
+ models.GetOutputSamplesByIDResponse, http_res
1313
+ )
1314
+ if utils.match_response(http_res, "500", "application/json"):
1315
+ response_data = unmarshal_json_response(errors.ErrorData, http_res)
1316
+ raise errors.Error(response_data, http_res)
1317
+ if utils.match_response(http_res, ["401", "4XX"], "*"):
1318
+ http_res_text = utils.stream_to_text(http_res)
1319
+ raise errors.APIError("API error occurred", http_res, http_res_text)
1320
+ if utils.match_response(http_res, "5XX", "*"):
1321
+ http_res_text = utils.stream_to_text(http_res)
1322
+ raise errors.APIError("API error occurred", http_res, http_res_text)
1323
+
1324
+ raise errors.APIError("Unexpected response received", http_res)
1325
+
1326
+ async def get_output_samples_by_id_async(
1327
+ self,
1328
+ *,
1329
+ id: str,
1330
+ retries: OptionalNullable[utils.RetryConfig] = UNSET,
1331
+ server_url: Optional[str] = None,
1332
+ timeout_ms: Optional[int] = None,
1333
+ http_headers: Optional[Mapping[str, str]] = None,
1334
+ ) -> models.GetOutputSamplesByIDResponse:
1335
+ r"""Retrieve samples data for the specified output. Used to get sample data for the test action.
1336
+
1337
+ Retrieve samples data for the specified output. Used to get sample data for the test action.
1338
+
1339
+ :param id: Output Id
1340
+ :param retries: Override the default retry configuration for this method
1341
+ :param server_url: Override the default server URL for this method
1342
+ :param timeout_ms: Override the default request timeout configuration for this method in milliseconds
1343
+ :param http_headers: Additional headers to set or replace on requests.
1344
+ """
1345
+ base_url = None
1346
+ url_variables = None
1347
+ if timeout_ms is None:
1348
+ timeout_ms = self.sdk_configuration.timeout_ms
1349
+
1350
+ if server_url is not None:
1351
+ base_url = server_url
1352
+ else:
1353
+ base_url = self._get_url(base_url, url_variables)
1354
+
1355
+ request = models.GetOutputSamplesByIDRequest(
1356
+ id=id,
1357
+ )
1358
+
1359
+ req = self._build_request_async(
1360
+ method="GET",
1361
+ path="/system/outputs/{id}/samples",
1362
+ base_url=base_url,
1363
+ url_variables=url_variables,
1364
+ request=request,
1365
+ request_body_required=False,
1366
+ request_has_path_params=True,
1367
+ request_has_query_params=True,
1368
+ user_agent_header="user-agent",
1369
+ accept_header_value="application/json",
1370
+ http_headers=http_headers,
1371
+ security=self.sdk_configuration.security,
1372
+ timeout_ms=timeout_ms,
1373
+ )
1374
+
1375
+ if retries == UNSET:
1376
+ if self.sdk_configuration.retry_config is not UNSET:
1377
+ retries = self.sdk_configuration.retry_config
1378
+
1379
+ retry_config = None
1380
+ if isinstance(retries, utils.RetryConfig):
1381
+ retry_config = (retries, ["429", "500", "502", "503", "504"])
1382
+
1383
+ http_res = await self.do_request_async(
1384
+ hook_ctx=HookContext(
1385
+ config=self.sdk_configuration,
1386
+ base_url=base_url or "",
1387
+ operation_id="getOutputSamplesById",
1388
+ oauth2_scopes=[],
1389
+ security_source=get_security_from_env(
1390
+ self.sdk_configuration.security, models.Security
1391
+ ),
1392
+ ),
1393
+ request=req,
1394
+ error_status_codes=["401", "4XX", "500", "5XX"],
1395
+ retry_config=retry_config,
1396
+ )
1397
+
1398
+ response_data: Any = None
1399
+ if utils.match_response(http_res, "200", "application/json"):
1400
+ return unmarshal_json_response(
1401
+ models.GetOutputSamplesByIDResponse, http_res
1402
+ )
1403
+ if utils.match_response(http_res, "500", "application/json"):
1404
+ response_data = unmarshal_json_response(errors.ErrorData, http_res)
1405
+ raise errors.Error(response_data, http_res)
1406
+ if utils.match_response(http_res, ["401", "4XX"], "*"):
1407
+ http_res_text = await utils.stream_to_text_async(http_res)
1408
+ raise errors.APIError("API error occurred", http_res, http_res_text)
1409
+ if utils.match_response(http_res, "5XX", "*"):
1410
+ http_res_text = await utils.stream_to_text_async(http_res)
1411
+ raise errors.APIError("API error occurred", http_res, http_res_text)
1412
+
1413
+ raise errors.APIError("Unexpected response received", http_res)
1414
+
1415
+ def create_output_test_by_id(
1416
+ self,
1417
+ *,
1418
+ id: str,
1419
+ events: Union[List[models.CriblEvent], List[models.CriblEventTypedDict]],
1420
+ retries: OptionalNullable[utils.RetryConfig] = UNSET,
1421
+ server_url: Optional[str] = None,
1422
+ timeout_ms: Optional[int] = None,
1423
+ http_headers: Optional[Mapping[str, str]] = None,
1424
+ ) -> models.CreateOutputTestByIDResponse:
1425
+ r"""Send sample data to an output to validate configuration or test connectivity
1426
+
1427
+ Send sample data to an output to validate configuration or test connectivity
1428
+
1429
+ :param id: Output Id
1430
+ :param events:
1431
+ :param retries: Override the default retry configuration for this method
1432
+ :param server_url: Override the default server URL for this method
1433
+ :param timeout_ms: Override the default request timeout configuration for this method in milliseconds
1434
+ :param http_headers: Additional headers to set or replace on requests.
1435
+ """
1436
+ base_url = None
1437
+ url_variables = None
1438
+ if timeout_ms is None:
1439
+ timeout_ms = self.sdk_configuration.timeout_ms
1440
+
1441
+ if server_url is not None:
1442
+ base_url = server_url
1443
+ else:
1444
+ base_url = self._get_url(base_url, url_variables)
1445
+
1446
+ request = models.CreateOutputTestByIDRequest(
1447
+ id=id,
1448
+ output_test_request=models.OutputTestRequest(
1449
+ events=utils.get_pydantic_model(events, List[models.CriblEvent]),
1450
+ ),
1451
+ )
1452
+
1453
+ req = self._build_request(
1454
+ method="POST",
1455
+ path="/system/outputs/{id}/test",
1456
+ base_url=base_url,
1457
+ url_variables=url_variables,
1458
+ request=request,
1459
+ request_body_required=True,
1460
+ request_has_path_params=True,
1461
+ request_has_query_params=True,
1462
+ user_agent_header="user-agent",
1463
+ accept_header_value="application/json",
1464
+ http_headers=http_headers,
1465
+ security=self.sdk_configuration.security,
1466
+ get_serialized_body=lambda: utils.serialize_request_body(
1467
+ request.output_test_request,
1468
+ False,
1469
+ False,
1470
+ "json",
1471
+ models.OutputTestRequest,
1472
+ ),
1473
+ timeout_ms=timeout_ms,
1474
+ )
1475
+
1476
+ if retries == UNSET:
1477
+ if self.sdk_configuration.retry_config is not UNSET:
1478
+ retries = self.sdk_configuration.retry_config
1479
+
1480
+ retry_config = None
1481
+ if isinstance(retries, utils.RetryConfig):
1482
+ retry_config = (retries, ["429", "500", "502", "503", "504"])
1483
+
1484
+ http_res = self.do_request(
1485
+ hook_ctx=HookContext(
1486
+ config=self.sdk_configuration,
1487
+ base_url=base_url or "",
1488
+ operation_id="createOutputTestById",
1489
+ oauth2_scopes=[],
1490
+ security_source=get_security_from_env(
1491
+ self.sdk_configuration.security, models.Security
1492
+ ),
1493
+ ),
1494
+ request=req,
1495
+ error_status_codes=["401", "4XX", "500", "5XX"],
1496
+ retry_config=retry_config,
1497
+ )
1498
+
1499
+ response_data: Any = None
1500
+ if utils.match_response(http_res, "200", "application/json"):
1501
+ return unmarshal_json_response(
1502
+ models.CreateOutputTestByIDResponse, http_res
1503
+ )
1504
+ if utils.match_response(http_res, "500", "application/json"):
1505
+ response_data = unmarshal_json_response(errors.ErrorData, http_res)
1506
+ raise errors.Error(response_data, http_res)
1507
+ if utils.match_response(http_res, ["401", "4XX"], "*"):
1508
+ http_res_text = utils.stream_to_text(http_res)
1509
+ raise errors.APIError("API error occurred", http_res, http_res_text)
1510
+ if utils.match_response(http_res, "5XX", "*"):
1511
+ http_res_text = utils.stream_to_text(http_res)
1512
+ raise errors.APIError("API error occurred", http_res, http_res_text)
1513
+
1514
+ raise errors.APIError("Unexpected response received", http_res)
1515
+
1516
+ async def create_output_test_by_id_async(
1517
+ self,
1518
+ *,
1519
+ id: str,
1520
+ events: Union[List[models.CriblEvent], List[models.CriblEventTypedDict]],
1521
+ retries: OptionalNullable[utils.RetryConfig] = UNSET,
1522
+ server_url: Optional[str] = None,
1523
+ timeout_ms: Optional[int] = None,
1524
+ http_headers: Optional[Mapping[str, str]] = None,
1525
+ ) -> models.CreateOutputTestByIDResponse:
1526
+ r"""Send sample data to an output to validate configuration or test connectivity
1527
+
1528
+ Send sample data to an output to validate configuration or test connectivity
1529
+
1530
+ :param id: Output Id
1531
+ :param events:
1532
+ :param retries: Override the default retry configuration for this method
1533
+ :param server_url: Override the default server URL for this method
1534
+ :param timeout_ms: Override the default request timeout configuration for this method in milliseconds
1535
+ :param http_headers: Additional headers to set or replace on requests.
1536
+ """
1537
+ base_url = None
1538
+ url_variables = None
1539
+ if timeout_ms is None:
1540
+ timeout_ms = self.sdk_configuration.timeout_ms
1541
+
1542
+ if server_url is not None:
1543
+ base_url = server_url
1544
+ else:
1545
+ base_url = self._get_url(base_url, url_variables)
1546
+
1547
+ request = models.CreateOutputTestByIDRequest(
1548
+ id=id,
1549
+ output_test_request=models.OutputTestRequest(
1550
+ events=utils.get_pydantic_model(events, List[models.CriblEvent]),
1551
+ ),
1552
+ )
1553
+
1554
+ req = self._build_request_async(
1555
+ method="POST",
1556
+ path="/system/outputs/{id}/test",
1557
+ base_url=base_url,
1558
+ url_variables=url_variables,
1559
+ request=request,
1560
+ request_body_required=True,
1561
+ request_has_path_params=True,
1562
+ request_has_query_params=True,
1563
+ user_agent_header="user-agent",
1564
+ accept_header_value="application/json",
1565
+ http_headers=http_headers,
1566
+ security=self.sdk_configuration.security,
1567
+ get_serialized_body=lambda: utils.serialize_request_body(
1568
+ request.output_test_request,
1569
+ False,
1570
+ False,
1571
+ "json",
1572
+ models.OutputTestRequest,
1573
+ ),
1574
+ timeout_ms=timeout_ms,
1575
+ )
1576
+
1577
+ if retries == UNSET:
1578
+ if self.sdk_configuration.retry_config is not UNSET:
1579
+ retries = self.sdk_configuration.retry_config
1580
+
1581
+ retry_config = None
1582
+ if isinstance(retries, utils.RetryConfig):
1583
+ retry_config = (retries, ["429", "500", "502", "503", "504"])
1584
+
1585
+ http_res = await self.do_request_async(
1586
+ hook_ctx=HookContext(
1587
+ config=self.sdk_configuration,
1588
+ base_url=base_url or "",
1589
+ operation_id="createOutputTestById",
1590
+ oauth2_scopes=[],
1591
+ security_source=get_security_from_env(
1592
+ self.sdk_configuration.security, models.Security
1593
+ ),
1594
+ ),
1595
+ request=req,
1596
+ error_status_codes=["401", "4XX", "500", "5XX"],
1597
+ retry_config=retry_config,
1598
+ )
1599
+
1600
+ response_data: Any = None
1601
+ if utils.match_response(http_res, "200", "application/json"):
1602
+ return unmarshal_json_response(
1603
+ models.CreateOutputTestByIDResponse, http_res
1604
+ )
1605
+ if utils.match_response(http_res, "500", "application/json"):
1606
+ response_data = unmarshal_json_response(errors.ErrorData, http_res)
1607
+ raise errors.Error(response_data, http_res)
1608
+ if utils.match_response(http_res, ["401", "4XX"], "*"):
1609
+ http_res_text = await utils.stream_to_text_async(http_res)
1610
+ raise errors.APIError("API error occurred", http_res, http_res_text)
1611
+ if utils.match_response(http_res, "5XX", "*"):
1612
+ http_res_text = await utils.stream_to_text_async(http_res)
1613
+ raise errors.APIError("API error occurred", http_res, http_res_text)
1614
+
1615
+ raise errors.APIError("Unexpected response received", http_res)