cribl-control-plane 0.0.21__py3-none-any.whl → 0.4.0b23__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (436) hide show
  1. cribl_control_plane/_hooks/clientcredentials.py +113 -48
  2. cribl_control_plane/_version.py +4 -4
  3. cribl_control_plane/acl.py +225 -0
  4. cribl_control_plane/auth_sdk.py +12 -176
  5. cribl_control_plane/basesdk.py +17 -1
  6. cribl_control_plane/branches.py +351 -0
  7. cribl_control_plane/commits.py +1403 -0
  8. cribl_control_plane/commits_files.py +391 -0
  9. cribl_control_plane/configs_versions.py +201 -0
  10. cribl_control_plane/cribl.py +495 -0
  11. cribl_control_plane/destinations.py +146 -805
  12. cribl_control_plane/destinations_pq.py +379 -0
  13. cribl_control_plane/errors/__init__.py +26 -10
  14. cribl_control_plane/errors/apierror.py +2 -0
  15. cribl_control_plane/errors/criblcontrolplaneerror.py +11 -7
  16. cribl_control_plane/errors/error.py +4 -2
  17. cribl_control_plane/errors/healthserverstatus_error.py +41 -0
  18. cribl_control_plane/errors/no_response_error.py +5 -1
  19. cribl_control_plane/errors/responsevalidationerror.py +2 -0
  20. cribl_control_plane/functions.py +367 -0
  21. cribl_control_plane/groups_configs.py +22 -0
  22. cribl_control_plane/groups_sdk.py +333 -578
  23. cribl_control_plane/health.py +38 -18
  24. cribl_control_plane/hectokens.py +503 -0
  25. cribl_control_plane/httpclient.py +0 -1
  26. cribl_control_plane/{lake.py → lakedatasets.py} +207 -115
  27. cribl_control_plane/models/__init__.py +3644 -5986
  28. cribl_control_plane/models/addhectokenrequest.py +7 -1
  29. cribl_control_plane/models/authtoken.py +5 -1
  30. cribl_control_plane/models/backupssettings_union.py +37 -0
  31. cribl_control_plane/models/{lookupversions.py → branchinfo.py} +4 -4
  32. cribl_control_plane/models/cacheconnection.py +30 -2
  33. cribl_control_plane/models/cacheconnectionbackfillstatus.py +2 -1
  34. cribl_control_plane/models/cloudprovider.py +2 -1
  35. cribl_control_plane/models/collectorazureblob.py +130 -0
  36. cribl_control_plane/models/collectorconf.py +56 -0
  37. cribl_control_plane/models/collectorcribllake.py +27 -0
  38. cribl_control_plane/models/collectordatabase.py +92 -0
  39. cribl_control_plane/models/collectorfilesystem.py +66 -0
  40. cribl_control_plane/models/collectorgooglecloudstorage.py +131 -0
  41. cribl_control_plane/models/collectorhealthcheck.py +269 -0
  42. cribl_control_plane/models/collectorrest.py +340 -0
  43. cribl_control_plane/models/collectors3.py +239 -0
  44. cribl_control_plane/models/collectorscript.py +59 -0
  45. cribl_control_plane/models/collectorsplunk.py +253 -0
  46. cribl_control_plane/models/configgroup.py +67 -11
  47. cribl_control_plane/models/configgroupcloud.py +17 -3
  48. cribl_control_plane/models/countedbranchinfo.py +20 -0
  49. cribl_control_plane/models/countedconfiggroup.py +20 -0
  50. cribl_control_plane/models/countedcribllakedataset.py +20 -0
  51. cribl_control_plane/models/counteddistributedsummary.py +20 -0
  52. cribl_control_plane/models/countedfunctionresponse.py +20 -0
  53. cribl_control_plane/models/countedgitcommitsummary.py +20 -0
  54. cribl_control_plane/models/countedgitcountresult.py +20 -0
  55. cribl_control_plane/models/countedgitdiffresult.py +20 -0
  56. cribl_control_plane/models/countedgitfilesresponse.py +20 -0
  57. cribl_control_plane/models/{getversioninfoop.py → countedgitinfo.py} +2 -6
  58. cribl_control_plane/models/countedgitlogresult.py +20 -0
  59. cribl_control_plane/models/countedgitrevertresult.py +20 -0
  60. cribl_control_plane/models/countedgitshowresult.py +20 -0
  61. cribl_control_plane/models/countedgitstatusresult.py +20 -0
  62. cribl_control_plane/models/{listinputop.py → countedinput.py} +2 -6
  63. cribl_control_plane/models/countedinputsplunkhec.py +20 -0
  64. cribl_control_plane/models/countedjobinfo.py +20 -0
  65. cribl_control_plane/models/countedmasterworkerentry.py +20 -0
  66. cribl_control_plane/models/countednumber.py +19 -0
  67. cribl_control_plane/models/{getversionbranchop.py → countedobject.py} +2 -6
  68. cribl_control_plane/models/{listoutputop.py → countedoutput.py} +2 -6
  69. cribl_control_plane/models/countedoutputsamplesresponse.py +20 -0
  70. cribl_control_plane/models/countedoutputtestresponse.py +20 -0
  71. cribl_control_plane/models/countedpackinfo.py +20 -0
  72. cribl_control_plane/models/{createpacksop.py → countedpackinstallinfo.py} +2 -6
  73. cribl_control_plane/models/{listpipelineop.py → countedpipeline.py} +2 -6
  74. cribl_control_plane/models/{listroutesop.py → countedroutes.py} +2 -6
  75. cribl_control_plane/models/countedstring.py +19 -0
  76. cribl_control_plane/models/countedsystemsettingsconf.py +20 -0
  77. cribl_control_plane/models/countedteamaccesscontrollist.py +20 -0
  78. cribl_control_plane/models/counteduseraccesscontrollist.py +20 -0
  79. cribl_control_plane/models/createauthloginop.py +18 -0
  80. cribl_control_plane/models/createconfiggroupbyproductop.py +46 -0
  81. cribl_control_plane/models/createcribllakedatasetbylakeidop.py +3 -21
  82. cribl_control_plane/models/createinputhectokenbyidop.py +3 -21
  83. cribl_control_plane/models/createoutputtestbyidop.py +3 -22
  84. cribl_control_plane/models/createroutesappendbyidop.py +4 -21
  85. cribl_control_plane/models/createversioncommitop.py +27 -20
  86. cribl_control_plane/models/createversionrevertop.py +7 -23
  87. cribl_control_plane/models/createversionundoop.py +7 -22
  88. cribl_control_plane/models/criblevent.py +15 -0
  89. cribl_control_plane/models/cribllakedataset.py +23 -3
  90. cribl_control_plane/models/cribllakedatasetupdate.py +95 -0
  91. cribl_control_plane/models/currentbranchresult.py +13 -0
  92. cribl_control_plane/models/datasetmetadata.py +18 -2
  93. cribl_control_plane/models/deleteconfiggroupbyproductandidop.py +43 -0
  94. cribl_control_plane/models/deletecribllakedatasetbylakeidandidop.py +5 -24
  95. cribl_control_plane/models/deleteinputbyidop.py +3 -22
  96. cribl_control_plane/models/deleteoutputbyidop.py +3 -22
  97. cribl_control_plane/models/deleteoutputpqbyidop.py +3 -21
  98. cribl_control_plane/models/deletepacksbyidop.py +3 -22
  99. cribl_control_plane/models/deletepipelinebyidop.py +3 -22
  100. cribl_control_plane/models/difffiles.py +130 -0
  101. cribl_control_plane/models/diffline.py +26 -0
  102. cribl_control_plane/models/difflinecontext.py +28 -0
  103. cribl_control_plane/models/difflinedelete.py +25 -0
  104. cribl_control_plane/models/difflineinsert.py +25 -0
  105. cribl_control_plane/models/distributedsummary.py +6 -0
  106. cribl_control_plane/models/functionaggregatemetrics.py +206 -0
  107. cribl_control_plane/models/functionaggregation.py +172 -0
  108. cribl_control_plane/models/functionautotimestamp.py +173 -0
  109. cribl_control_plane/models/functioncef.py +111 -0
  110. cribl_control_plane/models/functionchain.py +75 -0
  111. cribl_control_plane/models/functionclone.py +75 -0
  112. cribl_control_plane/models/functioncode.py +96 -0
  113. cribl_control_plane/models/functioncomment.py +75 -0
  114. cribl_control_plane/models/functiondistinct.py +99 -0
  115. cribl_control_plane/models/functiondnslookup.py +250 -0
  116. cribl_control_plane/models/functiondrop.py +73 -0
  117. cribl_control_plane/models/functiondropdimensions.py +87 -0
  118. cribl_control_plane/models/functiondynamicsampling.py +121 -0
  119. cribl_control_plane/models/functioneval.py +103 -0
  120. cribl_control_plane/models/functioneventbreaker.py +103 -0
  121. cribl_control_plane/models/functioneventstats.py +92 -0
  122. cribl_control_plane/models/functionexternaldata.py +73 -0
  123. cribl_control_plane/models/functionflatten.py +90 -0
  124. cribl_control_plane/models/functionfoldkeys.py +89 -0
  125. cribl_control_plane/models/functiongenstats.py +73 -0
  126. cribl_control_plane/models/functiongeoip.py +120 -0
  127. cribl_control_plane/models/functiongrok.py +95 -0
  128. cribl_control_plane/models/functionhandlebar.py +112 -0
  129. cribl_control_plane/models/functionjoin.py +112 -0
  130. cribl_control_plane/models/functionjsonunroll.py +80 -0
  131. cribl_control_plane/models/functionlakeexport.py +102 -0
  132. cribl_control_plane/models/functionlimit.py +75 -0
  133. cribl_control_plane/models/functionlocalsearchdatatypeparser.py +76 -0
  134. cribl_control_plane/models/functionlocalsearchrulesetrunner.py +97 -0
  135. cribl_control_plane/models/functionlookup.py +148 -0
  136. cribl_control_plane/models/functionmask.py +121 -0
  137. cribl_control_plane/models/functionmvexpand.py +128 -0
  138. cribl_control_plane/models/functionmvpull.py +99 -0
  139. cribl_control_plane/models/functionnotificationpolicies.py +186 -0
  140. cribl_control_plane/models/functionnotifications.py +85 -0
  141. cribl_control_plane/models/functionnotify.py +196 -0
  142. cribl_control_plane/models/functionnumerify.py +119 -0
  143. cribl_control_plane/models/functionotlplogs.py +82 -0
  144. cribl_control_plane/models/functionotlpmetrics.py +118 -0
  145. cribl_control_plane/models/functionotlptraces.py +111 -0
  146. cribl_control_plane/models/functionpack.py +80 -0
  147. cribl_control_plane/models/functionpivot.py +85 -0
  148. cribl_control_plane/models/functionpublishmetrics.py +153 -0
  149. cribl_control_plane/models/functionredis.py +173 -0
  150. cribl_control_plane/models/functionregexextract.py +112 -0
  151. cribl_control_plane/models/functionregexfilter.py +95 -0
  152. cribl_control_plane/models/functionrename.py +107 -0
  153. cribl_control_plane/models/functionresponse.py +242 -0
  154. cribl_control_plane/models/functionrollupmetrics.py +114 -0
  155. cribl_control_plane/models/functionsampling.py +90 -0
  156. cribl_control_plane/models/functionsend.py +141 -0
  157. cribl_control_plane/models/functionsensitivedatascanner.py +128 -0
  158. cribl_control_plane/models/functionserde.py +161 -0
  159. cribl_control_plane/models/functionserialize.py +134 -0
  160. cribl_control_plane/models/functionsidlookup.py +93 -0
  161. cribl_control_plane/models/functionsnmptrapserialize.py +144 -0
  162. cribl_control_plane/models/functionsort.py +97 -0
  163. cribl_control_plane/models/functionstore.py +132 -0
  164. cribl_control_plane/models/functionsuppress.py +115 -0
  165. cribl_control_plane/models/functiontee.py +90 -0
  166. cribl_control_plane/models/functiontrimtimestamp.py +75 -0
  167. cribl_control_plane/models/functionunion.py +80 -0
  168. cribl_control_plane/models/functionunroll.py +80 -0
  169. cribl_control_plane/models/functionwindow.py +96 -0
  170. cribl_control_plane/models/functionxmlunroll.py +92 -0
  171. cribl_control_plane/models/getconfiggroupaclbyproductandidop.py +63 -0
  172. cribl_control_plane/models/getconfiggroupaclteamsbyproductandidop.py +63 -0
  173. cribl_control_plane/models/getconfiggroupbyproductandidop.py +53 -0
  174. cribl_control_plane/models/getconfiggroupconfigversionbyproductandidop.py +43 -0
  175. cribl_control_plane/models/getcribllakedatasetbylakeidandidop.py +5 -24
  176. cribl_control_plane/models/getcribllakedatasetbylakeidop.py +56 -16
  177. cribl_control_plane/models/getfunctionsbyidop.py +18 -0
  178. cribl_control_plane/models/getinputbyidop.py +3 -22
  179. cribl_control_plane/models/getmasterworkerentryop.py +22 -0
  180. cribl_control_plane/models/getoutputbyidop.py +3 -22
  181. cribl_control_plane/models/getoutputpqbyidop.py +3 -21
  182. cribl_control_plane/models/getoutputsamplesbyidop.py +3 -22
  183. cribl_control_plane/models/getpacksbyidop.py +18 -0
  184. cribl_control_plane/models/getpacksop.py +3 -21
  185. cribl_control_plane/models/getpipelinebyidop.py +3 -22
  186. cribl_control_plane/models/getroutesbyidop.py +3 -22
  187. cribl_control_plane/models/getsummaryop.py +23 -32
  188. cribl_control_plane/models/getversioncountop.py +10 -27
  189. cribl_control_plane/models/getversiondiffop.py +12 -28
  190. cribl_control_plane/models/getversionfilesop.py +10 -28
  191. cribl_control_plane/models/getversionop.py +30 -0
  192. cribl_control_plane/models/getversionshowop.py +12 -28
  193. cribl_control_plane/models/getversionstatusop.py +7 -23
  194. cribl_control_plane/models/gitcommitsummary.py +3 -3
  195. cribl_control_plane/models/{routecloneconf.py → gitcountresult.py} +4 -4
  196. cribl_control_plane/models/gitdiffresult.py +16 -0
  197. cribl_control_plane/models/gitfilesresponse.py +7 -5
  198. cribl_control_plane/models/gitinfo.py +14 -3
  199. cribl_control_plane/models/gitlogresult.py +33 -0
  200. cribl_control_plane/models/gitrevertparams.py +3 -3
  201. cribl_control_plane/models/gitrevertresult.py +5 -5
  202. cribl_control_plane/models/gitshowresult.py +19 -0
  203. cribl_control_plane/models/gitstatusresult.py +0 -3
  204. cribl_control_plane/models/groupcreaterequest.py +172 -0
  205. cribl_control_plane/models/hbcriblinfo.py +42 -7
  206. cribl_control_plane/models/healthserverstatus.py +55 -0
  207. cribl_control_plane/models/heartbeatmetadata.py +6 -11
  208. cribl_control_plane/models/input.py +89 -81
  209. cribl_control_plane/models/inputappscope.py +131 -35
  210. cribl_control_plane/models/inputazureblob.py +62 -6
  211. cribl_control_plane/models/inputcloudflarehec.py +518 -0
  212. cribl_control_plane/models/inputcollection.py +49 -6
  213. cribl_control_plane/models/inputconfluentcloud.py +262 -22
  214. cribl_control_plane/models/inputcribl.py +52 -9
  215. cribl_control_plane/models/inputcriblhttp.py +124 -33
  216. cribl_control_plane/models/inputcribllakehttp.py +199 -29
  217. cribl_control_plane/models/inputcriblmetrics.py +53 -9
  218. cribl_control_plane/models/inputcribltcp.py +125 -27
  219. cribl_control_plane/models/inputcrowdstrike.py +99 -10
  220. cribl_control_plane/models/inputdatadogagent.py +101 -27
  221. cribl_control_plane/models/inputdatagen.py +47 -4
  222. cribl_control_plane/models/inputedgeprometheus.py +215 -58
  223. cribl_control_plane/models/inputelastic.py +170 -39
  224. cribl_control_plane/models/inputeventhub.py +212 -9
  225. cribl_control_plane/models/inputexec.py +59 -6
  226. cribl_control_plane/models/inputfile.py +83 -15
  227. cribl_control_plane/models/inputfirehose.py +100 -27
  228. cribl_control_plane/models/inputgooglepubsub.py +83 -15
  229. cribl_control_plane/models/{inputgrafana_union.py → inputgrafana.py} +261 -67
  230. cribl_control_plane/models/inputhttp.py +100 -27
  231. cribl_control_plane/models/inputhttpraw.py +100 -27
  232. cribl_control_plane/models/inputjournalfiles.py +51 -7
  233. cribl_control_plane/models/inputkafka.py +257 -19
  234. cribl_control_plane/models/inputkinesis.py +133 -17
  235. cribl_control_plane/models/inputkubeevents.py +52 -9
  236. cribl_control_plane/models/inputkubelogs.py +66 -13
  237. cribl_control_plane/models/inputkubemetrics.py +66 -13
  238. cribl_control_plane/models/inputloki.py +116 -30
  239. cribl_control_plane/models/inputmetrics.py +97 -24
  240. cribl_control_plane/models/inputmodeldriventelemetry.py +110 -29
  241. cribl_control_plane/models/inputmsk.py +148 -21
  242. cribl_control_plane/models/inputnetflow.py +50 -7
  243. cribl_control_plane/models/inputoffice365mgmt.py +115 -17
  244. cribl_control_plane/models/inputoffice365msgtrace.py +117 -19
  245. cribl_control_plane/models/inputoffice365service.py +117 -19
  246. cribl_control_plane/models/inputopentelemetry.py +146 -35
  247. cribl_control_plane/models/inputprometheus.py +196 -47
  248. cribl_control_plane/models/inputprometheusrw.py +117 -30
  249. cribl_control_plane/models/inputrawudp.py +50 -7
  250. cribl_control_plane/models/inputs3.py +85 -8
  251. cribl_control_plane/models/inputs3inventory.py +99 -10
  252. cribl_control_plane/models/inputsecuritylake.py +100 -10
  253. cribl_control_plane/models/inputsnmp.py +115 -24
  254. cribl_control_plane/models/inputsplunk.py +133 -31
  255. cribl_control_plane/models/inputsplunkhec.py +122 -32
  256. cribl_control_plane/models/inputsplunksearch.py +115 -18
  257. cribl_control_plane/models/inputsqs.py +102 -19
  258. cribl_control_plane/models/{inputsyslog_union.py → inputsyslog.py} +193 -51
  259. cribl_control_plane/models/inputsystemmetrics.py +207 -37
  260. cribl_control_plane/models/inputsystemstate.py +66 -13
  261. cribl_control_plane/models/inputtcp.py +125 -29
  262. cribl_control_plane/models/inputtcpjson.py +115 -29
  263. cribl_control_plane/models/inputwef.py +151 -22
  264. cribl_control_plane/models/inputwindowsmetrics.py +191 -38
  265. cribl_control_plane/models/inputwineventlogs.py +93 -11
  266. cribl_control_plane/models/inputwiz.py +176 -11
  267. cribl_control_plane/models/inputwizwebhook.py +466 -0
  268. cribl_control_plane/models/inputzscalerhec.py +122 -32
  269. cribl_control_plane/models/jobinfo.py +34 -0
  270. cribl_control_plane/models/jobstatus.py +48 -0
  271. cribl_control_plane/models/lakedatasetmetrics.py +17 -0
  272. cribl_control_plane/models/lakehouseconnectiontype.py +2 -1
  273. cribl_control_plane/models/listconfiggroupbyproductop.py +46 -0
  274. cribl_control_plane/models/listmasterworkerentryop.py +64 -0
  275. cribl_control_plane/models/logininfo.py +3 -3
  276. cribl_control_plane/models/masterworkerentry.py +20 -13
  277. cribl_control_plane/models/nodeactiveupgradestatus.py +2 -1
  278. cribl_control_plane/models/nodefailedupgradestatus.py +2 -1
  279. cribl_control_plane/models/nodeprovidedinfo.py +13 -11
  280. cribl_control_plane/models/nodeskippedupgradestatus.py +2 -1
  281. cribl_control_plane/models/nodeupgradestate.py +2 -1
  282. cribl_control_plane/models/nodeupgradestatus.py +51 -5
  283. cribl_control_plane/models/outpostnodeinfo.py +16 -0
  284. cribl_control_plane/models/output.py +103 -89
  285. cribl_control_plane/models/outputazureblob.py +174 -21
  286. cribl_control_plane/models/outputazuredataexplorer.py +517 -93
  287. cribl_control_plane/models/outputazureeventhub.py +318 -34
  288. cribl_control_plane/models/outputazurelogs.py +145 -26
  289. cribl_control_plane/models/outputchronicle.py +532 -0
  290. cribl_control_plane/models/outputclickhouse.py +208 -37
  291. cribl_control_plane/models/outputcloudflarer2.py +632 -0
  292. cribl_control_plane/models/outputcloudwatch.py +132 -26
  293. cribl_control_plane/models/outputconfluentcloud.py +387 -46
  294. cribl_control_plane/models/outputcriblhttp.py +203 -36
  295. cribl_control_plane/models/outputcribllake.py +161 -21
  296. cribl_control_plane/models/outputcribltcp.py +199 -34
  297. cribl_control_plane/models/outputcrowdstrikenextgensiem.py +176 -32
  298. cribl_control_plane/models/outputdatabricks.py +501 -0
  299. cribl_control_plane/models/outputdatadog.py +204 -36
  300. cribl_control_plane/models/outputdataset.py +186 -34
  301. cribl_control_plane/models/outputdevnull.py +5 -5
  302. cribl_control_plane/models/outputdiskspool.py +22 -7
  303. cribl_control_plane/models/outputdls3.py +238 -29
  304. cribl_control_plane/models/outputdynatracehttp.py +211 -37
  305. cribl_control_plane/models/outputdynatraceotlp.py +213 -39
  306. cribl_control_plane/models/outputelastic.py +199 -30
  307. cribl_control_plane/models/outputelasticcloud.py +174 -29
  308. cribl_control_plane/models/outputexabeam.py +99 -13
  309. cribl_control_plane/models/outputfilesystem.py +139 -14
  310. cribl_control_plane/models/outputgooglechronicle.py +216 -35
  311. cribl_control_plane/models/outputgooglecloudlogging.py +177 -34
  312. cribl_control_plane/models/outputgooglecloudstorage.py +220 -29
  313. cribl_control_plane/models/outputgooglepubsub.py +138 -51
  314. cribl_control_plane/models/outputgrafanacloud.py +386 -70
  315. cribl_control_plane/models/outputgraphite.py +131 -28
  316. cribl_control_plane/models/outputhoneycomb.py +145 -26
  317. cribl_control_plane/models/outputhumiohec.py +165 -31
  318. cribl_control_plane/models/outputinfluxdb.py +165 -28
  319. cribl_control_plane/models/outputkafka.py +378 -41
  320. cribl_control_plane/models/outputkinesis.py +168 -30
  321. cribl_control_plane/models/outputloki.py +171 -27
  322. cribl_control_plane/models/outputmicrosoftfabric.py +540 -0
  323. cribl_control_plane/models/outputminio.py +228 -28
  324. cribl_control_plane/models/outputmsk.py +270 -43
  325. cribl_control_plane/models/outputnewrelic.py +176 -34
  326. cribl_control_plane/models/outputnewrelicevents.py +166 -31
  327. cribl_control_plane/models/outputopentelemetry.py +240 -40
  328. cribl_control_plane/models/outputprometheus.py +145 -26
  329. cribl_control_plane/models/outputring.py +54 -13
  330. cribl_control_plane/models/outputs3.py +238 -31
  331. cribl_control_plane/models/outputsecuritylake.py +182 -21
  332. cribl_control_plane/models/outputsentinel.py +175 -32
  333. cribl_control_plane/models/outputsentineloneaisiem.py +184 -38
  334. cribl_control_plane/models/outputservicenow.py +226 -41
  335. cribl_control_plane/models/outputsignalfx.py +145 -26
  336. cribl_control_plane/models/outputsns.py +146 -28
  337. cribl_control_plane/models/outputsplunk.py +209 -39
  338. cribl_control_plane/models/outputsplunkhec.py +243 -31
  339. cribl_control_plane/models/outputsplunklb.py +266 -46
  340. cribl_control_plane/models/outputsqs.py +166 -36
  341. cribl_control_plane/models/outputstatsd.py +130 -28
  342. cribl_control_plane/models/outputstatsdext.py +131 -28
  343. cribl_control_plane/models/outputsumologic.py +146 -25
  344. cribl_control_plane/models/outputsyslog.py +323 -51
  345. cribl_control_plane/models/outputtcpjson.py +191 -37
  346. cribl_control_plane/models/outputwavefront.py +145 -26
  347. cribl_control_plane/models/outputwebhook.py +216 -38
  348. cribl_control_plane/models/outputxsiam.py +148 -31
  349. cribl_control_plane/models/packinfo.py +11 -8
  350. cribl_control_plane/models/packinstallinfo.py +14 -11
  351. cribl_control_plane/models/packrequestbody_union.py +140 -0
  352. cribl_control_plane/models/packupgraderequest.py +26 -0
  353. cribl_control_plane/models/piisettings_union.py +31 -0
  354. cribl_control_plane/models/productscore.py +10 -0
  355. cribl_control_plane/models/rbacresource.py +2 -1
  356. cribl_control_plane/models/resourcepolicy.py +15 -2
  357. cribl_control_plane/models/rollbacksettings_union.py +44 -0
  358. cribl_control_plane/models/routeconf.py +3 -4
  359. cribl_control_plane/models/routes.py +0 -24
  360. cribl_control_plane/models/runnablejob.py +27 -0
  361. cribl_control_plane/models/runnablejobcollection.py +628 -0
  362. cribl_control_plane/models/runnablejobexecutor.py +360 -0
  363. cribl_control_plane/models/runnablejobscheduledsearch.py +279 -0
  364. cribl_control_plane/models/schemeclientoauth.py +5 -0
  365. cribl_control_plane/models/snisettings_union.py +31 -0
  366. cribl_control_plane/models/systemsettingsconf.py +291 -0
  367. cribl_control_plane/models/tlssettings_union.py +43 -0
  368. cribl_control_plane/models/updateconfiggroupbyproductandidop.py +56 -0
  369. cribl_control_plane/models/updateconfiggroupdeploybyproductandidop.py +53 -0
  370. cribl_control_plane/models/updatecribllakedatasetbylakeidandidop.py +14 -29
  371. cribl_control_plane/models/updatehectokenrequest.py +7 -1
  372. cribl_control_plane/models/updateinputbyidop.py +5 -23
  373. cribl_control_plane/models/updateinputhectokenbyidandtokenop.py +5 -23
  374. cribl_control_plane/models/updateoutputbyidop.py +5 -23
  375. cribl_control_plane/models/updatepacksbyidop.py +12 -50
  376. cribl_control_plane/models/updatepacksop.py +12 -24
  377. cribl_control_plane/models/updatepipelinebyidop.py +5 -23
  378. cribl_control_plane/models/updateroutesbyidop.py +8 -27
  379. cribl_control_plane/models/upgradegroupsettings_union.py +43 -0
  380. cribl_control_plane/models/upgradepackageurls.py +20 -0
  381. cribl_control_plane/models/upgradesettings.py +38 -0
  382. cribl_control_plane/models/uploadpackresponse.py +13 -0
  383. cribl_control_plane/models/{appmode.py → workertypes.py} +2 -5
  384. cribl_control_plane/{workers_sdk.py → nodes.py} +102 -234
  385. cribl_control_plane/packs.py +385 -184
  386. cribl_control_plane/pipelines.py +116 -66
  387. cribl_control_plane/routes_sdk.py +102 -70
  388. cribl_control_plane/samples.py +407 -0
  389. cribl_control_plane/sdk.py +35 -25
  390. cribl_control_plane/settings.py +20 -0
  391. cribl_control_plane/sources.py +143 -545
  392. cribl_control_plane/statuses.py +195 -0
  393. cribl_control_plane/summaries.py +195 -0
  394. cribl_control_plane/system_sdk.py +20 -0
  395. cribl_control_plane/teams.py +36 -28
  396. cribl_control_plane/tokens.py +210 -0
  397. cribl_control_plane/utils/__init__.py +18 -5
  398. cribl_control_plane/utils/annotations.py +32 -8
  399. cribl_control_plane/utils/eventstreaming.py +10 -0
  400. cribl_control_plane/utils/forms.py +21 -10
  401. cribl_control_plane/utils/queryparams.py +14 -2
  402. cribl_control_plane/utils/retries.py +69 -5
  403. cribl_control_plane/utils/security.py +5 -0
  404. cribl_control_plane/utils/unmarshal_json_response.py +15 -1
  405. cribl_control_plane/versions.py +31 -0
  406. cribl_control_plane/{distributed.py → versions_configs.py} +29 -35
  407. cribl_control_plane-0.4.0b23.dist-info/METADATA +855 -0
  408. cribl_control_plane-0.4.0b23.dist-info/RECORD +450 -0
  409. {cribl_control_plane-0.0.21.dist-info → cribl_control_plane-0.4.0b23.dist-info}/WHEEL +1 -1
  410. cribl_control_plane-0.4.0b23.dist-info/licenses/LICENSE +201 -0
  411. cribl_control_plane/errors/healthstatus_error.py +0 -32
  412. cribl_control_plane/models/createinputop.py +0 -18238
  413. cribl_control_plane/models/createoutputop.py +0 -18437
  414. cribl_control_plane/models/createpipelineop.py +0 -24
  415. cribl_control_plane/models/createproductsgroupsbyproductop.py +0 -54
  416. cribl_control_plane/models/createversionpushop.py +0 -23
  417. cribl_control_plane/models/createversionsyncop.py +0 -23
  418. cribl_control_plane/models/deletegroupsbyidop.py +0 -37
  419. cribl_control_plane/models/getgroupsaclbyidop.py +0 -63
  420. cribl_control_plane/models/getgroupsbyidop.py +0 -49
  421. cribl_control_plane/models/getgroupsconfigversionbyidop.py +0 -36
  422. cribl_control_plane/models/getproductsgroupsaclteamsbyproductandidop.py +0 -78
  423. cribl_control_plane/models/getproductsgroupsbyproductop.py +0 -58
  424. cribl_control_plane/models/getsummaryworkersop.py +0 -39
  425. cribl_control_plane/models/getversioncurrentbranchop.py +0 -23
  426. cribl_control_plane/models/getworkersop.py +0 -82
  427. cribl_control_plane/models/healthstatus.py +0 -33
  428. cribl_control_plane/models/packrequestbody.py +0 -75
  429. cribl_control_plane/models/restartresponse.py +0 -26
  430. cribl_control_plane/models/routesroute_input.py +0 -67
  431. cribl_control_plane/models/updategroupsbyidop.py +0 -48
  432. cribl_control_plane/models/updategroupsdeploybyidop.py +0 -46
  433. cribl_control_plane/models/updateworkersrestartop.py +0 -24
  434. cribl_control_plane/versioning.py +0 -2309
  435. cribl_control_plane-0.0.21.dist-info/METADATA +0 -561
  436. cribl_control_plane-0.0.21.dist-info/RECORD +0 -301
@@ -0,0 +1,210 @@
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 OptionalNullable, UNSET
7
+ from cribl_control_plane.utils.unmarshal_json_response import unmarshal_json_response
8
+ from typing import Any, Mapping, Optional
9
+
10
+
11
+ class Tokens(BaseSDK):
12
+ def get(
13
+ self,
14
+ *,
15
+ password: str,
16
+ username: str,
17
+ retries: OptionalNullable[utils.RetryConfig] = UNSET,
18
+ server_url: Optional[str] = None,
19
+ timeout_ms: Optional[int] = None,
20
+ http_headers: Optional[Mapping[str, str]] = None,
21
+ ) -> models.CreateAuthLoginResponse:
22
+ r"""Log in and fetch an authentication token
23
+
24
+ This endpoint is unavailable on Cribl.Cloud.Instead, follow the instructions at https://docs.cribl.io/stream/api-tutorials/#criblcloud to get an Auth token for Cribl.Cloud.
25
+
26
+ :param password:
27
+ :param username:
28
+ :param retries: Override the default retry configuration for this method
29
+ :param server_url: Override the default server URL for this method
30
+ :param timeout_ms: Override the default request timeout configuration for this method in milliseconds
31
+ :param http_headers: Additional headers to set or replace on requests.
32
+ """
33
+ base_url = None
34
+ url_variables = None
35
+ if timeout_ms is None:
36
+ timeout_ms = self.sdk_configuration.timeout_ms
37
+
38
+ if server_url is not None:
39
+ base_url = server_url
40
+ else:
41
+ base_url = self._get_url(base_url, url_variables)
42
+
43
+ request = models.LoginInfo(
44
+ password=password,
45
+ username=username,
46
+ )
47
+
48
+ req = self._build_request(
49
+ method="POST",
50
+ path="/auth/login",
51
+ base_url=base_url,
52
+ url_variables=url_variables,
53
+ request=request,
54
+ request_body_required=True,
55
+ request_has_path_params=False,
56
+ request_has_query_params=False,
57
+ user_agent_header="user-agent",
58
+ accept_header_value="application/json",
59
+ http_headers=http_headers,
60
+ get_serialized_body=lambda: utils.serialize_request_body(
61
+ request, False, False, "json", models.LoginInfo
62
+ ),
63
+ allow_empty_value=None,
64
+ timeout_ms=timeout_ms,
65
+ )
66
+
67
+ if retries == UNSET:
68
+ if self.sdk_configuration.retry_config is not UNSET:
69
+ retries = self.sdk_configuration.retry_config
70
+ else:
71
+ retries = utils.RetryConfig(
72
+ "backoff", utils.BackoffStrategy(500, 60000, 1.5, 3600000), True
73
+ )
74
+
75
+ retry_config = None
76
+ if isinstance(retries, utils.RetryConfig):
77
+ retry_config = (retries, ["429"])
78
+
79
+ http_res = self.do_request(
80
+ hook_ctx=HookContext(
81
+ config=self.sdk_configuration,
82
+ base_url=base_url or "",
83
+ operation_id="createAuthLogin",
84
+ oauth2_scopes=[],
85
+ security_source=None,
86
+ ),
87
+ request=req,
88
+ error_status_codes=["401", "429", "4XX", "500", "5XX"],
89
+ retry_config=retry_config,
90
+ )
91
+
92
+ response_data: Any = None
93
+ if utils.match_response(http_res, "200", "application/json"):
94
+ return models.CreateAuthLoginResponse(
95
+ result=unmarshal_json_response(models.AuthToken, http_res), headers={}
96
+ )
97
+ if utils.match_response(http_res, "429", "*"):
98
+ http_res_text = utils.stream_to_text(http_res)
99
+ raise errors.APIError("API error occurred", http_res, http_res_text)
100
+ if utils.match_response(http_res, "500", "application/json"):
101
+ response_data = unmarshal_json_response(errors.ErrorData, http_res)
102
+ raise errors.Error(response_data, http_res)
103
+ if utils.match_response(http_res, ["401", "4XX"], "*"):
104
+ http_res_text = utils.stream_to_text(http_res)
105
+ raise errors.APIError("API error occurred", http_res, http_res_text)
106
+ if utils.match_response(http_res, "5XX", "*"):
107
+ http_res_text = utils.stream_to_text(http_res)
108
+ raise errors.APIError("API error occurred", http_res, http_res_text)
109
+
110
+ raise errors.APIError("Unexpected response received", http_res)
111
+
112
+ async def get_async(
113
+ self,
114
+ *,
115
+ password: str,
116
+ username: str,
117
+ retries: OptionalNullable[utils.RetryConfig] = UNSET,
118
+ server_url: Optional[str] = None,
119
+ timeout_ms: Optional[int] = None,
120
+ http_headers: Optional[Mapping[str, str]] = None,
121
+ ) -> models.CreateAuthLoginResponse:
122
+ r"""Log in and fetch an authentication token
123
+
124
+ This endpoint is unavailable on Cribl.Cloud.Instead, follow the instructions at https://docs.cribl.io/stream/api-tutorials/#criblcloud to get an Auth token for Cribl.Cloud.
125
+
126
+ :param password:
127
+ :param username:
128
+ :param retries: Override the default retry configuration for this method
129
+ :param server_url: Override the default server URL for this method
130
+ :param timeout_ms: Override the default request timeout configuration for this method in milliseconds
131
+ :param http_headers: Additional headers to set or replace on requests.
132
+ """
133
+ base_url = None
134
+ url_variables = None
135
+ if timeout_ms is None:
136
+ timeout_ms = self.sdk_configuration.timeout_ms
137
+
138
+ if server_url is not None:
139
+ base_url = server_url
140
+ else:
141
+ base_url = self._get_url(base_url, url_variables)
142
+
143
+ request = models.LoginInfo(
144
+ password=password,
145
+ username=username,
146
+ )
147
+
148
+ req = self._build_request_async(
149
+ method="POST",
150
+ path="/auth/login",
151
+ base_url=base_url,
152
+ url_variables=url_variables,
153
+ request=request,
154
+ request_body_required=True,
155
+ request_has_path_params=False,
156
+ request_has_query_params=False,
157
+ user_agent_header="user-agent",
158
+ accept_header_value="application/json",
159
+ http_headers=http_headers,
160
+ get_serialized_body=lambda: utils.serialize_request_body(
161
+ request, False, False, "json", models.LoginInfo
162
+ ),
163
+ allow_empty_value=None,
164
+ timeout_ms=timeout_ms,
165
+ )
166
+
167
+ if retries == UNSET:
168
+ if self.sdk_configuration.retry_config is not UNSET:
169
+ retries = self.sdk_configuration.retry_config
170
+ else:
171
+ retries = utils.RetryConfig(
172
+ "backoff", utils.BackoffStrategy(500, 60000, 1.5, 3600000), True
173
+ )
174
+
175
+ retry_config = None
176
+ if isinstance(retries, utils.RetryConfig):
177
+ retry_config = (retries, ["429"])
178
+
179
+ http_res = await self.do_request_async(
180
+ hook_ctx=HookContext(
181
+ config=self.sdk_configuration,
182
+ base_url=base_url or "",
183
+ operation_id="createAuthLogin",
184
+ oauth2_scopes=[],
185
+ security_source=None,
186
+ ),
187
+ request=req,
188
+ error_status_codes=["401", "429", "4XX", "500", "5XX"],
189
+ retry_config=retry_config,
190
+ )
191
+
192
+ response_data: Any = None
193
+ if utils.match_response(http_res, "200", "application/json"):
194
+ return models.CreateAuthLoginResponse(
195
+ result=unmarshal_json_response(models.AuthToken, http_res), headers={}
196
+ )
197
+ if utils.match_response(http_res, "429", "*"):
198
+ http_res_text = await utils.stream_to_text_async(http_res)
199
+ raise errors.APIError("API error occurred", http_res, http_res_text)
200
+ if utils.match_response(http_res, "500", "application/json"):
201
+ response_data = unmarshal_json_response(errors.ErrorData, http_res)
202
+ raise errors.Error(response_data, http_res)
203
+ if utils.match_response(http_res, ["401", "4XX"], "*"):
204
+ http_res_text = await utils.stream_to_text_async(http_res)
205
+ raise errors.APIError("API error occurred", http_res, http_res_text)
206
+ if utils.match_response(http_res, "5XX", "*"):
207
+ http_res_text = await utils.stream_to_text_async(http_res)
208
+ raise errors.APIError("API error occurred", http_res, http_res_text)
209
+
210
+ raise errors.APIError("Unexpected response received", http_res)
@@ -2,6 +2,8 @@
2
2
 
3
3
  from typing import TYPE_CHECKING
4
4
  from importlib import import_module
5
+ import builtins
6
+ import sys
5
7
 
6
8
  if TYPE_CHECKING:
7
9
  from .annotations import get_discriminator
@@ -161,6 +163,18 @@ _dynamic_imports: dict[str, str] = {
161
163
  }
162
164
 
163
165
 
166
+ def dynamic_import(modname, retries=3):
167
+ for attempt in range(retries):
168
+ try:
169
+ return import_module(modname, __package__)
170
+ except KeyError:
171
+ # Clear any half-initialized module and retry
172
+ sys.modules.pop(modname, None)
173
+ if attempt == retries - 1:
174
+ break
175
+ raise KeyError(f"Failed to import module '{modname}' after {retries} attempts")
176
+
177
+
164
178
  def __getattr__(attr_name: str) -> object:
165
179
  module_name = _dynamic_imports.get(attr_name)
166
180
  if module_name is None:
@@ -169,9 +183,8 @@ def __getattr__(attr_name: str) -> object:
169
183
  )
170
184
 
171
185
  try:
172
- module = import_module(module_name, __package__)
173
- result = getattr(module, attr_name)
174
- return result
186
+ module = dynamic_import(module_name)
187
+ return getattr(module, attr_name)
175
188
  except ImportError as e:
176
189
  raise ImportError(
177
190
  f"Failed to import {attr_name} from {module_name}: {e}"
@@ -183,5 +196,5 @@ def __getattr__(attr_name: str) -> object:
183
196
 
184
197
 
185
198
  def __dir__():
186
- lazy_attrs = list(_dynamic_imports.keys())
187
- return sorted(lazy_attrs)
199
+ lazy_attrs = builtins.list(_dynamic_imports.keys())
200
+ return builtins.sorted(lazy_attrs)
@@ -3,6 +3,7 @@
3
3
  from enum import Enum
4
4
  from typing import Any, Optional
5
5
 
6
+
6
7
  def get_discriminator(model: Any, fieldname: str, key: str) -> str:
7
8
  """
8
9
  Recursively search for the discriminator attribute in a model.
@@ -25,31 +26,54 @@ def get_discriminator(model: Any, fieldname: str, key: str) -> str:
25
26
 
26
27
  if isinstance(field, dict):
27
28
  if key in field:
28
- return f'{field[key]}'
29
+ return f"{field[key]}"
29
30
 
30
31
  if hasattr(field, fieldname):
31
32
  attr = getattr(field, fieldname)
32
33
  if isinstance(attr, Enum):
33
- return f'{attr.value}'
34
- return f'{attr}'
34
+ return f"{attr.value}"
35
+ return f"{attr}"
35
36
 
36
37
  if hasattr(field, upper_fieldname):
37
38
  attr = getattr(field, upper_fieldname)
38
39
  if isinstance(attr, Enum):
39
- return f'{attr.value}'
40
- return f'{attr}'
40
+ return f"{attr.value}"
41
+ return f"{attr}"
41
42
 
42
43
  return None
43
44
 
45
+ def search_nested_discriminator(obj: Any) -> Optional[str]:
46
+ """Recursively search for discriminator in nested structures."""
47
+ # First try direct field lookup
48
+ discriminator = get_field_discriminator(obj)
49
+ if discriminator is not None:
50
+ return discriminator
51
+
52
+ # If it's a dict, search in nested values
53
+ if isinstance(obj, dict):
54
+ for value in obj.values():
55
+ if isinstance(value, list):
56
+ # Search in list items
57
+ for item in value:
58
+ nested_discriminator = search_nested_discriminator(item)
59
+ if nested_discriminator is not None:
60
+ return nested_discriminator
61
+ elif isinstance(value, dict):
62
+ # Search in nested dict
63
+ nested_discriminator = search_nested_discriminator(value)
64
+ if nested_discriminator is not None:
65
+ return nested_discriminator
66
+
67
+ return None
44
68
 
45
69
  if isinstance(model, list):
46
70
  for field in model:
47
- discriminator = get_field_discriminator(field)
71
+ discriminator = search_nested_discriminator(field)
48
72
  if discriminator is not None:
49
73
  return discriminator
50
74
 
51
- discriminator = get_field_discriminator(model)
75
+ discriminator = search_nested_discriminator(model)
52
76
  if discriminator is not None:
53
77
  return discriminator
54
78
 
55
- raise ValueError(f'Could not find discriminator field {fieldname} in {model}')
79
+ raise ValueError(f"Could not find discriminator field {fieldname} in {model}")
@@ -17,6 +17,9 @@ T = TypeVar("T")
17
17
 
18
18
 
19
19
  class EventStream(Generic[T]):
20
+ # Holds a reference to the SDK client to avoid it being garbage collected
21
+ # and cause termination of the underlying httpx client.
22
+ client_ref: Optional[object]
20
23
  response: httpx.Response
21
24
  generator: Generator[T, None, None]
22
25
 
@@ -25,9 +28,11 @@ class EventStream(Generic[T]):
25
28
  response: httpx.Response,
26
29
  decoder: Callable[[str], T],
27
30
  sentinel: Optional[str] = None,
31
+ client_ref: Optional[object] = None,
28
32
  ):
29
33
  self.response = response
30
34
  self.generator = stream_events(response, decoder, sentinel)
35
+ self.client_ref = client_ref
31
36
 
32
37
  def __iter__(self):
33
38
  return self
@@ -43,6 +48,9 @@ class EventStream(Generic[T]):
43
48
 
44
49
 
45
50
  class EventStreamAsync(Generic[T]):
51
+ # Holds a reference to the SDK client to avoid it being garbage collected
52
+ # and cause termination of the underlying httpx client.
53
+ client_ref: Optional[object]
46
54
  response: httpx.Response
47
55
  generator: AsyncGenerator[T, None]
48
56
 
@@ -51,9 +59,11 @@ class EventStreamAsync(Generic[T]):
51
59
  response: httpx.Response,
52
60
  decoder: Callable[[str], T],
53
61
  sentinel: Optional[str] = None,
62
+ client_ref: Optional[object] = None,
54
63
  ):
55
64
  self.response = response
56
65
  self.generator = stream_events_async(response, decoder, sentinel)
66
+ self.client_ref = client_ref
57
67
 
58
68
  def __aiter__(self):
59
69
  return self
@@ -142,16 +142,21 @@ def serialize_multipart_form(
142
142
  if field_metadata.file:
143
143
  if isinstance(val, List):
144
144
  # Handle array of files
145
+ array_field_name = f_name + "[]"
145
146
  for file_obj in val:
146
147
  if not _is_set(file_obj):
147
148
  continue
148
-
149
- file_name, content, content_type = _extract_file_properties(file_obj)
149
+
150
+ file_name, content, content_type = _extract_file_properties(
151
+ file_obj
152
+ )
150
153
 
151
154
  if content_type is not None:
152
- files.append((f_name + "[]", (file_name, content, content_type)))
155
+ files.append(
156
+ (array_field_name, (file_name, content, content_type))
157
+ )
153
158
  else:
154
- files.append((f_name + "[]", (file_name, content)))
159
+ files.append((array_field_name, (file_name, content)))
155
160
  else:
156
161
  # Handle single file
157
162
  file_name, content, content_type = _extract_file_properties(val)
@@ -161,11 +166,16 @@ def serialize_multipart_form(
161
166
  else:
162
167
  files.append((f_name, (file_name, content)))
163
168
  elif field_metadata.json:
164
- files.append((f_name, (
165
- None,
166
- marshal_json(val, request_field_types[name]),
167
- "application/json",
168
- )))
169
+ files.append(
170
+ (
171
+ f_name,
172
+ (
173
+ None,
174
+ marshal_json(val, request_field_types[name]),
175
+ "application/json",
176
+ ),
177
+ )
178
+ )
169
179
  else:
170
180
  if isinstance(val, List):
171
181
  values = []
@@ -175,7 +185,8 @@ def serialize_multipart_form(
175
185
  continue
176
186
  values.append(_val_to_string(value))
177
187
 
178
- form[f_name + "[]"] = values
188
+ array_field_name = f_name + "[]"
189
+ form[array_field_name] = values
179
190
  else:
180
191
  form[f_name] = _val_to_string(val)
181
192
  return media_type, form, files
@@ -27,12 +27,13 @@ from .forms import _populate_form
27
27
  def get_query_params(
28
28
  query_params: Any,
29
29
  gbls: Optional[Any] = None,
30
+ allow_empty_value: Optional[List[str]] = None,
30
31
  ) -> Dict[str, List[str]]:
31
32
  params: Dict[str, List[str]] = {}
32
33
 
33
- globals_already_populated = _populate_query_params(query_params, gbls, params, [])
34
+ globals_already_populated = _populate_query_params(query_params, gbls, params, [], allow_empty_value)
34
35
  if _is_set(gbls):
35
- _populate_query_params(gbls, None, params, globals_already_populated)
36
+ _populate_query_params(gbls, None, params, globals_already_populated, allow_empty_value)
36
37
 
37
38
  return params
38
39
 
@@ -42,6 +43,7 @@ def _populate_query_params(
42
43
  gbls: Any,
43
44
  query_param_values: Dict[str, List[str]],
44
45
  skip_fields: List[str],
46
+ allow_empty_value: Optional[List[str]] = None,
45
47
  ) -> List[str]:
46
48
  globals_already_populated: List[str] = []
47
49
 
@@ -69,6 +71,16 @@ def _populate_query_params(
69
71
  globals_already_populated.append(name)
70
72
 
71
73
  f_name = field.alias if field.alias is not None else name
74
+
75
+ allow_empty_set = set(allow_empty_value or [])
76
+ should_include_empty = f_name in allow_empty_set and (
77
+ value is None or value == [] or value == ""
78
+ )
79
+
80
+ if should_include_empty:
81
+ query_param_values[f_name] = [""]
82
+ continue
83
+
72
84
  serialization = metadata.serialization
73
85
  if serialization is not None:
74
86
  serialized_parms = _get_serialized_params(
@@ -3,7 +3,9 @@
3
3
  import asyncio
4
4
  import random
5
5
  import time
6
- from typing import List
6
+ from datetime import datetime
7
+ from email.utils import parsedate_to_datetime
8
+ from typing import List, Optional
7
9
 
8
10
  import httpx
9
11
 
@@ -51,9 +53,11 @@ class Retries:
51
53
 
52
54
  class TemporaryError(Exception):
53
55
  response: httpx.Response
56
+ retry_after: Optional[int]
54
57
 
55
58
  def __init__(self, response: httpx.Response):
56
59
  self.response = response
60
+ self.retry_after = _parse_retry_after_header(response)
57
61
 
58
62
 
59
63
  class PermanentError(Exception):
@@ -63,6 +67,62 @@ class PermanentError(Exception):
63
67
  self.inner = inner
64
68
 
65
69
 
70
+ def _parse_retry_after_header(response: httpx.Response) -> Optional[int]:
71
+ """Parse Retry-After header from response.
72
+
73
+ Returns:
74
+ Retry interval in milliseconds, or None if header is missing or invalid.
75
+ """
76
+ retry_after_header = response.headers.get("retry-after")
77
+ if not retry_after_header:
78
+ return None
79
+
80
+ try:
81
+ seconds = float(retry_after_header)
82
+ return round(seconds * 1000)
83
+ except ValueError:
84
+ pass
85
+
86
+ try:
87
+ retry_date = parsedate_to_datetime(retry_after_header)
88
+ delta = (retry_date - datetime.now(retry_date.tzinfo)).total_seconds()
89
+ return round(max(0, delta) * 1000)
90
+ except (ValueError, TypeError):
91
+ pass
92
+
93
+ return None
94
+
95
+
96
+ def _get_sleep_interval(
97
+ exception: Exception,
98
+ initial_interval: int,
99
+ max_interval: int,
100
+ exponent: float,
101
+ retries: int,
102
+ ) -> float:
103
+ """Get sleep interval for retry with exponential backoff.
104
+
105
+ Args:
106
+ exception: The exception that triggered the retry.
107
+ initial_interval: Initial retry interval in milliseconds.
108
+ max_interval: Maximum retry interval in milliseconds.
109
+ exponent: Base for exponential backoff calculation.
110
+ retries: Current retry attempt count.
111
+
112
+ Returns:
113
+ Sleep interval in seconds.
114
+ """
115
+ if (
116
+ isinstance(exception, TemporaryError)
117
+ and exception.retry_after is not None
118
+ and exception.retry_after > 0
119
+ ):
120
+ return exception.retry_after / 1000
121
+
122
+ sleep = (initial_interval / 1000) * exponent**retries + random.uniform(0, 1)
123
+ return min(sleep, max_interval / 1000)
124
+
125
+
66
126
  def retry(func, retries: Retries):
67
127
  if retries.config.strategy == "backoff":
68
128
 
@@ -183,8 +243,10 @@ def retry_with_backoff(
183
243
  return exception.response
184
244
 
185
245
  raise
186
- sleep = (initial_interval / 1000) * exponent**retries + random.uniform(0, 1)
187
- sleep = min(sleep, max_interval / 1000)
246
+
247
+ sleep = _get_sleep_interval(
248
+ exception, initial_interval, max_interval, exponent, retries
249
+ )
188
250
  time.sleep(sleep)
189
251
  retries += 1
190
252
 
@@ -211,7 +273,9 @@ async def retry_with_backoff_async(
211
273
  return exception.response
212
274
 
213
275
  raise
214
- sleep = (initial_interval / 1000) * exponent**retries + random.uniform(0, 1)
215
- sleep = min(sleep, max_interval / 1000)
276
+
277
+ sleep = _get_sleep_interval(
278
+ exception, initial_interval, max_interval, exponent, retries
279
+ )
216
280
  await asyncio.sleep(sleep)
217
281
  retries += 1
@@ -82,6 +82,11 @@ def get_security_from_env(security: Any, security_class: Any) -> Optional[BaseMo
82
82
  "CRIBLCONTROLPLANE_TOKEN_URL"
83
83
  )
84
84
 
85
+ if os.getenv("CRIBLCONTROLPLANE_AUDIENCE"):
86
+ security_dict.setdefault("client_oauth", {})["audience"] = os.getenv(
87
+ "CRIBLCONTROLPLANE_AUDIENCE"
88
+ )
89
+
85
90
  return security_class(**security_dict) if security_dict else None
86
91
 
87
92
 
@@ -1,12 +1,26 @@
1
1
  """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
2
2
 
3
- from typing import Any, Optional
3
+ from typing import Any, Optional, Type, TypeVar, overload
4
4
 
5
5
  import httpx
6
6
 
7
7
  from .serializers import unmarshal_json
8
8
  from cribl_control_plane import errors
9
9
 
10
+ T = TypeVar("T")
11
+
12
+
13
+ @overload
14
+ def unmarshal_json_response(
15
+ typ: Type[T], http_res: httpx.Response, body: Optional[str] = None
16
+ ) -> T: ...
17
+
18
+
19
+ @overload
20
+ def unmarshal_json_response(
21
+ typ: Any, http_res: httpx.Response, body: Optional[str] = None
22
+ ) -> Any: ...
23
+
10
24
 
11
25
  def unmarshal_json_response(
12
26
  typ: Any, http_res: httpx.Response, body: Optional[str] = None
@@ -0,0 +1,31 @@
1
+ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
2
+
3
+ from .basesdk import BaseSDK
4
+ from .sdkconfiguration import SDKConfiguration
5
+ from cribl_control_plane.branches import Branches
6
+ from cribl_control_plane.commits import Commits
7
+ from cribl_control_plane.statuses import Statuses
8
+ from cribl_control_plane.versions_configs import VersionsConfigs
9
+ from typing import Optional
10
+
11
+
12
+ class Versions(BaseSDK):
13
+ branches: Branches
14
+ commits: Commits
15
+ configs: VersionsConfigs
16
+ statuses: Statuses
17
+
18
+ def __init__(
19
+ self, sdk_config: SDKConfiguration, parent_ref: Optional[object] = None
20
+ ) -> None:
21
+ BaseSDK.__init__(self, sdk_config, parent_ref=parent_ref)
22
+ self.sdk_configuration = sdk_config
23
+ self._init_sdks()
24
+
25
+ def _init_sdks(self):
26
+ self.branches = Branches(self.sdk_configuration, parent_ref=self.parent_ref)
27
+ self.commits = Commits(self.sdk_configuration, parent_ref=self.parent_ref)
28
+ self.configs = VersionsConfigs(
29
+ self.sdk_configuration, parent_ref=self.parent_ref
30
+ )
31
+ self.statuses = Statuses(self.sdk_configuration, parent_ref=self.parent_ref)