Skip to main content

hanzo_client/apis/
ai_api.rs

1/*
2 * Hanzo Cloud API
3 *
4 * The Hanzo Cloud API as a customer calls it: every operation under /v1/ except the operator's admin product, relay routes, legacy spellings and capabilities still reached by flag. Tagged by product: the first path segment after /v1/.
5 *
6 * The version of the OpenAPI document: v1
7 * 
8 * Generated by: https://openapi-generator.tech
9 */
10
11
12use reqwest;
13use serde::{Deserialize, Serialize, de::Error as _};
14use crate::{apis::ResponseContent, models};
15use super::{Error, configuration, ContentType};
16
17
18/// struct for typed errors of method [`ai_mcp_tools`]
19#[derive(Debug, Clone, Serialize, Deserialize)]
20#[serde(untagged)]
21pub enum AiMcpToolsError {
22    UnknownValue(serde_json::Value),
23}
24
25/// struct for typed errors of method [`delete_ai_articles_by_owner_by_name`]
26#[derive(Debug, Clone, Serialize, Deserialize)]
27#[serde(untagged)]
28pub enum DeleteAiArticlesByOwnerByNameError {
29    UnknownValue(serde_json::Value),
30}
31
32/// struct for typed errors of method [`delete_ai_assets_by_owner_by_name`]
33#[derive(Debug, Clone, Serialize, Deserialize)]
34#[serde(untagged)]
35pub enum DeleteAiAssetsByOwnerByNameError {
36    UnknownValue(serde_json::Value),
37}
38
39/// struct for typed errors of method [`delete_ai_chats_by_owner_by_name`]
40#[derive(Debug, Clone, Serialize, Deserialize)]
41#[serde(untagged)]
42pub enum DeleteAiChatsByOwnerByNameError {
43    UnknownValue(serde_json::Value),
44}
45
46/// struct for typed errors of method [`delete_ai_connections_by_provider`]
47#[derive(Debug, Clone, Serialize, Deserialize)]
48#[serde(untagged)]
49pub enum DeleteAiConnectionsByProviderError {
50    UnknownValue(serde_json::Value),
51}
52
53/// struct for typed errors of method [`delete_ai_deployments_by_owner_by_name`]
54#[derive(Debug, Clone, Serialize, Deserialize)]
55#[serde(untagged)]
56pub enum DeleteAiDeploymentsByOwnerByNameError {
57    UnknownValue(serde_json::Value),
58}
59
60/// struct for typed errors of method [`delete_ai_files_by_owner_by_name`]
61#[derive(Debug, Clone, Serialize, Deserialize)]
62#[serde(untagged)]
63pub enum DeleteAiFilesByOwnerByNameError {
64    UnknownValue(serde_json::Value),
65}
66
67/// struct for typed errors of method [`delete_ai_forms_by_owner_by_name`]
68#[derive(Debug, Clone, Serialize, Deserialize)]
69#[serde(untagged)]
70pub enum DeleteAiFormsByOwnerByNameError {
71    UnknownValue(serde_json::Value),
72}
73
74/// struct for typed errors of method [`delete_ai_graphs_by_owner_by_name`]
75#[derive(Debug, Clone, Serialize, Deserialize)]
76#[serde(untagged)]
77pub enum DeleteAiGraphsByOwnerByNameError {
78    UnknownValue(serde_json::Value),
79}
80
81/// struct for typed errors of method [`delete_ai_messages_by_owner_by_name`]
82#[derive(Debug, Clone, Serialize, Deserialize)]
83#[serde(untagged)]
84pub enum DeleteAiMessagesByOwnerByNameError {
85    UnknownValue(serde_json::Value),
86}
87
88/// struct for typed errors of method [`delete_ai_messages_welcome`]
89#[derive(Debug, Clone, Serialize, Deserialize)]
90#[serde(untagged)]
91pub enum DeleteAiMessagesWelcomeError {
92    UnknownValue(serde_json::Value),
93}
94
95/// struct for typed errors of method [`delete_ai_nodes_by_owner_by_name`]
96#[derive(Debug, Clone, Serialize, Deserialize)]
97#[serde(untagged)]
98pub enum DeleteAiNodesByOwnerByNameError {
99    UnknownValue(serde_json::Value),
100}
101
102/// struct for typed errors of method [`delete_ai_org_settings`]
103#[derive(Debug, Clone, Serialize, Deserialize)]
104#[serde(untagged)]
105pub enum DeleteAiOrgSettingsError {
106    UnknownValue(serde_json::Value),
107}
108
109/// struct for typed errors of method [`delete_ai_org_settings_list`]
110#[derive(Debug, Clone, Serialize, Deserialize)]
111#[serde(untagged)]
112pub enum DeleteAiOrgSettingsListError {
113    UnknownValue(serde_json::Value),
114}
115
116/// struct for typed errors of method [`delete_ai_providers_by_owner_by_name`]
117#[derive(Debug, Clone, Serialize, Deserialize)]
118#[serde(untagged)]
119pub enum DeleteAiProvidersByOwnerByNameError {
120    UnknownValue(serde_json::Value),
121}
122
123/// struct for typed errors of method [`delete_ai_records_by_owner_by_name`]
124#[derive(Debug, Clone, Serialize, Deserialize)]
125#[serde(untagged)]
126pub enum DeleteAiRecordsByOwnerByNameError {
127    UnknownValue(serde_json::Value),
128}
129
130/// struct for typed errors of method [`delete_ai_remote_connections_by_owner_by_name`]
131#[derive(Debug, Clone, Serialize, Deserialize)]
132#[serde(untagged)]
133pub enum DeleteAiRemoteConnectionsByOwnerByNameError {
134    UnknownValue(serde_json::Value),
135}
136
137/// struct for typed errors of method [`delete_ai_router_artifact_meta`]
138#[derive(Debug, Clone, Serialize, Deserialize)]
139#[serde(untagged)]
140pub enum DeleteAiRouterArtifactMetaError {
141    UnknownValue(serde_json::Value),
142}
143
144/// struct for typed errors of method [`delete_ai_router_data`]
145#[derive(Debug, Clone, Serialize, Deserialize)]
146#[serde(untagged)]
147pub enum DeleteAiRouterDataError {
148    UnknownValue(serde_json::Value),
149}
150
151/// struct for typed errors of method [`delete_ai_router_defaults`]
152#[derive(Debug, Clone, Serialize, Deserialize)]
153#[serde(untagged)]
154pub enum DeleteAiRouterDefaultsError {
155    UnknownValue(serde_json::Value),
156}
157
158/// struct for typed errors of method [`delete_ai_router_ledger`]
159#[derive(Debug, Clone, Serialize, Deserialize)]
160#[serde(untagged)]
161pub enum DeleteAiRouterLedgerError {
162    UnknownValue(serde_json::Value),
163}
164
165/// struct for typed errors of method [`delete_ai_router_policy`]
166#[derive(Debug, Clone, Serialize, Deserialize)]
167#[serde(untagged)]
168pub enum DeleteAiRouterPolicyError {
169    UnknownValue(serde_json::Value),
170}
171
172/// struct for typed errors of method [`delete_ai_router_rewards`]
173#[derive(Debug, Clone, Serialize, Deserialize)]
174#[serde(untagged)]
175pub enum DeleteAiRouterRewardsError {
176    UnknownValue(serde_json::Value),
177}
178
179/// struct for typed errors of method [`delete_ai_routes_by_owner_by_name`]
180#[derive(Debug, Clone, Serialize, Deserialize)]
181#[serde(untagged)]
182pub enum DeleteAiRoutesByOwnerByNameError {
183    UnknownValue(serde_json::Value),
184}
185
186/// struct for typed errors of method [`delete_ai_scales_by_owner_by_name`]
187#[derive(Debug, Clone, Serialize, Deserialize)]
188#[serde(untagged)]
189pub enum DeleteAiScalesByOwnerByNameError {
190    UnknownValue(serde_json::Value),
191}
192
193/// struct for typed errors of method [`delete_ai_scans_by_owner_by_name`]
194#[derive(Debug, Clone, Serialize, Deserialize)]
195#[serde(untagged)]
196pub enum DeleteAiScansByOwnerByNameError {
197    UnknownValue(serde_json::Value),
198}
199
200/// struct for typed errors of method [`delete_ai_signin_sessions_by_owner_by_name`]
201#[derive(Debug, Clone, Serialize, Deserialize)]
202#[serde(untagged)]
203pub enum DeleteAiSigninSessionsByOwnerByNameError {
204    UnknownValue(serde_json::Value),
205}
206
207/// struct for typed errors of method [`delete_ai_stores_by_owner_by_name`]
208#[derive(Debug, Clone, Serialize, Deserialize)]
209#[serde(untagged)]
210pub enum DeleteAiStoresByOwnerByNameError {
211    UnknownValue(serde_json::Value),
212}
213
214/// struct for typed errors of method [`delete_ai_tasks_by_owner_by_name`]
215#[derive(Debug, Clone, Serialize, Deserialize)]
216#[serde(untagged)]
217pub enum DeleteAiTasksByOwnerByNameError {
218    UnknownValue(serde_json::Value),
219}
220
221/// struct for typed errors of method [`delete_ai_templates_by_owner_by_name`]
222#[derive(Debug, Clone, Serialize, Deserialize)]
223#[serde(untagged)]
224pub enum DeleteAiTemplatesByOwnerByNameError {
225    UnknownValue(serde_json::Value),
226}
227
228/// struct for typed errors of method [`delete_ai_tree_files_by_owner_by_name`]
229#[derive(Debug, Clone, Serialize, Deserialize)]
230#[serde(untagged)]
231pub enum DeleteAiTreeFilesByOwnerByNameError {
232    UnknownValue(serde_json::Value),
233}
234
235/// struct for typed errors of method [`delete_ai_vectors_all`]
236#[derive(Debug, Clone, Serialize, Deserialize)]
237#[serde(untagged)]
238pub enum DeleteAiVectorsAllError {
239    UnknownValue(serde_json::Value),
240}
241
242/// struct for typed errors of method [`delete_ai_vectors_by_owner_by_name`]
243#[derive(Debug, Clone, Serialize, Deserialize)]
244#[serde(untagged)]
245pub enum DeleteAiVectorsByOwnerByNameError {
246    UnknownValue(serde_json::Value),
247}
248
249/// struct for typed errors of method [`delete_ai_videos_by_owner_by_name`]
250#[derive(Debug, Clone, Serialize, Deserialize)]
251#[serde(untagged)]
252pub enum DeleteAiVideosByOwnerByNameError {
253    UnknownValue(serde_json::Value),
254}
255
256/// struct for typed errors of method [`delete_ai_workflows_by_owner_by_name`]
257#[derive(Debug, Clone, Serialize, Deserialize)]
258#[serde(untagged)]
259pub enum DeleteAiWorkflowsByOwnerByNameError {
260    UnknownValue(serde_json::Value),
261}
262
263/// struct for typed errors of method [`get_ai_account`]
264#[derive(Debug, Clone, Serialize, Deserialize)]
265#[serde(untagged)]
266pub enum GetAiAccountError {
267    UnknownValue(serde_json::Value),
268}
269
270/// struct for typed errors of method [`get_ai_activities`]
271#[derive(Debug, Clone, Serialize, Deserialize)]
272#[serde(untagged)]
273pub enum GetAiActivitiesError {
274    UnknownValue(serde_json::Value),
275}
276
277/// struct for typed errors of method [`get_ai_answer`]
278#[derive(Debug, Clone, Serialize, Deserialize)]
279#[serde(untagged)]
280pub enum GetAiAnswerError {
281    UnknownValue(serde_json::Value),
282}
283
284/// struct for typed errors of method [`get_ai_articles`]
285#[derive(Debug, Clone, Serialize, Deserialize)]
286#[serde(untagged)]
287pub enum GetAiArticlesError {
288    UnknownValue(serde_json::Value),
289}
290
291/// struct for typed errors of method [`get_ai_articles_by_owner_by_name`]
292#[derive(Debug, Clone, Serialize, Deserialize)]
293#[serde(untagged)]
294pub enum GetAiArticlesByOwnerByNameError {
295    UnknownValue(serde_json::Value),
296}
297
298/// struct for typed errors of method [`get_ai_articles_global`]
299#[derive(Debug, Clone, Serialize, Deserialize)]
300#[serde(untagged)]
301pub enum GetAiArticlesGlobalError {
302    UnknownValue(serde_json::Value),
303}
304
305/// struct for typed errors of method [`get_ai_assets`]
306#[derive(Debug, Clone, Serialize, Deserialize)]
307#[serde(untagged)]
308pub enum GetAiAssetsError {
309    UnknownValue(serde_json::Value),
310}
311
312/// struct for typed errors of method [`get_ai_assets_by_owner_by_name`]
313#[derive(Debug, Clone, Serialize, Deserialize)]
314#[serde(untagged)]
315pub enum GetAiAssetsByOwnerByNameError {
316    UnknownValue(serde_json::Value),
317}
318
319/// struct for typed errors of method [`get_ai_chats`]
320#[derive(Debug, Clone, Serialize, Deserialize)]
321#[serde(untagged)]
322pub enum GetAiChatsError {
323    UnknownValue(serde_json::Value),
324}
325
326/// struct for typed errors of method [`get_ai_chats_by_owner_by_name`]
327#[derive(Debug, Clone, Serialize, Deserialize)]
328#[serde(untagged)]
329pub enum GetAiChatsByOwnerByNameError {
330    UnknownValue(serde_json::Value),
331}
332
333/// struct for typed errors of method [`get_ai_chats_global`]
334#[derive(Debug, Clone, Serialize, Deserialize)]
335#[serde(untagged)]
336pub enum GetAiChatsGlobalError {
337    UnknownValue(serde_json::Value),
338}
339
340/// struct for typed errors of method [`get_ai_connections`]
341#[derive(Debug, Clone, Serialize, Deserialize)]
342#[serde(untagged)]
343pub enum GetAiConnectionsError {
344    UnknownValue(serde_json::Value),
345}
346
347/// struct for typed errors of method [`get_ai_connections_by_provider_authorize`]
348#[derive(Debug, Clone, Serialize, Deserialize)]
349#[serde(untagged)]
350pub enum GetAiConnectionsByProviderAuthorizeError {
351    UnknownValue(serde_json::Value),
352}
353
354/// struct for typed errors of method [`get_ai_connections_by_provider_callback`]
355#[derive(Debug, Clone, Serialize, Deserialize)]
356#[serde(untagged)]
357pub enum GetAiConnectionsByProviderCallbackError {
358    UnknownValue(serde_json::Value),
359}
360
361/// struct for typed errors of method [`get_ai_connections_by_provider_usage`]
362#[derive(Debug, Clone, Serialize, Deserialize)]
363#[serde(untagged)]
364pub enum GetAiConnectionsByProviderUsageError {
365    UnknownValue(serde_json::Value),
366}
367
368/// struct for typed errors of method [`get_ai_dashboards_agents`]
369#[derive(Debug, Clone, Serialize, Deserialize)]
370#[serde(untagged)]
371pub enum GetAiDashboardsAgentsError {
372    UnknownValue(serde_json::Value),
373}
374
375/// struct for typed errors of method [`get_ai_dashboards_vm`]
376#[derive(Debug, Clone, Serialize, Deserialize)]
377#[serde(untagged)]
378pub enum GetAiDashboardsVmError {
379    UnknownValue(serde_json::Value),
380}
381
382/// struct for typed errors of method [`get_ai_deployments`]
383#[derive(Debug, Clone, Serialize, Deserialize)]
384#[serde(untagged)]
385pub enum GetAiDeploymentsError {
386    UnknownValue(serde_json::Value),
387}
388
389/// struct for typed errors of method [`get_ai_deployments_by_owner_by_name`]
390#[derive(Debug, Clone, Serialize, Deserialize)]
391#[serde(untagged)]
392pub enum GetAiDeploymentsByOwnerByNameError {
393    UnknownValue(serde_json::Value),
394}
395
396/// struct for typed errors of method [`get_ai_files`]
397#[derive(Debug, Clone, Serialize, Deserialize)]
398#[serde(untagged)]
399pub enum GetAiFilesError {
400    UnknownValue(serde_json::Value),
401}
402
403/// struct for typed errors of method [`get_ai_files_active`]
404#[derive(Debug, Clone, Serialize, Deserialize)]
405#[serde(untagged)]
406pub enum GetAiFilesActiveError {
407    UnknownValue(serde_json::Value),
408}
409
410/// struct for typed errors of method [`get_ai_files_by_owner_by_name`]
411#[derive(Debug, Clone, Serialize, Deserialize)]
412#[serde(untagged)]
413pub enum GetAiFilesByOwnerByNameError {
414    UnknownValue(serde_json::Value),
415}
416
417/// struct for typed errors of method [`get_ai_files_global`]
418#[derive(Debug, Clone, Serialize, Deserialize)]
419#[serde(untagged)]
420pub enum GetAiFilesGlobalError {
421    UnknownValue(serde_json::Value),
422}
423
424/// struct for typed errors of method [`get_ai_finetune_hf_datasets`]
425#[derive(Debug, Clone, Serialize, Deserialize)]
426#[serde(untagged)]
427pub enum GetAiFinetuneHfDatasetsError {
428    UnknownValue(serde_json::Value),
429}
430
431/// struct for typed errors of method [`get_ai_finetune_hf_models`]
432#[derive(Debug, Clone, Serialize, Deserialize)]
433#[serde(untagged)]
434pub enum GetAiFinetuneHfModelsError {
435    UnknownValue(serde_json::Value),
436}
437
438/// struct for typed errors of method [`get_ai_finetune_hf_repo`]
439#[derive(Debug, Clone, Serialize, Deserialize)]
440#[serde(untagged)]
441pub enum GetAiFinetuneHfRepoError {
442    UnknownValue(serde_json::Value),
443}
444
445/// struct for typed errors of method [`get_ai_finetune_job`]
446#[derive(Debug, Clone, Serialize, Deserialize)]
447#[serde(untagged)]
448pub enum GetAiFinetuneJobError {
449    UnknownValue(serde_json::Value),
450}
451
452/// struct for typed errors of method [`get_ai_finetune_jobs`]
453#[derive(Debug, Clone, Serialize, Deserialize)]
454#[serde(untagged)]
455pub enum GetAiFinetuneJobsError {
456    UnknownValue(serde_json::Value),
457}
458
459/// struct for typed errors of method [`get_ai_finetune_presets`]
460#[derive(Debug, Clone, Serialize, Deserialize)]
461#[serde(untagged)]
462pub enum GetAiFinetunePresetsError {
463    UnknownValue(serde_json::Value),
464}
465
466/// struct for typed errors of method [`get_ai_forms`]
467#[derive(Debug, Clone, Serialize, Deserialize)]
468#[serde(untagged)]
469pub enum GetAiFormsError {
470    UnknownValue(serde_json::Value),
471}
472
473/// struct for typed errors of method [`get_ai_forms_by_owner_by_name`]
474#[derive(Debug, Clone, Serialize, Deserialize)]
475#[serde(untagged)]
476pub enum GetAiFormsByOwnerByNameError {
477    UnknownValue(serde_json::Value),
478}
479
480/// struct for typed errors of method [`get_ai_forms_data`]
481#[derive(Debug, Clone, Serialize, Deserialize)]
482#[serde(untagged)]
483pub enum GetAiFormsDataError {
484    UnknownValue(serde_json::Value),
485}
486
487/// struct for typed errors of method [`get_ai_forms_global`]
488#[derive(Debug, Clone, Serialize, Deserialize)]
489#[serde(untagged)]
490pub enum GetAiFormsGlobalError {
491    UnknownValue(serde_json::Value),
492}
493
494/// struct for typed errors of method [`get_ai_graphs`]
495#[derive(Debug, Clone, Serialize, Deserialize)]
496#[serde(untagged)]
497pub enum GetAiGraphsError {
498    UnknownValue(serde_json::Value),
499}
500
501/// struct for typed errors of method [`get_ai_graphs_by_owner_by_name`]
502#[derive(Debug, Clone, Serialize, Deserialize)]
503#[serde(untagged)]
504pub enum GetAiGraphsByOwnerByNameError {
505    UnknownValue(serde_json::Value),
506}
507
508/// struct for typed errors of method [`get_ai_graphs_global`]
509#[derive(Debug, Clone, Serialize, Deserialize)]
510#[serde(untagged)]
511pub enum GetAiGraphsGlobalError {
512    UnknownValue(serde_json::Value),
513}
514
515/// struct for typed errors of method [`get_ai_k8s_status`]
516#[derive(Debug, Clone, Serialize, Deserialize)]
517#[serde(untagged)]
518pub enum GetAiK8sStatusError {
519    UnknownValue(serde_json::Value),
520}
521
522/// struct for typed errors of method [`get_ai_memory_facts`]
523#[derive(Debug, Clone, Serialize, Deserialize)]
524#[serde(untagged)]
525pub enum GetAiMemoryFactsError {
526    UnknownValue(serde_json::Value),
527}
528
529/// struct for typed errors of method [`get_ai_memory_list`]
530#[derive(Debug, Clone, Serialize, Deserialize)]
531#[serde(untagged)]
532pub enum GetAiMemoryListError {
533    UnknownValue(serde_json::Value),
534}
535
536/// struct for typed errors of method [`get_ai_memory_recall`]
537#[derive(Debug, Clone, Serialize, Deserialize)]
538#[serde(untagged)]
539pub enum GetAiMemoryRecallError {
540    UnknownValue(serde_json::Value),
541}
542
543/// struct for typed errors of method [`get_ai_memory_search`]
544#[derive(Debug, Clone, Serialize, Deserialize)]
545#[serde(untagged)]
546pub enum GetAiMemorySearchError {
547    UnknownValue(serde_json::Value),
548}
549
550/// struct for typed errors of method [`get_ai_messages`]
551#[derive(Debug, Clone, Serialize, Deserialize)]
552#[serde(untagged)]
553pub enum GetAiMessagesError {
554    UnknownValue(serde_json::Value),
555}
556
557/// struct for typed errors of method [`get_ai_messages_by_owner_by_name`]
558#[derive(Debug, Clone, Serialize, Deserialize)]
559#[serde(untagged)]
560pub enum GetAiMessagesByOwnerByNameError {
561    UnknownValue(serde_json::Value),
562}
563
564/// struct for typed errors of method [`get_ai_messages_by_owner_by_name_answer`]
565#[derive(Debug, Clone, Serialize, Deserialize)]
566#[serde(untagged)]
567pub enum GetAiMessagesByOwnerByNameAnswerError {
568    UnknownValue(serde_json::Value),
569}
570
571/// struct for typed errors of method [`get_ai_messages_global`]
572#[derive(Debug, Clone, Serialize, Deserialize)]
573#[serde(untagged)]
574pub enum GetAiMessagesGlobalError {
575    UnknownValue(serde_json::Value),
576}
577
578/// struct for typed errors of method [`get_ai_nodes`]
579#[derive(Debug, Clone, Serialize, Deserialize)]
580#[serde(untagged)]
581pub enum GetAiNodesError {
582    UnknownValue(serde_json::Value),
583}
584
585/// struct for typed errors of method [`get_ai_nodes_by_owner_by_name`]
586#[derive(Debug, Clone, Serialize, Deserialize)]
587#[serde(untagged)]
588pub enum GetAiNodesByOwnerByNameError {
589    UnknownValue(serde_json::Value),
590}
591
592/// struct for typed errors of method [`get_ai_nodes_by_owner_by_name_tunnel`]
593#[derive(Debug, Clone, Serialize, Deserialize)]
594#[serde(untagged)]
595pub enum GetAiNodesByOwnerByNameTunnelError {
596    UnknownValue(serde_json::Value),
597}
598
599/// struct for typed errors of method [`get_ai_org_settings`]
600#[derive(Debug, Clone, Serialize, Deserialize)]
601#[serde(untagged)]
602pub enum GetAiOrgSettingsError {
603    UnknownValue(serde_json::Value),
604}
605
606/// struct for typed errors of method [`get_ai_org_settings_list`]
607#[derive(Debug, Clone, Serialize, Deserialize)]
608#[serde(untagged)]
609pub enum GetAiOrgSettingsListError {
610    UnknownValue(serde_json::Value),
611}
612
613/// struct for typed errors of method [`get_ai_prometheus`]
614#[derive(Debug, Clone, Serialize, Deserialize)]
615#[serde(untagged)]
616pub enum GetAiPrometheusError {
617    UnknownValue(serde_json::Value),
618}
619
620/// struct for typed errors of method [`get_ai_providers`]
621#[derive(Debug, Clone, Serialize, Deserialize)]
622#[serde(untagged)]
623pub enum GetAiProvidersError {
624    UnknownValue(serde_json::Value),
625}
626
627/// struct for typed errors of method [`get_ai_providers_by_owner_by_name`]
628#[derive(Debug, Clone, Serialize, Deserialize)]
629#[serde(untagged)]
630pub enum GetAiProvidersByOwnerByNameError {
631    UnknownValue(serde_json::Value),
632}
633
634/// struct for typed errors of method [`get_ai_providers_global`]
635#[derive(Debug, Clone, Serialize, Deserialize)]
636#[serde(untagged)]
637pub enum GetAiProvidersGlobalError {
638    UnknownValue(serde_json::Value),
639}
640
641/// struct for typed errors of method [`get_ai_rag_context`]
642#[derive(Debug, Clone, Serialize, Deserialize)]
643#[serde(untagged)]
644pub enum GetAiRagContextError {
645    UnknownValue(serde_json::Value),
646}
647
648/// struct for typed errors of method [`get_ai_records`]
649#[derive(Debug, Clone, Serialize, Deserialize)]
650#[serde(untagged)]
651pub enum GetAiRecordsError {
652    UnknownValue(serde_json::Value),
653}
654
655/// struct for typed errors of method [`get_ai_records_by_owner_by_name`]
656#[derive(Debug, Clone, Serialize, Deserialize)]
657#[serde(untagged)]
658pub enum GetAiRecordsByOwnerByNameError {
659    UnknownValue(serde_json::Value),
660}
661
662/// struct for typed errors of method [`get_ai_records_query`]
663#[derive(Debug, Clone, Serialize, Deserialize)]
664#[serde(untagged)]
665pub enum GetAiRecordsQueryError {
666    UnknownValue(serde_json::Value),
667}
668
669/// struct for typed errors of method [`get_ai_records_query_second`]
670#[derive(Debug, Clone, Serialize, Deserialize)]
671#[serde(untagged)]
672pub enum GetAiRecordsQuerySecondError {
673    UnknownValue(serde_json::Value),
674}
675
676/// struct for typed errors of method [`get_ai_remote_connections`]
677#[derive(Debug, Clone, Serialize, Deserialize)]
678#[serde(untagged)]
679pub enum GetAiRemoteConnectionsError {
680    UnknownValue(serde_json::Value),
681}
682
683/// struct for typed errors of method [`get_ai_remote_connections_by_owner_by_name`]
684#[derive(Debug, Clone, Serialize, Deserialize)]
685#[serde(untagged)]
686pub enum GetAiRemoteConnectionsByOwnerByNameError {
687    UnknownValue(serde_json::Value),
688}
689
690/// struct for typed errors of method [`get_ai_router_artifact_meta`]
691#[derive(Debug, Clone, Serialize, Deserialize)]
692#[serde(untagged)]
693pub enum GetAiRouterArtifactMetaError {
694    UnknownValue(serde_json::Value),
695}
696
697/// struct for typed errors of method [`get_ai_router_data`]
698#[derive(Debug, Clone, Serialize, Deserialize)]
699#[serde(untagged)]
700pub enum GetAiRouterDataError {
701    UnknownValue(serde_json::Value),
702}
703
704/// struct for typed errors of method [`get_ai_router_defaults`]
705#[derive(Debug, Clone, Serialize, Deserialize)]
706#[serde(untagged)]
707pub enum GetAiRouterDefaultsError {
708    UnknownValue(serde_json::Value),
709}
710
711/// struct for typed errors of method [`get_ai_router_history`]
712#[derive(Debug, Clone, Serialize, Deserialize)]
713#[serde(untagged)]
714pub enum GetAiRouterHistoryError {
715    UnknownValue(serde_json::Value),
716}
717
718/// struct for typed errors of method [`get_ai_router_judge_panel`]
719#[derive(Debug, Clone, Serialize, Deserialize)]
720#[serde(untagged)]
721pub enum GetAiRouterJudgePanelError {
722    UnknownValue(serde_json::Value),
723}
724
725/// struct for typed errors of method [`get_ai_router_ledger`]
726#[derive(Debug, Clone, Serialize, Deserialize)]
727#[serde(untagged)]
728pub enum GetAiRouterLedgerError {
729    UnknownValue(serde_json::Value),
730}
731
732/// struct for typed errors of method [`get_ai_router_policy`]
733#[derive(Debug, Clone, Serialize, Deserialize)]
734#[serde(untagged)]
735pub enum GetAiRouterPolicyError {
736    UnknownValue(serde_json::Value),
737}
738
739/// struct for typed errors of method [`get_ai_router_rewards`]
740#[derive(Debug, Clone, Serialize, Deserialize)]
741#[serde(untagged)]
742pub enum GetAiRouterRewardsError {
743    UnknownValue(serde_json::Value),
744}
745
746/// struct for typed errors of method [`get_ai_router_stats`]
747#[derive(Debug, Clone, Serialize, Deserialize)]
748#[serde(untagged)]
749pub enum GetAiRouterStatsError {
750    UnknownValue(serde_json::Value),
751}
752
753/// struct for typed errors of method [`get_ai_routes`]
754#[derive(Debug, Clone, Serialize, Deserialize)]
755#[serde(untagged)]
756pub enum GetAiRoutesError {
757    UnknownValue(serde_json::Value),
758}
759
760/// struct for typed errors of method [`get_ai_routes_by_owner_by_name`]
761#[derive(Debug, Clone, Serialize, Deserialize)]
762#[serde(untagged)]
763pub enum GetAiRoutesByOwnerByNameError {
764    UnknownValue(serde_json::Value),
765}
766
767/// struct for typed errors of method [`get_ai_scales`]
768#[derive(Debug, Clone, Serialize, Deserialize)]
769#[serde(untagged)]
770pub enum GetAiScalesError {
771    UnknownValue(serde_json::Value),
772}
773
774/// struct for typed errors of method [`get_ai_scales_by_owner_by_name`]
775#[derive(Debug, Clone, Serialize, Deserialize)]
776#[serde(untagged)]
777pub enum GetAiScalesByOwnerByNameError {
778    UnknownValue(serde_json::Value),
779}
780
781/// struct for typed errors of method [`get_ai_scales_global`]
782#[derive(Debug, Clone, Serialize, Deserialize)]
783#[serde(untagged)]
784pub enum GetAiScalesGlobalError {
785    UnknownValue(serde_json::Value),
786}
787
788/// struct for typed errors of method [`get_ai_scales_public`]
789#[derive(Debug, Clone, Serialize, Deserialize)]
790#[serde(untagged)]
791pub enum GetAiScalesPublicError {
792    UnknownValue(serde_json::Value),
793}
794
795/// struct for typed errors of method [`get_ai_scans`]
796#[derive(Debug, Clone, Serialize, Deserialize)]
797#[serde(untagged)]
798pub enum GetAiScansError {
799    UnknownValue(serde_json::Value),
800}
801
802/// struct for typed errors of method [`get_ai_scans_by_owner_by_name`]
803#[derive(Debug, Clone, Serialize, Deserialize)]
804#[serde(untagged)]
805pub enum GetAiScansByOwnerByNameError {
806    UnknownValue(serde_json::Value),
807}
808
809/// struct for typed errors of method [`get_ai_signin_sessions`]
810#[derive(Debug, Clone, Serialize, Deserialize)]
811#[serde(untagged)]
812pub enum GetAiSigninSessionsError {
813    UnknownValue(serde_json::Value),
814}
815
816/// struct for typed errors of method [`get_ai_signin_sessions_by_owner_by_name`]
817#[derive(Debug, Clone, Serialize, Deserialize)]
818#[serde(untagged)]
819pub enum GetAiSigninSessionsByOwnerByNameError {
820    UnknownValue(serde_json::Value),
821}
822
823/// struct for typed errors of method [`get_ai_signin_sessions_duplicated`]
824#[derive(Debug, Clone, Serialize, Deserialize)]
825#[serde(untagged)]
826pub enum GetAiSigninSessionsDuplicatedError {
827    UnknownValue(serde_json::Value),
828}
829
830/// struct for typed errors of method [`get_ai_stores`]
831#[derive(Debug, Clone, Serialize, Deserialize)]
832#[serde(untagged)]
833pub enum GetAiStoresError {
834    UnknownValue(serde_json::Value),
835}
836
837/// struct for typed errors of method [`get_ai_stores_by_owner_by_name`]
838#[derive(Debug, Clone, Serialize, Deserialize)]
839#[serde(untagged)]
840pub enum GetAiStoresByOwnerByNameError {
841    UnknownValue(serde_json::Value),
842}
843
844/// struct for typed errors of method [`get_ai_stores_global`]
845#[derive(Debug, Clone, Serialize, Deserialize)]
846#[serde(untagged)]
847pub enum GetAiStoresGlobalError {
848    UnknownValue(serde_json::Value),
849}
850
851/// struct for typed errors of method [`get_ai_stores_names`]
852#[derive(Debug, Clone, Serialize, Deserialize)]
853#[serde(untagged)]
854pub enum GetAiStoresNamesError {
855    UnknownValue(serde_json::Value),
856}
857
858/// struct for typed errors of method [`get_ai_stores_providers`]
859#[derive(Debug, Clone, Serialize, Deserialize)]
860#[serde(untagged)]
861pub enum GetAiStoresProvidersError {
862    UnknownValue(serde_json::Value),
863}
864
865/// struct for typed errors of method [`get_ai_system`]
866#[derive(Debug, Clone, Serialize, Deserialize)]
867#[serde(untagged)]
868pub enum GetAiSystemError {
869    UnknownValue(serde_json::Value),
870}
871
872/// struct for typed errors of method [`get_ai_tasks`]
873#[derive(Debug, Clone, Serialize, Deserialize)]
874#[serde(untagged)]
875pub enum GetAiTasksError {
876    UnknownValue(serde_json::Value),
877}
878
879/// struct for typed errors of method [`get_ai_tasks_by_owner_by_name`]
880#[derive(Debug, Clone, Serialize, Deserialize)]
881#[serde(untagged)]
882pub enum GetAiTasksByOwnerByNameError {
883    UnknownValue(serde_json::Value),
884}
885
886/// struct for typed errors of method [`get_ai_tasks_global`]
887#[derive(Debug, Clone, Serialize, Deserialize)]
888#[serde(untagged)]
889pub enum GetAiTasksGlobalError {
890    UnknownValue(serde_json::Value),
891}
892
893/// struct for typed errors of method [`get_ai_templates`]
894#[derive(Debug, Clone, Serialize, Deserialize)]
895#[serde(untagged)]
896pub enum GetAiTemplatesError {
897    UnknownValue(serde_json::Value),
898}
899
900/// struct for typed errors of method [`get_ai_templates_by_owner_by_name`]
901#[derive(Debug, Clone, Serialize, Deserialize)]
902#[serde(untagged)]
903pub enum GetAiTemplatesByOwnerByNameError {
904    UnknownValue(serde_json::Value),
905}
906
907/// struct for typed errors of method [`get_ai_traffic_globe`]
908#[derive(Debug, Clone, Serialize, Deserialize)]
909#[serde(untagged)]
910pub enum GetAiTrafficGlobeError {
911    UnknownValue(serde_json::Value),
912}
913
914/// struct for typed errors of method [`get_ai_training_contribution`]
915#[derive(Debug, Clone, Serialize, Deserialize)]
916#[serde(untagged)]
917pub enum GetAiTrainingContributionError {
918    UnknownValue(serde_json::Value),
919}
920
921/// struct for typed errors of method [`get_ai_usages`]
922#[derive(Debug, Clone, Serialize, Deserialize)]
923#[serde(untagged)]
924pub enum GetAiUsagesError {
925    UnknownValue(serde_json::Value),
926}
927
928/// struct for typed errors of method [`get_ai_usages_by_user`]
929#[derive(Debug, Clone, Serialize, Deserialize)]
930#[serde(untagged)]
931pub enum GetAiUsagesByUserError {
932    UnknownValue(serde_json::Value),
933}
934
935/// struct for typed errors of method [`get_ai_usages_cloud`]
936#[derive(Debug, Clone, Serialize, Deserialize)]
937#[serde(untagged)]
938pub enum GetAiUsagesCloudError {
939    UnknownValue(serde_json::Value),
940}
941
942/// struct for typed errors of method [`get_ai_usages_range`]
943#[derive(Debug, Clone, Serialize, Deserialize)]
944#[serde(untagged)]
945pub enum GetAiUsagesRangeError {
946    UnknownValue(serde_json::Value),
947}
948
949/// struct for typed errors of method [`get_ai_usages_user_names`]
950#[derive(Debug, Clone, Serialize, Deserialize)]
951#[serde(untagged)]
952pub enum GetAiUsagesUserNamesError {
953    UnknownValue(serde_json::Value),
954}
955
956/// struct for typed errors of method [`get_ai_vectors`]
957#[derive(Debug, Clone, Serialize, Deserialize)]
958#[serde(untagged)]
959pub enum GetAiVectorsError {
960    UnknownValue(serde_json::Value),
961}
962
963/// struct for typed errors of method [`get_ai_vectors_by_owner_by_name`]
964#[derive(Debug, Clone, Serialize, Deserialize)]
965#[serde(untagged)]
966pub enum GetAiVectorsByOwnerByNameError {
967    UnknownValue(serde_json::Value),
968}
969
970/// struct for typed errors of method [`get_ai_vectors_global`]
971#[derive(Debug, Clone, Serialize, Deserialize)]
972#[serde(untagged)]
973pub enum GetAiVectorsGlobalError {
974    UnknownValue(serde_json::Value),
975}
976
977/// struct for typed errors of method [`get_ai_version`]
978#[derive(Debug, Clone, Serialize, Deserialize)]
979#[serde(untagged)]
980pub enum GetAiVersionError {
981    UnknownValue(serde_json::Value),
982}
983
984/// struct for typed errors of method [`get_ai_videos`]
985#[derive(Debug, Clone, Serialize, Deserialize)]
986#[serde(untagged)]
987pub enum GetAiVideosError {
988    UnknownValue(serde_json::Value),
989}
990
991/// struct for typed errors of method [`get_ai_videos_by_owner_by_name`]
992#[derive(Debug, Clone, Serialize, Deserialize)]
993#[serde(untagged)]
994pub enum GetAiVideosByOwnerByNameError {
995    UnknownValue(serde_json::Value),
996}
997
998/// struct for typed errors of method [`get_ai_videos_global`]
999#[derive(Debug, Clone, Serialize, Deserialize)]
1000#[serde(untagged)]
1001pub enum GetAiVideosGlobalError {
1002    UnknownValue(serde_json::Value),
1003}
1004
1005/// struct for typed errors of method [`get_ai_workflows`]
1006#[derive(Debug, Clone, Serialize, Deserialize)]
1007#[serde(untagged)]
1008pub enum GetAiWorkflowsError {
1009    UnknownValue(serde_json::Value),
1010}
1011
1012/// struct for typed errors of method [`get_ai_workflows_by_owner_by_name`]
1013#[derive(Debug, Clone, Serialize, Deserialize)]
1014#[serde(untagged)]
1015pub enum GetAiWorkflowsByOwnerByNameError {
1016    UnknownValue(serde_json::Value),
1017}
1018
1019/// struct for typed errors of method [`get_ai_workflows_global`]
1020#[derive(Debug, Clone, Serialize, Deserialize)]
1021#[serde(untagged)]
1022pub enum GetAiWorkflowsGlobalError {
1023    UnknownValue(serde_json::Value),
1024}
1025
1026/// struct for typed errors of method [`get_models`]
1027#[derive(Debug, Clone, Serialize, Deserialize)]
1028#[serde(untagged)]
1029pub enum GetModelsError {
1030    UnknownValue(serde_json::Value),
1031}
1032
1033/// struct for typed errors of method [`get_models_by_model_access`]
1034#[derive(Debug, Clone, Serialize, Deserialize)]
1035#[serde(untagged)]
1036pub enum GetModelsByModelAccessError {
1037    UnknownValue(serde_json::Value),
1038}
1039
1040/// struct for typed errors of method [`get_models_providers`]
1041#[derive(Debug, Clone, Serialize, Deserialize)]
1042#[serde(untagged)]
1043pub enum GetModelsProvidersError {
1044    UnknownValue(serde_json::Value),
1045}
1046
1047/// struct for typed errors of method [`get_videos_by_id`]
1048#[derive(Debug, Clone, Serialize, Deserialize)]
1049#[serde(untagged)]
1050pub enum GetVideosByIdError {
1051    UnknownValue(serde_json::Value),
1052}
1053
1054/// struct for typed errors of method [`get_videos_by_id_content`]
1055#[derive(Debug, Clone, Serialize, Deserialize)]
1056#[serde(untagged)]
1057pub enum GetVideosByIdContentError {
1058    UnknownValue(serde_json::Value),
1059}
1060
1061/// struct for typed errors of method [`patch_ai_articles_by_owner_by_name`]
1062#[derive(Debug, Clone, Serialize, Deserialize)]
1063#[serde(untagged)]
1064pub enum PatchAiArticlesByOwnerByNameError {
1065    UnknownValue(serde_json::Value),
1066}
1067
1068/// struct for typed errors of method [`patch_ai_assets_by_owner_by_name`]
1069#[derive(Debug, Clone, Serialize, Deserialize)]
1070#[serde(untagged)]
1071pub enum PatchAiAssetsByOwnerByNameError {
1072    UnknownValue(serde_json::Value),
1073}
1074
1075/// struct for typed errors of method [`patch_ai_chats_by_owner_by_name`]
1076#[derive(Debug, Clone, Serialize, Deserialize)]
1077#[serde(untagged)]
1078pub enum PatchAiChatsByOwnerByNameError {
1079    UnknownValue(serde_json::Value),
1080}
1081
1082/// struct for typed errors of method [`patch_ai_deployments_by_owner_by_name`]
1083#[derive(Debug, Clone, Serialize, Deserialize)]
1084#[serde(untagged)]
1085pub enum PatchAiDeploymentsByOwnerByNameError {
1086    UnknownValue(serde_json::Value),
1087}
1088
1089/// struct for typed errors of method [`patch_ai_files_by_owner_by_name`]
1090#[derive(Debug, Clone, Serialize, Deserialize)]
1091#[serde(untagged)]
1092pub enum PatchAiFilesByOwnerByNameError {
1093    UnknownValue(serde_json::Value),
1094}
1095
1096/// struct for typed errors of method [`patch_ai_forms_by_owner_by_name`]
1097#[derive(Debug, Clone, Serialize, Deserialize)]
1098#[serde(untagged)]
1099pub enum PatchAiFormsByOwnerByNameError {
1100    UnknownValue(serde_json::Value),
1101}
1102
1103/// struct for typed errors of method [`patch_ai_graphs_by_owner_by_name`]
1104#[derive(Debug, Clone, Serialize, Deserialize)]
1105#[serde(untagged)]
1106pub enum PatchAiGraphsByOwnerByNameError {
1107    UnknownValue(serde_json::Value),
1108}
1109
1110/// struct for typed errors of method [`patch_ai_messages_by_owner_by_name`]
1111#[derive(Debug, Clone, Serialize, Deserialize)]
1112#[serde(untagged)]
1113pub enum PatchAiMessagesByOwnerByNameError {
1114    UnknownValue(serde_json::Value),
1115}
1116
1117/// struct for typed errors of method [`patch_ai_nodes_by_owner_by_name`]
1118#[derive(Debug, Clone, Serialize, Deserialize)]
1119#[serde(untagged)]
1120pub enum PatchAiNodesByOwnerByNameError {
1121    UnknownValue(serde_json::Value),
1122}
1123
1124/// struct for typed errors of method [`patch_ai_org_settings`]
1125#[derive(Debug, Clone, Serialize, Deserialize)]
1126#[serde(untagged)]
1127pub enum PatchAiOrgSettingsError {
1128    UnknownValue(serde_json::Value),
1129}
1130
1131/// struct for typed errors of method [`patch_ai_org_settings_list`]
1132#[derive(Debug, Clone, Serialize, Deserialize)]
1133#[serde(untagged)]
1134pub enum PatchAiOrgSettingsListError {
1135    UnknownValue(serde_json::Value),
1136}
1137
1138/// struct for typed errors of method [`patch_ai_preferences`]
1139#[derive(Debug, Clone, Serialize, Deserialize)]
1140#[serde(untagged)]
1141pub enum PatchAiPreferencesError {
1142    UnknownValue(serde_json::Value),
1143}
1144
1145/// struct for typed errors of method [`patch_ai_providers_by_owner_by_name`]
1146#[derive(Debug, Clone, Serialize, Deserialize)]
1147#[serde(untagged)]
1148pub enum PatchAiProvidersByOwnerByNameError {
1149    UnknownValue(serde_json::Value),
1150}
1151
1152/// struct for typed errors of method [`patch_ai_records_by_owner_by_name`]
1153#[derive(Debug, Clone, Serialize, Deserialize)]
1154#[serde(untagged)]
1155pub enum PatchAiRecordsByOwnerByNameError {
1156    UnknownValue(serde_json::Value),
1157}
1158
1159/// struct for typed errors of method [`patch_ai_remote_connections_by_owner_by_name`]
1160#[derive(Debug, Clone, Serialize, Deserialize)]
1161#[serde(untagged)]
1162pub enum PatchAiRemoteConnectionsByOwnerByNameError {
1163    UnknownValue(serde_json::Value),
1164}
1165
1166/// struct for typed errors of method [`patch_ai_router_artifact_meta`]
1167#[derive(Debug, Clone, Serialize, Deserialize)]
1168#[serde(untagged)]
1169pub enum PatchAiRouterArtifactMetaError {
1170    UnknownValue(serde_json::Value),
1171}
1172
1173/// struct for typed errors of method [`patch_ai_router_defaults`]
1174#[derive(Debug, Clone, Serialize, Deserialize)]
1175#[serde(untagged)]
1176pub enum PatchAiRouterDefaultsError {
1177    UnknownValue(serde_json::Value),
1178}
1179
1180/// struct for typed errors of method [`patch_ai_router_ledger`]
1181#[derive(Debug, Clone, Serialize, Deserialize)]
1182#[serde(untagged)]
1183pub enum PatchAiRouterLedgerError {
1184    UnknownValue(serde_json::Value),
1185}
1186
1187/// struct for typed errors of method [`patch_ai_router_policy`]
1188#[derive(Debug, Clone, Serialize, Deserialize)]
1189#[serde(untagged)]
1190pub enum PatchAiRouterPolicyError {
1191    UnknownValue(serde_json::Value),
1192}
1193
1194/// struct for typed errors of method [`patch_ai_router_rewards`]
1195#[derive(Debug, Clone, Serialize, Deserialize)]
1196#[serde(untagged)]
1197pub enum PatchAiRouterRewardsError {
1198    UnknownValue(serde_json::Value),
1199}
1200
1201/// struct for typed errors of method [`patch_ai_routes_by_owner_by_name`]
1202#[derive(Debug, Clone, Serialize, Deserialize)]
1203#[serde(untagged)]
1204pub enum PatchAiRoutesByOwnerByNameError {
1205    UnknownValue(serde_json::Value),
1206}
1207
1208/// struct for typed errors of method [`patch_ai_scales_by_owner_by_name`]
1209#[derive(Debug, Clone, Serialize, Deserialize)]
1210#[serde(untagged)]
1211pub enum PatchAiScalesByOwnerByNameError {
1212    UnknownValue(serde_json::Value),
1213}
1214
1215/// struct for typed errors of method [`patch_ai_scans_by_owner_by_name`]
1216#[derive(Debug, Clone, Serialize, Deserialize)]
1217#[serde(untagged)]
1218pub enum PatchAiScansByOwnerByNameError {
1219    UnknownValue(serde_json::Value),
1220}
1221
1222/// struct for typed errors of method [`patch_ai_signin_sessions_by_owner_by_name`]
1223#[derive(Debug, Clone, Serialize, Deserialize)]
1224#[serde(untagged)]
1225pub enum PatchAiSigninSessionsByOwnerByNameError {
1226    UnknownValue(serde_json::Value),
1227}
1228
1229/// struct for typed errors of method [`patch_ai_stores_by_owner_by_name`]
1230#[derive(Debug, Clone, Serialize, Deserialize)]
1231#[serde(untagged)]
1232pub enum PatchAiStoresByOwnerByNameError {
1233    UnknownValue(serde_json::Value),
1234}
1235
1236/// struct for typed errors of method [`patch_ai_tasks_by_owner_by_name`]
1237#[derive(Debug, Clone, Serialize, Deserialize)]
1238#[serde(untagged)]
1239pub enum PatchAiTasksByOwnerByNameError {
1240    UnknownValue(serde_json::Value),
1241}
1242
1243/// struct for typed errors of method [`patch_ai_templates_by_owner_by_name`]
1244#[derive(Debug, Clone, Serialize, Deserialize)]
1245#[serde(untagged)]
1246pub enum PatchAiTemplatesByOwnerByNameError {
1247    UnknownValue(serde_json::Value),
1248}
1249
1250/// struct for typed errors of method [`patch_ai_training_contribution`]
1251#[derive(Debug, Clone, Serialize, Deserialize)]
1252#[serde(untagged)]
1253pub enum PatchAiTrainingContributionError {
1254    UnknownValue(serde_json::Value),
1255}
1256
1257/// struct for typed errors of method [`patch_ai_tree_files_by_owner_by_name`]
1258#[derive(Debug, Clone, Serialize, Deserialize)]
1259#[serde(untagged)]
1260pub enum PatchAiTreeFilesByOwnerByNameError {
1261    UnknownValue(serde_json::Value),
1262}
1263
1264/// struct for typed errors of method [`patch_ai_vectors_by_owner_by_name`]
1265#[derive(Debug, Clone, Serialize, Deserialize)]
1266#[serde(untagged)]
1267pub enum PatchAiVectorsByOwnerByNameError {
1268    UnknownValue(serde_json::Value),
1269}
1270
1271/// struct for typed errors of method [`patch_ai_videos_by_owner_by_name`]
1272#[derive(Debug, Clone, Serialize, Deserialize)]
1273#[serde(untagged)]
1274pub enum PatchAiVideosByOwnerByNameError {
1275    UnknownValue(serde_json::Value),
1276}
1277
1278/// struct for typed errors of method [`patch_ai_workflows_by_owner_by_name`]
1279#[derive(Debug, Clone, Serialize, Deserialize)]
1280#[serde(untagged)]
1281pub enum PatchAiWorkflowsByOwnerByNameError {
1282    UnknownValue(serde_json::Value),
1283}
1284
1285/// struct for typed errors of method [`post_ai_articles`]
1286#[derive(Debug, Clone, Serialize, Deserialize)]
1287#[serde(untagged)]
1288pub enum PostAiArticlesError {
1289    UnknownValue(serde_json::Value),
1290}
1291
1292/// struct for typed errors of method [`post_ai_assets`]
1293#[derive(Debug, Clone, Serialize, Deserialize)]
1294#[serde(untagged)]
1295pub enum PostAiAssetsError {
1296    UnknownValue(serde_json::Value),
1297}
1298
1299/// struct for typed errors of method [`post_ai_assets_by_owner_by_name_scan`]
1300#[derive(Debug, Clone, Serialize, Deserialize)]
1301#[serde(untagged)]
1302pub enum PostAiAssetsByOwnerByNameScanError {
1303    UnknownValue(serde_json::Value),
1304}
1305
1306/// struct for typed errors of method [`post_ai_assets_scan`]
1307#[derive(Debug, Clone, Serialize, Deserialize)]
1308#[serde(untagged)]
1309pub enum PostAiAssetsScanError {
1310    UnknownValue(serde_json::Value),
1311}
1312
1313/// struct for typed errors of method [`post_ai_chats`]
1314#[derive(Debug, Clone, Serialize, Deserialize)]
1315#[serde(untagged)]
1316pub enum PostAiChatsError {
1317    UnknownValue(serde_json::Value),
1318}
1319
1320/// struct for typed errors of method [`post_ai_connections`]
1321#[derive(Debug, Clone, Serialize, Deserialize)]
1322#[serde(untagged)]
1323pub enum PostAiConnectionsError {
1324    UnknownValue(serde_json::Value),
1325}
1326
1327/// struct for typed errors of method [`post_ai_connections_by_provider`]
1328#[derive(Debug, Clone, Serialize, Deserialize)]
1329#[serde(untagged)]
1330pub enum PostAiConnectionsByProviderError {
1331    UnknownValue(serde_json::Value),
1332}
1333
1334/// struct for typed errors of method [`post_ai_deployments`]
1335#[derive(Debug, Clone, Serialize, Deserialize)]
1336#[serde(untagged)]
1337pub enum PostAiDeploymentsError {
1338    UnknownValue(serde_json::Value),
1339}
1340
1341/// struct for typed errors of method [`post_ai_deployments_by_owner_by_name_deploy`]
1342#[derive(Debug, Clone, Serialize, Deserialize)]
1343#[serde(untagged)]
1344pub enum PostAiDeploymentsByOwnerByNameDeployError {
1345    UnknownValue(serde_json::Value),
1346}
1347
1348/// struct for typed errors of method [`post_ai_deployments_by_owner_by_name_undeploy`]
1349#[derive(Debug, Clone, Serialize, Deserialize)]
1350#[serde(untagged)]
1351pub enum PostAiDeploymentsByOwnerByNameUndeployError {
1352    UnknownValue(serde_json::Value),
1353}
1354
1355/// struct for typed errors of method [`post_ai_feedback`]
1356#[derive(Debug, Clone, Serialize, Deserialize)]
1357#[serde(untagged)]
1358pub enum PostAiFeedbackError {
1359    UnknownValue(serde_json::Value),
1360}
1361
1362/// struct for typed errors of method [`post_ai_files`]
1363#[derive(Debug, Clone, Serialize, Deserialize)]
1364#[serde(untagged)]
1365pub enum PostAiFilesError {
1366    UnknownValue(serde_json::Value),
1367}
1368
1369/// struct for typed errors of method [`post_ai_files_activate`]
1370#[derive(Debug, Clone, Serialize, Deserialize)]
1371#[serde(untagged)]
1372pub enum PostAiFilesActivateError {
1373    UnknownValue(serde_json::Value),
1374}
1375
1376/// struct for typed errors of method [`post_ai_files_by_owner_by_name_vectors`]
1377#[derive(Debug, Clone, Serialize, Deserialize)]
1378#[serde(untagged)]
1379pub enum PostAiFilesByOwnerByNameVectorsError {
1380    UnknownValue(serde_json::Value),
1381}
1382
1383/// struct for typed errors of method [`post_ai_files_upload`]
1384#[derive(Debug, Clone, Serialize, Deserialize)]
1385#[serde(untagged)]
1386pub enum PostAiFilesUploadError {
1387    UnknownValue(serde_json::Value),
1388}
1389
1390/// struct for typed errors of method [`post_ai_finetune_cancel`]
1391#[derive(Debug, Clone, Serialize, Deserialize)]
1392#[serde(untagged)]
1393pub enum PostAiFinetuneCancelError {
1394    UnknownValue(serde_json::Value),
1395}
1396
1397/// struct for typed errors of method [`post_ai_finetune_deploy`]
1398#[derive(Debug, Clone, Serialize, Deserialize)]
1399#[serde(untagged)]
1400pub enum PostAiFinetuneDeployError {
1401    UnknownValue(serde_json::Value),
1402}
1403
1404/// struct for typed errors of method [`post_ai_finetune_jobs`]
1405#[derive(Debug, Clone, Serialize, Deserialize)]
1406#[serde(untagged)]
1407pub enum PostAiFinetuneJobsError {
1408    UnknownValue(serde_json::Value),
1409}
1410
1411/// struct for typed errors of method [`post_ai_forms`]
1412#[derive(Debug, Clone, Serialize, Deserialize)]
1413#[serde(untagged)]
1414pub enum PostAiFormsError {
1415    UnknownValue(serde_json::Value),
1416}
1417
1418/// struct for typed errors of method [`post_ai_graphs`]
1419#[derive(Debug, Clone, Serialize, Deserialize)]
1420#[serde(untagged)]
1421pub enum PostAiGraphsError {
1422    UnknownValue(serde_json::Value),
1423}
1424
1425/// struct for typed errors of method [`post_ai_memory_delete`]
1426#[derive(Debug, Clone, Serialize, Deserialize)]
1427#[serde(untagged)]
1428pub enum PostAiMemoryDeleteError {
1429    UnknownValue(serde_json::Value),
1430}
1431
1432/// struct for typed errors of method [`post_ai_memory_remember`]
1433#[derive(Debug, Clone, Serialize, Deserialize)]
1434#[serde(untagged)]
1435pub enum PostAiMemoryRememberError {
1436    UnknownValue(serde_json::Value),
1437}
1438
1439/// struct for typed errors of method [`post_ai_memory_update`]
1440#[derive(Debug, Clone, Serialize, Deserialize)]
1441#[serde(untagged)]
1442pub enum PostAiMemoryUpdateError {
1443    UnknownValue(serde_json::Value),
1444}
1445
1446/// struct for typed errors of method [`post_ai_messages`]
1447#[derive(Debug, Clone, Serialize, Deserialize)]
1448#[serde(untagged)]
1449pub enum PostAiMessagesError {
1450    UnknownValue(serde_json::Value),
1451}
1452
1453/// struct for typed errors of method [`post_ai_nodes`]
1454#[derive(Debug, Clone, Serialize, Deserialize)]
1455#[serde(untagged)]
1456pub enum PostAiNodesError {
1457    UnknownValue(serde_json::Value),
1458}
1459
1460/// struct for typed errors of method [`post_ai_nodes_by_owner_by_name_tunnel`]
1461#[derive(Debug, Clone, Serialize, Deserialize)]
1462#[serde(untagged)]
1463pub enum PostAiNodesByOwnerByNameTunnelError {
1464    UnknownValue(serde_json::Value),
1465}
1466
1467/// struct for typed errors of method [`post_ai_org_settings`]
1468#[derive(Debug, Clone, Serialize, Deserialize)]
1469#[serde(untagged)]
1470pub enum PostAiOrgSettingsError {
1471    UnknownValue(serde_json::Value),
1472}
1473
1474/// struct for typed errors of method [`post_ai_org_settings_list`]
1475#[derive(Debug, Clone, Serialize, Deserialize)]
1476#[serde(untagged)]
1477pub enum PostAiOrgSettingsListError {
1478    UnknownValue(serde_json::Value),
1479}
1480
1481/// struct for typed errors of method [`post_ai_providers`]
1482#[derive(Debug, Clone, Serialize, Deserialize)]
1483#[serde(untagged)]
1484pub enum PostAiProvidersError {
1485    UnknownValue(serde_json::Value),
1486}
1487
1488/// struct for typed errors of method [`post_ai_providers_mcp_tools`]
1489#[derive(Debug, Clone, Serialize, Deserialize)]
1490#[serde(untagged)]
1491pub enum PostAiProvidersMcpToolsError {
1492    UnknownValue(serde_json::Value),
1493}
1494
1495/// struct for typed errors of method [`post_ai_rag_delete`]
1496#[derive(Debug, Clone, Serialize, Deserialize)]
1497#[serde(untagged)]
1498pub enum PostAiRagDeleteError {
1499    UnknownValue(serde_json::Value),
1500}
1501
1502/// struct for typed errors of method [`post_ai_rag_embed`]
1503#[derive(Debug, Clone, Serialize, Deserialize)]
1504#[serde(untagged)]
1505pub enum PostAiRagEmbedError {
1506    UnknownValue(serde_json::Value),
1507}
1508
1509/// struct for typed errors of method [`post_ai_rag_ingest`]
1510#[derive(Debug, Clone, Serialize, Deserialize)]
1511#[serde(untagged)]
1512pub enum PostAiRagIngestError {
1513    UnknownValue(serde_json::Value),
1514}
1515
1516/// struct for typed errors of method [`post_ai_rag_query`]
1517#[derive(Debug, Clone, Serialize, Deserialize)]
1518#[serde(untagged)]
1519pub enum PostAiRagQueryError {
1520    UnknownValue(serde_json::Value),
1521}
1522
1523/// struct for typed errors of method [`post_ai_rag_query_multiple`]
1524#[derive(Debug, Clone, Serialize, Deserialize)]
1525#[serde(untagged)]
1526pub enum PostAiRagQueryMultipleError {
1527    UnknownValue(serde_json::Value),
1528}
1529
1530/// struct for typed errors of method [`post_ai_records`]
1531#[derive(Debug, Clone, Serialize, Deserialize)]
1532#[serde(untagged)]
1533pub enum PostAiRecordsError {
1534    UnknownValue(serde_json::Value),
1535}
1536
1537/// struct for typed errors of method [`post_ai_records_batch`]
1538#[derive(Debug, Clone, Serialize, Deserialize)]
1539#[serde(untagged)]
1540pub enum PostAiRecordsBatchError {
1541    UnknownValue(serde_json::Value),
1542}
1543
1544/// struct for typed errors of method [`post_ai_records_commit`]
1545#[derive(Debug, Clone, Serialize, Deserialize)]
1546#[serde(untagged)]
1547pub enum PostAiRecordsCommitError {
1548    UnknownValue(serde_json::Value),
1549}
1550
1551/// struct for typed errors of method [`post_ai_records_commit_second`]
1552#[derive(Debug, Clone, Serialize, Deserialize)]
1553#[serde(untagged)]
1554pub enum PostAiRecordsCommitSecondError {
1555    UnknownValue(serde_json::Value),
1556}
1557
1558/// struct for typed errors of method [`post_ai_remote_connections`]
1559#[derive(Debug, Clone, Serialize, Deserialize)]
1560#[serde(untagged)]
1561pub enum PostAiRemoteConnectionsError {
1562    UnknownValue(serde_json::Value),
1563}
1564
1565/// struct for typed errors of method [`post_ai_remote_connections_by_owner_by_name_start`]
1566#[derive(Debug, Clone, Serialize, Deserialize)]
1567#[serde(untagged)]
1568pub enum PostAiRemoteConnectionsByOwnerByNameStartError {
1569    UnknownValue(serde_json::Value),
1570}
1571
1572/// struct for typed errors of method [`post_ai_remote_connections_by_owner_by_name_stop`]
1573#[derive(Debug, Clone, Serialize, Deserialize)]
1574#[serde(untagged)]
1575pub enum PostAiRemoteConnectionsByOwnerByNameStopError {
1576    UnknownValue(serde_json::Value),
1577}
1578
1579/// struct for typed errors of method [`post_ai_router_artifact_meta`]
1580#[derive(Debug, Clone, Serialize, Deserialize)]
1581#[serde(untagged)]
1582pub enum PostAiRouterArtifactMetaError {
1583    UnknownValue(serde_json::Value),
1584}
1585
1586/// struct for typed errors of method [`post_ai_router_defaults`]
1587#[derive(Debug, Clone, Serialize, Deserialize)]
1588#[serde(untagged)]
1589pub enum PostAiRouterDefaultsError {
1590    UnknownValue(serde_json::Value),
1591}
1592
1593/// struct for typed errors of method [`post_ai_router_ledger`]
1594#[derive(Debug, Clone, Serialize, Deserialize)]
1595#[serde(untagged)]
1596pub enum PostAiRouterLedgerError {
1597    UnknownValue(serde_json::Value),
1598}
1599
1600/// struct for typed errors of method [`post_ai_router_policy`]
1601#[derive(Debug, Clone, Serialize, Deserialize)]
1602#[serde(untagged)]
1603pub enum PostAiRouterPolicyError {
1604    UnknownValue(serde_json::Value),
1605}
1606
1607/// struct for typed errors of method [`post_ai_router_rewards`]
1608#[derive(Debug, Clone, Serialize, Deserialize)]
1609#[serde(untagged)]
1610pub enum PostAiRouterRewardsError {
1611    UnknownValue(serde_json::Value),
1612}
1613
1614/// struct for typed errors of method [`post_ai_routes`]
1615#[derive(Debug, Clone, Serialize, Deserialize)]
1616#[serde(untagged)]
1617pub enum PostAiRoutesError {
1618    UnknownValue(serde_json::Value),
1619}
1620
1621/// struct for typed errors of method [`post_ai_scales`]
1622#[derive(Debug, Clone, Serialize, Deserialize)]
1623#[serde(untagged)]
1624pub enum PostAiScalesError {
1625    UnknownValue(serde_json::Value),
1626}
1627
1628/// struct for typed errors of method [`post_ai_scans`]
1629#[derive(Debug, Clone, Serialize, Deserialize)]
1630#[serde(untagged)]
1631pub enum PostAiScansError {
1632    UnknownValue(serde_json::Value),
1633}
1634
1635/// struct for typed errors of method [`post_ai_signin`]
1636#[derive(Debug, Clone, Serialize, Deserialize)]
1637#[serde(untagged)]
1638pub enum PostAiSigninError {
1639    UnknownValue(serde_json::Value),
1640}
1641
1642/// struct for typed errors of method [`post_ai_signin_sessions`]
1643#[derive(Debug, Clone, Serialize, Deserialize)]
1644#[serde(untagged)]
1645pub enum PostAiSigninSessionsError {
1646    UnknownValue(serde_json::Value),
1647}
1648
1649/// struct for typed errors of method [`post_ai_signout`]
1650#[derive(Debug, Clone, Serialize, Deserialize)]
1651#[serde(untagged)]
1652pub enum PostAiSignoutError {
1653    UnknownValue(serde_json::Value),
1654}
1655
1656/// struct for typed errors of method [`post_ai_stores`]
1657#[derive(Debug, Clone, Serialize, Deserialize)]
1658#[serde(untagged)]
1659pub enum PostAiStoresError {
1660    UnknownValue(serde_json::Value),
1661}
1662
1663/// struct for typed errors of method [`post_ai_stores_by_owner_by_name_vectors`]
1664#[derive(Debug, Clone, Serialize, Deserialize)]
1665#[serde(untagged)]
1666pub enum PostAiStoresByOwnerByNameVectorsError {
1667    UnknownValue(serde_json::Value),
1668}
1669
1670/// struct for typed errors of method [`post_ai_tasks`]
1671#[derive(Debug, Clone, Serialize, Deserialize)]
1672#[serde(untagged)]
1673pub enum PostAiTasksError {
1674    UnknownValue(serde_json::Value),
1675}
1676
1677/// struct for typed errors of method [`post_ai_tasks_by_owner_by_name_analyze`]
1678#[derive(Debug, Clone, Serialize, Deserialize)]
1679#[serde(untagged)]
1680pub enum PostAiTasksByOwnerByNameAnalyzeError {
1681    UnknownValue(serde_json::Value),
1682}
1683
1684/// struct for typed errors of method [`post_ai_tasks_by_owner_by_name_document`]
1685#[derive(Debug, Clone, Serialize, Deserialize)]
1686#[serde(untagged)]
1687pub enum PostAiTasksByOwnerByNameDocumentError {
1688    UnknownValue(serde_json::Value),
1689}
1690
1691/// struct for typed errors of method [`post_ai_templates`]
1692#[derive(Debug, Clone, Serialize, Deserialize)]
1693#[serde(untagged)]
1694pub enum PostAiTemplatesError {
1695    UnknownValue(serde_json::Value),
1696}
1697
1698/// struct for typed errors of method [`post_ai_tree_files`]
1699#[derive(Debug, Clone, Serialize, Deserialize)]
1700#[serde(untagged)]
1701pub enum PostAiTreeFilesError {
1702    UnknownValue(serde_json::Value),
1703}
1704
1705/// struct for typed errors of method [`post_ai_vectors`]
1706#[derive(Debug, Clone, Serialize, Deserialize)]
1707#[serde(untagged)]
1708pub enum PostAiVectorsError {
1709    UnknownValue(serde_json::Value),
1710}
1711
1712/// struct for typed errors of method [`post_ai_videos`]
1713#[derive(Debug, Clone, Serialize, Deserialize)]
1714#[serde(untagged)]
1715pub enum PostAiVideosError {
1716    UnknownValue(serde_json::Value),
1717}
1718
1719/// struct for typed errors of method [`post_ai_videos_upload`]
1720#[derive(Debug, Clone, Serialize, Deserialize)]
1721#[serde(untagged)]
1722pub enum PostAiVideosUploadError {
1723    UnknownValue(serde_json::Value),
1724}
1725
1726/// struct for typed errors of method [`post_ai_workflows`]
1727#[derive(Debug, Clone, Serialize, Deserialize)]
1728#[serde(untagged)]
1729pub enum PostAiWorkflowsError {
1730    UnknownValue(serde_json::Value),
1731}
1732
1733/// struct for typed errors of method [`post_audio_foley`]
1734#[derive(Debug, Clone, Serialize, Deserialize)]
1735#[serde(untagged)]
1736pub enum PostAudioFoleyError {
1737    UnknownValue(serde_json::Value),
1738}
1739
1740/// struct for typed errors of method [`post_audio_music`]
1741#[derive(Debug, Clone, Serialize, Deserialize)]
1742#[serde(untagged)]
1743pub enum PostAudioMusicError {
1744    UnknownValue(serde_json::Value),
1745}
1746
1747/// struct for typed errors of method [`post_audio_speech`]
1748#[derive(Debug, Clone, Serialize, Deserialize)]
1749#[serde(untagged)]
1750pub enum PostAudioSpeechError {
1751    UnknownValue(serde_json::Value),
1752}
1753
1754/// struct for typed errors of method [`post_audio_transcriptions`]
1755#[derive(Debug, Clone, Serialize, Deserialize)]
1756#[serde(untagged)]
1757pub enum PostAudioTranscriptionsError {
1758    UnknownValue(serde_json::Value),
1759}
1760
1761/// struct for typed errors of method [`post_audio_voice`]
1762#[derive(Debug, Clone, Serialize, Deserialize)]
1763#[serde(untagged)]
1764pub enum PostAudioVoiceError {
1765    UnknownValue(serde_json::Value),
1766}
1767
1768/// struct for typed errors of method [`post_chat`]
1769#[derive(Debug, Clone, Serialize, Deserialize)]
1770#[serde(untagged)]
1771pub enum PostChatError {
1772    UnknownValue(serde_json::Value),
1773}
1774
1775/// struct for typed errors of method [`post_chat_completions`]
1776#[derive(Debug, Clone, Serialize, Deserialize)]
1777#[serde(untagged)]
1778pub enum PostChatCompletionsError {
1779    UnknownValue(serde_json::Value),
1780}
1781
1782/// struct for typed errors of method [`post_chat_public`]
1783#[derive(Debug, Clone, Serialize, Deserialize)]
1784#[serde(untagged)]
1785pub enum PostChatPublicError {
1786    UnknownValue(serde_json::Value),
1787}
1788
1789/// struct for typed errors of method [`post_completions`]
1790#[derive(Debug, Clone, Serialize, Deserialize)]
1791#[serde(untagged)]
1792pub enum PostCompletionsError {
1793    UnknownValue(serde_json::Value),
1794}
1795
1796/// struct for typed errors of method [`post_embeddings`]
1797#[derive(Debug, Clone, Serialize, Deserialize)]
1798#[serde(untagged)]
1799pub enum PostEmbeddingsError {
1800    UnknownValue(serde_json::Value),
1801}
1802
1803/// struct for typed errors of method [`post_images_generations`]
1804#[derive(Debug, Clone, Serialize, Deserialize)]
1805#[serde(untagged)]
1806pub enum PostImagesGenerationsError {
1807    UnknownValue(serde_json::Value),
1808}
1809
1810/// struct for typed errors of method [`post_messages`]
1811#[derive(Debug, Clone, Serialize, Deserialize)]
1812#[serde(untagged)]
1813pub enum PostMessagesError {
1814    UnknownValue(serde_json::Value),
1815}
1816
1817/// struct for typed errors of method [`post_messages_count_tokens`]
1818#[derive(Debug, Clone, Serialize, Deserialize)]
1819#[serde(untagged)]
1820pub enum PostMessagesCountTokensError {
1821    UnknownValue(serde_json::Value),
1822}
1823
1824/// struct for typed errors of method [`post_models_by_model_access`]
1825#[derive(Debug, Clone, Serialize, Deserialize)]
1826#[serde(untagged)]
1827pub enum PostModelsByModelAccessError {
1828    UnknownValue(serde_json::Value),
1829}
1830
1831/// struct for typed errors of method [`post_rerank`]
1832#[derive(Debug, Clone, Serialize, Deserialize)]
1833#[serde(untagged)]
1834pub enum PostRerankError {
1835    UnknownValue(serde_json::Value),
1836}
1837
1838/// struct for typed errors of method [`post_responses`]
1839#[derive(Debug, Clone, Serialize, Deserialize)]
1840#[serde(untagged)]
1841pub enum PostResponsesError {
1842    UnknownValue(serde_json::Value),
1843}
1844
1845/// struct for typed errors of method [`post_videos_generations`]
1846#[derive(Debug, Clone, Serialize, Deserialize)]
1847#[serde(untagged)]
1848pub enum PostVideosGenerationsError {
1849    UnknownValue(serde_json::Value),
1850}
1851
1852/// struct for typed errors of method [`put_ai_articles_by_owner_by_name`]
1853#[derive(Debug, Clone, Serialize, Deserialize)]
1854#[serde(untagged)]
1855pub enum PutAiArticlesByOwnerByNameError {
1856    UnknownValue(serde_json::Value),
1857}
1858
1859/// struct for typed errors of method [`put_ai_assets_by_owner_by_name`]
1860#[derive(Debug, Clone, Serialize, Deserialize)]
1861#[serde(untagged)]
1862pub enum PutAiAssetsByOwnerByNameError {
1863    UnknownValue(serde_json::Value),
1864}
1865
1866/// struct for typed errors of method [`put_ai_chats_by_owner_by_name`]
1867#[derive(Debug, Clone, Serialize, Deserialize)]
1868#[serde(untagged)]
1869pub enum PutAiChatsByOwnerByNameError {
1870    UnknownValue(serde_json::Value),
1871}
1872
1873/// struct for typed errors of method [`put_ai_deployments_by_owner_by_name`]
1874#[derive(Debug, Clone, Serialize, Deserialize)]
1875#[serde(untagged)]
1876pub enum PutAiDeploymentsByOwnerByNameError {
1877    UnknownValue(serde_json::Value),
1878}
1879
1880/// struct for typed errors of method [`put_ai_files_by_owner_by_name`]
1881#[derive(Debug, Clone, Serialize, Deserialize)]
1882#[serde(untagged)]
1883pub enum PutAiFilesByOwnerByNameError {
1884    UnknownValue(serde_json::Value),
1885}
1886
1887/// struct for typed errors of method [`put_ai_forms_by_owner_by_name`]
1888#[derive(Debug, Clone, Serialize, Deserialize)]
1889#[serde(untagged)]
1890pub enum PutAiFormsByOwnerByNameError {
1891    UnknownValue(serde_json::Value),
1892}
1893
1894/// struct for typed errors of method [`put_ai_graphs_by_owner_by_name`]
1895#[derive(Debug, Clone, Serialize, Deserialize)]
1896#[serde(untagged)]
1897pub enum PutAiGraphsByOwnerByNameError {
1898    UnknownValue(serde_json::Value),
1899}
1900
1901/// struct for typed errors of method [`put_ai_messages_by_owner_by_name`]
1902#[derive(Debug, Clone, Serialize, Deserialize)]
1903#[serde(untagged)]
1904pub enum PutAiMessagesByOwnerByNameError {
1905    UnknownValue(serde_json::Value),
1906}
1907
1908/// struct for typed errors of method [`put_ai_nodes_by_owner_by_name`]
1909#[derive(Debug, Clone, Serialize, Deserialize)]
1910#[serde(untagged)]
1911pub enum PutAiNodesByOwnerByNameError {
1912    UnknownValue(serde_json::Value),
1913}
1914
1915/// struct for typed errors of method [`put_ai_org_settings`]
1916#[derive(Debug, Clone, Serialize, Deserialize)]
1917#[serde(untagged)]
1918pub enum PutAiOrgSettingsError {
1919    UnknownValue(serde_json::Value),
1920}
1921
1922/// struct for typed errors of method [`put_ai_org_settings_list`]
1923#[derive(Debug, Clone, Serialize, Deserialize)]
1924#[serde(untagged)]
1925pub enum PutAiOrgSettingsListError {
1926    UnknownValue(serde_json::Value),
1927}
1928
1929/// struct for typed errors of method [`put_ai_preferences`]
1930#[derive(Debug, Clone, Serialize, Deserialize)]
1931#[serde(untagged)]
1932pub enum PutAiPreferencesError {
1933    UnknownValue(serde_json::Value),
1934}
1935
1936/// struct for typed errors of method [`put_ai_providers_by_owner_by_name`]
1937#[derive(Debug, Clone, Serialize, Deserialize)]
1938#[serde(untagged)]
1939pub enum PutAiProvidersByOwnerByNameError {
1940    UnknownValue(serde_json::Value),
1941}
1942
1943/// struct for typed errors of method [`put_ai_records_by_owner_by_name`]
1944#[derive(Debug, Clone, Serialize, Deserialize)]
1945#[serde(untagged)]
1946pub enum PutAiRecordsByOwnerByNameError {
1947    UnknownValue(serde_json::Value),
1948}
1949
1950/// struct for typed errors of method [`put_ai_remote_connections_by_owner_by_name`]
1951#[derive(Debug, Clone, Serialize, Deserialize)]
1952#[serde(untagged)]
1953pub enum PutAiRemoteConnectionsByOwnerByNameError {
1954    UnknownValue(serde_json::Value),
1955}
1956
1957/// struct for typed errors of method [`put_ai_router_artifact_meta`]
1958#[derive(Debug, Clone, Serialize, Deserialize)]
1959#[serde(untagged)]
1960pub enum PutAiRouterArtifactMetaError {
1961    UnknownValue(serde_json::Value),
1962}
1963
1964/// struct for typed errors of method [`put_ai_router_defaults`]
1965#[derive(Debug, Clone, Serialize, Deserialize)]
1966#[serde(untagged)]
1967pub enum PutAiRouterDefaultsError {
1968    UnknownValue(serde_json::Value),
1969}
1970
1971/// struct for typed errors of method [`put_ai_router_ledger`]
1972#[derive(Debug, Clone, Serialize, Deserialize)]
1973#[serde(untagged)]
1974pub enum PutAiRouterLedgerError {
1975    UnknownValue(serde_json::Value),
1976}
1977
1978/// struct for typed errors of method [`put_ai_router_policy`]
1979#[derive(Debug, Clone, Serialize, Deserialize)]
1980#[serde(untagged)]
1981pub enum PutAiRouterPolicyError {
1982    UnknownValue(serde_json::Value),
1983}
1984
1985/// struct for typed errors of method [`put_ai_router_rewards`]
1986#[derive(Debug, Clone, Serialize, Deserialize)]
1987#[serde(untagged)]
1988pub enum PutAiRouterRewardsError {
1989    UnknownValue(serde_json::Value),
1990}
1991
1992/// struct for typed errors of method [`put_ai_routes_by_owner_by_name`]
1993#[derive(Debug, Clone, Serialize, Deserialize)]
1994#[serde(untagged)]
1995pub enum PutAiRoutesByOwnerByNameError {
1996    UnknownValue(serde_json::Value),
1997}
1998
1999/// struct for typed errors of method [`put_ai_scales_by_owner_by_name`]
2000#[derive(Debug, Clone, Serialize, Deserialize)]
2001#[serde(untagged)]
2002pub enum PutAiScalesByOwnerByNameError {
2003    UnknownValue(serde_json::Value),
2004}
2005
2006/// struct for typed errors of method [`put_ai_scans_by_owner_by_name`]
2007#[derive(Debug, Clone, Serialize, Deserialize)]
2008#[serde(untagged)]
2009pub enum PutAiScansByOwnerByNameError {
2010    UnknownValue(serde_json::Value),
2011}
2012
2013/// struct for typed errors of method [`put_ai_signin_sessions_by_owner_by_name`]
2014#[derive(Debug, Clone, Serialize, Deserialize)]
2015#[serde(untagged)]
2016pub enum PutAiSigninSessionsByOwnerByNameError {
2017    UnknownValue(serde_json::Value),
2018}
2019
2020/// struct for typed errors of method [`put_ai_stores_by_owner_by_name`]
2021#[derive(Debug, Clone, Serialize, Deserialize)]
2022#[serde(untagged)]
2023pub enum PutAiStoresByOwnerByNameError {
2024    UnknownValue(serde_json::Value),
2025}
2026
2027/// struct for typed errors of method [`put_ai_tasks_by_owner_by_name`]
2028#[derive(Debug, Clone, Serialize, Deserialize)]
2029#[serde(untagged)]
2030pub enum PutAiTasksByOwnerByNameError {
2031    UnknownValue(serde_json::Value),
2032}
2033
2034/// struct for typed errors of method [`put_ai_templates_by_owner_by_name`]
2035#[derive(Debug, Clone, Serialize, Deserialize)]
2036#[serde(untagged)]
2037pub enum PutAiTemplatesByOwnerByNameError {
2038    UnknownValue(serde_json::Value),
2039}
2040
2041/// struct for typed errors of method [`put_ai_training_contribution`]
2042#[derive(Debug, Clone, Serialize, Deserialize)]
2043#[serde(untagged)]
2044pub enum PutAiTrainingContributionError {
2045    UnknownValue(serde_json::Value),
2046}
2047
2048/// struct for typed errors of method [`put_ai_tree_files_by_owner_by_name`]
2049#[derive(Debug, Clone, Serialize, Deserialize)]
2050#[serde(untagged)]
2051pub enum PutAiTreeFilesByOwnerByNameError {
2052    UnknownValue(serde_json::Value),
2053}
2054
2055/// struct for typed errors of method [`put_ai_vectors_by_owner_by_name`]
2056#[derive(Debug, Clone, Serialize, Deserialize)]
2057#[serde(untagged)]
2058pub enum PutAiVectorsByOwnerByNameError {
2059    UnknownValue(serde_json::Value),
2060}
2061
2062/// struct for typed errors of method [`put_ai_videos_by_owner_by_name`]
2063#[derive(Debug, Clone, Serialize, Deserialize)]
2064#[serde(untagged)]
2065pub enum PutAiVideosByOwnerByNameError {
2066    UnknownValue(serde_json::Value),
2067}
2068
2069/// struct for typed errors of method [`put_ai_workflows_by_owner_by_name`]
2070#[derive(Debug, Clone, Serialize, Deserialize)]
2071#[serde(untagged)]
2072pub enum PutAiWorkflowsByOwnerByNameError {
2073    UnknownValue(serde_json::Value),
2074}
2075
2076
2077/// Tools reports what THIS PROCESS's MCP server carries: how many tools its own registry projects, optionally their names, and which subsystems this process composed. It is the answer to \"is this MCP server up and does it have anything behind it\" — a question a status code cannot answer, since an empty server and a full one are both 200. What the FLEET's server carries is the fleet server's own answer: POST /v1/mcp, tools/list, which asks every subsystem and names the ones that did not reply.
2078pub async fn ai_mcp_tools(configuration: &configuration::Configuration, names: Option<bool>) -> Result<models::AiMcpSurface, Error<AiMcpToolsError>> {
2079    // add a prefix to parameters to efficiently prevent name collisions
2080    let p_names = names;
2081
2082    let uri_str = format!("{}/v1/ai/mcp/tools", configuration.base_path);
2083    let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
2084
2085    if let Some(ref param_value) = p_names {
2086        req_builder = req_builder.query(&[("names", &param_value.to_string())]);
2087    }
2088    if let Some(ref user_agent) = configuration.user_agent {
2089        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
2090    }
2091    if let Some(ref token) = configuration.bearer_access_token {
2092        req_builder = req_builder.bearer_auth(token.to_owned());
2093    };
2094
2095    let req = req_builder.build()?;
2096    let resp = configuration.client.execute(req).await?;
2097
2098    let status = resp.status();
2099    let content_type = resp
2100        .headers()
2101        .get("content-type")
2102        .and_then(|v| v.to_str().ok())
2103        .unwrap_or("application/octet-stream");
2104    let content_type = super::ContentType::from(content_type);
2105
2106    if !status.is_client_error() && !status.is_server_error() {
2107        let content = resp.text().await?;
2108        match content_type {
2109            ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
2110            ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::AiMcpSurface`"))),
2111            ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::AiMcpSurface`")))),
2112        }
2113    } else {
2114        let content = resp.text().await?;
2115        let entity: Option<AiMcpToolsError> = serde_json::from_str(&content).ok();
2116        Err(Error::ResponseError(ResponseContent { status, content, entity }))
2117    }
2118}
2119
2120/// Delete one article.
2121pub async fn delete_ai_articles_by_owner_by_name(configuration: &configuration::Configuration, owner: &str, name: &str) -> Result<(), Error<DeleteAiArticlesByOwnerByNameError>> {
2122    // add a prefix to parameters to efficiently prevent name collisions
2123    let p_owner = owner;
2124    let p_name = name;
2125
2126    let uri_str = format!("{}/v1/ai/articles/{owner}/{name}", configuration.base_path, owner=crate::apis::urlencode(p_owner), name=crate::apis::urlencode(p_name));
2127    let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str);
2128
2129    if let Some(ref user_agent) = configuration.user_agent {
2130        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
2131    }
2132    if let Some(ref token) = configuration.bearer_access_token {
2133        req_builder = req_builder.bearer_auth(token.to_owned());
2134    };
2135
2136    let req = req_builder.build()?;
2137    let resp = configuration.client.execute(req).await?;
2138
2139    let status = resp.status();
2140
2141    if !status.is_client_error() && !status.is_server_error() {
2142        Ok(())
2143    } else {
2144        let content = resp.text().await?;
2145        let entity: Option<DeleteAiArticlesByOwnerByNameError> = serde_json::from_str(&content).ok();
2146        Err(Error::ResponseError(ResponseContent { status, content, entity }))
2147    }
2148}
2149
2150/// Delete one asset.
2151pub async fn delete_ai_assets_by_owner_by_name(configuration: &configuration::Configuration, owner: &str, name: &str) -> Result<(), Error<DeleteAiAssetsByOwnerByNameError>> {
2152    // add a prefix to parameters to efficiently prevent name collisions
2153    let p_owner = owner;
2154    let p_name = name;
2155
2156    let uri_str = format!("{}/v1/ai/assets/{owner}/{name}", configuration.base_path, owner=crate::apis::urlencode(p_owner), name=crate::apis::urlencode(p_name));
2157    let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str);
2158
2159    if let Some(ref user_agent) = configuration.user_agent {
2160        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
2161    }
2162    if let Some(ref token) = configuration.bearer_access_token {
2163        req_builder = req_builder.bearer_auth(token.to_owned());
2164    };
2165
2166    let req = req_builder.build()?;
2167    let resp = configuration.client.execute(req).await?;
2168
2169    let status = resp.status();
2170
2171    if !status.is_client_error() && !status.is_server_error() {
2172        Ok(())
2173    } else {
2174        let content = resp.text().await?;
2175        let entity: Option<DeleteAiAssetsByOwnerByNameError> = serde_json::from_str(&content).ok();
2176        Err(Error::ResponseError(ResponseContent { status, content, entity }))
2177    }
2178}
2179
2180/// Delete one chat.
2181pub async fn delete_ai_chats_by_owner_by_name(configuration: &configuration::Configuration, owner: &str, name: &str) -> Result<(), Error<DeleteAiChatsByOwnerByNameError>> {
2182    // add a prefix to parameters to efficiently prevent name collisions
2183    let p_owner = owner;
2184    let p_name = name;
2185
2186    let uri_str = format!("{}/v1/ai/chats/{owner}/{name}", configuration.base_path, owner=crate::apis::urlencode(p_owner), name=crate::apis::urlencode(p_name));
2187    let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str);
2188
2189    if let Some(ref user_agent) = configuration.user_agent {
2190        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
2191    }
2192    if let Some(ref token) = configuration.bearer_access_token {
2193        req_builder = req_builder.bearer_auth(token.to_owned());
2194    };
2195
2196    let req = req_builder.build()?;
2197    let resp = configuration.client.execute(req).await?;
2198
2199    let status = resp.status();
2200
2201    if !status.is_client_error() && !status.is_server_error() {
2202        Ok(())
2203    } else {
2204        let content = resp.text().await?;
2205        let entity: Option<DeleteAiChatsByOwnerByNameError> = serde_json::from_str(&content).ok();
2206        Err(Error::ResponseError(ResponseContent { status, content, entity }))
2207    }
2208}
2209
2210/// Disconnects a third-party AI account: it deactivates the org's row so completion resolution falls back to the global Hanzo account (no BYO), and best-effort tombstones the sealed secret. Idempotent.
2211pub async fn delete_ai_connections_by_provider(configuration: &configuration::Configuration, provider: &str) -> Result<(), Error<DeleteAiConnectionsByProviderError>> {
2212    // add a prefix to parameters to efficiently prevent name collisions
2213    let p_provider = provider;
2214
2215    let uri_str = format!("{}/v1/ai/connections/{provider}", configuration.base_path, provider=crate::apis::urlencode(p_provider));
2216    let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str);
2217
2218    if let Some(ref user_agent) = configuration.user_agent {
2219        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
2220    }
2221    if let Some(ref token) = configuration.bearer_access_token {
2222        req_builder = req_builder.bearer_auth(token.to_owned());
2223    };
2224
2225    let req = req_builder.build()?;
2226    let resp = configuration.client.execute(req).await?;
2227
2228    let status = resp.status();
2229
2230    if !status.is_client_error() && !status.is_server_error() {
2231        Ok(())
2232    } else {
2233        let content = resp.text().await?;
2234        let entity: Option<DeleteAiConnectionsByProviderError> = serde_json::from_str(&content).ok();
2235        Err(Error::ResponseError(ResponseContent { status, content, entity }))
2236    }
2237}
2238
2239/// Delete one application.
2240pub async fn delete_ai_deployments_by_owner_by_name(configuration: &configuration::Configuration, owner: &str, name: &str) -> Result<(), Error<DeleteAiDeploymentsByOwnerByNameError>> {
2241    // add a prefix to parameters to efficiently prevent name collisions
2242    let p_owner = owner;
2243    let p_name = name;
2244
2245    let uri_str = format!("{}/v1/ai/deployments/{owner}/{name}", configuration.base_path, owner=crate::apis::urlencode(p_owner), name=crate::apis::urlencode(p_name));
2246    let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str);
2247
2248    if let Some(ref user_agent) = configuration.user_agent {
2249        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
2250    }
2251    if let Some(ref token) = configuration.bearer_access_token {
2252        req_builder = req_builder.bearer_auth(token.to_owned());
2253    };
2254
2255    let req = req_builder.build()?;
2256    let resp = configuration.client.execute(req).await?;
2257
2258    let status = resp.status();
2259
2260    if !status.is_client_error() && !status.is_server_error() {
2261        Ok(())
2262    } else {
2263        let content = resp.text().await?;
2264        let entity: Option<DeleteAiDeploymentsByOwnerByNameError> = serde_json::from_str(&content).ok();
2265        Err(Error::ResponseError(ResponseContent { status, content, entity }))
2266    }
2267}
2268
2269/// Delete one file.
2270pub async fn delete_ai_files_by_owner_by_name(configuration: &configuration::Configuration, owner: &str, name: &str) -> Result<(), Error<DeleteAiFilesByOwnerByNameError>> {
2271    // add a prefix to parameters to efficiently prevent name collisions
2272    let p_owner = owner;
2273    let p_name = name;
2274
2275    let uri_str = format!("{}/v1/ai/files/{owner}/{name}", configuration.base_path, owner=crate::apis::urlencode(p_owner), name=crate::apis::urlencode(p_name));
2276    let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str);
2277
2278    if let Some(ref user_agent) = configuration.user_agent {
2279        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
2280    }
2281    if let Some(ref token) = configuration.bearer_access_token {
2282        req_builder = req_builder.bearer_auth(token.to_owned());
2283    };
2284
2285    let req = req_builder.build()?;
2286    let resp = configuration.client.execute(req).await?;
2287
2288    let status = resp.status();
2289
2290    if !status.is_client_error() && !status.is_server_error() {
2291        Ok(())
2292    } else {
2293        let content = resp.text().await?;
2294        let entity: Option<DeleteAiFilesByOwnerByNameError> = serde_json::from_str(&content).ok();
2295        Err(Error::ResponseError(ResponseContent { status, content, entity }))
2296    }
2297}
2298
2299/// Delete one form.
2300pub async fn delete_ai_forms_by_owner_by_name(configuration: &configuration::Configuration, owner: &str, name: &str) -> Result<(), Error<DeleteAiFormsByOwnerByNameError>> {
2301    // add a prefix to parameters to efficiently prevent name collisions
2302    let p_owner = owner;
2303    let p_name = name;
2304
2305    let uri_str = format!("{}/v1/ai/forms/{owner}/{name}", configuration.base_path, owner=crate::apis::urlencode(p_owner), name=crate::apis::urlencode(p_name));
2306    let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str);
2307
2308    if let Some(ref user_agent) = configuration.user_agent {
2309        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
2310    }
2311    if let Some(ref token) = configuration.bearer_access_token {
2312        req_builder = req_builder.bearer_auth(token.to_owned());
2313    };
2314
2315    let req = req_builder.build()?;
2316    let resp = configuration.client.execute(req).await?;
2317
2318    let status = resp.status();
2319
2320    if !status.is_client_error() && !status.is_server_error() {
2321        Ok(())
2322    } else {
2323        let content = resp.text().await?;
2324        let entity: Option<DeleteAiFormsByOwnerByNameError> = serde_json::from_str(&content).ok();
2325        Err(Error::ResponseError(ResponseContent { status, content, entity }))
2326    }
2327}
2328
2329/// Delete one graph.
2330pub async fn delete_ai_graphs_by_owner_by_name(configuration: &configuration::Configuration, owner: &str, name: &str) -> Result<(), Error<DeleteAiGraphsByOwnerByNameError>> {
2331    // add a prefix to parameters to efficiently prevent name collisions
2332    let p_owner = owner;
2333    let p_name = name;
2334
2335    let uri_str = format!("{}/v1/ai/graphs/{owner}/{name}", configuration.base_path, owner=crate::apis::urlencode(p_owner), name=crate::apis::urlencode(p_name));
2336    let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str);
2337
2338    if let Some(ref user_agent) = configuration.user_agent {
2339        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
2340    }
2341    if let Some(ref token) = configuration.bearer_access_token {
2342        req_builder = req_builder.bearer_auth(token.to_owned());
2343    };
2344
2345    let req = req_builder.build()?;
2346    let resp = configuration.client.execute(req).await?;
2347
2348    let status = resp.status();
2349
2350    if !status.is_client_error() && !status.is_server_error() {
2351        Ok(())
2352    } else {
2353        let content = resp.text().await?;
2354        let entity: Option<DeleteAiGraphsByOwnerByNameError> = serde_json::from_str(&content).ok();
2355        Err(Error::ResponseError(ResponseContent { status, content, entity }))
2356    }
2357}
2358
2359/// Delete one message.
2360pub async fn delete_ai_messages_by_owner_by_name(configuration: &configuration::Configuration, owner: &str, name: &str) -> Result<(), Error<DeleteAiMessagesByOwnerByNameError>> {
2361    // add a prefix to parameters to efficiently prevent name collisions
2362    let p_owner = owner;
2363    let p_name = name;
2364
2365    let uri_str = format!("{}/v1/ai/messages/{owner}/{name}", configuration.base_path, owner=crate::apis::urlencode(p_owner), name=crate::apis::urlencode(p_name));
2366    let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str);
2367
2368    if let Some(ref user_agent) = configuration.user_agent {
2369        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
2370    }
2371    if let Some(ref token) = configuration.bearer_access_token {
2372        req_builder = req_builder.bearer_auth(token.to_owned());
2373    };
2374
2375    let req = req_builder.build()?;
2376    let resp = configuration.client.execute(req).await?;
2377
2378    let status = resp.status();
2379
2380    if !status.is_client_error() && !status.is_server_error() {
2381        Ok(())
2382    } else {
2383        let content = resp.text().await?;
2384        let entity: Option<DeleteAiMessagesByOwnerByNameError> = serde_json::from_str(&content).ok();
2385        Err(Error::ResponseError(ResponseContent { status, content, entity }))
2386    }
2387}
2388
2389pub async fn delete_ai_messages_welcome(configuration: &configuration::Configuration, ) -> Result<(), Error<DeleteAiMessagesWelcomeError>> {
2390
2391    let uri_str = format!("{}/v1/ai/messages/welcome", configuration.base_path);
2392    let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str);
2393
2394    if let Some(ref user_agent) = configuration.user_agent {
2395        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
2396    }
2397    if let Some(ref token) = configuration.bearer_access_token {
2398        req_builder = req_builder.bearer_auth(token.to_owned());
2399    };
2400
2401    let req = req_builder.build()?;
2402    let resp = configuration.client.execute(req).await?;
2403
2404    let status = resp.status();
2405
2406    if !status.is_client_error() && !status.is_server_error() {
2407        Ok(())
2408    } else {
2409        let content = resp.text().await?;
2410        let entity: Option<DeleteAiMessagesWelcomeError> = serde_json::from_str(&content).ok();
2411        Err(Error::ResponseError(ResponseContent { status, content, entity }))
2412    }
2413}
2414
2415/// Delete one node.
2416pub async fn delete_ai_nodes_by_owner_by_name(configuration: &configuration::Configuration, owner: &str, name: &str) -> Result<(), Error<DeleteAiNodesByOwnerByNameError>> {
2417    // add a prefix to parameters to efficiently prevent name collisions
2418    let p_owner = owner;
2419    let p_name = name;
2420
2421    let uri_str = format!("{}/v1/ai/nodes/{owner}/{name}", configuration.base_path, owner=crate::apis::urlencode(p_owner), name=crate::apis::urlencode(p_name));
2422    let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str);
2423
2424    if let Some(ref user_agent) = configuration.user_agent {
2425        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
2426    }
2427    if let Some(ref token) = configuration.bearer_access_token {
2428        req_builder = req_builder.bearer_auth(token.to_owned());
2429    };
2430
2431    let req = req_builder.build()?;
2432    let resp = configuration.client.execute(req).await?;
2433
2434    let status = resp.status();
2435
2436    if !status.is_client_error() && !status.is_server_error() {
2437        Ok(())
2438    } else {
2439        let content = resp.text().await?;
2440        let entity: Option<DeleteAiNodesByOwnerByNameError> = serde_json::from_str(&content).ok();
2441        Err(Error::ResponseError(ResponseContent { status, content, entity }))
2442    }
2443}
2444
2445/// The HTTP transport binding for the RESTful router-config nouns (/v1/ai/router/{policy,defaults,ledger,rewards,artifact-meta} and /v1/ai/org/settings[/list]). It dispatches IN-PROCESS through dispatchGateway — the SAME canonical ZAP gateway registry (zap_registry.go) that the MsgType 200 handler serves over the gateway transport. The native ZAP handler is the ONE and ONLY implementation of these routes; this is purely the api.hanzo.ai HTTP binding, so there is NO controller twin to drift from and the split-brain the router refactor removed stays removed.  Why a bridge and not a twin controller method: every other migrated route (get-records, get-connections, …) carries BOTH a controller method and a ZAP handler — the exact dual-impl drift that silently NULLed customer router settings (the update-router-policy data-wipe). Routing these nouns through the ZAP handler over one adapter keeps a single source of truth.  Identity is the request's own Bearer credential (Authorization header), which the native handlers resolve exactly as the gateway does — every caller (console, chat, app) already sends it. The dispatched handler returns a ZAP message whose status is field 0 and body is field 4 (BuildCloudResponse / BuildGatewayResponse layout); both are relayed verbatim. The route is mapped \"*\" (any verb) because the native handler is method-aware: /v1/ai/router/policy splits GET (read) vs PUT (write), /v1/ai/org/settings GET/PUT/DELETE, and returns 405 for a verb it does not own.
2446pub async fn delete_ai_org_settings(configuration: &configuration::Configuration, ) -> Result<(), Error<DeleteAiOrgSettingsError>> {
2447
2448    let uri_str = format!("{}/v1/ai/org/settings", configuration.base_path);
2449    let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str);
2450
2451    if let Some(ref user_agent) = configuration.user_agent {
2452        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
2453    }
2454    if let Some(ref token) = configuration.bearer_access_token {
2455        req_builder = req_builder.bearer_auth(token.to_owned());
2456    };
2457
2458    let req = req_builder.build()?;
2459    let resp = configuration.client.execute(req).await?;
2460
2461    let status = resp.status();
2462
2463    if !status.is_client_error() && !status.is_server_error() {
2464        Ok(())
2465    } else {
2466        let content = resp.text().await?;
2467        let entity: Option<DeleteAiOrgSettingsError> = serde_json::from_str(&content).ok();
2468        Err(Error::ResponseError(ResponseContent { status, content, entity }))
2469    }
2470}
2471
2472/// The HTTP transport binding for the RESTful router-config nouns (/v1/ai/router/{policy,defaults,ledger,rewards,artifact-meta} and /v1/ai/org/settings[/list]). It dispatches IN-PROCESS through dispatchGateway — the SAME canonical ZAP gateway registry (zap_registry.go) that the MsgType 200 handler serves over the gateway transport. The native ZAP handler is the ONE and ONLY implementation of these routes; this is purely the api.hanzo.ai HTTP binding, so there is NO controller twin to drift from and the split-brain the router refactor removed stays removed.  Why a bridge and not a twin controller method: every other migrated route (get-records, get-connections, …) carries BOTH a controller method and a ZAP handler — the exact dual-impl drift that silently NULLed customer router settings (the update-router-policy data-wipe). Routing these nouns through the ZAP handler over one adapter keeps a single source of truth.  Identity is the request's own Bearer credential (Authorization header), which the native handlers resolve exactly as the gateway does — every caller (console, chat, app) already sends it. The dispatched handler returns a ZAP message whose status is field 0 and body is field 4 (BuildCloudResponse / BuildGatewayResponse layout); both are relayed verbatim. The route is mapped \"*\" (any verb) because the native handler is method-aware: /v1/ai/router/policy splits GET (read) vs PUT (write), /v1/ai/org/settings GET/PUT/DELETE, and returns 405 for a verb it does not own.
2473pub async fn delete_ai_org_settings_list(configuration: &configuration::Configuration, ) -> Result<(), Error<DeleteAiOrgSettingsListError>> {
2474
2475    let uri_str = format!("{}/v1/ai/org/settings/list", configuration.base_path);
2476    let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str);
2477
2478    if let Some(ref user_agent) = configuration.user_agent {
2479        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
2480    }
2481    if let Some(ref token) = configuration.bearer_access_token {
2482        req_builder = req_builder.bearer_auth(token.to_owned());
2483    };
2484
2485    let req = req_builder.build()?;
2486    let resp = configuration.client.execute(req).await?;
2487
2488    let status = resp.status();
2489
2490    if !status.is_client_error() && !status.is_server_error() {
2491        Ok(())
2492    } else {
2493        let content = resp.text().await?;
2494        let entity: Option<DeleteAiOrgSettingsListError> = serde_json::from_str(&content).ok();
2495        Err(Error::ResponseError(ResponseContent { status, content, entity }))
2496    }
2497}
2498
2499/// Delete one provider.
2500pub async fn delete_ai_providers_by_owner_by_name(configuration: &configuration::Configuration, owner: &str, name: &str) -> Result<(), Error<DeleteAiProvidersByOwnerByNameError>> {
2501    // add a prefix to parameters to efficiently prevent name collisions
2502    let p_owner = owner;
2503    let p_name = name;
2504
2505    let uri_str = format!("{}/v1/ai/providers/{owner}/{name}", configuration.base_path, owner=crate::apis::urlencode(p_owner), name=crate::apis::urlencode(p_name));
2506    let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str);
2507
2508    if let Some(ref user_agent) = configuration.user_agent {
2509        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
2510    }
2511    if let Some(ref token) = configuration.bearer_access_token {
2512        req_builder = req_builder.bearer_auth(token.to_owned());
2513    };
2514
2515    let req = req_builder.build()?;
2516    let resp = configuration.client.execute(req).await?;
2517
2518    let status = resp.status();
2519
2520    if !status.is_client_error() && !status.is_server_error() {
2521        Ok(())
2522    } else {
2523        let content = resp.text().await?;
2524        let entity: Option<DeleteAiProvidersByOwnerByNameError> = serde_json::from_str(&content).ok();
2525        Err(Error::ResponseError(ResponseContent { status, content, entity }))
2526    }
2527}
2528
2529/// Delete one record.
2530pub async fn delete_ai_records_by_owner_by_name(configuration: &configuration::Configuration, owner: &str, name: &str) -> Result<(), Error<DeleteAiRecordsByOwnerByNameError>> {
2531    // add a prefix to parameters to efficiently prevent name collisions
2532    let p_owner = owner;
2533    let p_name = name;
2534
2535    let uri_str = format!("{}/v1/ai/records/{owner}/{name}", configuration.base_path, owner=crate::apis::urlencode(p_owner), name=crate::apis::urlencode(p_name));
2536    let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str);
2537
2538    if let Some(ref user_agent) = configuration.user_agent {
2539        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
2540    }
2541    if let Some(ref token) = configuration.bearer_access_token {
2542        req_builder = req_builder.bearer_auth(token.to_owned());
2543    };
2544
2545    let req = req_builder.build()?;
2546    let resp = configuration.client.execute(req).await?;
2547
2548    let status = resp.status();
2549
2550    if !status.is_client_error() && !status.is_server_error() {
2551        Ok(())
2552    } else {
2553        let content = resp.text().await?;
2554        let entity: Option<DeleteAiRecordsByOwnerByNameError> = serde_json::from_str(&content).ok();
2555        Err(Error::ResponseError(ResponseContent { status, content, entity }))
2556    }
2557}
2558
2559/// Delete one connection.
2560pub async fn delete_ai_remote_connections_by_owner_by_name(configuration: &configuration::Configuration, owner: &str, name: &str) -> Result<(), Error<DeleteAiRemoteConnectionsByOwnerByNameError>> {
2561    // add a prefix to parameters to efficiently prevent name collisions
2562    let p_owner = owner;
2563    let p_name = name;
2564
2565    let uri_str = format!("{}/v1/ai/remote-connections/{owner}/{name}", configuration.base_path, owner=crate::apis::urlencode(p_owner), name=crate::apis::urlencode(p_name));
2566    let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str);
2567
2568    if let Some(ref user_agent) = configuration.user_agent {
2569        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
2570    }
2571    if let Some(ref token) = configuration.bearer_access_token {
2572        req_builder = req_builder.bearer_auth(token.to_owned());
2573    };
2574
2575    let req = req_builder.build()?;
2576    let resp = configuration.client.execute(req).await?;
2577
2578    let status = resp.status();
2579
2580    if !status.is_client_error() && !status.is_server_error() {
2581        Ok(())
2582    } else {
2583        let content = resp.text().await?;
2584        let entity: Option<DeleteAiRemoteConnectionsByOwnerByNameError> = serde_json::from_str(&content).ok();
2585        Err(Error::ResponseError(ResponseContent { status, content, entity }))
2586    }
2587}
2588
2589/// The HTTP transport binding for the RESTful router-config nouns (/v1/ai/router/{policy,defaults,ledger,rewards,artifact-meta} and /v1/ai/org/settings[/list]). It dispatches IN-PROCESS through dispatchGateway — the SAME canonical ZAP gateway registry (zap_registry.go) that the MsgType 200 handler serves over the gateway transport. The native ZAP handler is the ONE and ONLY implementation of these routes; this is purely the api.hanzo.ai HTTP binding, so there is NO controller twin to drift from and the split-brain the router refactor removed stays removed.  Why a bridge and not a twin controller method: every other migrated route (get-records, get-connections, …) carries BOTH a controller method and a ZAP handler — the exact dual-impl drift that silently NULLed customer router settings (the update-router-policy data-wipe). Routing these nouns through the ZAP handler over one adapter keeps a single source of truth.  Identity is the request's own Bearer credential (Authorization header), which the native handlers resolve exactly as the gateway does — every caller (console, chat, app) already sends it. The dispatched handler returns a ZAP message whose status is field 0 and body is field 4 (BuildCloudResponse / BuildGatewayResponse layout); both are relayed verbatim. The route is mapped \"*\" (any verb) because the native handler is method-aware: /v1/ai/router/policy splits GET (read) vs PUT (write), /v1/ai/org/settings GET/PUT/DELETE, and returns 405 for a verb it does not own.
2590pub async fn delete_ai_router_artifact_meta(configuration: &configuration::Configuration, ) -> Result<(), Error<DeleteAiRouterArtifactMetaError>> {
2591
2592    let uri_str = format!("{}/v1/ai/router/artifact-meta", configuration.base_path);
2593    let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str);
2594
2595    if let Some(ref user_agent) = configuration.user_agent {
2596        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
2597    }
2598    if let Some(ref token) = configuration.bearer_access_token {
2599        req_builder = req_builder.bearer_auth(token.to_owned());
2600    };
2601
2602    let req = req_builder.build()?;
2603    let resp = configuration.client.execute(req).await?;
2604
2605    let status = resp.status();
2606
2607    if !status.is_client_error() && !status.is_server_error() {
2608        Ok(())
2609    } else {
2610        let content = resp.text().await?;
2611        let entity: Option<DeleteAiRouterArtifactMetaError> = serde_json::from_str(&content).ok();
2612        Err(Error::ResponseError(ResponseContent { status, content, entity }))
2613    }
2614}
2615
2616pub async fn delete_ai_router_data(configuration: &configuration::Configuration, ) -> Result<(), Error<DeleteAiRouterDataError>> {
2617
2618    let uri_str = format!("{}/v1/ai/router/data", configuration.base_path);
2619    let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str);
2620
2621    if let Some(ref user_agent) = configuration.user_agent {
2622        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
2623    }
2624    if let Some(ref token) = configuration.bearer_access_token {
2625        req_builder = req_builder.bearer_auth(token.to_owned());
2626    };
2627
2628    let req = req_builder.build()?;
2629    let resp = configuration.client.execute(req).await?;
2630
2631    let status = resp.status();
2632
2633    if !status.is_client_error() && !status.is_server_error() {
2634        Ok(())
2635    } else {
2636        let content = resp.text().await?;
2637        let entity: Option<DeleteAiRouterDataError> = serde_json::from_str(&content).ok();
2638        Err(Error::ResponseError(ResponseContent { status, content, entity }))
2639    }
2640}
2641
2642/// The HTTP transport binding for the RESTful router-config nouns (/v1/ai/router/{policy,defaults,ledger,rewards,artifact-meta} and /v1/ai/org/settings[/list]). It dispatches IN-PROCESS through dispatchGateway — the SAME canonical ZAP gateway registry (zap_registry.go) that the MsgType 200 handler serves over the gateway transport. The native ZAP handler is the ONE and ONLY implementation of these routes; this is purely the api.hanzo.ai HTTP binding, so there is NO controller twin to drift from and the split-brain the router refactor removed stays removed.  Why a bridge and not a twin controller method: every other migrated route (get-records, get-connections, …) carries BOTH a controller method and a ZAP handler — the exact dual-impl drift that silently NULLed customer router settings (the update-router-policy data-wipe). Routing these nouns through the ZAP handler over one adapter keeps a single source of truth.  Identity is the request's own Bearer credential (Authorization header), which the native handlers resolve exactly as the gateway does — every caller (console, chat, app) already sends it. The dispatched handler returns a ZAP message whose status is field 0 and body is field 4 (BuildCloudResponse / BuildGatewayResponse layout); both are relayed verbatim. The route is mapped \"*\" (any verb) because the native handler is method-aware: /v1/ai/router/policy splits GET (read) vs PUT (write), /v1/ai/org/settings GET/PUT/DELETE, and returns 405 for a verb it does not own.
2643pub async fn delete_ai_router_defaults(configuration: &configuration::Configuration, ) -> Result<(), Error<DeleteAiRouterDefaultsError>> {
2644
2645    let uri_str = format!("{}/v1/ai/router/defaults", configuration.base_path);
2646    let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str);
2647
2648    if let Some(ref user_agent) = configuration.user_agent {
2649        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
2650    }
2651    if let Some(ref token) = configuration.bearer_access_token {
2652        req_builder = req_builder.bearer_auth(token.to_owned());
2653    };
2654
2655    let req = req_builder.build()?;
2656    let resp = configuration.client.execute(req).await?;
2657
2658    let status = resp.status();
2659
2660    if !status.is_client_error() && !status.is_server_error() {
2661        Ok(())
2662    } else {
2663        let content = resp.text().await?;
2664        let entity: Option<DeleteAiRouterDefaultsError> = serde_json::from_str(&content).ok();
2665        Err(Error::ResponseError(ResponseContent { status, content, entity }))
2666    }
2667}
2668
2669/// The HTTP transport binding for the RESTful router-config nouns (/v1/ai/router/{policy,defaults,ledger,rewards,artifact-meta} and /v1/ai/org/settings[/list]). It dispatches IN-PROCESS through dispatchGateway — the SAME canonical ZAP gateway registry (zap_registry.go) that the MsgType 200 handler serves over the gateway transport. The native ZAP handler is the ONE and ONLY implementation of these routes; this is purely the api.hanzo.ai HTTP binding, so there is NO controller twin to drift from and the split-brain the router refactor removed stays removed.  Why a bridge and not a twin controller method: every other migrated route (get-records, get-connections, …) carries BOTH a controller method and a ZAP handler — the exact dual-impl drift that silently NULLed customer router settings (the update-router-policy data-wipe). Routing these nouns through the ZAP handler over one adapter keeps a single source of truth.  Identity is the request's own Bearer credential (Authorization header), which the native handlers resolve exactly as the gateway does — every caller (console, chat, app) already sends it. The dispatched handler returns a ZAP message whose status is field 0 and body is field 4 (BuildCloudResponse / BuildGatewayResponse layout); both are relayed verbatim. The route is mapped \"*\" (any verb) because the native handler is method-aware: /v1/ai/router/policy splits GET (read) vs PUT (write), /v1/ai/org/settings GET/PUT/DELETE, and returns 405 for a verb it does not own.
2670pub async fn delete_ai_router_ledger(configuration: &configuration::Configuration, ) -> Result<(), Error<DeleteAiRouterLedgerError>> {
2671
2672    let uri_str = format!("{}/v1/ai/router/ledger", configuration.base_path);
2673    let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str);
2674
2675    if let Some(ref user_agent) = configuration.user_agent {
2676        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
2677    }
2678    if let Some(ref token) = configuration.bearer_access_token {
2679        req_builder = req_builder.bearer_auth(token.to_owned());
2680    };
2681
2682    let req = req_builder.build()?;
2683    let resp = configuration.client.execute(req).await?;
2684
2685    let status = resp.status();
2686
2687    if !status.is_client_error() && !status.is_server_error() {
2688        Ok(())
2689    } else {
2690        let content = resp.text().await?;
2691        let entity: Option<DeleteAiRouterLedgerError> = serde_json::from_str(&content).ok();
2692        Err(Error::ResponseError(ResponseContent { status, content, entity }))
2693    }
2694}
2695
2696/// The HTTP transport binding for the RESTful router-config nouns (/v1/ai/router/{policy,defaults,ledger,rewards,artifact-meta} and /v1/ai/org/settings[/list]). It dispatches IN-PROCESS through dispatchGateway — the SAME canonical ZAP gateway registry (zap_registry.go) that the MsgType 200 handler serves over the gateway transport. The native ZAP handler is the ONE and ONLY implementation of these routes; this is purely the api.hanzo.ai HTTP binding, so there is NO controller twin to drift from and the split-brain the router refactor removed stays removed.  Why a bridge and not a twin controller method: every other migrated route (get-records, get-connections, …) carries BOTH a controller method and a ZAP handler — the exact dual-impl drift that silently NULLed customer router settings (the update-router-policy data-wipe). Routing these nouns through the ZAP handler over one adapter keeps a single source of truth.  Identity is the request's own Bearer credential (Authorization header), which the native handlers resolve exactly as the gateway does — every caller (console, chat, app) already sends it. The dispatched handler returns a ZAP message whose status is field 0 and body is field 4 (BuildCloudResponse / BuildGatewayResponse layout); both are relayed verbatim. The route is mapped \"*\" (any verb) because the native handler is method-aware: /v1/ai/router/policy splits GET (read) vs PUT (write), /v1/ai/org/settings GET/PUT/DELETE, and returns 405 for a verb it does not own.
2697pub async fn delete_ai_router_policy(configuration: &configuration::Configuration, ) -> Result<(), Error<DeleteAiRouterPolicyError>> {
2698
2699    let uri_str = format!("{}/v1/ai/router/policy", configuration.base_path);
2700    let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str);
2701
2702    if let Some(ref user_agent) = configuration.user_agent {
2703        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
2704    }
2705    if let Some(ref token) = configuration.bearer_access_token {
2706        req_builder = req_builder.bearer_auth(token.to_owned());
2707    };
2708
2709    let req = req_builder.build()?;
2710    let resp = configuration.client.execute(req).await?;
2711
2712    let status = resp.status();
2713
2714    if !status.is_client_error() && !status.is_server_error() {
2715        Ok(())
2716    } else {
2717        let content = resp.text().await?;
2718        let entity: Option<DeleteAiRouterPolicyError> = serde_json::from_str(&content).ok();
2719        Err(Error::ResponseError(ResponseContent { status, content, entity }))
2720    }
2721}
2722
2723/// The HTTP transport binding for the RESTful router-config nouns (/v1/ai/router/{policy,defaults,ledger,rewards,artifact-meta} and /v1/ai/org/settings[/list]). It dispatches IN-PROCESS through dispatchGateway — the SAME canonical ZAP gateway registry (zap_registry.go) that the MsgType 200 handler serves over the gateway transport. The native ZAP handler is the ONE and ONLY implementation of these routes; this is purely the api.hanzo.ai HTTP binding, so there is NO controller twin to drift from and the split-brain the router refactor removed stays removed.  Why a bridge and not a twin controller method: every other migrated route (get-records, get-connections, …) carries BOTH a controller method and a ZAP handler — the exact dual-impl drift that silently NULLed customer router settings (the update-router-policy data-wipe). Routing these nouns through the ZAP handler over one adapter keeps a single source of truth.  Identity is the request's own Bearer credential (Authorization header), which the native handlers resolve exactly as the gateway does — every caller (console, chat, app) already sends it. The dispatched handler returns a ZAP message whose status is field 0 and body is field 4 (BuildCloudResponse / BuildGatewayResponse layout); both are relayed verbatim. The route is mapped \"*\" (any verb) because the native handler is method-aware: /v1/ai/router/policy splits GET (read) vs PUT (write), /v1/ai/org/settings GET/PUT/DELETE, and returns 405 for a verb it does not own.
2724pub async fn delete_ai_router_rewards(configuration: &configuration::Configuration, ) -> Result<(), Error<DeleteAiRouterRewardsError>> {
2725
2726    let uri_str = format!("{}/v1/ai/router/rewards", configuration.base_path);
2727    let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str);
2728
2729    if let Some(ref user_agent) = configuration.user_agent {
2730        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
2731    }
2732    if let Some(ref token) = configuration.bearer_access_token {
2733        req_builder = req_builder.bearer_auth(token.to_owned());
2734    };
2735
2736    let req = req_builder.build()?;
2737    let resp = configuration.client.execute(req).await?;
2738
2739    let status = resp.status();
2740
2741    if !status.is_client_error() && !status.is_server_error() {
2742        Ok(())
2743    } else {
2744        let content = resp.text().await?;
2745        let entity: Option<DeleteAiRouterRewardsError> = serde_json::from_str(&content).ok();
2746        Err(Error::ResponseError(ResponseContent { status, content, entity }))
2747    }
2748}
2749
2750/// Delete one model-route.
2751pub async fn delete_ai_routes_by_owner_by_name(configuration: &configuration::Configuration, owner: &str, name: &str) -> Result<(), Error<DeleteAiRoutesByOwnerByNameError>> {
2752    // add a prefix to parameters to efficiently prevent name collisions
2753    let p_owner = owner;
2754    let p_name = name;
2755
2756    let uri_str = format!("{}/v1/ai/routes/{owner}/{name}", configuration.base_path, owner=crate::apis::urlencode(p_owner), name=crate::apis::urlencode(p_name));
2757    let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str);
2758
2759    if let Some(ref user_agent) = configuration.user_agent {
2760        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
2761    }
2762    if let Some(ref token) = configuration.bearer_access_token {
2763        req_builder = req_builder.bearer_auth(token.to_owned());
2764    };
2765
2766    let req = req_builder.build()?;
2767    let resp = configuration.client.execute(req).await?;
2768
2769    let status = resp.status();
2770
2771    if !status.is_client_error() && !status.is_server_error() {
2772        Ok(())
2773    } else {
2774        let content = resp.text().await?;
2775        let entity: Option<DeleteAiRoutesByOwnerByNameError> = serde_json::from_str(&content).ok();
2776        Err(Error::ResponseError(ResponseContent { status, content, entity }))
2777    }
2778}
2779
2780/// Delete one scale.
2781pub async fn delete_ai_scales_by_owner_by_name(configuration: &configuration::Configuration, owner: &str, name: &str) -> Result<(), Error<DeleteAiScalesByOwnerByNameError>> {
2782    // add a prefix to parameters to efficiently prevent name collisions
2783    let p_owner = owner;
2784    let p_name = name;
2785
2786    let uri_str = format!("{}/v1/ai/scales/{owner}/{name}", configuration.base_path, owner=crate::apis::urlencode(p_owner), name=crate::apis::urlencode(p_name));
2787    let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str);
2788
2789    if let Some(ref user_agent) = configuration.user_agent {
2790        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
2791    }
2792    if let Some(ref token) = configuration.bearer_access_token {
2793        req_builder = req_builder.bearer_auth(token.to_owned());
2794    };
2795
2796    let req = req_builder.build()?;
2797    let resp = configuration.client.execute(req).await?;
2798
2799    let status = resp.status();
2800
2801    if !status.is_client_error() && !status.is_server_error() {
2802        Ok(())
2803    } else {
2804        let content = resp.text().await?;
2805        let entity: Option<DeleteAiScalesByOwnerByNameError> = serde_json::from_str(&content).ok();
2806        Err(Error::ResponseError(ResponseContent { status, content, entity }))
2807    }
2808}
2809
2810/// Delete one scan.
2811pub async fn delete_ai_scans_by_owner_by_name(configuration: &configuration::Configuration, owner: &str, name: &str) -> Result<(), Error<DeleteAiScansByOwnerByNameError>> {
2812    // add a prefix to parameters to efficiently prevent name collisions
2813    let p_owner = owner;
2814    let p_name = name;
2815
2816    let uri_str = format!("{}/v1/ai/scans/{owner}/{name}", configuration.base_path, owner=crate::apis::urlencode(p_owner), name=crate::apis::urlencode(p_name));
2817    let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str);
2818
2819    if let Some(ref user_agent) = configuration.user_agent {
2820        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
2821    }
2822    if let Some(ref token) = configuration.bearer_access_token {
2823        req_builder = req_builder.bearer_auth(token.to_owned());
2824    };
2825
2826    let req = req_builder.build()?;
2827    let resp = configuration.client.execute(req).await?;
2828
2829    let status = resp.status();
2830
2831    if !status.is_client_error() && !status.is_server_error() {
2832        Ok(())
2833    } else {
2834        let content = resp.text().await?;
2835        let entity: Option<DeleteAiScansByOwnerByNameError> = serde_json::from_str(&content).ok();
2836        Err(Error::ResponseError(ResponseContent { status, content, entity }))
2837    }
2838}
2839
2840/// Delete one session.
2841pub async fn delete_ai_signin_sessions_by_owner_by_name(configuration: &configuration::Configuration, owner: &str, name: &str) -> Result<(), Error<DeleteAiSigninSessionsByOwnerByNameError>> {
2842    // add a prefix to parameters to efficiently prevent name collisions
2843    let p_owner = owner;
2844    let p_name = name;
2845
2846    let uri_str = format!("{}/v1/ai/signin-sessions/{owner}/{name}", configuration.base_path, owner=crate::apis::urlencode(p_owner), name=crate::apis::urlencode(p_name));
2847    let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str);
2848
2849    if let Some(ref user_agent) = configuration.user_agent {
2850        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
2851    }
2852    if let Some(ref token) = configuration.bearer_access_token {
2853        req_builder = req_builder.bearer_auth(token.to_owned());
2854    };
2855
2856    let req = req_builder.build()?;
2857    let resp = configuration.client.execute(req).await?;
2858
2859    let status = resp.status();
2860
2861    if !status.is_client_error() && !status.is_server_error() {
2862        Ok(())
2863    } else {
2864        let content = resp.text().await?;
2865        let entity: Option<DeleteAiSigninSessionsByOwnerByNameError> = serde_json::from_str(&content).ok();
2866        Err(Error::ResponseError(ResponseContent { status, content, entity }))
2867    }
2868}
2869
2870/// Delete one store.
2871pub async fn delete_ai_stores_by_owner_by_name(configuration: &configuration::Configuration, owner: &str, name: &str) -> Result<(), Error<DeleteAiStoresByOwnerByNameError>> {
2872    // add a prefix to parameters to efficiently prevent name collisions
2873    let p_owner = owner;
2874    let p_name = name;
2875
2876    let uri_str = format!("{}/v1/ai/stores/{owner}/{name}", configuration.base_path, owner=crate::apis::urlencode(p_owner), name=crate::apis::urlencode(p_name));
2877    let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str);
2878
2879    if let Some(ref user_agent) = configuration.user_agent {
2880        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
2881    }
2882    if let Some(ref token) = configuration.bearer_access_token {
2883        req_builder = req_builder.bearer_auth(token.to_owned());
2884    };
2885
2886    let req = req_builder.build()?;
2887    let resp = configuration.client.execute(req).await?;
2888
2889    let status = resp.status();
2890
2891    if !status.is_client_error() && !status.is_server_error() {
2892        Ok(())
2893    } else {
2894        let content = resp.text().await?;
2895        let entity: Option<DeleteAiStoresByOwnerByNameError> = serde_json::from_str(&content).ok();
2896        Err(Error::ResponseError(ResponseContent { status, content, entity }))
2897    }
2898}
2899
2900/// Delete one task.
2901pub async fn delete_ai_tasks_by_owner_by_name(configuration: &configuration::Configuration, owner: &str, name: &str) -> Result<(), Error<DeleteAiTasksByOwnerByNameError>> {
2902    // add a prefix to parameters to efficiently prevent name collisions
2903    let p_owner = owner;
2904    let p_name = name;
2905
2906    let uri_str = format!("{}/v1/ai/tasks/{owner}/{name}", configuration.base_path, owner=crate::apis::urlencode(p_owner), name=crate::apis::urlencode(p_name));
2907    let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str);
2908
2909    if let Some(ref user_agent) = configuration.user_agent {
2910        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
2911    }
2912    if let Some(ref token) = configuration.bearer_access_token {
2913        req_builder = req_builder.bearer_auth(token.to_owned());
2914    };
2915
2916    let req = req_builder.build()?;
2917    let resp = configuration.client.execute(req).await?;
2918
2919    let status = resp.status();
2920
2921    if !status.is_client_error() && !status.is_server_error() {
2922        Ok(())
2923    } else {
2924        let content = resp.text().await?;
2925        let entity: Option<DeleteAiTasksByOwnerByNameError> = serde_json::from_str(&content).ok();
2926        Err(Error::ResponseError(ResponseContent { status, content, entity }))
2927    }
2928}
2929
2930/// Delete one template.
2931pub async fn delete_ai_templates_by_owner_by_name(configuration: &configuration::Configuration, owner: &str, name: &str) -> Result<(), Error<DeleteAiTemplatesByOwnerByNameError>> {
2932    // add a prefix to parameters to efficiently prevent name collisions
2933    let p_owner = owner;
2934    let p_name = name;
2935
2936    let uri_str = format!("{}/v1/ai/templates/{owner}/{name}", configuration.base_path, owner=crate::apis::urlencode(p_owner), name=crate::apis::urlencode(p_name));
2937    let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str);
2938
2939    if let Some(ref user_agent) = configuration.user_agent {
2940        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
2941    }
2942    if let Some(ref token) = configuration.bearer_access_token {
2943        req_builder = req_builder.bearer_auth(token.to_owned());
2944    };
2945
2946    let req = req_builder.build()?;
2947    let resp = configuration.client.execute(req).await?;
2948
2949    let status = resp.status();
2950
2951    if !status.is_client_error() && !status.is_server_error() {
2952        Ok(())
2953    } else {
2954        let content = resp.text().await?;
2955        let entity: Option<DeleteAiTemplatesByOwnerByNameError> = serde_json::from_str(&content).ok();
2956        Err(Error::ResponseError(ResponseContent { status, content, entity }))
2957    }
2958}
2959
2960/// Delete one tree-file.
2961pub async fn delete_ai_tree_files_by_owner_by_name(configuration: &configuration::Configuration, owner: &str, name: &str) -> Result<(), Error<DeleteAiTreeFilesByOwnerByNameError>> {
2962    // add a prefix to parameters to efficiently prevent name collisions
2963    let p_owner = owner;
2964    let p_name = name;
2965
2966    let uri_str = format!("{}/v1/ai/tree-files/{owner}/{name}", configuration.base_path, owner=crate::apis::urlencode(p_owner), name=crate::apis::urlencode(p_name));
2967    let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str);
2968
2969    if let Some(ref user_agent) = configuration.user_agent {
2970        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
2971    }
2972    if let Some(ref token) = configuration.bearer_access_token {
2973        req_builder = req_builder.bearer_auth(token.to_owned());
2974    };
2975
2976    let req = req_builder.build()?;
2977    let resp = configuration.client.execute(req).await?;
2978
2979    let status = resp.status();
2980
2981    if !status.is_client_error() && !status.is_server_error() {
2982        Ok(())
2983    } else {
2984        let content = resp.text().await?;
2985        let entity: Option<DeleteAiTreeFilesByOwnerByNameError> = serde_json::from_str(&content).ok();
2986        Err(Error::ResponseError(ResponseContent { status, content, entity }))
2987    }
2988}
2989
2990pub async fn delete_ai_vectors_all(configuration: &configuration::Configuration, ) -> Result<(), Error<DeleteAiVectorsAllError>> {
2991
2992    let uri_str = format!("{}/v1/ai/vectors/all", configuration.base_path);
2993    let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str);
2994
2995    if let Some(ref user_agent) = configuration.user_agent {
2996        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
2997    }
2998    if let Some(ref token) = configuration.bearer_access_token {
2999        req_builder = req_builder.bearer_auth(token.to_owned());
3000    };
3001
3002    let req = req_builder.build()?;
3003    let resp = configuration.client.execute(req).await?;
3004
3005    let status = resp.status();
3006
3007    if !status.is_client_error() && !status.is_server_error() {
3008        Ok(())
3009    } else {
3010        let content = resp.text().await?;
3011        let entity: Option<DeleteAiVectorsAllError> = serde_json::from_str(&content).ok();
3012        Err(Error::ResponseError(ResponseContent { status, content, entity }))
3013    }
3014}
3015
3016/// Delete one vector.
3017pub async fn delete_ai_vectors_by_owner_by_name(configuration: &configuration::Configuration, owner: &str, name: &str) -> Result<(), Error<DeleteAiVectorsByOwnerByNameError>> {
3018    // add a prefix to parameters to efficiently prevent name collisions
3019    let p_owner = owner;
3020    let p_name = name;
3021
3022    let uri_str = format!("{}/v1/ai/vectors/{owner}/{name}", configuration.base_path, owner=crate::apis::urlencode(p_owner), name=crate::apis::urlencode(p_name));
3023    let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str);
3024
3025    if let Some(ref user_agent) = configuration.user_agent {
3026        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
3027    }
3028    if let Some(ref token) = configuration.bearer_access_token {
3029        req_builder = req_builder.bearer_auth(token.to_owned());
3030    };
3031
3032    let req = req_builder.build()?;
3033    let resp = configuration.client.execute(req).await?;
3034
3035    let status = resp.status();
3036
3037    if !status.is_client_error() && !status.is_server_error() {
3038        Ok(())
3039    } else {
3040        let content = resp.text().await?;
3041        let entity: Option<DeleteAiVectorsByOwnerByNameError> = serde_json::from_str(&content).ok();
3042        Err(Error::ResponseError(ResponseContent { status, content, entity }))
3043    }
3044}
3045
3046/// Delete one video.
3047pub async fn delete_ai_videos_by_owner_by_name(configuration: &configuration::Configuration, owner: &str, name: &str) -> Result<(), Error<DeleteAiVideosByOwnerByNameError>> {
3048    // add a prefix to parameters to efficiently prevent name collisions
3049    let p_owner = owner;
3050    let p_name = name;
3051
3052    let uri_str = format!("{}/v1/ai/videos/{owner}/{name}", configuration.base_path, owner=crate::apis::urlencode(p_owner), name=crate::apis::urlencode(p_name));
3053    let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str);
3054
3055    if let Some(ref user_agent) = configuration.user_agent {
3056        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
3057    }
3058    if let Some(ref token) = configuration.bearer_access_token {
3059        req_builder = req_builder.bearer_auth(token.to_owned());
3060    };
3061
3062    let req = req_builder.build()?;
3063    let resp = configuration.client.execute(req).await?;
3064
3065    let status = resp.status();
3066
3067    if !status.is_client_error() && !status.is_server_error() {
3068        Ok(())
3069    } else {
3070        let content = resp.text().await?;
3071        let entity: Option<DeleteAiVideosByOwnerByNameError> = serde_json::from_str(&content).ok();
3072        Err(Error::ResponseError(ResponseContent { status, content, entity }))
3073    }
3074}
3075
3076/// Delete one workflow.
3077pub async fn delete_ai_workflows_by_owner_by_name(configuration: &configuration::Configuration, owner: &str, name: &str) -> Result<(), Error<DeleteAiWorkflowsByOwnerByNameError>> {
3078    // add a prefix to parameters to efficiently prevent name collisions
3079    let p_owner = owner;
3080    let p_name = name;
3081
3082    let uri_str = format!("{}/v1/ai/workflows/{owner}/{name}", configuration.base_path, owner=crate::apis::urlencode(p_owner), name=crate::apis::urlencode(p_name));
3083    let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str);
3084
3085    if let Some(ref user_agent) = configuration.user_agent {
3086        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
3087    }
3088    if let Some(ref token) = configuration.bearer_access_token {
3089        req_builder = req_builder.bearer_auth(token.to_owned());
3090    };
3091
3092    let req = req_builder.build()?;
3093    let resp = configuration.client.execute(req).await?;
3094
3095    let status = resp.status();
3096
3097    if !status.is_client_error() && !status.is_server_error() {
3098        Ok(())
3099    } else {
3100        let content = resp.text().await?;
3101        let entity: Option<DeleteAiWorkflowsByOwnerByNameError> = serde_json::from_str(&content).ok();
3102        Err(Error::ResponseError(ResponseContent { status, content, entity }))
3103    }
3104}
3105
3106pub async fn get_ai_account(configuration: &configuration::Configuration, ) -> Result<(), Error<GetAiAccountError>> {
3107
3108    let uri_str = format!("{}/v1/ai/account", configuration.base_path);
3109    let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
3110
3111    if let Some(ref user_agent) = configuration.user_agent {
3112        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
3113    }
3114    if let Some(ref token) = configuration.bearer_access_token {
3115        req_builder = req_builder.bearer_auth(token.to_owned());
3116    };
3117
3118    let req = req_builder.build()?;
3119    let resp = configuration.client.execute(req).await?;
3120
3121    let status = resp.status();
3122
3123    if !status.is_client_error() && !status.is_server_error() {
3124        Ok(())
3125    } else {
3126        let content = resp.text().await?;
3127        let entity: Option<GetAiAccountError> = serde_json::from_str(&content).ok();
3128        Err(Error::ResponseError(ResponseContent { status, content, entity }))
3129    }
3130}
3131
3132/// List the caller's activities.
3133pub async fn get_ai_activities(configuration: &configuration::Configuration, ) -> Result<(), Error<GetAiActivitiesError>> {
3134
3135    let uri_str = format!("{}/v1/ai/activities", configuration.base_path);
3136    let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
3137
3138    if let Some(ref user_agent) = configuration.user_agent {
3139        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
3140    }
3141    if let Some(ref token) = configuration.bearer_access_token {
3142        req_builder = req_builder.bearer_auth(token.to_owned());
3143    };
3144
3145    let req = req_builder.build()?;
3146    let resp = configuration.client.execute(req).await?;
3147
3148    let status = resp.status();
3149
3150    if !status.is_client_error() && !status.is_server_error() {
3151        Ok(())
3152    } else {
3153        let content = resp.text().await?;
3154        let entity: Option<GetAiActivitiesError> = serde_json::from_str(&content).ok();
3155        Err(Error::ResponseError(ResponseContent { status, content, entity }))
3156    }
3157}
3158
3159pub async fn get_ai_answer(configuration: &configuration::Configuration, ) -> Result<(), Error<GetAiAnswerError>> {
3160
3161    let uri_str = format!("{}/v1/ai/answer", configuration.base_path);
3162    let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
3163
3164    if let Some(ref user_agent) = configuration.user_agent {
3165        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
3166    }
3167    if let Some(ref token) = configuration.bearer_access_token {
3168        req_builder = req_builder.bearer_auth(token.to_owned());
3169    };
3170
3171    let req = req_builder.build()?;
3172    let resp = configuration.client.execute(req).await?;
3173
3174    let status = resp.status();
3175
3176    if !status.is_client_error() && !status.is_server_error() {
3177        Ok(())
3178    } else {
3179        let content = resp.text().await?;
3180        let entity: Option<GetAiAnswerError> = serde_json::from_str(&content).ok();
3181        Err(Error::ResponseError(ResponseContent { status, content, entity }))
3182    }
3183}
3184
3185/// List the caller's articles.
3186pub async fn get_ai_articles(configuration: &configuration::Configuration, ) -> Result<(), Error<GetAiArticlesError>> {
3187
3188    let uri_str = format!("{}/v1/ai/articles", configuration.base_path);
3189    let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
3190
3191    if let Some(ref user_agent) = configuration.user_agent {
3192        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
3193    }
3194    if let Some(ref token) = configuration.bearer_access_token {
3195        req_builder = req_builder.bearer_auth(token.to_owned());
3196    };
3197
3198    let req = req_builder.build()?;
3199    let resp = configuration.client.execute(req).await?;
3200
3201    let status = resp.status();
3202
3203    if !status.is_client_error() && !status.is_server_error() {
3204        Ok(())
3205    } else {
3206        let content = resp.text().await?;
3207        let entity: Option<GetAiArticlesError> = serde_json::from_str(&content).ok();
3208        Err(Error::ResponseError(ResponseContent { status, content, entity }))
3209    }
3210}
3211
3212/// Read one article by its (owner, name) key.
3213pub async fn get_ai_articles_by_owner_by_name(configuration: &configuration::Configuration, owner: &str, name: &str) -> Result<(), Error<GetAiArticlesByOwnerByNameError>> {
3214    // add a prefix to parameters to efficiently prevent name collisions
3215    let p_owner = owner;
3216    let p_name = name;
3217
3218    let uri_str = format!("{}/v1/ai/articles/{owner}/{name}", configuration.base_path, owner=crate::apis::urlencode(p_owner), name=crate::apis::urlencode(p_name));
3219    let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
3220
3221    if let Some(ref user_agent) = configuration.user_agent {
3222        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
3223    }
3224    if let Some(ref token) = configuration.bearer_access_token {
3225        req_builder = req_builder.bearer_auth(token.to_owned());
3226    };
3227
3228    let req = req_builder.build()?;
3229    let resp = configuration.client.execute(req).await?;
3230
3231    let status = resp.status();
3232
3233    if !status.is_client_error() && !status.is_server_error() {
3234        Ok(())
3235    } else {
3236        let content = resp.text().await?;
3237        let entity: Option<GetAiArticlesByOwnerByNameError> = serde_json::from_str(&content).ok();
3238        Err(Error::ResponseError(ResponseContent { status, content, entity }))
3239    }
3240}
3241
3242/// Cross-tenant listing. Admin-only; a tenant caller is refused.
3243pub async fn get_ai_articles_global(configuration: &configuration::Configuration, ) -> Result<(), Error<GetAiArticlesGlobalError>> {
3244
3245    let uri_str = format!("{}/v1/ai/articles/global", configuration.base_path);
3246    let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
3247
3248    if let Some(ref user_agent) = configuration.user_agent {
3249        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
3250    }
3251    if let Some(ref token) = configuration.bearer_access_token {
3252        req_builder = req_builder.bearer_auth(token.to_owned());
3253    };
3254
3255    let req = req_builder.build()?;
3256    let resp = configuration.client.execute(req).await?;
3257
3258    let status = resp.status();
3259
3260    if !status.is_client_error() && !status.is_server_error() {
3261        Ok(())
3262    } else {
3263        let content = resp.text().await?;
3264        let entity: Option<GetAiArticlesGlobalError> = serde_json::from_str(&content).ok();
3265        Err(Error::ResponseError(ResponseContent { status, content, entity }))
3266    }
3267}
3268
3269/// List the caller's assets.
3270pub async fn get_ai_assets(configuration: &configuration::Configuration, ) -> Result<(), Error<GetAiAssetsError>> {
3271
3272    let uri_str = format!("{}/v1/ai/assets", configuration.base_path);
3273    let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
3274
3275    if let Some(ref user_agent) = configuration.user_agent {
3276        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
3277    }
3278    if let Some(ref token) = configuration.bearer_access_token {
3279        req_builder = req_builder.bearer_auth(token.to_owned());
3280    };
3281
3282    let req = req_builder.build()?;
3283    let resp = configuration.client.execute(req).await?;
3284
3285    let status = resp.status();
3286
3287    if !status.is_client_error() && !status.is_server_error() {
3288        Ok(())
3289    } else {
3290        let content = resp.text().await?;
3291        let entity: Option<GetAiAssetsError> = serde_json::from_str(&content).ok();
3292        Err(Error::ResponseError(ResponseContent { status, content, entity }))
3293    }
3294}
3295
3296/// Read one asset by its (owner, name) key.
3297pub async fn get_ai_assets_by_owner_by_name(configuration: &configuration::Configuration, owner: &str, name: &str) -> Result<(), Error<GetAiAssetsByOwnerByNameError>> {
3298    // add a prefix to parameters to efficiently prevent name collisions
3299    let p_owner = owner;
3300    let p_name = name;
3301
3302    let uri_str = format!("{}/v1/ai/assets/{owner}/{name}", configuration.base_path, owner=crate::apis::urlencode(p_owner), name=crate::apis::urlencode(p_name));
3303    let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
3304
3305    if let Some(ref user_agent) = configuration.user_agent {
3306        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
3307    }
3308    if let Some(ref token) = configuration.bearer_access_token {
3309        req_builder = req_builder.bearer_auth(token.to_owned());
3310    };
3311
3312    let req = req_builder.build()?;
3313    let resp = configuration.client.execute(req).await?;
3314
3315    let status = resp.status();
3316
3317    if !status.is_client_error() && !status.is_server_error() {
3318        Ok(())
3319    } else {
3320        let content = resp.text().await?;
3321        let entity: Option<GetAiAssetsByOwnerByNameError> = serde_json::from_str(&content).ok();
3322        Err(Error::ResponseError(ResponseContent { status, content, entity }))
3323    }
3324}
3325
3326/// List the caller's chats.
3327pub async fn get_ai_chats(configuration: &configuration::Configuration, ) -> Result<(), Error<GetAiChatsError>> {
3328
3329    let uri_str = format!("{}/v1/ai/chats", configuration.base_path);
3330    let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
3331
3332    if let Some(ref user_agent) = configuration.user_agent {
3333        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
3334    }
3335    if let Some(ref token) = configuration.bearer_access_token {
3336        req_builder = req_builder.bearer_auth(token.to_owned());
3337    };
3338
3339    let req = req_builder.build()?;
3340    let resp = configuration.client.execute(req).await?;
3341
3342    let status = resp.status();
3343
3344    if !status.is_client_error() && !status.is_server_error() {
3345        Ok(())
3346    } else {
3347        let content = resp.text().await?;
3348        let entity: Option<GetAiChatsError> = serde_json::from_str(&content).ok();
3349        Err(Error::ResponseError(ResponseContent { status, content, entity }))
3350    }
3351}
3352
3353/// Read one chat by its (owner, name) key.
3354pub async fn get_ai_chats_by_owner_by_name(configuration: &configuration::Configuration, owner: &str, name: &str) -> Result<(), Error<GetAiChatsByOwnerByNameError>> {
3355    // add a prefix to parameters to efficiently prevent name collisions
3356    let p_owner = owner;
3357    let p_name = name;
3358
3359    let uri_str = format!("{}/v1/ai/chats/{owner}/{name}", configuration.base_path, owner=crate::apis::urlencode(p_owner), name=crate::apis::urlencode(p_name));
3360    let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
3361
3362    if let Some(ref user_agent) = configuration.user_agent {
3363        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
3364    }
3365    if let Some(ref token) = configuration.bearer_access_token {
3366        req_builder = req_builder.bearer_auth(token.to_owned());
3367    };
3368
3369    let req = req_builder.build()?;
3370    let resp = configuration.client.execute(req).await?;
3371
3372    let status = resp.status();
3373
3374    if !status.is_client_error() && !status.is_server_error() {
3375        Ok(())
3376    } else {
3377        let content = resp.text().await?;
3378        let entity: Option<GetAiChatsByOwnerByNameError> = serde_json::from_str(&content).ok();
3379        Err(Error::ResponseError(ResponseContent { status, content, entity }))
3380    }
3381}
3382
3383/// Cross-tenant listing. Admin-only; a tenant caller is refused.
3384pub async fn get_ai_chats_global(configuration: &configuration::Configuration, ) -> Result<(), Error<GetAiChatsGlobalError>> {
3385
3386    let uri_str = format!("{}/v1/ai/chats/global", configuration.base_path);
3387    let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
3388
3389    if let Some(ref user_agent) = configuration.user_agent {
3390        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
3391    }
3392    if let Some(ref token) = configuration.bearer_access_token {
3393        req_builder = req_builder.bearer_auth(token.to_owned());
3394    };
3395
3396    let req = req_builder.build()?;
3397    let resp = configuration.client.execute(req).await?;
3398
3399    let status = resp.status();
3400
3401    if !status.is_client_error() && !status.is_server_error() {
3402        Ok(())
3403    } else {
3404        let content = resp.text().await?;
3405        let entity: Option<GetAiChatsGlobalError> = serde_json::from_str(&content).ok();
3406        Err(Error::ResponseError(ResponseContent { status, content, entity }))
3407    }
3408}
3409
3410/// Lists the org's connectable AI accounts and whether each is currently connected. Never returns a key or a kms:// reference.
3411pub async fn get_ai_connections(configuration: &configuration::Configuration, ) -> Result<(), Error<GetAiConnectionsError>> {
3412
3413    let uri_str = format!("{}/v1/ai/connections", configuration.base_path);
3414    let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
3415
3416    if let Some(ref user_agent) = configuration.user_agent {
3417        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
3418    }
3419    if let Some(ref token) = configuration.bearer_access_token {
3420        req_builder = req_builder.bearer_auth(token.to_owned());
3421    };
3422
3423    let req = req_builder.build()?;
3424    let resp = configuration.client.execute(req).await?;
3425
3426    let status = resp.status();
3427
3428    if !status.is_client_error() && !status.is_server_error() {
3429        Ok(())
3430    } else {
3431        let content = resp.text().await?;
3432        let entity: Option<GetAiConnectionsError> = serde_json::from_str(&content).ok();
3433        Err(Error::ResponseError(ResponseContent { status, content, entity }))
3434    }
3435}
3436
3437/// Begins an OAuth connection for the caller's org: it binds the org into a signed state and sends the caller to the provider's authorize URL. By default it 302-redirects (a top-level browser \"connect your login\" click); a SPA/BFF that needs to drive the redirect itself passes ?format=json and gets {authorizeUrl} in the standard envelope. The org is the VERIFIED principal, so only the caller's own connection can result.
3438pub async fn get_ai_connections_by_provider_authorize(configuration: &configuration::Configuration, provider: &str) -> Result<(), Error<GetAiConnectionsByProviderAuthorizeError>> {
3439    // add a prefix to parameters to efficiently prevent name collisions
3440    let p_provider = provider;
3441
3442    let uri_str = format!("{}/v1/ai/connections/{provider}/authorize", configuration.base_path, provider=crate::apis::urlencode(p_provider));
3443    let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
3444
3445    if let Some(ref user_agent) = configuration.user_agent {
3446        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
3447    }
3448    if let Some(ref token) = configuration.bearer_access_token {
3449        req_builder = req_builder.bearer_auth(token.to_owned());
3450    };
3451
3452    let req = req_builder.build()?;
3453    let resp = configuration.client.execute(req).await?;
3454
3455    let status = resp.status();
3456
3457    if !status.is_client_error() && !status.is_server_error() {
3458        Ok(())
3459    } else {
3460        let content = resp.text().await?;
3461        let entity: Option<GetAiConnectionsByProviderAuthorizeError> = serde_json::from_str(&content).ok();
3462        Err(Error::ResponseError(ResponseContent { status, content, entity }))
3463    }
3464}
3465
3466/// Completes OAuth: the org is recovered from the SIGNED state (not a header), the code is exchanged for a token, the token is SEALED into KMS (never the row/logs) through the same path as a BYOK key, and the org's provider row is upserted to \"connected\". The browser is then redirected back to the console with ?ai_connected=<provider> (or ?ai_connect_error=<provider> on failure). Because the org comes from the state THIS server signed, an attacker cannot land their token in a victim org — which is why this endpoint is state-authenticated rather than credential-gated.
3467pub async fn get_ai_connections_by_provider_callback(configuration: &configuration::Configuration, provider: &str) -> Result<(), Error<GetAiConnectionsByProviderCallbackError>> {
3468    // add a prefix to parameters to efficiently prevent name collisions
3469    let p_provider = provider;
3470
3471    let uri_str = format!("{}/v1/ai/connections/{provider}/callback", configuration.base_path, provider=crate::apis::urlencode(p_provider));
3472    let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
3473
3474    if let Some(ref user_agent) = configuration.user_agent {
3475        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
3476    }
3477    if let Some(ref token) = configuration.bearer_access_token {
3478        req_builder = req_builder.bearer_auth(token.to_owned());
3479    };
3480
3481    let req = req_builder.build()?;
3482    let resp = configuration.client.execute(req).await?;
3483
3484    let status = resp.status();
3485
3486    if !status.is_client_error() && !status.is_server_error() {
3487        Ok(())
3488    } else {
3489        let content = resp.text().await?;
3490        let entity: Option<GetAiConnectionsByProviderCallbackError> = serde_json::from_str(&content).ok();
3491        Err(Error::ResponseError(ResponseContent { status, content, entity }))
3492    }
3493}
3494
3495/// Imports the caller org's usage for a connected third-party account. The org is resolved from the VERIFIED principal (requireConnectionOrg), so a tenant reads only its own connection. The key is unsealed SERVER-SIDE and never returned. An unconnected account, a missing importer, or a scope-denied provider all return a 200 ProviderUsage with connected/available flags + a human note — the UI's honest-empty states — never a fabricated figure.
3496pub async fn get_ai_connections_by_provider_usage(configuration: &configuration::Configuration, provider: &str) -> Result<(), Error<GetAiConnectionsByProviderUsageError>> {
3497    // add a prefix to parameters to efficiently prevent name collisions
3498    let p_provider = provider;
3499
3500    let uri_str = format!("{}/v1/ai/connections/{provider}/usage", configuration.base_path, provider=crate::apis::urlencode(p_provider));
3501    let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
3502
3503    if let Some(ref user_agent) = configuration.user_agent {
3504        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
3505    }
3506    if let Some(ref token) = configuration.bearer_access_token {
3507        req_builder = req_builder.bearer_auth(token.to_owned());
3508    };
3509
3510    let req = req_builder.build()?;
3511    let resp = configuration.client.execute(req).await?;
3512
3513    let status = resp.status();
3514
3515    if !status.is_client_error() && !status.is_server_error() {
3516        Ok(())
3517    } else {
3518        let content = resp.text().await?;
3519        let entity: Option<GetAiConnectionsByProviderUsageError> = serde_json::from_str(&content).ok();
3520        Err(Error::ResponseError(ResponseContent { status, content, entity }))
3521    }
3522}
3523
3524pub async fn get_ai_dashboards_agents(configuration: &configuration::Configuration, ) -> Result<(), Error<GetAiDashboardsAgentsError>> {
3525
3526    let uri_str = format!("{}/v1/ai/dashboards/agents", configuration.base_path);
3527    let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
3528
3529    if let Some(ref user_agent) = configuration.user_agent {
3530        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
3531    }
3532    if let Some(ref token) = configuration.bearer_access_token {
3533        req_builder = req_builder.bearer_auth(token.to_owned());
3534    };
3535
3536    let req = req_builder.build()?;
3537    let resp = configuration.client.execute(req).await?;
3538
3539    let status = resp.status();
3540
3541    if !status.is_client_error() && !status.is_server_error() {
3542        Ok(())
3543    } else {
3544        let content = resp.text().await?;
3545        let entity: Option<GetAiDashboardsAgentsError> = serde_json::from_str(&content).ok();
3546        Err(Error::ResponseError(ResponseContent { status, content, entity }))
3547    }
3548}
3549
3550pub async fn get_ai_dashboards_vm(configuration: &configuration::Configuration, ) -> Result<(), Error<GetAiDashboardsVmError>> {
3551
3552    let uri_str = format!("{}/v1/ai/dashboards/vm", configuration.base_path);
3553    let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
3554
3555    if let Some(ref user_agent) = configuration.user_agent {
3556        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
3557    }
3558    if let Some(ref token) = configuration.bearer_access_token {
3559        req_builder = req_builder.bearer_auth(token.to_owned());
3560    };
3561
3562    let req = req_builder.build()?;
3563    let resp = configuration.client.execute(req).await?;
3564
3565    let status = resp.status();
3566
3567    if !status.is_client_error() && !status.is_server_error() {
3568        Ok(())
3569    } else {
3570        let content = resp.text().await?;
3571        let entity: Option<GetAiDashboardsVmError> = serde_json::from_str(&content).ok();
3572        Err(Error::ResponseError(ResponseContent { status, content, entity }))
3573    }
3574}
3575
3576/// List the caller's deployments.
3577pub async fn get_ai_deployments(configuration: &configuration::Configuration, ) -> Result<(), Error<GetAiDeploymentsError>> {
3578
3579    let uri_str = format!("{}/v1/ai/deployments", configuration.base_path);
3580    let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
3581
3582    if let Some(ref user_agent) = configuration.user_agent {
3583        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
3584    }
3585    if let Some(ref token) = configuration.bearer_access_token {
3586        req_builder = req_builder.bearer_auth(token.to_owned());
3587    };
3588
3589    let req = req_builder.build()?;
3590    let resp = configuration.client.execute(req).await?;
3591
3592    let status = resp.status();
3593
3594    if !status.is_client_error() && !status.is_server_error() {
3595        Ok(())
3596    } else {
3597        let content = resp.text().await?;
3598        let entity: Option<GetAiDeploymentsError> = serde_json::from_str(&content).ok();
3599        Err(Error::ResponseError(ResponseContent { status, content, entity }))
3600    }
3601}
3602
3603/// Read one application by its (owner, name) key.
3604pub async fn get_ai_deployments_by_owner_by_name(configuration: &configuration::Configuration, owner: &str, name: &str) -> Result<(), Error<GetAiDeploymentsByOwnerByNameError>> {
3605    // add a prefix to parameters to efficiently prevent name collisions
3606    let p_owner = owner;
3607    let p_name = name;
3608
3609    let uri_str = format!("{}/v1/ai/deployments/{owner}/{name}", configuration.base_path, owner=crate::apis::urlencode(p_owner), name=crate::apis::urlencode(p_name));
3610    let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
3611
3612    if let Some(ref user_agent) = configuration.user_agent {
3613        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
3614    }
3615    if let Some(ref token) = configuration.bearer_access_token {
3616        req_builder = req_builder.bearer_auth(token.to_owned());
3617    };
3618
3619    let req = req_builder.build()?;
3620    let resp = configuration.client.execute(req).await?;
3621
3622    let status = resp.status();
3623
3624    if !status.is_client_error() && !status.is_server_error() {
3625        Ok(())
3626    } else {
3627        let content = resp.text().await?;
3628        let entity: Option<GetAiDeploymentsByOwnerByNameError> = serde_json::from_str(&content).ok();
3629        Err(Error::ResponseError(ResponseContent { status, content, entity }))
3630    }
3631}
3632
3633/// List the caller's files.
3634pub async fn get_ai_files(configuration: &configuration::Configuration, ) -> Result<(), Error<GetAiFilesError>> {
3635
3636    let uri_str = format!("{}/v1/ai/files", configuration.base_path);
3637    let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
3638
3639    if let Some(ref user_agent) = configuration.user_agent {
3640        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
3641    }
3642    if let Some(ref token) = configuration.bearer_access_token {
3643        req_builder = req_builder.bearer_auth(token.to_owned());
3644    };
3645
3646    let req = req_builder.build()?;
3647    let resp = configuration.client.execute(req).await?;
3648
3649    let status = resp.status();
3650
3651    if !status.is_client_error() && !status.is_server_error() {
3652        Ok(())
3653    } else {
3654        let content = resp.text().await?;
3655        let entity: Option<GetAiFilesError> = serde_json::from_str(&content).ok();
3656        Err(Error::ResponseError(ResponseContent { status, content, entity }))
3657    }
3658}
3659
3660pub async fn get_ai_files_active(configuration: &configuration::Configuration, ) -> Result<(), Error<GetAiFilesActiveError>> {
3661
3662    let uri_str = format!("{}/v1/ai/files/active", configuration.base_path);
3663    let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
3664
3665    if let Some(ref user_agent) = configuration.user_agent {
3666        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
3667    }
3668    if let Some(ref token) = configuration.bearer_access_token {
3669        req_builder = req_builder.bearer_auth(token.to_owned());
3670    };
3671
3672    let req = req_builder.build()?;
3673    let resp = configuration.client.execute(req).await?;
3674
3675    let status = resp.status();
3676
3677    if !status.is_client_error() && !status.is_server_error() {
3678        Ok(())
3679    } else {
3680        let content = resp.text().await?;
3681        let entity: Option<GetAiFilesActiveError> = serde_json::from_str(&content).ok();
3682        Err(Error::ResponseError(ResponseContent { status, content, entity }))
3683    }
3684}
3685
3686/// Read one file by its (owner, name) key.
3687pub async fn get_ai_files_by_owner_by_name(configuration: &configuration::Configuration, owner: &str, name: &str) -> Result<(), Error<GetAiFilesByOwnerByNameError>> {
3688    // add a prefix to parameters to efficiently prevent name collisions
3689    let p_owner = owner;
3690    let p_name = name;
3691
3692    let uri_str = format!("{}/v1/ai/files/{owner}/{name}", configuration.base_path, owner=crate::apis::urlencode(p_owner), name=crate::apis::urlencode(p_name));
3693    let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
3694
3695    if let Some(ref user_agent) = configuration.user_agent {
3696        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
3697    }
3698    if let Some(ref token) = configuration.bearer_access_token {
3699        req_builder = req_builder.bearer_auth(token.to_owned());
3700    };
3701
3702    let req = req_builder.build()?;
3703    let resp = configuration.client.execute(req).await?;
3704
3705    let status = resp.status();
3706
3707    if !status.is_client_error() && !status.is_server_error() {
3708        Ok(())
3709    } else {
3710        let content = resp.text().await?;
3711        let entity: Option<GetAiFilesByOwnerByNameError> = serde_json::from_str(&content).ok();
3712        Err(Error::ResponseError(ResponseContent { status, content, entity }))
3713    }
3714}
3715
3716/// Cross-tenant listing. Admin-only; a tenant caller is refused.
3717pub async fn get_ai_files_global(configuration: &configuration::Configuration, ) -> Result<(), Error<GetAiFilesGlobalError>> {
3718
3719    let uri_str = format!("{}/v1/ai/files/global", configuration.base_path);
3720    let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
3721
3722    if let Some(ref user_agent) = configuration.user_agent {
3723        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
3724    }
3725    if let Some(ref token) = configuration.bearer_access_token {
3726        req_builder = req_builder.bearer_auth(token.to_owned());
3727    };
3728
3729    let req = req_builder.build()?;
3730    let resp = configuration.client.execute(req).await?;
3731
3732    let status = resp.status();
3733
3734    if !status.is_client_error() && !status.is_server_error() {
3735        Ok(())
3736    } else {
3737        let content = resp.text().await?;
3738        let entity: Option<GetAiFilesGlobalError> = serde_json::from_str(&content).ok();
3739        Err(Error::ResponseError(ResponseContent { status, content, entity }))
3740    }
3741}
3742
3743/// Proxies a HuggingFace dataset search (dataset picker).
3744pub async fn get_ai_finetune_hf_datasets(configuration: &configuration::Configuration, ) -> Result<(), Error<GetAiFinetuneHfDatasetsError>> {
3745
3746    let uri_str = format!("{}/v1/ai/finetune/hf/datasets", configuration.base_path);
3747    let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
3748
3749    if let Some(ref user_agent) = configuration.user_agent {
3750        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
3751    }
3752    if let Some(ref token) = configuration.bearer_access_token {
3753        req_builder = req_builder.bearer_auth(token.to_owned());
3754    };
3755
3756    let req = req_builder.build()?;
3757    let resp = configuration.client.execute(req).await?;
3758
3759    let status = resp.status();
3760
3761    if !status.is_client_error() && !status.is_server_error() {
3762        Ok(())
3763    } else {
3764        let content = resp.text().await?;
3765        let entity: Option<GetAiFinetuneHfDatasetsError> = serde_json::from_str(&content).ok();
3766        Err(Error::ResponseError(ResponseContent { status, content, entity }))
3767    }
3768}
3769
3770/// Proxies a HuggingFace model search (base-model picker).
3771pub async fn get_ai_finetune_hf_models(configuration: &configuration::Configuration, ) -> Result<(), Error<GetAiFinetuneHfModelsError>> {
3772
3773    let uri_str = format!("{}/v1/ai/finetune/hf/models", configuration.base_path);
3774    let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
3775
3776    if let Some(ref user_agent) = configuration.user_agent {
3777        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
3778    }
3779    if let Some(ref token) = configuration.bearer_access_token {
3780        req_builder = req_builder.bearer_auth(token.to_owned());
3781    };
3782
3783    let req = req_builder.build()?;
3784    let resp = configuration.client.execute(req).await?;
3785
3786    let status = resp.status();
3787
3788    if !status.is_client_error() && !status.is_server_error() {
3789        Ok(())
3790    } else {
3791        let content = resp.text().await?;
3792        let entity: Option<GetAiFinetuneHfModelsError> = serde_json::from_str(&content).ok();
3793        Err(Error::ResponseError(ResponseContent { status, content, entity }))
3794    }
3795}
3796
3797/// Returns a repo's detail (files, gated/private state). ?id=&kind=model|dataset
3798pub async fn get_ai_finetune_hf_repo(configuration: &configuration::Configuration, ) -> Result<(), Error<GetAiFinetuneHfRepoError>> {
3799
3800    let uri_str = format!("{}/v1/ai/finetune/hf/repo", configuration.base_path);
3801    let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
3802
3803    if let Some(ref user_agent) = configuration.user_agent {
3804        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
3805    }
3806    if let Some(ref token) = configuration.bearer_access_token {
3807        req_builder = req_builder.bearer_auth(token.to_owned());
3808    };
3809
3810    let req = req_builder.build()?;
3811    let resp = configuration.client.execute(req).await?;
3812
3813    let status = resp.status();
3814
3815    if !status.is_client_error() && !status.is_server_error() {
3816        Ok(())
3817    } else {
3818        let content = resp.text().await?;
3819        let entity: Option<GetAiFinetuneHfRepoError> = serde_json::from_str(&content).ok();
3820        Err(Error::ResponseError(ResponseContent { status, content, entity }))
3821    }
3822}
3823
3824/// Returns one job with refreshed live status. ?id=owner/name or ?name=
3825pub async fn get_ai_finetune_job(configuration: &configuration::Configuration, ) -> Result<(), Error<GetAiFinetuneJobError>> {
3826
3827    let uri_str = format!("{}/v1/ai/finetune/job", configuration.base_path);
3828    let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
3829
3830    if let Some(ref user_agent) = configuration.user_agent {
3831        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
3832    }
3833    if let Some(ref token) = configuration.bearer_access_token {
3834        req_builder = req_builder.bearer_auth(token.to_owned());
3835    };
3836
3837    let req = req_builder.build()?;
3838    let resp = configuration.client.execute(req).await?;
3839
3840    let status = resp.status();
3841
3842    if !status.is_client_error() && !status.is_server_error() {
3843        Ok(())
3844    } else {
3845        let content = resp.text().await?;
3846        let entity: Option<GetAiFinetuneJobError> = serde_json::from_str(&content).ok();
3847        Err(Error::ResponseError(ResponseContent { status, content, entity }))
3848    }
3849}
3850
3851/// Returns the org's jobs, refreshing live status for active ones.
3852pub async fn get_ai_finetune_jobs(configuration: &configuration::Configuration, ) -> Result<(), Error<GetAiFinetuneJobsError>> {
3853
3854    let uri_str = format!("{}/v1/ai/finetune/jobs", configuration.base_path);
3855    let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
3856
3857    if let Some(ref user_agent) = configuration.user_agent {
3858        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
3859    }
3860    if let Some(ref token) = configuration.bearer_access_token {
3861        req_builder = req_builder.bearer_auth(token.to_owned());
3862    };
3863
3864    let req = req_builder.build()?;
3865    let resp = configuration.client.execute(req).await?;
3866
3867    let status = resp.status();
3868
3869    if !status.is_client_error() && !status.is_server_error() {
3870        Ok(())
3871    } else {
3872        let content = resp.text().await?;
3873        let entity: Option<GetAiFinetuneJobsError> = serde_json::from_str(&content).ok();
3874        Err(Error::ResponseError(ResponseContent { status, content, entity }))
3875    }
3876}
3877
3878/// Returns the new-job catalog plus, when a selection is passed (?baseModel&method&task&preset[&datasetExamples]), the recommended config so the console can render \"Recommended\" as a one-click, ready-to-run default.
3879pub async fn get_ai_finetune_presets(configuration: &configuration::Configuration, ) -> Result<(), Error<GetAiFinetunePresetsError>> {
3880
3881    let uri_str = format!("{}/v1/ai/finetune/presets", configuration.base_path);
3882    let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
3883
3884    if let Some(ref user_agent) = configuration.user_agent {
3885        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
3886    }
3887    if let Some(ref token) = configuration.bearer_access_token {
3888        req_builder = req_builder.bearer_auth(token.to_owned());
3889    };
3890
3891    let req = req_builder.build()?;
3892    let resp = configuration.client.execute(req).await?;
3893
3894    let status = resp.status();
3895
3896    if !status.is_client_error() && !status.is_server_error() {
3897        Ok(())
3898    } else {
3899        let content = resp.text().await?;
3900        let entity: Option<GetAiFinetunePresetsError> = serde_json::from_str(&content).ok();
3901        Err(Error::ResponseError(ResponseContent { status, content, entity }))
3902    }
3903}
3904
3905/// List the caller's forms.
3906pub async fn get_ai_forms(configuration: &configuration::Configuration, ) -> Result<(), Error<GetAiFormsError>> {
3907
3908    let uri_str = format!("{}/v1/ai/forms", configuration.base_path);
3909    let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
3910
3911    if let Some(ref user_agent) = configuration.user_agent {
3912        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
3913    }
3914    if let Some(ref token) = configuration.bearer_access_token {
3915        req_builder = req_builder.bearer_auth(token.to_owned());
3916    };
3917
3918    let req = req_builder.build()?;
3919    let resp = configuration.client.execute(req).await?;
3920
3921    let status = resp.status();
3922
3923    if !status.is_client_error() && !status.is_server_error() {
3924        Ok(())
3925    } else {
3926        let content = resp.text().await?;
3927        let entity: Option<GetAiFormsError> = serde_json::from_str(&content).ok();
3928        Err(Error::ResponseError(ResponseContent { status, content, entity }))
3929    }
3930}
3931
3932/// Read one form by its (owner, name) key.
3933pub async fn get_ai_forms_by_owner_by_name(configuration: &configuration::Configuration, owner: &str, name: &str) -> Result<(), Error<GetAiFormsByOwnerByNameError>> {
3934    // add a prefix to parameters to efficiently prevent name collisions
3935    let p_owner = owner;
3936    let p_name = name;
3937
3938    let uri_str = format!("{}/v1/ai/forms/{owner}/{name}", configuration.base_path, owner=crate::apis::urlencode(p_owner), name=crate::apis::urlencode(p_name));
3939    let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
3940
3941    if let Some(ref user_agent) = configuration.user_agent {
3942        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
3943    }
3944    if let Some(ref token) = configuration.bearer_access_token {
3945        req_builder = req_builder.bearer_auth(token.to_owned());
3946    };
3947
3948    let req = req_builder.build()?;
3949    let resp = configuration.client.execute(req).await?;
3950
3951    let status = resp.status();
3952
3953    if !status.is_client_error() && !status.is_server_error() {
3954        Ok(())
3955    } else {
3956        let content = resp.text().await?;
3957        let entity: Option<GetAiFormsByOwnerByNameError> = serde_json::from_str(&content).ok();
3958        Err(Error::ResponseError(ResponseContent { status, content, entity }))
3959    }
3960}
3961
3962pub async fn get_ai_forms_data(configuration: &configuration::Configuration, ) -> Result<(), Error<GetAiFormsDataError>> {
3963
3964    let uri_str = format!("{}/v1/ai/forms/data", configuration.base_path);
3965    let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
3966
3967    if let Some(ref user_agent) = configuration.user_agent {
3968        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
3969    }
3970    if let Some(ref token) = configuration.bearer_access_token {
3971        req_builder = req_builder.bearer_auth(token.to_owned());
3972    };
3973
3974    let req = req_builder.build()?;
3975    let resp = configuration.client.execute(req).await?;
3976
3977    let status = resp.status();
3978
3979    if !status.is_client_error() && !status.is_server_error() {
3980        Ok(())
3981    } else {
3982        let content = resp.text().await?;
3983        let entity: Option<GetAiFormsDataError> = serde_json::from_str(&content).ok();
3984        Err(Error::ResponseError(ResponseContent { status, content, entity }))
3985    }
3986}
3987
3988/// Cross-tenant listing. Admin-only; a tenant caller is refused.
3989pub async fn get_ai_forms_global(configuration: &configuration::Configuration, ) -> Result<(), Error<GetAiFormsGlobalError>> {
3990
3991    let uri_str = format!("{}/v1/ai/forms/global", configuration.base_path);
3992    let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
3993
3994    if let Some(ref user_agent) = configuration.user_agent {
3995        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
3996    }
3997    if let Some(ref token) = configuration.bearer_access_token {
3998        req_builder = req_builder.bearer_auth(token.to_owned());
3999    };
4000
4001    let req = req_builder.build()?;
4002    let resp = configuration.client.execute(req).await?;
4003
4004    let status = resp.status();
4005
4006    if !status.is_client_error() && !status.is_server_error() {
4007        Ok(())
4008    } else {
4009        let content = resp.text().await?;
4010        let entity: Option<GetAiFormsGlobalError> = serde_json::from_str(&content).ok();
4011        Err(Error::ResponseError(ResponseContent { status, content, entity }))
4012    }
4013}
4014
4015/// List the caller's graphs.
4016pub async fn get_ai_graphs(configuration: &configuration::Configuration, ) -> Result<(), Error<GetAiGraphsError>> {
4017
4018    let uri_str = format!("{}/v1/ai/graphs", configuration.base_path);
4019    let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
4020
4021    if let Some(ref user_agent) = configuration.user_agent {
4022        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
4023    }
4024    if let Some(ref token) = configuration.bearer_access_token {
4025        req_builder = req_builder.bearer_auth(token.to_owned());
4026    };
4027
4028    let req = req_builder.build()?;
4029    let resp = configuration.client.execute(req).await?;
4030
4031    let status = resp.status();
4032
4033    if !status.is_client_error() && !status.is_server_error() {
4034        Ok(())
4035    } else {
4036        let content = resp.text().await?;
4037        let entity: Option<GetAiGraphsError> = serde_json::from_str(&content).ok();
4038        Err(Error::ResponseError(ResponseContent { status, content, entity }))
4039    }
4040}
4041
4042/// Read one graph by its (owner, name) key.
4043pub async fn get_ai_graphs_by_owner_by_name(configuration: &configuration::Configuration, owner: &str, name: &str) -> Result<(), Error<GetAiGraphsByOwnerByNameError>> {
4044    // add a prefix to parameters to efficiently prevent name collisions
4045    let p_owner = owner;
4046    let p_name = name;
4047
4048    let uri_str = format!("{}/v1/ai/graphs/{owner}/{name}", configuration.base_path, owner=crate::apis::urlencode(p_owner), name=crate::apis::urlencode(p_name));
4049    let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
4050
4051    if let Some(ref user_agent) = configuration.user_agent {
4052        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
4053    }
4054    if let Some(ref token) = configuration.bearer_access_token {
4055        req_builder = req_builder.bearer_auth(token.to_owned());
4056    };
4057
4058    let req = req_builder.build()?;
4059    let resp = configuration.client.execute(req).await?;
4060
4061    let status = resp.status();
4062
4063    if !status.is_client_error() && !status.is_server_error() {
4064        Ok(())
4065    } else {
4066        let content = resp.text().await?;
4067        let entity: Option<GetAiGraphsByOwnerByNameError> = serde_json::from_str(&content).ok();
4068        Err(Error::ResponseError(ResponseContent { status, content, entity }))
4069    }
4070}
4071
4072/// Cross-tenant listing. Admin-only; a tenant caller is refused.
4073pub async fn get_ai_graphs_global(configuration: &configuration::Configuration, ) -> Result<(), Error<GetAiGraphsGlobalError>> {
4074
4075    let uri_str = format!("{}/v1/ai/graphs/global", configuration.base_path);
4076    let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
4077
4078    if let Some(ref user_agent) = configuration.user_agent {
4079        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
4080    }
4081    if let Some(ref token) = configuration.bearer_access_token {
4082        req_builder = req_builder.bearer_auth(token.to_owned());
4083    };
4084
4085    let req = req_builder.build()?;
4086    let resp = configuration.client.execute(req).await?;
4087
4088    let status = resp.status();
4089
4090    if !status.is_client_error() && !status.is_server_error() {
4091        Ok(())
4092    } else {
4093        let content = resp.text().await?;
4094        let entity: Option<GetAiGraphsGlobalError> = serde_json::from_str(&content).ok();
4095        Err(Error::ResponseError(ResponseContent { status, content, entity }))
4096    }
4097}
4098
4099pub async fn get_ai_k8s_status(configuration: &configuration::Configuration, ) -> Result<(), Error<GetAiK8sStatusError>> {
4100
4101    let uri_str = format!("{}/v1/ai/k8s-status", configuration.base_path);
4102    let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
4103
4104    if let Some(ref user_agent) = configuration.user_agent {
4105        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
4106    }
4107    if let Some(ref token) = configuration.bearer_access_token {
4108        req_builder = req_builder.bearer_auth(token.to_owned());
4109    };
4110
4111    let req = req_builder.build()?;
4112    let resp = configuration.client.execute(req).await?;
4113
4114    let status = resp.status();
4115
4116    if !status.is_client_error() && !status.is_server_error() {
4117        Ok(())
4118    } else {
4119        let content = resp.text().await?;
4120        let entity: Option<GetAiK8sStatusError> = serde_json::from_str(&content).ok();
4121        Err(Error::ResponseError(ResponseContent { status, content, entity }))
4122    }
4123}
4124
4125/// List the authenticated user's stored facts
4126pub async fn get_ai_memory_facts(configuration: &configuration::Configuration, ) -> Result<(), Error<GetAiMemoryFactsError>> {
4127
4128    let uri_str = format!("{}/v1/ai/memory/facts", configuration.base_path);
4129    let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
4130
4131    if let Some(ref user_agent) = configuration.user_agent {
4132        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
4133    }
4134    if let Some(ref token) = configuration.bearer_access_token {
4135        req_builder = req_builder.bearer_auth(token.to_owned());
4136    };
4137
4138    let req = req_builder.build()?;
4139    let resp = configuration.client.execute(req).await?;
4140
4141    let status = resp.status();
4142
4143    if !status.is_client_error() && !status.is_server_error() {
4144        Ok(())
4145    } else {
4146        let content = resp.text().await?;
4147        let entity: Option<GetAiMemoryFactsError> = serde_json::from_str(&content).ok();
4148        Err(Error::ResponseError(ResponseContent { status, content, entity }))
4149    }
4150}
4151
4152/// List the authenticated user's memories, newest first
4153pub async fn get_ai_memory_list(configuration: &configuration::Configuration, ) -> Result<(), Error<GetAiMemoryListError>> {
4154
4155    let uri_str = format!("{}/v1/ai/memory/list", configuration.base_path);
4156    let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
4157
4158    if let Some(ref user_agent) = configuration.user_agent {
4159        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
4160    }
4161    if let Some(ref token) = configuration.bearer_access_token {
4162        req_builder = req_builder.bearer_auth(token.to_owned());
4163    };
4164
4165    let req = req_builder.build()?;
4166    let resp = configuration.client.execute(req).await?;
4167
4168    let status = resp.status();
4169
4170    if !status.is_client_error() && !status.is_server_error() {
4171        Ok(())
4172    } else {
4173        let content = resp.text().await?;
4174        let entity: Option<GetAiMemoryListError> = serde_json::from_str(&content).ok();
4175        Err(Error::ResponseError(ResponseContent { status, content, entity }))
4176    }
4177}
4178
4179/// Recall recent/relevant memories for context injection; with q it ranks semantically, without q it returns the most recent
4180pub async fn get_ai_memory_recall(configuration: &configuration::Configuration, ) -> Result<(), Error<GetAiMemoryRecallError>> {
4181
4182    let uri_str = format!("{}/v1/ai/memory/recall", configuration.base_path);
4183    let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
4184
4185    if let Some(ref user_agent) = configuration.user_agent {
4186        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
4187    }
4188    if let Some(ref token) = configuration.bearer_access_token {
4189        req_builder = req_builder.bearer_auth(token.to_owned());
4190    };
4191
4192    let req = req_builder.build()?;
4193    let resp = configuration.client.execute(req).await?;
4194
4195    let status = resp.status();
4196
4197    if !status.is_client_error() && !status.is_server_error() {
4198        Ok(())
4199    } else {
4200        let content = resp.text().await?;
4201        let entity: Option<GetAiMemoryRecallError> = serde_json::from_str(&content).ok();
4202        Err(Error::ResponseError(ResponseContent { status, content, entity }))
4203    }
4204}
4205
4206/// Search the authenticated user's memories (semantic, text fallback)
4207pub async fn get_ai_memory_search(configuration: &configuration::Configuration, ) -> Result<(), Error<GetAiMemorySearchError>> {
4208
4209    let uri_str = format!("{}/v1/ai/memory/search", configuration.base_path);
4210    let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
4211
4212    if let Some(ref user_agent) = configuration.user_agent {
4213        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
4214    }
4215    if let Some(ref token) = configuration.bearer_access_token {
4216        req_builder = req_builder.bearer_auth(token.to_owned());
4217    };
4218
4219    let req = req_builder.build()?;
4220    let resp = configuration.client.execute(req).await?;
4221
4222    let status = resp.status();
4223
4224    if !status.is_client_error() && !status.is_server_error() {
4225        Ok(())
4226    } else {
4227        let content = resp.text().await?;
4228        let entity: Option<GetAiMemorySearchError> = serde_json::from_str(&content).ok();
4229        Err(Error::ResponseError(ResponseContent { status, content, entity }))
4230    }
4231}
4232
4233/// List the caller's messages.
4234pub async fn get_ai_messages(configuration: &configuration::Configuration, ) -> Result<(), Error<GetAiMessagesError>> {
4235
4236    let uri_str = format!("{}/v1/ai/messages", configuration.base_path);
4237    let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
4238
4239    if let Some(ref user_agent) = configuration.user_agent {
4240        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
4241    }
4242    if let Some(ref token) = configuration.bearer_access_token {
4243        req_builder = req_builder.bearer_auth(token.to_owned());
4244    };
4245
4246    let req = req_builder.build()?;
4247    let resp = configuration.client.execute(req).await?;
4248
4249    let status = resp.status();
4250
4251    if !status.is_client_error() && !status.is_server_error() {
4252        Ok(())
4253    } else {
4254        let content = resp.text().await?;
4255        let entity: Option<GetAiMessagesError> = serde_json::from_str(&content).ok();
4256        Err(Error::ResponseError(ResponseContent { status, content, entity }))
4257    }
4258}
4259
4260/// Read one message by its (owner, name) key.
4261pub async fn get_ai_messages_by_owner_by_name(configuration: &configuration::Configuration, owner: &str, name: &str) -> Result<(), Error<GetAiMessagesByOwnerByNameError>> {
4262    // add a prefix to parameters to efficiently prevent name collisions
4263    let p_owner = owner;
4264    let p_name = name;
4265
4266    let uri_str = format!("{}/v1/ai/messages/{owner}/{name}", configuration.base_path, owner=crate::apis::urlencode(p_owner), name=crate::apis::urlencode(p_name));
4267    let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
4268
4269    if let Some(ref user_agent) = configuration.user_agent {
4270        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
4271    }
4272    if let Some(ref token) = configuration.bearer_access_token {
4273        req_builder = req_builder.bearer_auth(token.to_owned());
4274    };
4275
4276    let req = req_builder.build()?;
4277    let resp = configuration.client.execute(req).await?;
4278
4279    let status = resp.status();
4280
4281    if !status.is_client_error() && !status.is_server_error() {
4282        Ok(())
4283    } else {
4284        let content = resp.text().await?;
4285        let entity: Option<GetAiMessagesByOwnerByNameError> = serde_json::from_str(&content).ok();
4286        Err(Error::ResponseError(ResponseContent { status, content, entity }))
4287    }
4288}
4289
4290pub async fn get_ai_messages_by_owner_by_name_answer(configuration: &configuration::Configuration, owner: &str, name: &str) -> Result<(), Error<GetAiMessagesByOwnerByNameAnswerError>> {
4291    // add a prefix to parameters to efficiently prevent name collisions
4292    let p_owner = owner;
4293    let p_name = name;
4294
4295    let uri_str = format!("{}/v1/ai/messages/{owner}/{name}/answer", configuration.base_path, owner=crate::apis::urlencode(p_owner), name=crate::apis::urlencode(p_name));
4296    let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
4297
4298    if let Some(ref user_agent) = configuration.user_agent {
4299        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
4300    }
4301    if let Some(ref token) = configuration.bearer_access_token {
4302        req_builder = req_builder.bearer_auth(token.to_owned());
4303    };
4304
4305    let req = req_builder.build()?;
4306    let resp = configuration.client.execute(req).await?;
4307
4308    let status = resp.status();
4309
4310    if !status.is_client_error() && !status.is_server_error() {
4311        Ok(())
4312    } else {
4313        let content = resp.text().await?;
4314        let entity: Option<GetAiMessagesByOwnerByNameAnswerError> = serde_json::from_str(&content).ok();
4315        Err(Error::ResponseError(ResponseContent { status, content, entity }))
4316    }
4317}
4318
4319/// Cross-tenant listing. Admin-only; a tenant caller is refused.
4320pub async fn get_ai_messages_global(configuration: &configuration::Configuration, ) -> Result<(), Error<GetAiMessagesGlobalError>> {
4321
4322    let uri_str = format!("{}/v1/ai/messages/global", configuration.base_path);
4323    let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
4324
4325    if let Some(ref user_agent) = configuration.user_agent {
4326        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
4327    }
4328    if let Some(ref token) = configuration.bearer_access_token {
4329        req_builder = req_builder.bearer_auth(token.to_owned());
4330    };
4331
4332    let req = req_builder.build()?;
4333    let resp = configuration.client.execute(req).await?;
4334
4335    let status = resp.status();
4336
4337    if !status.is_client_error() && !status.is_server_error() {
4338        Ok(())
4339    } else {
4340        let content = resp.text().await?;
4341        let entity: Option<GetAiMessagesGlobalError> = serde_json::from_str(&content).ok();
4342        Err(Error::ResponseError(ResponseContent { status, content, entity }))
4343    }
4344}
4345
4346/// List the caller's nodes.
4347pub async fn get_ai_nodes(configuration: &configuration::Configuration, ) -> Result<(), Error<GetAiNodesError>> {
4348
4349    let uri_str = format!("{}/v1/ai/nodes", configuration.base_path);
4350    let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
4351
4352    if let Some(ref user_agent) = configuration.user_agent {
4353        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
4354    }
4355    if let Some(ref token) = configuration.bearer_access_token {
4356        req_builder = req_builder.bearer_auth(token.to_owned());
4357    };
4358
4359    let req = req_builder.build()?;
4360    let resp = configuration.client.execute(req).await?;
4361
4362    let status = resp.status();
4363
4364    if !status.is_client_error() && !status.is_server_error() {
4365        Ok(())
4366    } else {
4367        let content = resp.text().await?;
4368        let entity: Option<GetAiNodesError> = serde_json::from_str(&content).ok();
4369        Err(Error::ResponseError(ResponseContent { status, content, entity }))
4370    }
4371}
4372
4373/// Read one node by its (owner, name) key.
4374pub async fn get_ai_nodes_by_owner_by_name(configuration: &configuration::Configuration, owner: &str, name: &str) -> Result<(), Error<GetAiNodesByOwnerByNameError>> {
4375    // add a prefix to parameters to efficiently prevent name collisions
4376    let p_owner = owner;
4377    let p_name = name;
4378
4379    let uri_str = format!("{}/v1/ai/nodes/{owner}/{name}", configuration.base_path, owner=crate::apis::urlencode(p_owner), name=crate::apis::urlencode(p_name));
4380    let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
4381
4382    if let Some(ref user_agent) = configuration.user_agent {
4383        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
4384    }
4385    if let Some(ref token) = configuration.bearer_access_token {
4386        req_builder = req_builder.bearer_auth(token.to_owned());
4387    };
4388
4389    let req = req_builder.build()?;
4390    let resp = configuration.client.execute(req).await?;
4391
4392    let status = resp.status();
4393
4394    if !status.is_client_error() && !status.is_server_error() {
4395        Ok(())
4396    } else {
4397        let content = resp.text().await?;
4398        let entity: Option<GetAiNodesByOwnerByNameError> = serde_json::from_str(&content).ok();
4399        Err(Error::ResponseError(ResponseContent { status, content, entity }))
4400    }
4401}
4402
4403pub async fn get_ai_nodes_by_owner_by_name_tunnel(configuration: &configuration::Configuration, owner: &str, name: &str) -> Result<(), Error<GetAiNodesByOwnerByNameTunnelError>> {
4404    // add a prefix to parameters to efficiently prevent name collisions
4405    let p_owner = owner;
4406    let p_name = name;
4407
4408    let uri_str = format!("{}/v1/ai/nodes/{owner}/{name}/tunnel", configuration.base_path, owner=crate::apis::urlencode(p_owner), name=crate::apis::urlencode(p_name));
4409    let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
4410
4411    if let Some(ref user_agent) = configuration.user_agent {
4412        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
4413    }
4414    if let Some(ref token) = configuration.bearer_access_token {
4415        req_builder = req_builder.bearer_auth(token.to_owned());
4416    };
4417
4418    let req = req_builder.build()?;
4419    let resp = configuration.client.execute(req).await?;
4420
4421    let status = resp.status();
4422
4423    if !status.is_client_error() && !status.is_server_error() {
4424        Ok(())
4425    } else {
4426        let content = resp.text().await?;
4427        let entity: Option<GetAiNodesByOwnerByNameTunnelError> = serde_json::from_str(&content).ok();
4428        Err(Error::ResponseError(ResponseContent { status, content, entity }))
4429    }
4430}
4431
4432/// The HTTP transport binding for the RESTful router-config nouns (/v1/ai/router/{policy,defaults,ledger,rewards,artifact-meta} and /v1/ai/org/settings[/list]). It dispatches IN-PROCESS through dispatchGateway — the SAME canonical ZAP gateway registry (zap_registry.go) that the MsgType 200 handler serves over the gateway transport. The native ZAP handler is the ONE and ONLY implementation of these routes; this is purely the api.hanzo.ai HTTP binding, so there is NO controller twin to drift from and the split-brain the router refactor removed stays removed.  Why a bridge and not a twin controller method: every other migrated route (get-records, get-connections, …) carries BOTH a controller method and a ZAP handler — the exact dual-impl drift that silently NULLed customer router settings (the update-router-policy data-wipe). Routing these nouns through the ZAP handler over one adapter keeps a single source of truth.  Identity is the request's own Bearer credential (Authorization header), which the native handlers resolve exactly as the gateway does — every caller (console, chat, app) already sends it. The dispatched handler returns a ZAP message whose status is field 0 and body is field 4 (BuildCloudResponse / BuildGatewayResponse layout); both are relayed verbatim. The route is mapped \"*\" (any verb) because the native handler is method-aware: /v1/ai/router/policy splits GET (read) vs PUT (write), /v1/ai/org/settings GET/PUT/DELETE, and returns 405 for a verb it does not own.
4433pub async fn get_ai_org_settings(configuration: &configuration::Configuration, ) -> Result<(), Error<GetAiOrgSettingsError>> {
4434
4435    let uri_str = format!("{}/v1/ai/org/settings", configuration.base_path);
4436    let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
4437
4438    if let Some(ref user_agent) = configuration.user_agent {
4439        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
4440    }
4441    if let Some(ref token) = configuration.bearer_access_token {
4442        req_builder = req_builder.bearer_auth(token.to_owned());
4443    };
4444
4445    let req = req_builder.build()?;
4446    let resp = configuration.client.execute(req).await?;
4447
4448    let status = resp.status();
4449
4450    if !status.is_client_error() && !status.is_server_error() {
4451        Ok(())
4452    } else {
4453        let content = resp.text().await?;
4454        let entity: Option<GetAiOrgSettingsError> = serde_json::from_str(&content).ok();
4455        Err(Error::ResponseError(ResponseContent { status, content, entity }))
4456    }
4457}
4458
4459/// The HTTP transport binding for the RESTful router-config nouns (/v1/ai/router/{policy,defaults,ledger,rewards,artifact-meta} and /v1/ai/org/settings[/list]). It dispatches IN-PROCESS through dispatchGateway — the SAME canonical ZAP gateway registry (zap_registry.go) that the MsgType 200 handler serves over the gateway transport. The native ZAP handler is the ONE and ONLY implementation of these routes; this is purely the api.hanzo.ai HTTP binding, so there is NO controller twin to drift from and the split-brain the router refactor removed stays removed.  Why a bridge and not a twin controller method: every other migrated route (get-records, get-connections, …) carries BOTH a controller method and a ZAP handler — the exact dual-impl drift that silently NULLed customer router settings (the update-router-policy data-wipe). Routing these nouns through the ZAP handler over one adapter keeps a single source of truth.  Identity is the request's own Bearer credential (Authorization header), which the native handlers resolve exactly as the gateway does — every caller (console, chat, app) already sends it. The dispatched handler returns a ZAP message whose status is field 0 and body is field 4 (BuildCloudResponse / BuildGatewayResponse layout); both are relayed verbatim. The route is mapped \"*\" (any verb) because the native handler is method-aware: /v1/ai/router/policy splits GET (read) vs PUT (write), /v1/ai/org/settings GET/PUT/DELETE, and returns 405 for a verb it does not own.
4460pub async fn get_ai_org_settings_list(configuration: &configuration::Configuration, ) -> Result<(), Error<GetAiOrgSettingsListError>> {
4461
4462    let uri_str = format!("{}/v1/ai/org/settings/list", configuration.base_path);
4463    let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
4464
4465    if let Some(ref user_agent) = configuration.user_agent {
4466        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
4467    }
4468    if let Some(ref token) = configuration.bearer_access_token {
4469        req_builder = req_builder.bearer_auth(token.to_owned());
4470    };
4471
4472    let req = req_builder.build()?;
4473    let resp = configuration.client.execute(req).await?;
4474
4475    let status = resp.status();
4476
4477    if !status.is_client_error() && !status.is_server_error() {
4478        Ok(())
4479    } else {
4480        let content = resp.text().await?;
4481        let entity: Option<GetAiOrgSettingsListError> = serde_json::from_str(&content).ok();
4482        Err(Error::ResponseError(ResponseContent { status, content, entity }))
4483    }
4484}
4485
4486pub async fn get_ai_prometheus(configuration: &configuration::Configuration, ) -> Result<(), Error<GetAiPrometheusError>> {
4487
4488    let uri_str = format!("{}/v1/ai/prometheus", configuration.base_path);
4489    let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
4490
4491    if let Some(ref user_agent) = configuration.user_agent {
4492        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
4493    }
4494    if let Some(ref token) = configuration.bearer_access_token {
4495        req_builder = req_builder.bearer_auth(token.to_owned());
4496    };
4497
4498    let req = req_builder.build()?;
4499    let resp = configuration.client.execute(req).await?;
4500
4501    let status = resp.status();
4502
4503    if !status.is_client_error() && !status.is_server_error() {
4504        Ok(())
4505    } else {
4506        let content = resp.text().await?;
4507        let entity: Option<GetAiPrometheusError> = serde_json::from_str(&content).ok();
4508        Err(Error::ResponseError(ResponseContent { status, content, entity }))
4509    }
4510}
4511
4512/// List the caller's providers.
4513pub async fn get_ai_providers(configuration: &configuration::Configuration, ) -> Result<(), Error<GetAiProvidersError>> {
4514
4515    let uri_str = format!("{}/v1/ai/providers", configuration.base_path);
4516    let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
4517
4518    if let Some(ref user_agent) = configuration.user_agent {
4519        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
4520    }
4521    if let Some(ref token) = configuration.bearer_access_token {
4522        req_builder = req_builder.bearer_auth(token.to_owned());
4523    };
4524
4525    let req = req_builder.build()?;
4526    let resp = configuration.client.execute(req).await?;
4527
4528    let status = resp.status();
4529
4530    if !status.is_client_error() && !status.is_server_error() {
4531        Ok(())
4532    } else {
4533        let content = resp.text().await?;
4534        let entity: Option<GetAiProvidersError> = serde_json::from_str(&content).ok();
4535        Err(Error::ResponseError(ResponseContent { status, content, entity }))
4536    }
4537}
4538
4539/// Read one provider by its (owner, name) key.
4540pub async fn get_ai_providers_by_owner_by_name(configuration: &configuration::Configuration, owner: &str, name: &str) -> Result<(), Error<GetAiProvidersByOwnerByNameError>> {
4541    // add a prefix to parameters to efficiently prevent name collisions
4542    let p_owner = owner;
4543    let p_name = name;
4544
4545    let uri_str = format!("{}/v1/ai/providers/{owner}/{name}", configuration.base_path, owner=crate::apis::urlencode(p_owner), name=crate::apis::urlencode(p_name));
4546    let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
4547
4548    if let Some(ref user_agent) = configuration.user_agent {
4549        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
4550    }
4551    if let Some(ref token) = configuration.bearer_access_token {
4552        req_builder = req_builder.bearer_auth(token.to_owned());
4553    };
4554
4555    let req = req_builder.build()?;
4556    let resp = configuration.client.execute(req).await?;
4557
4558    let status = resp.status();
4559
4560    if !status.is_client_error() && !status.is_server_error() {
4561        Ok(())
4562    } else {
4563        let content = resp.text().await?;
4564        let entity: Option<GetAiProvidersByOwnerByNameError> = serde_json::from_str(&content).ok();
4565        Err(Error::ResponseError(ResponseContent { status, content, entity }))
4566    }
4567}
4568
4569/// Cross-tenant listing. Admin-only; a tenant caller is refused.
4570pub async fn get_ai_providers_global(configuration: &configuration::Configuration, ) -> Result<(), Error<GetAiProvidersGlobalError>> {
4571
4572    let uri_str = format!("{}/v1/ai/providers/global", configuration.base_path);
4573    let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
4574
4575    if let Some(ref user_agent) = configuration.user_agent {
4576        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
4577    }
4578    if let Some(ref token) = configuration.bearer_access_token {
4579        req_builder = req_builder.bearer_auth(token.to_owned());
4580    };
4581
4582    let req = req_builder.build()?;
4583    let resp = configuration.client.execute(req).await?;
4584
4585    let status = resp.status();
4586
4587    if !status.is_client_error() && !status.is_server_error() {
4588        Ok(())
4589    } else {
4590        let content = resp.text().await?;
4591        let entity: Option<GetAiProvidersGlobalError> = serde_json::from_str(&content).ok();
4592        Err(Error::ResponseError(ResponseContent { status, content, entity }))
4593    }
4594}
4595
4596/// Return every stored chunk of one file_id (full document context). Consolidates the retired chat-rag-api GET /documents/{id}/context.
4597pub async fn get_ai_rag_context(configuration: &configuration::Configuration, ) -> Result<(), Error<GetAiRagContextError>> {
4598
4599    let uri_str = format!("{}/v1/ai/rag/context", configuration.base_path);
4600    let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
4601
4602    if let Some(ref user_agent) = configuration.user_agent {
4603        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
4604    }
4605    if let Some(ref token) = configuration.bearer_access_token {
4606        req_builder = req_builder.bearer_auth(token.to_owned());
4607    };
4608
4609    let req = req_builder.build()?;
4610    let resp = configuration.client.execute(req).await?;
4611
4612    let status = resp.status();
4613
4614    if !status.is_client_error() && !status.is_server_error() {
4615        Ok(())
4616    } else {
4617        let content = resp.text().await?;
4618        let entity: Option<GetAiRagContextError> = serde_json::from_str(&content).ok();
4619        Err(Error::ResponseError(ResponseContent { status, content, entity }))
4620    }
4621}
4622
4623/// List the caller's records.
4624pub async fn get_ai_records(configuration: &configuration::Configuration, ) -> Result<(), Error<GetAiRecordsError>> {
4625
4626    let uri_str = format!("{}/v1/ai/records", configuration.base_path);
4627    let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
4628
4629    if let Some(ref user_agent) = configuration.user_agent {
4630        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
4631    }
4632    if let Some(ref token) = configuration.bearer_access_token {
4633        req_builder = req_builder.bearer_auth(token.to_owned());
4634    };
4635
4636    let req = req_builder.build()?;
4637    let resp = configuration.client.execute(req).await?;
4638
4639    let status = resp.status();
4640
4641    if !status.is_client_error() && !status.is_server_error() {
4642        Ok(())
4643    } else {
4644        let content = resp.text().await?;
4645        let entity: Option<GetAiRecordsError> = serde_json::from_str(&content).ok();
4646        Err(Error::ResponseError(ResponseContent { status, content, entity }))
4647    }
4648}
4649
4650/// Read one record by its (owner, name) key.
4651pub async fn get_ai_records_by_owner_by_name(configuration: &configuration::Configuration, owner: &str, name: &str) -> Result<(), Error<GetAiRecordsByOwnerByNameError>> {
4652    // add a prefix to parameters to efficiently prevent name collisions
4653    let p_owner = owner;
4654    let p_name = name;
4655
4656    let uri_str = format!("{}/v1/ai/records/{owner}/{name}", configuration.base_path, owner=crate::apis::urlencode(p_owner), name=crate::apis::urlencode(p_name));
4657    let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
4658
4659    if let Some(ref user_agent) = configuration.user_agent {
4660        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
4661    }
4662    if let Some(ref token) = configuration.bearer_access_token {
4663        req_builder = req_builder.bearer_auth(token.to_owned());
4664    };
4665
4666    let req = req_builder.build()?;
4667    let resp = configuration.client.execute(req).await?;
4668
4669    let status = resp.status();
4670
4671    if !status.is_client_error() && !status.is_server_error() {
4672        Ok(())
4673    } else {
4674        let content = resp.text().await?;
4675        let entity: Option<GetAiRecordsByOwnerByNameError> = serde_json::from_str(&content).ok();
4676        Err(Error::ResponseError(ResponseContent { status, content, entity }))
4677    }
4678}
4679
4680pub async fn get_ai_records_query(configuration: &configuration::Configuration, ) -> Result<(), Error<GetAiRecordsQueryError>> {
4681
4682    let uri_str = format!("{}/v1/ai/records/query", configuration.base_path);
4683    let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
4684
4685    if let Some(ref user_agent) = configuration.user_agent {
4686        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
4687    }
4688    if let Some(ref token) = configuration.bearer_access_token {
4689        req_builder = req_builder.bearer_auth(token.to_owned());
4690    };
4691
4692    let req = req_builder.build()?;
4693    let resp = configuration.client.execute(req).await?;
4694
4695    let status = resp.status();
4696
4697    if !status.is_client_error() && !status.is_server_error() {
4698        Ok(())
4699    } else {
4700        let content = resp.text().await?;
4701        let entity: Option<GetAiRecordsQueryError> = serde_json::from_str(&content).ok();
4702        Err(Error::ResponseError(ResponseContent { status, content, entity }))
4703    }
4704}
4705
4706pub async fn get_ai_records_query_second(configuration: &configuration::Configuration, ) -> Result<(), Error<GetAiRecordsQuerySecondError>> {
4707
4708    let uri_str = format!("{}/v1/ai/records/query-second", configuration.base_path);
4709    let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
4710
4711    if let Some(ref user_agent) = configuration.user_agent {
4712        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
4713    }
4714    if let Some(ref token) = configuration.bearer_access_token {
4715        req_builder = req_builder.bearer_auth(token.to_owned());
4716    };
4717
4718    let req = req_builder.build()?;
4719    let resp = configuration.client.execute(req).await?;
4720
4721    let status = resp.status();
4722
4723    if !status.is_client_error() && !status.is_server_error() {
4724        Ok(())
4725    } else {
4726        let content = resp.text().await?;
4727        let entity: Option<GetAiRecordsQuerySecondError> = serde_json::from_str(&content).ok();
4728        Err(Error::ResponseError(ResponseContent { status, content, entity }))
4729    }
4730}
4731
4732/// List the caller's remote-connections.
4733pub async fn get_ai_remote_connections(configuration: &configuration::Configuration, ) -> Result<(), Error<GetAiRemoteConnectionsError>> {
4734
4735    let uri_str = format!("{}/v1/ai/remote-connections", configuration.base_path);
4736    let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
4737
4738    if let Some(ref user_agent) = configuration.user_agent {
4739        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
4740    }
4741    if let Some(ref token) = configuration.bearer_access_token {
4742        req_builder = req_builder.bearer_auth(token.to_owned());
4743    };
4744
4745    let req = req_builder.build()?;
4746    let resp = configuration.client.execute(req).await?;
4747
4748    let status = resp.status();
4749
4750    if !status.is_client_error() && !status.is_server_error() {
4751        Ok(())
4752    } else {
4753        let content = resp.text().await?;
4754        let entity: Option<GetAiRemoteConnectionsError> = serde_json::from_str(&content).ok();
4755        Err(Error::ResponseError(ResponseContent { status, content, entity }))
4756    }
4757}
4758
4759/// Read one connection by its (owner, name) key.
4760pub async fn get_ai_remote_connections_by_owner_by_name(configuration: &configuration::Configuration, owner: &str, name: &str) -> Result<(), Error<GetAiRemoteConnectionsByOwnerByNameError>> {
4761    // add a prefix to parameters to efficiently prevent name collisions
4762    let p_owner = owner;
4763    let p_name = name;
4764
4765    let uri_str = format!("{}/v1/ai/remote-connections/{owner}/{name}", configuration.base_path, owner=crate::apis::urlencode(p_owner), name=crate::apis::urlencode(p_name));
4766    let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
4767
4768    if let Some(ref user_agent) = configuration.user_agent {
4769        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
4770    }
4771    if let Some(ref token) = configuration.bearer_access_token {
4772        req_builder = req_builder.bearer_auth(token.to_owned());
4773    };
4774
4775    let req = req_builder.build()?;
4776    let resp = configuration.client.execute(req).await?;
4777
4778    let status = resp.status();
4779
4780    if !status.is_client_error() && !status.is_server_error() {
4781        Ok(())
4782    } else {
4783        let content = resp.text().await?;
4784        let entity: Option<GetAiRemoteConnectionsByOwnerByNameError> = serde_json::from_str(&content).ok();
4785        Err(Error::ResponseError(ResponseContent { status, content, entity }))
4786    }
4787}
4788
4789/// The HTTP transport binding for the RESTful router-config nouns (/v1/ai/router/{policy,defaults,ledger,rewards,artifact-meta} and /v1/ai/org/settings[/list]). It dispatches IN-PROCESS through dispatchGateway — the SAME canonical ZAP gateway registry (zap_registry.go) that the MsgType 200 handler serves over the gateway transport. The native ZAP handler is the ONE and ONLY implementation of these routes; this is purely the api.hanzo.ai HTTP binding, so there is NO controller twin to drift from and the split-brain the router refactor removed stays removed.  Why a bridge and not a twin controller method: every other migrated route (get-records, get-connections, …) carries BOTH a controller method and a ZAP handler — the exact dual-impl drift that silently NULLed customer router settings (the update-router-policy data-wipe). Routing these nouns through the ZAP handler over one adapter keeps a single source of truth.  Identity is the request's own Bearer credential (Authorization header), which the native handlers resolve exactly as the gateway does — every caller (console, chat, app) already sends it. The dispatched handler returns a ZAP message whose status is field 0 and body is field 4 (BuildCloudResponse / BuildGatewayResponse layout); both are relayed verbatim. The route is mapped \"*\" (any verb) because the native handler is method-aware: /v1/ai/router/policy splits GET (read) vs PUT (write), /v1/ai/org/settings GET/PUT/DELETE, and returns 405 for a verb it does not own.
4790pub async fn get_ai_router_artifact_meta(configuration: &configuration::Configuration, ) -> Result<(), Error<GetAiRouterArtifactMetaError>> {
4791
4792    let uri_str = format!("{}/v1/ai/router/artifact-meta", configuration.base_path);
4793    let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
4794
4795    if let Some(ref user_agent) = configuration.user_agent {
4796        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
4797    }
4798    if let Some(ref token) = configuration.bearer_access_token {
4799        req_builder = req_builder.bearer_auth(token.to_owned());
4800    };
4801
4802    let req = req_builder.build()?;
4803    let resp = configuration.client.execute(req).await?;
4804
4805    let status = resp.status();
4806
4807    if !status.is_client_error() && !status.is_server_error() {
4808        Ok(())
4809    } else {
4810        let content = resp.text().await?;
4811        let entity: Option<GetAiRouterArtifactMetaError> = serde_json::from_str(&content).ok();
4812        Err(Error::ResponseError(ResponseContent { status, content, entity }))
4813    }
4814}
4815
4816pub async fn get_ai_router_data(configuration: &configuration::Configuration, ) -> Result<(), Error<GetAiRouterDataError>> {
4817
4818    let uri_str = format!("{}/v1/ai/router/data", configuration.base_path);
4819    let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
4820
4821    if let Some(ref user_agent) = configuration.user_agent {
4822        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
4823    }
4824    if let Some(ref token) = configuration.bearer_access_token {
4825        req_builder = req_builder.bearer_auth(token.to_owned());
4826    };
4827
4828    let req = req_builder.build()?;
4829    let resp = configuration.client.execute(req).await?;
4830
4831    let status = resp.status();
4832
4833    if !status.is_client_error() && !status.is_server_error() {
4834        Ok(())
4835    } else {
4836        let content = resp.text().await?;
4837        let entity: Option<GetAiRouterDataError> = serde_json::from_str(&content).ok();
4838        Err(Error::ResponseError(ResponseContent { status, content, entity }))
4839    }
4840}
4841
4842/// The HTTP transport binding for the RESTful router-config nouns (/v1/ai/router/{policy,defaults,ledger,rewards,artifact-meta} and /v1/ai/org/settings[/list]). It dispatches IN-PROCESS through dispatchGateway — the SAME canonical ZAP gateway registry (zap_registry.go) that the MsgType 200 handler serves over the gateway transport. The native ZAP handler is the ONE and ONLY implementation of these routes; this is purely the api.hanzo.ai HTTP binding, so there is NO controller twin to drift from and the split-brain the router refactor removed stays removed.  Why a bridge and not a twin controller method: every other migrated route (get-records, get-connections, …) carries BOTH a controller method and a ZAP handler — the exact dual-impl drift that silently NULLed customer router settings (the update-router-policy data-wipe). Routing these nouns through the ZAP handler over one adapter keeps a single source of truth.  Identity is the request's own Bearer credential (Authorization header), which the native handlers resolve exactly as the gateway does — every caller (console, chat, app) already sends it. The dispatched handler returns a ZAP message whose status is field 0 and body is field 4 (BuildCloudResponse / BuildGatewayResponse layout); both are relayed verbatim. The route is mapped \"*\" (any verb) because the native handler is method-aware: /v1/ai/router/policy splits GET (read) vs PUT (write), /v1/ai/org/settings GET/PUT/DELETE, and returns 405 for a verb it does not own.
4843pub async fn get_ai_router_defaults(configuration: &configuration::Configuration, ) -> Result<(), Error<GetAiRouterDefaultsError>> {
4844
4845    let uri_str = format!("{}/v1/ai/router/defaults", configuration.base_path);
4846    let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
4847
4848    if let Some(ref user_agent) = configuration.user_agent {
4849        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
4850    }
4851    if let Some(ref token) = configuration.bearer_access_token {
4852        req_builder = req_builder.bearer_auth(token.to_owned());
4853    };
4854
4855    let req = req_builder.build()?;
4856    let resp = configuration.client.execute(req).await?;
4857
4858    let status = resp.status();
4859
4860    if !status.is_client_error() && !status.is_server_error() {
4861        Ok(())
4862    } else {
4863        let content = resp.text().await?;
4864        let entity: Option<GetAiRouterDefaultsError> = serde_json::from_str(&content).ok();
4865        Err(Error::ResponseError(ResponseContent { status, content, entity }))
4866    }
4867}
4868
4869/// Returns the router-improvement time-series. Two scopes, one route, mirroring /v1/ai/router/stats:    - ?scope=platform — PUBLIC-safe aggregate over ALL orgs, no authentication. Emits     the daily reward/cost-saved/adoption series (task mix included, model ids NOT)     and the retrain timeline. This is what world.hanzo.ai polls.   - default (org scope) — requires a signed-in principal, scoped to the caller's OWN     org (a super admin may pass ?org= to target another or \"\" for all).  Window: ?days=N (default 30, capped at 90). Aggregates only.
4870pub async fn get_ai_router_history(configuration: &configuration::Configuration, ) -> Result<(), Error<GetAiRouterHistoryError>> {
4871
4872    let uri_str = format!("{}/v1/ai/router/history", configuration.base_path);
4873    let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
4874
4875    if let Some(ref user_agent) = configuration.user_agent {
4876        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
4877    }
4878    if let Some(ref token) = configuration.bearer_access_token {
4879        req_builder = req_builder.bearer_auth(token.to_owned());
4880    };
4881
4882    let req = req_builder.build()?;
4883    let resp = configuration.client.execute(req).await?;
4884
4885    let status = resp.status();
4886
4887    if !status.is_client_error() && !status.is_server_error() {
4888        Ok(())
4889    } else {
4890        let content = resp.text().await?;
4891        let entity: Option<GetAiRouterHistoryError> = serde_json::from_str(&content).ok();
4892        Err(Error::ResponseError(ResponseContent { status, content, entity }))
4893    }
4894}
4895
4896/// Returns the LIVE Mean-Field Judge Panel state: the configured panel + dynamic judge posture (enabled/sample) resolved from the \"*\" GlobalDefaultOwner row, the live in-process per-judge calibration (weight/mean/n), and the static published benchmark. PUBLIC-safe and platform-global (model ids + scalars only), so it rides the same unauthenticated, balance-exempt class as /v1/ai/router/stats?scope=platform — the world widget polls it with no auth. The judge state is a single in-process population (not per-org), so there is nothing to scope; ?scope=platform is accepted for symmetry with router-stats.
4897pub async fn get_ai_router_judge_panel(configuration: &configuration::Configuration, ) -> Result<(), Error<GetAiRouterJudgePanelError>> {
4898
4899    let uri_str = format!("{}/v1/ai/router/judge-panel", configuration.base_path);
4900    let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
4901
4902    if let Some(ref user_agent) = configuration.user_agent {
4903        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
4904    }
4905    if let Some(ref token) = configuration.bearer_access_token {
4906        req_builder = req_builder.bearer_auth(token.to_owned());
4907    };
4908
4909    let req = req_builder.build()?;
4910    let resp = configuration.client.execute(req).await?;
4911
4912    let status = resp.status();
4913
4914    if !status.is_client_error() && !status.is_server_error() {
4915        Ok(())
4916    } else {
4917        let content = resp.text().await?;
4918        let entity: Option<GetAiRouterJudgePanelError> = serde_json::from_str(&content).ok();
4919        Err(Error::ResponseError(ResponseContent { status, content, entity }))
4920    }
4921}
4922
4923/// The HTTP transport binding for the RESTful router-config nouns (/v1/ai/router/{policy,defaults,ledger,rewards,artifact-meta} and /v1/ai/org/settings[/list]). It dispatches IN-PROCESS through dispatchGateway — the SAME canonical ZAP gateway registry (zap_registry.go) that the MsgType 200 handler serves over the gateway transport. The native ZAP handler is the ONE and ONLY implementation of these routes; this is purely the api.hanzo.ai HTTP binding, so there is NO controller twin to drift from and the split-brain the router refactor removed stays removed.  Why a bridge and not a twin controller method: every other migrated route (get-records, get-connections, …) carries BOTH a controller method and a ZAP handler — the exact dual-impl drift that silently NULLed customer router settings (the update-router-policy data-wipe). Routing these nouns through the ZAP handler over one adapter keeps a single source of truth.  Identity is the request's own Bearer credential (Authorization header), which the native handlers resolve exactly as the gateway does — every caller (console, chat, app) already sends it. The dispatched handler returns a ZAP message whose status is field 0 and body is field 4 (BuildCloudResponse / BuildGatewayResponse layout); both are relayed verbatim. The route is mapped \"*\" (any verb) because the native handler is method-aware: /v1/ai/router/policy splits GET (read) vs PUT (write), /v1/ai/org/settings GET/PUT/DELETE, and returns 405 for a verb it does not own.
4924pub async fn get_ai_router_ledger(configuration: &configuration::Configuration, ) -> Result<(), Error<GetAiRouterLedgerError>> {
4925
4926    let uri_str = format!("{}/v1/ai/router/ledger", configuration.base_path);
4927    let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
4928
4929    if let Some(ref user_agent) = configuration.user_agent {
4930        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
4931    }
4932    if let Some(ref token) = configuration.bearer_access_token {
4933        req_builder = req_builder.bearer_auth(token.to_owned());
4934    };
4935
4936    let req = req_builder.build()?;
4937    let resp = configuration.client.execute(req).await?;
4938
4939    let status = resp.status();
4940
4941    if !status.is_client_error() && !status.is_server_error() {
4942        Ok(())
4943    } else {
4944        let content = resp.text().await?;
4945        let entity: Option<GetAiRouterLedgerError> = serde_json::from_str(&content).ok();
4946        Err(Error::ResponseError(ResponseContent { status, content, entity }))
4947    }
4948}
4949
4950/// The HTTP transport binding for the RESTful router-config nouns (/v1/ai/router/{policy,defaults,ledger,rewards,artifact-meta} and /v1/ai/org/settings[/list]). It dispatches IN-PROCESS through dispatchGateway — the SAME canonical ZAP gateway registry (zap_registry.go) that the MsgType 200 handler serves over the gateway transport. The native ZAP handler is the ONE and ONLY implementation of these routes; this is purely the api.hanzo.ai HTTP binding, so there is NO controller twin to drift from and the split-brain the router refactor removed stays removed.  Why a bridge and not a twin controller method: every other migrated route (get-records, get-connections, …) carries BOTH a controller method and a ZAP handler — the exact dual-impl drift that silently NULLed customer router settings (the update-router-policy data-wipe). Routing these nouns through the ZAP handler over one adapter keeps a single source of truth.  Identity is the request's own Bearer credential (Authorization header), which the native handlers resolve exactly as the gateway does — every caller (console, chat, app) already sends it. The dispatched handler returns a ZAP message whose status is field 0 and body is field 4 (BuildCloudResponse / BuildGatewayResponse layout); both are relayed verbatim. The route is mapped \"*\" (any verb) because the native handler is method-aware: /v1/ai/router/policy splits GET (read) vs PUT (write), /v1/ai/org/settings GET/PUT/DELETE, and returns 405 for a verb it does not own.
4951pub async fn get_ai_router_policy(configuration: &configuration::Configuration, ) -> Result<(), Error<GetAiRouterPolicyError>> {
4952
4953    let uri_str = format!("{}/v1/ai/router/policy", configuration.base_path);
4954    let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
4955
4956    if let Some(ref user_agent) = configuration.user_agent {
4957        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
4958    }
4959    if let Some(ref token) = configuration.bearer_access_token {
4960        req_builder = req_builder.bearer_auth(token.to_owned());
4961    };
4962
4963    let req = req_builder.build()?;
4964    let resp = configuration.client.execute(req).await?;
4965
4966    let status = resp.status();
4967
4968    if !status.is_client_error() && !status.is_server_error() {
4969        Ok(())
4970    } else {
4971        let content = resp.text().await?;
4972        let entity: Option<GetAiRouterPolicyError> = serde_json::from_str(&content).ok();
4973        Err(Error::ResponseError(ResponseContent { status, content, entity }))
4974    }
4975}
4976
4977/// The HTTP transport binding for the RESTful router-config nouns (/v1/ai/router/{policy,defaults,ledger,rewards,artifact-meta} and /v1/ai/org/settings[/list]). It dispatches IN-PROCESS through dispatchGateway — the SAME canonical ZAP gateway registry (zap_registry.go) that the MsgType 200 handler serves over the gateway transport. The native ZAP handler is the ONE and ONLY implementation of these routes; this is purely the api.hanzo.ai HTTP binding, so there is NO controller twin to drift from and the split-brain the router refactor removed stays removed.  Why a bridge and not a twin controller method: every other migrated route (get-records, get-connections, …) carries BOTH a controller method and a ZAP handler — the exact dual-impl drift that silently NULLed customer router settings (the update-router-policy data-wipe). Routing these nouns through the ZAP handler over one adapter keeps a single source of truth.  Identity is the request's own Bearer credential (Authorization header), which the native handlers resolve exactly as the gateway does — every caller (console, chat, app) already sends it. The dispatched handler returns a ZAP message whose status is field 0 and body is field 4 (BuildCloudResponse / BuildGatewayResponse layout); both are relayed verbatim. The route is mapped \"*\" (any verb) because the native handler is method-aware: /v1/ai/router/policy splits GET (read) vs PUT (write), /v1/ai/org/settings GET/PUT/DELETE, and returns 405 for a verb it does not own.
4978pub async fn get_ai_router_rewards(configuration: &configuration::Configuration, ) -> Result<(), Error<GetAiRouterRewardsError>> {
4979
4980    let uri_str = format!("{}/v1/ai/router/rewards", configuration.base_path);
4981    let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
4982
4983    if let Some(ref user_agent) = configuration.user_agent {
4984        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
4985    }
4986    if let Some(ref token) = configuration.bearer_access_token {
4987        req_builder = req_builder.bearer_auth(token.to_owned());
4988    };
4989
4990    let req = req_builder.build()?;
4991    let resp = configuration.client.execute(req).await?;
4992
4993    let status = resp.status();
4994
4995    if !status.is_client_error() && !status.is_server_error() {
4996        Ok(())
4997    } else {
4998        let content = resp.text().await?;
4999        let entity: Option<GetAiRouterRewardsError> = serde_json::from_str(&content).ok();
5000        Err(Error::ResponseError(ResponseContent { status, content, entity }))
5001    }
5002}
5003
5004/// Returns the router observability aggregate. Two scopes, one route:    - ?scope=platform — PUBLIC-safe aggregate over ALL orgs, no authentication.     Emits rates, shares, per-task/per-model counts, throughput, and the cost     RATIO (saved_pct) + counterfactual model id, but NEVER absolute $ levels,     org identity, raw events, or feature vectors. This is what world.hanzo.ai     polls.   - default (org scope) — requires a signed-in principal; scoped to the caller's     OWN org (a super admin may pass ?org= to target another org or \"\" for all).     Carries the absolute $/MTok indices for the admin savings panel.  Window: ?since= (RFC3339) or ?hours= (default 24, capped). Aggregates only.
5005pub async fn get_ai_router_stats(configuration: &configuration::Configuration, ) -> Result<(), Error<GetAiRouterStatsError>> {
5006
5007    let uri_str = format!("{}/v1/ai/router/stats", configuration.base_path);
5008    let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
5009
5010    if let Some(ref user_agent) = configuration.user_agent {
5011        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
5012    }
5013    if let Some(ref token) = configuration.bearer_access_token {
5014        req_builder = req_builder.bearer_auth(token.to_owned());
5015    };
5016
5017    let req = req_builder.build()?;
5018    let resp = configuration.client.execute(req).await?;
5019
5020    let status = resp.status();
5021
5022    if !status.is_client_error() && !status.is_server_error() {
5023        Ok(())
5024    } else {
5025        let content = resp.text().await?;
5026        let entity: Option<GetAiRouterStatsError> = serde_json::from_str(&content).ok();
5027        Err(Error::ResponseError(ResponseContent { status, content, entity }))
5028    }
5029}
5030
5031/// List the caller's routes.
5032pub async fn get_ai_routes(configuration: &configuration::Configuration, ) -> Result<(), Error<GetAiRoutesError>> {
5033
5034    let uri_str = format!("{}/v1/ai/routes", configuration.base_path);
5035    let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
5036
5037    if let Some(ref user_agent) = configuration.user_agent {
5038        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
5039    }
5040    if let Some(ref token) = configuration.bearer_access_token {
5041        req_builder = req_builder.bearer_auth(token.to_owned());
5042    };
5043
5044    let req = req_builder.build()?;
5045    let resp = configuration.client.execute(req).await?;
5046
5047    let status = resp.status();
5048
5049    if !status.is_client_error() && !status.is_server_error() {
5050        Ok(())
5051    } else {
5052        let content = resp.text().await?;
5053        let entity: Option<GetAiRoutesError> = serde_json::from_str(&content).ok();
5054        Err(Error::ResponseError(ResponseContent { status, content, entity }))
5055    }
5056}
5057
5058/// Read one model-route by its (owner, name) key.
5059pub async fn get_ai_routes_by_owner_by_name(configuration: &configuration::Configuration, owner: &str, name: &str) -> Result<(), Error<GetAiRoutesByOwnerByNameError>> {
5060    // add a prefix to parameters to efficiently prevent name collisions
5061    let p_owner = owner;
5062    let p_name = name;
5063
5064    let uri_str = format!("{}/v1/ai/routes/{owner}/{name}", configuration.base_path, owner=crate::apis::urlencode(p_owner), name=crate::apis::urlencode(p_name));
5065    let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
5066
5067    if let Some(ref user_agent) = configuration.user_agent {
5068        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
5069    }
5070    if let Some(ref token) = configuration.bearer_access_token {
5071        req_builder = req_builder.bearer_auth(token.to_owned());
5072    };
5073
5074    let req = req_builder.build()?;
5075    let resp = configuration.client.execute(req).await?;
5076
5077    let status = resp.status();
5078
5079    if !status.is_client_error() && !status.is_server_error() {
5080        Ok(())
5081    } else {
5082        let content = resp.text().await?;
5083        let entity: Option<GetAiRoutesByOwnerByNameError> = serde_json::from_str(&content).ok();
5084        Err(Error::ResponseError(ResponseContent { status, content, entity }))
5085    }
5086}
5087
5088/// List the caller's scales.
5089pub async fn get_ai_scales(configuration: &configuration::Configuration, ) -> Result<(), Error<GetAiScalesError>> {
5090
5091    let uri_str = format!("{}/v1/ai/scales", configuration.base_path);
5092    let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
5093
5094    if let Some(ref user_agent) = configuration.user_agent {
5095        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
5096    }
5097    if let Some(ref token) = configuration.bearer_access_token {
5098        req_builder = req_builder.bearer_auth(token.to_owned());
5099    };
5100
5101    let req = req_builder.build()?;
5102    let resp = configuration.client.execute(req).await?;
5103
5104    let status = resp.status();
5105
5106    if !status.is_client_error() && !status.is_server_error() {
5107        Ok(())
5108    } else {
5109        let content = resp.text().await?;
5110        let entity: Option<GetAiScalesError> = serde_json::from_str(&content).ok();
5111        Err(Error::ResponseError(ResponseContent { status, content, entity }))
5112    }
5113}
5114
5115/// Read one scale by its (owner, name) key.
5116pub async fn get_ai_scales_by_owner_by_name(configuration: &configuration::Configuration, owner: &str, name: &str) -> Result<(), Error<GetAiScalesByOwnerByNameError>> {
5117    // add a prefix to parameters to efficiently prevent name collisions
5118    let p_owner = owner;
5119    let p_name = name;
5120
5121    let uri_str = format!("{}/v1/ai/scales/{owner}/{name}", configuration.base_path, owner=crate::apis::urlencode(p_owner), name=crate::apis::urlencode(p_name));
5122    let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
5123
5124    if let Some(ref user_agent) = configuration.user_agent {
5125        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
5126    }
5127    if let Some(ref token) = configuration.bearer_access_token {
5128        req_builder = req_builder.bearer_auth(token.to_owned());
5129    };
5130
5131    let req = req_builder.build()?;
5132    let resp = configuration.client.execute(req).await?;
5133
5134    let status = resp.status();
5135
5136    if !status.is_client_error() && !status.is_server_error() {
5137        Ok(())
5138    } else {
5139        let content = resp.text().await?;
5140        let entity: Option<GetAiScalesByOwnerByNameError> = serde_json::from_str(&content).ok();
5141        Err(Error::ResponseError(ResponseContent { status, content, entity }))
5142    }
5143}
5144
5145/// Cross-tenant listing. Admin-only; a tenant caller is refused.
5146pub async fn get_ai_scales_global(configuration: &configuration::Configuration, ) -> Result<(), Error<GetAiScalesGlobalError>> {
5147
5148    let uri_str = format!("{}/v1/ai/scales/global", configuration.base_path);
5149    let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
5150
5151    if let Some(ref user_agent) = configuration.user_agent {
5152        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
5153    }
5154    if let Some(ref token) = configuration.bearer_access_token {
5155        req_builder = req_builder.bearer_auth(token.to_owned());
5156    };
5157
5158    let req = req_builder.build()?;
5159    let resp = configuration.client.execute(req).await?;
5160
5161    let status = resp.status();
5162
5163    if !status.is_client_error() && !status.is_server_error() {
5164        Ok(())
5165    } else {
5166        let content = resp.text().await?;
5167        let entity: Option<GetAiScalesGlobalError> = serde_json::from_str(&content).ok();
5168        Err(Error::ResponseError(ResponseContent { status, content, entity }))
5169    }
5170}
5171
5172pub async fn get_ai_scales_public(configuration: &configuration::Configuration, ) -> Result<(), Error<GetAiScalesPublicError>> {
5173
5174    let uri_str = format!("{}/v1/ai/scales/public", configuration.base_path);
5175    let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
5176
5177    if let Some(ref user_agent) = configuration.user_agent {
5178        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
5179    }
5180    if let Some(ref token) = configuration.bearer_access_token {
5181        req_builder = req_builder.bearer_auth(token.to_owned());
5182    };
5183
5184    let req = req_builder.build()?;
5185    let resp = configuration.client.execute(req).await?;
5186
5187    let status = resp.status();
5188
5189    if !status.is_client_error() && !status.is_server_error() {
5190        Ok(())
5191    } else {
5192        let content = resp.text().await?;
5193        let entity: Option<GetAiScalesPublicError> = serde_json::from_str(&content).ok();
5194        Err(Error::ResponseError(ResponseContent { status, content, entity }))
5195    }
5196}
5197
5198/// List the caller's scans.
5199pub async fn get_ai_scans(configuration: &configuration::Configuration, ) -> Result<(), Error<GetAiScansError>> {
5200
5201    let uri_str = format!("{}/v1/ai/scans", configuration.base_path);
5202    let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
5203
5204    if let Some(ref user_agent) = configuration.user_agent {
5205        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
5206    }
5207    if let Some(ref token) = configuration.bearer_access_token {
5208        req_builder = req_builder.bearer_auth(token.to_owned());
5209    };
5210
5211    let req = req_builder.build()?;
5212    let resp = configuration.client.execute(req).await?;
5213
5214    let status = resp.status();
5215
5216    if !status.is_client_error() && !status.is_server_error() {
5217        Ok(())
5218    } else {
5219        let content = resp.text().await?;
5220        let entity: Option<GetAiScansError> = serde_json::from_str(&content).ok();
5221        Err(Error::ResponseError(ResponseContent { status, content, entity }))
5222    }
5223}
5224
5225/// Read one scan by its (owner, name) key.
5226pub async fn get_ai_scans_by_owner_by_name(configuration: &configuration::Configuration, owner: &str, name: &str) -> Result<(), Error<GetAiScansByOwnerByNameError>> {
5227    // add a prefix to parameters to efficiently prevent name collisions
5228    let p_owner = owner;
5229    let p_name = name;
5230
5231    let uri_str = format!("{}/v1/ai/scans/{owner}/{name}", configuration.base_path, owner=crate::apis::urlencode(p_owner), name=crate::apis::urlencode(p_name));
5232    let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
5233
5234    if let Some(ref user_agent) = configuration.user_agent {
5235        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
5236    }
5237    if let Some(ref token) = configuration.bearer_access_token {
5238        req_builder = req_builder.bearer_auth(token.to_owned());
5239    };
5240
5241    let req = req_builder.build()?;
5242    let resp = configuration.client.execute(req).await?;
5243
5244    let status = resp.status();
5245
5246    if !status.is_client_error() && !status.is_server_error() {
5247        Ok(())
5248    } else {
5249        let content = resp.text().await?;
5250        let entity: Option<GetAiScansByOwnerByNameError> = serde_json::from_str(&content).ok();
5251        Err(Error::ResponseError(ResponseContent { status, content, entity }))
5252    }
5253}
5254
5255/// List the caller's signin-sessions.
5256pub async fn get_ai_signin_sessions(configuration: &configuration::Configuration, ) -> Result<(), Error<GetAiSigninSessionsError>> {
5257
5258    let uri_str = format!("{}/v1/ai/signin-sessions", configuration.base_path);
5259    let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
5260
5261    if let Some(ref user_agent) = configuration.user_agent {
5262        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
5263    }
5264    if let Some(ref token) = configuration.bearer_access_token {
5265        req_builder = req_builder.bearer_auth(token.to_owned());
5266    };
5267
5268    let req = req_builder.build()?;
5269    let resp = configuration.client.execute(req).await?;
5270
5271    let status = resp.status();
5272
5273    if !status.is_client_error() && !status.is_server_error() {
5274        Ok(())
5275    } else {
5276        let content = resp.text().await?;
5277        let entity: Option<GetAiSigninSessionsError> = serde_json::from_str(&content).ok();
5278        Err(Error::ResponseError(ResponseContent { status, content, entity }))
5279    }
5280}
5281
5282/// Read one session by its (owner, name) key.
5283pub async fn get_ai_signin_sessions_by_owner_by_name(configuration: &configuration::Configuration, owner: &str, name: &str) -> Result<(), Error<GetAiSigninSessionsByOwnerByNameError>> {
5284    // add a prefix to parameters to efficiently prevent name collisions
5285    let p_owner = owner;
5286    let p_name = name;
5287
5288    let uri_str = format!("{}/v1/ai/signin-sessions/{owner}/{name}", configuration.base_path, owner=crate::apis::urlencode(p_owner), name=crate::apis::urlencode(p_name));
5289    let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
5290
5291    if let Some(ref user_agent) = configuration.user_agent {
5292        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
5293    }
5294    if let Some(ref token) = configuration.bearer_access_token {
5295        req_builder = req_builder.bearer_auth(token.to_owned());
5296    };
5297
5298    let req = req_builder.build()?;
5299    let resp = configuration.client.execute(req).await?;
5300
5301    let status = resp.status();
5302
5303    if !status.is_client_error() && !status.is_server_error() {
5304        Ok(())
5305    } else {
5306        let content = resp.text().await?;
5307        let entity: Option<GetAiSigninSessionsByOwnerByNameError> = serde_json::from_str(&content).ok();
5308        Err(Error::ResponseError(ResponseContent { status, content, entity }))
5309    }
5310}
5311
5312pub async fn get_ai_signin_sessions_duplicated(configuration: &configuration::Configuration, ) -> Result<(), Error<GetAiSigninSessionsDuplicatedError>> {
5313
5314    let uri_str = format!("{}/v1/ai/signin-sessions/duplicated", configuration.base_path);
5315    let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
5316
5317    if let Some(ref user_agent) = configuration.user_agent {
5318        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
5319    }
5320    if let Some(ref token) = configuration.bearer_access_token {
5321        req_builder = req_builder.bearer_auth(token.to_owned());
5322    };
5323
5324    let req = req_builder.build()?;
5325    let resp = configuration.client.execute(req).await?;
5326
5327    let status = resp.status();
5328
5329    if !status.is_client_error() && !status.is_server_error() {
5330        Ok(())
5331    } else {
5332        let content = resp.text().await?;
5333        let entity: Option<GetAiSigninSessionsDuplicatedError> = serde_json::from_str(&content).ok();
5334        Err(Error::ResponseError(ResponseContent { status, content, entity }))
5335    }
5336}
5337
5338/// List the caller's stores.
5339pub async fn get_ai_stores(configuration: &configuration::Configuration, ) -> Result<(), Error<GetAiStoresError>> {
5340
5341    let uri_str = format!("{}/v1/ai/stores", configuration.base_path);
5342    let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
5343
5344    if let Some(ref user_agent) = configuration.user_agent {
5345        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
5346    }
5347    if let Some(ref token) = configuration.bearer_access_token {
5348        req_builder = req_builder.bearer_auth(token.to_owned());
5349    };
5350
5351    let req = req_builder.build()?;
5352    let resp = configuration.client.execute(req).await?;
5353
5354    let status = resp.status();
5355
5356    if !status.is_client_error() && !status.is_server_error() {
5357        Ok(())
5358    } else {
5359        let content = resp.text().await?;
5360        let entity: Option<GetAiStoresError> = serde_json::from_str(&content).ok();
5361        Err(Error::ResponseError(ResponseContent { status, content, entity }))
5362    }
5363}
5364
5365/// Read one store by its (owner, name) key.
5366pub async fn get_ai_stores_by_owner_by_name(configuration: &configuration::Configuration, owner: &str, name: &str) -> Result<(), Error<GetAiStoresByOwnerByNameError>> {
5367    // add a prefix to parameters to efficiently prevent name collisions
5368    let p_owner = owner;
5369    let p_name = name;
5370
5371    let uri_str = format!("{}/v1/ai/stores/{owner}/{name}", configuration.base_path, owner=crate::apis::urlencode(p_owner), name=crate::apis::urlencode(p_name));
5372    let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
5373
5374    if let Some(ref user_agent) = configuration.user_agent {
5375        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
5376    }
5377    if let Some(ref token) = configuration.bearer_access_token {
5378        req_builder = req_builder.bearer_auth(token.to_owned());
5379    };
5380
5381    let req = req_builder.build()?;
5382    let resp = configuration.client.execute(req).await?;
5383
5384    let status = resp.status();
5385
5386    if !status.is_client_error() && !status.is_server_error() {
5387        Ok(())
5388    } else {
5389        let content = resp.text().await?;
5390        let entity: Option<GetAiStoresByOwnerByNameError> = serde_json::from_str(&content).ok();
5391        Err(Error::ResponseError(ResponseContent { status, content, entity }))
5392    }
5393}
5394
5395/// Cross-tenant listing. Admin-only; a tenant caller is refused.
5396pub async fn get_ai_stores_global(configuration: &configuration::Configuration, ) -> Result<(), Error<GetAiStoresGlobalError>> {
5397
5398    let uri_str = format!("{}/v1/ai/stores/global", configuration.base_path);
5399    let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
5400
5401    if let Some(ref user_agent) = configuration.user_agent {
5402        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
5403    }
5404    if let Some(ref token) = configuration.bearer_access_token {
5405        req_builder = req_builder.bearer_auth(token.to_owned());
5406    };
5407
5408    let req = req_builder.build()?;
5409    let resp = configuration.client.execute(req).await?;
5410
5411    let status = resp.status();
5412
5413    if !status.is_client_error() && !status.is_server_error() {
5414        Ok(())
5415    } else {
5416        let content = resp.text().await?;
5417        let entity: Option<GetAiStoresGlobalError> = serde_json::from_str(&content).ok();
5418        Err(Error::ResponseError(ResponseContent { status, content, entity }))
5419    }
5420}
5421
5422pub async fn get_ai_stores_names(configuration: &configuration::Configuration, ) -> Result<(), Error<GetAiStoresNamesError>> {
5423
5424    let uri_str = format!("{}/v1/ai/stores/names", configuration.base_path);
5425    let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
5426
5427    if let Some(ref user_agent) = configuration.user_agent {
5428        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
5429    }
5430    if let Some(ref token) = configuration.bearer_access_token {
5431        req_builder = req_builder.bearer_auth(token.to_owned());
5432    };
5433
5434    let req = req_builder.build()?;
5435    let resp = configuration.client.execute(req).await?;
5436
5437    let status = resp.status();
5438
5439    if !status.is_client_error() && !status.is_server_error() {
5440        Ok(())
5441    } else {
5442        let content = resp.text().await?;
5443        let entity: Option<GetAiStoresNamesError> = serde_json::from_str(&content).ok();
5444        Err(Error::ResponseError(ResponseContent { status, content, entity }))
5445    }
5446}
5447
5448pub async fn get_ai_stores_providers(configuration: &configuration::Configuration, ) -> Result<(), Error<GetAiStoresProvidersError>> {
5449
5450    let uri_str = format!("{}/v1/ai/stores/providers", configuration.base_path);
5451    let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
5452
5453    if let Some(ref user_agent) = configuration.user_agent {
5454        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
5455    }
5456    if let Some(ref token) = configuration.bearer_access_token {
5457        req_builder = req_builder.bearer_auth(token.to_owned());
5458    };
5459
5460    let req = req_builder.build()?;
5461    let resp = configuration.client.execute(req).await?;
5462
5463    let status = resp.status();
5464
5465    if !status.is_client_error() && !status.is_server_error() {
5466        Ok(())
5467    } else {
5468        let content = resp.text().await?;
5469        let entity: Option<GetAiStoresProvidersError> = serde_json::from_str(&content).ok();
5470        Err(Error::ResponseError(ResponseContent { status, content, entity }))
5471    }
5472}
5473
5474pub async fn get_ai_system(configuration: &configuration::Configuration, ) -> Result<(), Error<GetAiSystemError>> {
5475
5476    let uri_str = format!("{}/v1/ai/system", configuration.base_path);
5477    let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
5478
5479    if let Some(ref user_agent) = configuration.user_agent {
5480        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
5481    }
5482    if let Some(ref token) = configuration.bearer_access_token {
5483        req_builder = req_builder.bearer_auth(token.to_owned());
5484    };
5485
5486    let req = req_builder.build()?;
5487    let resp = configuration.client.execute(req).await?;
5488
5489    let status = resp.status();
5490
5491    if !status.is_client_error() && !status.is_server_error() {
5492        Ok(())
5493    } else {
5494        let content = resp.text().await?;
5495        let entity: Option<GetAiSystemError> = serde_json::from_str(&content).ok();
5496        Err(Error::ResponseError(ResponseContent { status, content, entity }))
5497    }
5498}
5499
5500/// List the caller's tasks.
5501pub async fn get_ai_tasks(configuration: &configuration::Configuration, ) -> Result<(), Error<GetAiTasksError>> {
5502
5503    let uri_str = format!("{}/v1/ai/tasks", configuration.base_path);
5504    let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
5505
5506    if let Some(ref user_agent) = configuration.user_agent {
5507        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
5508    }
5509    if let Some(ref token) = configuration.bearer_access_token {
5510        req_builder = req_builder.bearer_auth(token.to_owned());
5511    };
5512
5513    let req = req_builder.build()?;
5514    let resp = configuration.client.execute(req).await?;
5515
5516    let status = resp.status();
5517
5518    if !status.is_client_error() && !status.is_server_error() {
5519        Ok(())
5520    } else {
5521        let content = resp.text().await?;
5522        let entity: Option<GetAiTasksError> = serde_json::from_str(&content).ok();
5523        Err(Error::ResponseError(ResponseContent { status, content, entity }))
5524    }
5525}
5526
5527/// Read one task by its (owner, name) key.
5528pub async fn get_ai_tasks_by_owner_by_name(configuration: &configuration::Configuration, owner: &str, name: &str) -> Result<(), Error<GetAiTasksByOwnerByNameError>> {
5529    // add a prefix to parameters to efficiently prevent name collisions
5530    let p_owner = owner;
5531    let p_name = name;
5532
5533    let uri_str = format!("{}/v1/ai/tasks/{owner}/{name}", configuration.base_path, owner=crate::apis::urlencode(p_owner), name=crate::apis::urlencode(p_name));
5534    let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
5535
5536    if let Some(ref user_agent) = configuration.user_agent {
5537        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
5538    }
5539    if let Some(ref token) = configuration.bearer_access_token {
5540        req_builder = req_builder.bearer_auth(token.to_owned());
5541    };
5542
5543    let req = req_builder.build()?;
5544    let resp = configuration.client.execute(req).await?;
5545
5546    let status = resp.status();
5547
5548    if !status.is_client_error() && !status.is_server_error() {
5549        Ok(())
5550    } else {
5551        let content = resp.text().await?;
5552        let entity: Option<GetAiTasksByOwnerByNameError> = serde_json::from_str(&content).ok();
5553        Err(Error::ResponseError(ResponseContent { status, content, entity }))
5554    }
5555}
5556
5557/// Cross-tenant listing. Admin-only; a tenant caller is refused.
5558pub async fn get_ai_tasks_global(configuration: &configuration::Configuration, ) -> Result<(), Error<GetAiTasksGlobalError>> {
5559
5560    let uri_str = format!("{}/v1/ai/tasks/global", configuration.base_path);
5561    let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
5562
5563    if let Some(ref user_agent) = configuration.user_agent {
5564        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
5565    }
5566    if let Some(ref token) = configuration.bearer_access_token {
5567        req_builder = req_builder.bearer_auth(token.to_owned());
5568    };
5569
5570    let req = req_builder.build()?;
5571    let resp = configuration.client.execute(req).await?;
5572
5573    let status = resp.status();
5574
5575    if !status.is_client_error() && !status.is_server_error() {
5576        Ok(())
5577    } else {
5578        let content = resp.text().await?;
5579        let entity: Option<GetAiTasksGlobalError> = serde_json::from_str(&content).ok();
5580        Err(Error::ResponseError(ResponseContent { status, content, entity }))
5581    }
5582}
5583
5584/// List the caller's templates.
5585pub async fn get_ai_templates(configuration: &configuration::Configuration, ) -> Result<(), Error<GetAiTemplatesError>> {
5586
5587    let uri_str = format!("{}/v1/ai/templates", configuration.base_path);
5588    let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
5589
5590    if let Some(ref user_agent) = configuration.user_agent {
5591        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
5592    }
5593    if let Some(ref token) = configuration.bearer_access_token {
5594        req_builder = req_builder.bearer_auth(token.to_owned());
5595    };
5596
5597    let req = req_builder.build()?;
5598    let resp = configuration.client.execute(req).await?;
5599
5600    let status = resp.status();
5601
5602    if !status.is_client_error() && !status.is_server_error() {
5603        Ok(())
5604    } else {
5605        let content = resp.text().await?;
5606        let entity: Option<GetAiTemplatesError> = serde_json::from_str(&content).ok();
5607        Err(Error::ResponseError(ResponseContent { status, content, entity }))
5608    }
5609}
5610
5611/// Read one template by its (owner, name) key.
5612pub async fn get_ai_templates_by_owner_by_name(configuration: &configuration::Configuration, owner: &str, name: &str) -> Result<(), Error<GetAiTemplatesByOwnerByNameError>> {
5613    // add a prefix to parameters to efficiently prevent name collisions
5614    let p_owner = owner;
5615    let p_name = name;
5616
5617    let uri_str = format!("{}/v1/ai/templates/{owner}/{name}", configuration.base_path, owner=crate::apis::urlencode(p_owner), name=crate::apis::urlencode(p_name));
5618    let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
5619
5620    if let Some(ref user_agent) = configuration.user_agent {
5621        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
5622    }
5623    if let Some(ref token) = configuration.bearer_access_token {
5624        req_builder = req_builder.bearer_auth(token.to_owned());
5625    };
5626
5627    let req = req_builder.build()?;
5628    let resp = configuration.client.execute(req).await?;
5629
5630    let status = resp.status();
5631
5632    if !status.is_client_error() && !status.is_server_error() {
5633        Ok(())
5634    } else {
5635        let content = resp.text().await?;
5636        let entity: Option<GetAiTemplatesByOwnerByNameError> = serde_json::from_str(&content).ok();
5637        Err(Error::ResponseError(ResponseContent { status, content, entity }))
5638    }
5639}
5640
5641/// Returns the PUBLIC live request-geo aggregate for the world.hanzo.ai \"Hanzo mode\" globe: WHERE requests to api.hanzo.ai are coming from, as country/region points with per-service-class counts, plus headline throughput rates.  It is AUTH-exempt and BALANCE-exempt exactly like /v1/ai/router/stats?scope=platform:   - auth: the controller name \"traffic/globe\" is neither a get-/update- CRUD name     nor a super-admin/present-credential endpoint, so the authz filter passes it     through, and this handler requires no principal.   - balance: isBalanceExempt(\"/v1/ai/traffic/...\") returns true.  It exposes ONLY aggregates — counts, rates, and country/region centroids — and NEVER any IP, per-request row, org, or user dimension (see object/traffic.go). Marketing telemetry; nothing sensitive.
5642pub async fn get_ai_traffic_globe(configuration: &configuration::Configuration, ) -> Result<(), Error<GetAiTrafficGlobeError>> {
5643
5644    let uri_str = format!("{}/v1/ai/traffic/globe", configuration.base_path);
5645    let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
5646
5647    if let Some(ref user_agent) = configuration.user_agent {
5648        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
5649    }
5650    if let Some(ref token) = configuration.bearer_access_token {
5651        req_builder = req_builder.bearer_auth(token.to_owned());
5652    };
5653
5654    let req = req_builder.build()?;
5655    let resp = configuration.client.execute(req).await?;
5656
5657    let status = resp.status();
5658
5659    if !status.is_client_error() && !status.is_server_error() {
5660        Ok(())
5661    } else {
5662        let content = resp.text().await?;
5663        let entity: Option<GetAiTrafficGlobeError> = serde_json::from_str(&content).ok();
5664        Err(Error::ResponseError(ResponseContent { status, content, entity }))
5665    }
5666}
5667
5668pub async fn get_ai_training_contribution(configuration: &configuration::Configuration, ) -> Result<(), Error<GetAiTrainingContributionError>> {
5669
5670    let uri_str = format!("{}/v1/ai/training-contribution", configuration.base_path);
5671    let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
5672
5673    if let Some(ref user_agent) = configuration.user_agent {
5674        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
5675    }
5676    if let Some(ref token) = configuration.bearer_access_token {
5677        req_builder = req_builder.bearer_auth(token.to_owned());
5678    };
5679
5680    let req = req_builder.build()?;
5681    let resp = configuration.client.execute(req).await?;
5682
5683    let status = resp.status();
5684
5685    if !status.is_client_error() && !status.is_server_error() {
5686        Ok(())
5687    } else {
5688        let content = resp.text().await?;
5689        let entity: Option<GetAiTrainingContributionError> = serde_json::from_str(&content).ok();
5690        Err(Error::ResponseError(ResponseContent { status, content, entity }))
5691    }
5692}
5693
5694/// List the caller's usages.
5695pub async fn get_ai_usages(configuration: &configuration::Configuration, ) -> Result<(), Error<GetAiUsagesError>> {
5696
5697    let uri_str = format!("{}/v1/ai/usages", configuration.base_path);
5698    let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
5699
5700    if let Some(ref user_agent) = configuration.user_agent {
5701        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
5702    }
5703    if let Some(ref token) = configuration.bearer_access_token {
5704        req_builder = req_builder.bearer_auth(token.to_owned());
5705    };
5706
5707    let req = req_builder.build()?;
5708    let resp = configuration.client.execute(req).await?;
5709
5710    let status = resp.status();
5711
5712    if !status.is_client_error() && !status.is_server_error() {
5713        Ok(())
5714    } else {
5715        let content = resp.text().await?;
5716        let entity: Option<GetAiUsagesError> = serde_json::from_str(&content).ok();
5717        Err(Error::ResponseError(ResponseContent { status, content, entity }))
5718    }
5719}
5720
5721pub async fn get_ai_usages_by_user(configuration: &configuration::Configuration, ) -> Result<(), Error<GetAiUsagesByUserError>> {
5722
5723    let uri_str = format!("{}/v1/ai/usages/by-user", configuration.base_path);
5724    let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
5725
5726    if let Some(ref user_agent) = configuration.user_agent {
5727        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
5728    }
5729    if let Some(ref token) = configuration.bearer_access_token {
5730        req_builder = req_builder.bearer_auth(token.to_owned());
5731    };
5732
5733    let req = req_builder.build()?;
5734    let resp = configuration.client.execute(req).await?;
5735
5736    let status = resp.status();
5737
5738    if !status.is_client_error() && !status.is_server_error() {
5739        Ok(())
5740    } else {
5741        let content = resp.text().await?;
5742        let entity: Option<GetAiUsagesByUserError> = serde_json::from_str(&content).ok();
5743        Err(Error::ResponseError(ResponseContent { status, content, entity }))
5744    }
5745}
5746
5747pub async fn get_ai_usages_cloud(configuration: &configuration::Configuration, ) -> Result<(), Error<GetAiUsagesCloudError>> {
5748
5749    let uri_str = format!("{}/v1/ai/usages/cloud", configuration.base_path);
5750    let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
5751
5752    if let Some(ref user_agent) = configuration.user_agent {
5753        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
5754    }
5755    if let Some(ref token) = configuration.bearer_access_token {
5756        req_builder = req_builder.bearer_auth(token.to_owned());
5757    };
5758
5759    let req = req_builder.build()?;
5760    let resp = configuration.client.execute(req).await?;
5761
5762    let status = resp.status();
5763
5764    if !status.is_client_error() && !status.is_server_error() {
5765        Ok(())
5766    } else {
5767        let content = resp.text().await?;
5768        let entity: Option<GetAiUsagesCloudError> = serde_json::from_str(&content).ok();
5769        Err(Error::ResponseError(ResponseContent { status, content, entity }))
5770    }
5771}
5772
5773pub async fn get_ai_usages_range(configuration: &configuration::Configuration, ) -> Result<(), Error<GetAiUsagesRangeError>> {
5774
5775    let uri_str = format!("{}/v1/ai/usages/range", configuration.base_path);
5776    let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
5777
5778    if let Some(ref user_agent) = configuration.user_agent {
5779        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
5780    }
5781    if let Some(ref token) = configuration.bearer_access_token {
5782        req_builder = req_builder.bearer_auth(token.to_owned());
5783    };
5784
5785    let req = req_builder.build()?;
5786    let resp = configuration.client.execute(req).await?;
5787
5788    let status = resp.status();
5789
5790    if !status.is_client_error() && !status.is_server_error() {
5791        Ok(())
5792    } else {
5793        let content = resp.text().await?;
5794        let entity: Option<GetAiUsagesRangeError> = serde_json::from_str(&content).ok();
5795        Err(Error::ResponseError(ResponseContent { status, content, entity }))
5796    }
5797}
5798
5799pub async fn get_ai_usages_user_names(configuration: &configuration::Configuration, ) -> Result<(), Error<GetAiUsagesUserNamesError>> {
5800
5801    let uri_str = format!("{}/v1/ai/usages/user-names", configuration.base_path);
5802    let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
5803
5804    if let Some(ref user_agent) = configuration.user_agent {
5805        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
5806    }
5807    if let Some(ref token) = configuration.bearer_access_token {
5808        req_builder = req_builder.bearer_auth(token.to_owned());
5809    };
5810
5811    let req = req_builder.build()?;
5812    let resp = configuration.client.execute(req).await?;
5813
5814    let status = resp.status();
5815
5816    if !status.is_client_error() && !status.is_server_error() {
5817        Ok(())
5818    } else {
5819        let content = resp.text().await?;
5820        let entity: Option<GetAiUsagesUserNamesError> = serde_json::from_str(&content).ok();
5821        Err(Error::ResponseError(ResponseContent { status, content, entity }))
5822    }
5823}
5824
5825/// List the caller's vectors.
5826pub async fn get_ai_vectors(configuration: &configuration::Configuration, ) -> Result<(), Error<GetAiVectorsError>> {
5827
5828    let uri_str = format!("{}/v1/ai/vectors", configuration.base_path);
5829    let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
5830
5831    if let Some(ref user_agent) = configuration.user_agent {
5832        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
5833    }
5834    if let Some(ref token) = configuration.bearer_access_token {
5835        req_builder = req_builder.bearer_auth(token.to_owned());
5836    };
5837
5838    let req = req_builder.build()?;
5839    let resp = configuration.client.execute(req).await?;
5840
5841    let status = resp.status();
5842
5843    if !status.is_client_error() && !status.is_server_error() {
5844        Ok(())
5845    } else {
5846        let content = resp.text().await?;
5847        let entity: Option<GetAiVectorsError> = serde_json::from_str(&content).ok();
5848        Err(Error::ResponseError(ResponseContent { status, content, entity }))
5849    }
5850}
5851
5852/// Read one vector by its (owner, name) key.
5853pub async fn get_ai_vectors_by_owner_by_name(configuration: &configuration::Configuration, owner: &str, name: &str) -> Result<(), Error<GetAiVectorsByOwnerByNameError>> {
5854    // add a prefix to parameters to efficiently prevent name collisions
5855    let p_owner = owner;
5856    let p_name = name;
5857
5858    let uri_str = format!("{}/v1/ai/vectors/{owner}/{name}", configuration.base_path, owner=crate::apis::urlencode(p_owner), name=crate::apis::urlencode(p_name));
5859    let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
5860
5861    if let Some(ref user_agent) = configuration.user_agent {
5862        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
5863    }
5864    if let Some(ref token) = configuration.bearer_access_token {
5865        req_builder = req_builder.bearer_auth(token.to_owned());
5866    };
5867
5868    let req = req_builder.build()?;
5869    let resp = configuration.client.execute(req).await?;
5870
5871    let status = resp.status();
5872
5873    if !status.is_client_error() && !status.is_server_error() {
5874        Ok(())
5875    } else {
5876        let content = resp.text().await?;
5877        let entity: Option<GetAiVectorsByOwnerByNameError> = serde_json::from_str(&content).ok();
5878        Err(Error::ResponseError(ResponseContent { status, content, entity }))
5879    }
5880}
5881
5882/// Cross-tenant listing. Admin-only; a tenant caller is refused.
5883pub async fn get_ai_vectors_global(configuration: &configuration::Configuration, ) -> Result<(), Error<GetAiVectorsGlobalError>> {
5884
5885    let uri_str = format!("{}/v1/ai/vectors/global", configuration.base_path);
5886    let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
5887
5888    if let Some(ref user_agent) = configuration.user_agent {
5889        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
5890    }
5891    if let Some(ref token) = configuration.bearer_access_token {
5892        req_builder = req_builder.bearer_auth(token.to_owned());
5893    };
5894
5895    let req = req_builder.build()?;
5896    let resp = configuration.client.execute(req).await?;
5897
5898    let status = resp.status();
5899
5900    if !status.is_client_error() && !status.is_server_error() {
5901        Ok(())
5902    } else {
5903        let content = resp.text().await?;
5904        let entity: Option<GetAiVectorsGlobalError> = serde_json::from_str(&content).ok();
5905        Err(Error::ResponseError(ResponseContent { status, content, entity }))
5906    }
5907}
5908
5909pub async fn get_ai_version(configuration: &configuration::Configuration, ) -> Result<(), Error<GetAiVersionError>> {
5910
5911    let uri_str = format!("{}/v1/ai/version", configuration.base_path);
5912    let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
5913
5914    if let Some(ref user_agent) = configuration.user_agent {
5915        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
5916    }
5917    if let Some(ref token) = configuration.bearer_access_token {
5918        req_builder = req_builder.bearer_auth(token.to_owned());
5919    };
5920
5921    let req = req_builder.build()?;
5922    let resp = configuration.client.execute(req).await?;
5923
5924    let status = resp.status();
5925
5926    if !status.is_client_error() && !status.is_server_error() {
5927        Ok(())
5928    } else {
5929        let content = resp.text().await?;
5930        let entity: Option<GetAiVersionError> = serde_json::from_str(&content).ok();
5931        Err(Error::ResponseError(ResponseContent { status, content, entity }))
5932    }
5933}
5934
5935/// List the caller's videos.
5936pub async fn get_ai_videos(configuration: &configuration::Configuration, ) -> Result<(), Error<GetAiVideosError>> {
5937
5938    let uri_str = format!("{}/v1/ai/videos", configuration.base_path);
5939    let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
5940
5941    if let Some(ref user_agent) = configuration.user_agent {
5942        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
5943    }
5944    if let Some(ref token) = configuration.bearer_access_token {
5945        req_builder = req_builder.bearer_auth(token.to_owned());
5946    };
5947
5948    let req = req_builder.build()?;
5949    let resp = configuration.client.execute(req).await?;
5950
5951    let status = resp.status();
5952
5953    if !status.is_client_error() && !status.is_server_error() {
5954        Ok(())
5955    } else {
5956        let content = resp.text().await?;
5957        let entity: Option<GetAiVideosError> = serde_json::from_str(&content).ok();
5958        Err(Error::ResponseError(ResponseContent { status, content, entity }))
5959    }
5960}
5961
5962/// Read one video by its (owner, name) key.
5963pub async fn get_ai_videos_by_owner_by_name(configuration: &configuration::Configuration, owner: &str, name: &str) -> Result<(), Error<GetAiVideosByOwnerByNameError>> {
5964    // add a prefix to parameters to efficiently prevent name collisions
5965    let p_owner = owner;
5966    let p_name = name;
5967
5968    let uri_str = format!("{}/v1/ai/videos/{owner}/{name}", configuration.base_path, owner=crate::apis::urlencode(p_owner), name=crate::apis::urlencode(p_name));
5969    let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
5970
5971    if let Some(ref user_agent) = configuration.user_agent {
5972        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
5973    }
5974    if let Some(ref token) = configuration.bearer_access_token {
5975        req_builder = req_builder.bearer_auth(token.to_owned());
5976    };
5977
5978    let req = req_builder.build()?;
5979    let resp = configuration.client.execute(req).await?;
5980
5981    let status = resp.status();
5982
5983    if !status.is_client_error() && !status.is_server_error() {
5984        Ok(())
5985    } else {
5986        let content = resp.text().await?;
5987        let entity: Option<GetAiVideosByOwnerByNameError> = serde_json::from_str(&content).ok();
5988        Err(Error::ResponseError(ResponseContent { status, content, entity }))
5989    }
5990}
5991
5992/// Cross-tenant listing. Admin-only; a tenant caller is refused.
5993pub async fn get_ai_videos_global(configuration: &configuration::Configuration, ) -> Result<(), Error<GetAiVideosGlobalError>> {
5994
5995    let uri_str = format!("{}/v1/ai/videos/global", configuration.base_path);
5996    let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
5997
5998    if let Some(ref user_agent) = configuration.user_agent {
5999        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
6000    }
6001    if let Some(ref token) = configuration.bearer_access_token {
6002        req_builder = req_builder.bearer_auth(token.to_owned());
6003    };
6004
6005    let req = req_builder.build()?;
6006    let resp = configuration.client.execute(req).await?;
6007
6008    let status = resp.status();
6009
6010    if !status.is_client_error() && !status.is_server_error() {
6011        Ok(())
6012    } else {
6013        let content = resp.text().await?;
6014        let entity: Option<GetAiVideosGlobalError> = serde_json::from_str(&content).ok();
6015        Err(Error::ResponseError(ResponseContent { status, content, entity }))
6016    }
6017}
6018
6019/// List the caller's workflows.
6020pub async fn get_ai_workflows(configuration: &configuration::Configuration, ) -> Result<(), Error<GetAiWorkflowsError>> {
6021
6022    let uri_str = format!("{}/v1/ai/workflows", configuration.base_path);
6023    let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
6024
6025    if let Some(ref user_agent) = configuration.user_agent {
6026        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
6027    }
6028    if let Some(ref token) = configuration.bearer_access_token {
6029        req_builder = req_builder.bearer_auth(token.to_owned());
6030    };
6031
6032    let req = req_builder.build()?;
6033    let resp = configuration.client.execute(req).await?;
6034
6035    let status = resp.status();
6036
6037    if !status.is_client_error() && !status.is_server_error() {
6038        Ok(())
6039    } else {
6040        let content = resp.text().await?;
6041        let entity: Option<GetAiWorkflowsError> = serde_json::from_str(&content).ok();
6042        Err(Error::ResponseError(ResponseContent { status, content, entity }))
6043    }
6044}
6045
6046/// Read one workflow by its (owner, name) key.
6047pub async fn get_ai_workflows_by_owner_by_name(configuration: &configuration::Configuration, owner: &str, name: &str) -> Result<(), Error<GetAiWorkflowsByOwnerByNameError>> {
6048    // add a prefix to parameters to efficiently prevent name collisions
6049    let p_owner = owner;
6050    let p_name = name;
6051
6052    let uri_str = format!("{}/v1/ai/workflows/{owner}/{name}", configuration.base_path, owner=crate::apis::urlencode(p_owner), name=crate::apis::urlencode(p_name));
6053    let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
6054
6055    if let Some(ref user_agent) = configuration.user_agent {
6056        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
6057    }
6058    if let Some(ref token) = configuration.bearer_access_token {
6059        req_builder = req_builder.bearer_auth(token.to_owned());
6060    };
6061
6062    let req = req_builder.build()?;
6063    let resp = configuration.client.execute(req).await?;
6064
6065    let status = resp.status();
6066
6067    if !status.is_client_error() && !status.is_server_error() {
6068        Ok(())
6069    } else {
6070        let content = resp.text().await?;
6071        let entity: Option<GetAiWorkflowsByOwnerByNameError> = serde_json::from_str(&content).ok();
6072        Err(Error::ResponseError(ResponseContent { status, content, entity }))
6073    }
6074}
6075
6076/// Cross-tenant listing. Admin-only; a tenant caller is refused.
6077pub async fn get_ai_workflows_global(configuration: &configuration::Configuration, ) -> Result<(), Error<GetAiWorkflowsGlobalError>> {
6078
6079    let uri_str = format!("{}/v1/ai/workflows/global", configuration.base_path);
6080    let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
6081
6082    if let Some(ref user_agent) = configuration.user_agent {
6083        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
6084    }
6085    if let Some(ref token) = configuration.bearer_access_token {
6086        req_builder = req_builder.bearer_auth(token.to_owned());
6087    };
6088
6089    let req = req_builder.build()?;
6090    let resp = configuration.client.execute(req).await?;
6091
6092    let status = resp.status();
6093
6094    if !status.is_client_error() && !status.is_server_error() {
6095        Ok(())
6096    } else {
6097        let content = resp.text().await?;
6098        let entity: Option<GetAiWorkflowsGlobalError> = serde_json::from_str(&content).ok();
6099        Err(Error::ResponseError(ResponseContent { status, content, entity }))
6100    }
6101}
6102
6103/// Returns the list of available models from the routing table.  PUBLIC BY DESIGN, AND IT DOES NOT AUTHENTICATE — that is the whole contract, so it is stated here rather than left to be inferred. The catalogue is the same for everyone (listAvailableModels takes no principal), docs.hanzo.ai fetches it from the browser, and every policy layer around it already says so out loud: the authz filter lists \"models\" as public, filter_balance refuses to gate it (a 402 here was a console-wide outage), the rate limiter excludes it, and cloud's spend.Reachable carries /v1/models/ as \"the model catalog the shell reads for discovery\".  SO THE Authorization HEADER IS NOT AN ADMISSION CHECK HERE. It is read for ONE thing — annotating gated SKUs with the caller's own access standing — and annotation degrades to nothing when there is no verified principal.  It used to hold a \"require authentication\" gate that authenticated nobody: it rejected an ABSENT credential and a MALFORMED one, then accepted any string that merely looked like a key. `Bearer sk-` followed by 36 zeroes returned 200 in production; so did a JWT three days expired. It was a shape check wearing an auth check's clothes, and its cost was diagnostic: /v1/models is the natural \"is my auth working?\" probe, and answering 200 to a dead credential sent people debugging the wrong system. A public endpoint must not appear to validate. Either check the credential or ignore it — this one ignores it, deliberately and visibly.  Removing that gate discloses nothing new: the catalogue was already reachable by anyone willing to type three characters, so there is no confidentiality delta, only an honesty one.
6104pub async fn get_models(configuration: &configuration::Configuration, ) -> Result<(), Error<GetModelsError>> {
6105
6106    let uri_str = format!("{}/v1/models", configuration.base_path);
6107    let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
6108
6109    if let Some(ref user_agent) = configuration.user_agent {
6110        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
6111    }
6112    if let Some(ref token) = configuration.bearer_access_token {
6113        req_builder = req_builder.bearer_auth(token.to_owned());
6114    };
6115
6116    let req = req_builder.build()?;
6117    let resp = configuration.client.execute(req).await?;
6118
6119    let status = resp.status();
6120
6121    if !status.is_client_error() && !status.is_server_error() {
6122        Ok(())
6123    } else {
6124        let content = resp.text().await?;
6125        let entity: Option<GetModelsError> = serde_json::from_str(&content).ok();
6126        Err(Error::ResponseError(ResponseContent { status, content, entity }))
6127    }
6128}
6129
6130/// Returns the caller's own standing for a gated model: \"granted\", \"requested\", or empty when they have never asked.
6131pub async fn get_models_by_model_access(configuration: &configuration::Configuration, model: &str) -> Result<(), Error<GetModelsByModelAccessError>> {
6132    // add a prefix to parameters to efficiently prevent name collisions
6133    let p_model = model;
6134
6135    let uri_str = format!("{}/v1/models/{model}/access", configuration.base_path, model=crate::apis::urlencode(p_model));
6136    let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
6137
6138    if let Some(ref user_agent) = configuration.user_agent {
6139        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
6140    }
6141    if let Some(ref token) = configuration.bearer_access_token {
6142        req_builder = req_builder.bearer_auth(token.to_owned());
6143    };
6144
6145    let req = req_builder.build()?;
6146    let resp = configuration.client.execute(req).await?;
6147
6148    let status = resp.status();
6149
6150    if !status.is_client_error() && !status.is_server_error() {
6151        Ok(())
6152    } else {
6153        let content = resp.text().await?;
6154        let entity: Option<GetModelsByModelAccessError> = serde_json::from_str(&content).ok();
6155        Err(Error::ResponseError(ResponseContent { status, content, entity }))
6156    }
6157}
6158
6159/// Public, secret-free list of the providers serving the models that GET /v1/models lists — the same source, projected. Safe unauthenticated: no keys, URLs, or config are returned, and it reports a SET of names, never which provider serves which model.
6160pub async fn get_models_providers(configuration: &configuration::Configuration, ) -> Result<(), Error<GetModelsProvidersError>> {
6161
6162    let uri_str = format!("{}/v1/models/providers", configuration.base_path);
6163    let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
6164
6165    if let Some(ref user_agent) = configuration.user_agent {
6166        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
6167    }
6168    if let Some(ref token) = configuration.bearer_access_token {
6169        req_builder = req_builder.bearer_auth(token.to_owned());
6170    };
6171
6172    let req = req_builder.build()?;
6173    let resp = configuration.client.execute(req).await?;
6174
6175    let status = resp.status();
6176
6177    if !status.is_client_error() && !status.is_server_error() {
6178        Ok(())
6179    } else {
6180        let content = resp.text().await?;
6181        let entity: Option<GetModelsProvidersError> = serde_json::from_str(&content).ok();
6182        Err(Error::ResponseError(ResponseContent { status, content, entity }))
6183    }
6184}
6185
6186/// Implements GET /v1/videos/{id} — poll a job's status.  It authenticates the caller, verifies they OWN the job (the caller's billing subject must equal the job's), performs ONE upstream status poll, and — the first time the job is observed completed — settles the reservation with the actual cost and records the billable usage event (exactly once). Returns the OpenAI-shaped video object.
6187pub async fn get_videos_by_id(configuration: &configuration::Configuration, id: &str) -> Result<(), Error<GetVideosByIdError>> {
6188    // add a prefix to parameters to efficiently prevent name collisions
6189    let p_id = id;
6190
6191    let uri_str = format!("{}/v1/videos/{id}", configuration.base_path, id=crate::apis::urlencode(p_id));
6192    let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
6193
6194    if let Some(ref user_agent) = configuration.user_agent {
6195        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
6196    }
6197    if let Some(ref token) = configuration.bearer_access_token {
6198        req_builder = req_builder.bearer_auth(token.to_owned());
6199    };
6200
6201    let req = req_builder.build()?;
6202    let resp = configuration.client.execute(req).await?;
6203
6204    let status = resp.status();
6205
6206    if !status.is_client_error() && !status.is_server_error() {
6207        Ok(())
6208    } else {
6209        let content = resp.text().await?;
6210        let entity: Option<GetVideosByIdError> = serde_json::from_str(&content).ok();
6211        Err(Error::ResponseError(ResponseContent { status, content, entity }))
6212    }
6213}
6214
6215/// Implements GET /v1/videos/{id}/content — download the finished MP4.  It authenticates + ownership-checks the caller, then proxies the upstream /content endpoint (bounded by the download concurrency ceiling) and streams the raw video bytes back inline. A successful download also bills the job once (for the client that downloads without first polling to completion) — idempotent with the poll path via job.markCompleted.
6216pub async fn get_videos_by_id_content(configuration: &configuration::Configuration, id: &str) -> Result<(), Error<GetVideosByIdContentError>> {
6217    // add a prefix to parameters to efficiently prevent name collisions
6218    let p_id = id;
6219
6220    let uri_str = format!("{}/v1/videos/{id}/content", configuration.base_path, id=crate::apis::urlencode(p_id));
6221    let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
6222
6223    if let Some(ref user_agent) = configuration.user_agent {
6224        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
6225    }
6226    if let Some(ref token) = configuration.bearer_access_token {
6227        req_builder = req_builder.bearer_auth(token.to_owned());
6228    };
6229
6230    let req = req_builder.build()?;
6231    let resp = configuration.client.execute(req).await?;
6232
6233    let status = resp.status();
6234
6235    if !status.is_client_error() && !status.is_server_error() {
6236        Ok(())
6237    } else {
6238        let content = resp.text().await?;
6239        let entity: Option<GetVideosByIdContentError> = serde_json::from_str(&content).ok();
6240        Err(Error::ResponseError(ResponseContent { status, content, entity }))
6241    }
6242}
6243
6244/// Update one article. PATCH and PUT reach the same handler, which has always taken a whole object.
6245pub async fn patch_ai_articles_by_owner_by_name(configuration: &configuration::Configuration, owner: &str, name: &str) -> Result<(), Error<PatchAiArticlesByOwnerByNameError>> {
6246    // add a prefix to parameters to efficiently prevent name collisions
6247    let p_owner = owner;
6248    let p_name = name;
6249
6250    let uri_str = format!("{}/v1/ai/articles/{owner}/{name}", configuration.base_path, owner=crate::apis::urlencode(p_owner), name=crate::apis::urlencode(p_name));
6251    let mut req_builder = configuration.client.request(reqwest::Method::PATCH, &uri_str);
6252
6253    if let Some(ref user_agent) = configuration.user_agent {
6254        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
6255    }
6256    if let Some(ref token) = configuration.bearer_access_token {
6257        req_builder = req_builder.bearer_auth(token.to_owned());
6258    };
6259
6260    let req = req_builder.build()?;
6261    let resp = configuration.client.execute(req).await?;
6262
6263    let status = resp.status();
6264
6265    if !status.is_client_error() && !status.is_server_error() {
6266        Ok(())
6267    } else {
6268        let content = resp.text().await?;
6269        let entity: Option<PatchAiArticlesByOwnerByNameError> = serde_json::from_str(&content).ok();
6270        Err(Error::ResponseError(ResponseContent { status, content, entity }))
6271    }
6272}
6273
6274/// Update one asset. PATCH and PUT reach the same handler, which has always taken a whole object.
6275pub async fn patch_ai_assets_by_owner_by_name(configuration: &configuration::Configuration, owner: &str, name: &str) -> Result<(), Error<PatchAiAssetsByOwnerByNameError>> {
6276    // add a prefix to parameters to efficiently prevent name collisions
6277    let p_owner = owner;
6278    let p_name = name;
6279
6280    let uri_str = format!("{}/v1/ai/assets/{owner}/{name}", configuration.base_path, owner=crate::apis::urlencode(p_owner), name=crate::apis::urlencode(p_name));
6281    let mut req_builder = configuration.client.request(reqwest::Method::PATCH, &uri_str);
6282
6283    if let Some(ref user_agent) = configuration.user_agent {
6284        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
6285    }
6286    if let Some(ref token) = configuration.bearer_access_token {
6287        req_builder = req_builder.bearer_auth(token.to_owned());
6288    };
6289
6290    let req = req_builder.build()?;
6291    let resp = configuration.client.execute(req).await?;
6292
6293    let status = resp.status();
6294
6295    if !status.is_client_error() && !status.is_server_error() {
6296        Ok(())
6297    } else {
6298        let content = resp.text().await?;
6299        let entity: Option<PatchAiAssetsByOwnerByNameError> = serde_json::from_str(&content).ok();
6300        Err(Error::ResponseError(ResponseContent { status, content, entity }))
6301    }
6302}
6303
6304/// Update one chat. PATCH and PUT reach the same handler, which has always taken a whole object.
6305pub async fn patch_ai_chats_by_owner_by_name(configuration: &configuration::Configuration, owner: &str, name: &str) -> Result<(), Error<PatchAiChatsByOwnerByNameError>> {
6306    // add a prefix to parameters to efficiently prevent name collisions
6307    let p_owner = owner;
6308    let p_name = name;
6309
6310    let uri_str = format!("{}/v1/ai/chats/{owner}/{name}", configuration.base_path, owner=crate::apis::urlencode(p_owner), name=crate::apis::urlencode(p_name));
6311    let mut req_builder = configuration.client.request(reqwest::Method::PATCH, &uri_str);
6312
6313    if let Some(ref user_agent) = configuration.user_agent {
6314        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
6315    }
6316    if let Some(ref token) = configuration.bearer_access_token {
6317        req_builder = req_builder.bearer_auth(token.to_owned());
6318    };
6319
6320    let req = req_builder.build()?;
6321    let resp = configuration.client.execute(req).await?;
6322
6323    let status = resp.status();
6324
6325    if !status.is_client_error() && !status.is_server_error() {
6326        Ok(())
6327    } else {
6328        let content = resp.text().await?;
6329        let entity: Option<PatchAiChatsByOwnerByNameError> = serde_json::from_str(&content).ok();
6330        Err(Error::ResponseError(ResponseContent { status, content, entity }))
6331    }
6332}
6333
6334/// Update one application. PATCH and PUT reach the same handler, which has always taken a whole object.
6335pub async fn patch_ai_deployments_by_owner_by_name(configuration: &configuration::Configuration, owner: &str, name: &str) -> Result<(), Error<PatchAiDeploymentsByOwnerByNameError>> {
6336    // add a prefix to parameters to efficiently prevent name collisions
6337    let p_owner = owner;
6338    let p_name = name;
6339
6340    let uri_str = format!("{}/v1/ai/deployments/{owner}/{name}", configuration.base_path, owner=crate::apis::urlencode(p_owner), name=crate::apis::urlencode(p_name));
6341    let mut req_builder = configuration.client.request(reqwest::Method::PATCH, &uri_str);
6342
6343    if let Some(ref user_agent) = configuration.user_agent {
6344        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
6345    }
6346    if let Some(ref token) = configuration.bearer_access_token {
6347        req_builder = req_builder.bearer_auth(token.to_owned());
6348    };
6349
6350    let req = req_builder.build()?;
6351    let resp = configuration.client.execute(req).await?;
6352
6353    let status = resp.status();
6354
6355    if !status.is_client_error() && !status.is_server_error() {
6356        Ok(())
6357    } else {
6358        let content = resp.text().await?;
6359        let entity: Option<PatchAiDeploymentsByOwnerByNameError> = serde_json::from_str(&content).ok();
6360        Err(Error::ResponseError(ResponseContent { status, content, entity }))
6361    }
6362}
6363
6364/// Update one file. PATCH and PUT reach the same handler, which has always taken a whole object.
6365pub async fn patch_ai_files_by_owner_by_name(configuration: &configuration::Configuration, owner: &str, name: &str) -> Result<(), Error<PatchAiFilesByOwnerByNameError>> {
6366    // add a prefix to parameters to efficiently prevent name collisions
6367    let p_owner = owner;
6368    let p_name = name;
6369
6370    let uri_str = format!("{}/v1/ai/files/{owner}/{name}", configuration.base_path, owner=crate::apis::urlencode(p_owner), name=crate::apis::urlencode(p_name));
6371    let mut req_builder = configuration.client.request(reqwest::Method::PATCH, &uri_str);
6372
6373    if let Some(ref user_agent) = configuration.user_agent {
6374        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
6375    }
6376    if let Some(ref token) = configuration.bearer_access_token {
6377        req_builder = req_builder.bearer_auth(token.to_owned());
6378    };
6379
6380    let req = req_builder.build()?;
6381    let resp = configuration.client.execute(req).await?;
6382
6383    let status = resp.status();
6384
6385    if !status.is_client_error() && !status.is_server_error() {
6386        Ok(())
6387    } else {
6388        let content = resp.text().await?;
6389        let entity: Option<PatchAiFilesByOwnerByNameError> = serde_json::from_str(&content).ok();
6390        Err(Error::ResponseError(ResponseContent { status, content, entity }))
6391    }
6392}
6393
6394/// Update one form. PATCH and PUT reach the same handler, which has always taken a whole object.
6395pub async fn patch_ai_forms_by_owner_by_name(configuration: &configuration::Configuration, owner: &str, name: &str) -> Result<(), Error<PatchAiFormsByOwnerByNameError>> {
6396    // add a prefix to parameters to efficiently prevent name collisions
6397    let p_owner = owner;
6398    let p_name = name;
6399
6400    let uri_str = format!("{}/v1/ai/forms/{owner}/{name}", configuration.base_path, owner=crate::apis::urlencode(p_owner), name=crate::apis::urlencode(p_name));
6401    let mut req_builder = configuration.client.request(reqwest::Method::PATCH, &uri_str);
6402
6403    if let Some(ref user_agent) = configuration.user_agent {
6404        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
6405    }
6406    if let Some(ref token) = configuration.bearer_access_token {
6407        req_builder = req_builder.bearer_auth(token.to_owned());
6408    };
6409
6410    let req = req_builder.build()?;
6411    let resp = configuration.client.execute(req).await?;
6412
6413    let status = resp.status();
6414
6415    if !status.is_client_error() && !status.is_server_error() {
6416        Ok(())
6417    } else {
6418        let content = resp.text().await?;
6419        let entity: Option<PatchAiFormsByOwnerByNameError> = serde_json::from_str(&content).ok();
6420        Err(Error::ResponseError(ResponseContent { status, content, entity }))
6421    }
6422}
6423
6424/// Update one graph. PATCH and PUT reach the same handler, which has always taken a whole object.
6425pub async fn patch_ai_graphs_by_owner_by_name(configuration: &configuration::Configuration, owner: &str, name: &str) -> Result<(), Error<PatchAiGraphsByOwnerByNameError>> {
6426    // add a prefix to parameters to efficiently prevent name collisions
6427    let p_owner = owner;
6428    let p_name = name;
6429
6430    let uri_str = format!("{}/v1/ai/graphs/{owner}/{name}", configuration.base_path, owner=crate::apis::urlencode(p_owner), name=crate::apis::urlencode(p_name));
6431    let mut req_builder = configuration.client.request(reqwest::Method::PATCH, &uri_str);
6432
6433    if let Some(ref user_agent) = configuration.user_agent {
6434        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
6435    }
6436    if let Some(ref token) = configuration.bearer_access_token {
6437        req_builder = req_builder.bearer_auth(token.to_owned());
6438    };
6439
6440    let req = req_builder.build()?;
6441    let resp = configuration.client.execute(req).await?;
6442
6443    let status = resp.status();
6444
6445    if !status.is_client_error() && !status.is_server_error() {
6446        Ok(())
6447    } else {
6448        let content = resp.text().await?;
6449        let entity: Option<PatchAiGraphsByOwnerByNameError> = serde_json::from_str(&content).ok();
6450        Err(Error::ResponseError(ResponseContent { status, content, entity }))
6451    }
6452}
6453
6454/// Update one message. PATCH and PUT reach the same handler, which has always taken a whole object.
6455pub async fn patch_ai_messages_by_owner_by_name(configuration: &configuration::Configuration, owner: &str, name: &str) -> Result<(), Error<PatchAiMessagesByOwnerByNameError>> {
6456    // add a prefix to parameters to efficiently prevent name collisions
6457    let p_owner = owner;
6458    let p_name = name;
6459
6460    let uri_str = format!("{}/v1/ai/messages/{owner}/{name}", configuration.base_path, owner=crate::apis::urlencode(p_owner), name=crate::apis::urlencode(p_name));
6461    let mut req_builder = configuration.client.request(reqwest::Method::PATCH, &uri_str);
6462
6463    if let Some(ref user_agent) = configuration.user_agent {
6464        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
6465    }
6466    if let Some(ref token) = configuration.bearer_access_token {
6467        req_builder = req_builder.bearer_auth(token.to_owned());
6468    };
6469
6470    let req = req_builder.build()?;
6471    let resp = configuration.client.execute(req).await?;
6472
6473    let status = resp.status();
6474
6475    if !status.is_client_error() && !status.is_server_error() {
6476        Ok(())
6477    } else {
6478        let content = resp.text().await?;
6479        let entity: Option<PatchAiMessagesByOwnerByNameError> = serde_json::from_str(&content).ok();
6480        Err(Error::ResponseError(ResponseContent { status, content, entity }))
6481    }
6482}
6483
6484/// Update one node. PATCH and PUT reach the same handler, which has always taken a whole object.
6485pub async fn patch_ai_nodes_by_owner_by_name(configuration: &configuration::Configuration, owner: &str, name: &str) -> Result<(), Error<PatchAiNodesByOwnerByNameError>> {
6486    // add a prefix to parameters to efficiently prevent name collisions
6487    let p_owner = owner;
6488    let p_name = name;
6489
6490    let uri_str = format!("{}/v1/ai/nodes/{owner}/{name}", configuration.base_path, owner=crate::apis::urlencode(p_owner), name=crate::apis::urlencode(p_name));
6491    let mut req_builder = configuration.client.request(reqwest::Method::PATCH, &uri_str);
6492
6493    if let Some(ref user_agent) = configuration.user_agent {
6494        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
6495    }
6496    if let Some(ref token) = configuration.bearer_access_token {
6497        req_builder = req_builder.bearer_auth(token.to_owned());
6498    };
6499
6500    let req = req_builder.build()?;
6501    let resp = configuration.client.execute(req).await?;
6502
6503    let status = resp.status();
6504
6505    if !status.is_client_error() && !status.is_server_error() {
6506        Ok(())
6507    } else {
6508        let content = resp.text().await?;
6509        let entity: Option<PatchAiNodesByOwnerByNameError> = serde_json::from_str(&content).ok();
6510        Err(Error::ResponseError(ResponseContent { status, content, entity }))
6511    }
6512}
6513
6514/// The HTTP transport binding for the RESTful router-config nouns (/v1/ai/router/{policy,defaults,ledger,rewards,artifact-meta} and /v1/ai/org/settings[/list]). It dispatches IN-PROCESS through dispatchGateway — the SAME canonical ZAP gateway registry (zap_registry.go) that the MsgType 200 handler serves over the gateway transport. The native ZAP handler is the ONE and ONLY implementation of these routes; this is purely the api.hanzo.ai HTTP binding, so there is NO controller twin to drift from and the split-brain the router refactor removed stays removed.  Why a bridge and not a twin controller method: every other migrated route (get-records, get-connections, …) carries BOTH a controller method and a ZAP handler — the exact dual-impl drift that silently NULLed customer router settings (the update-router-policy data-wipe). Routing these nouns through the ZAP handler over one adapter keeps a single source of truth.  Identity is the request's own Bearer credential (Authorization header), which the native handlers resolve exactly as the gateway does — every caller (console, chat, app) already sends it. The dispatched handler returns a ZAP message whose status is field 0 and body is field 4 (BuildCloudResponse / BuildGatewayResponse layout); both are relayed verbatim. The route is mapped \"*\" (any verb) because the native handler is method-aware: /v1/ai/router/policy splits GET (read) vs PUT (write), /v1/ai/org/settings GET/PUT/DELETE, and returns 405 for a verb it does not own.
6515pub async fn patch_ai_org_settings(configuration: &configuration::Configuration, ) -> Result<(), Error<PatchAiOrgSettingsError>> {
6516
6517    let uri_str = format!("{}/v1/ai/org/settings", configuration.base_path);
6518    let mut req_builder = configuration.client.request(reqwest::Method::PATCH, &uri_str);
6519
6520    if let Some(ref user_agent) = configuration.user_agent {
6521        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
6522    }
6523    if let Some(ref token) = configuration.bearer_access_token {
6524        req_builder = req_builder.bearer_auth(token.to_owned());
6525    };
6526
6527    let req = req_builder.build()?;
6528    let resp = configuration.client.execute(req).await?;
6529
6530    let status = resp.status();
6531
6532    if !status.is_client_error() && !status.is_server_error() {
6533        Ok(())
6534    } else {
6535        let content = resp.text().await?;
6536        let entity: Option<PatchAiOrgSettingsError> = serde_json::from_str(&content).ok();
6537        Err(Error::ResponseError(ResponseContent { status, content, entity }))
6538    }
6539}
6540
6541/// The HTTP transport binding for the RESTful router-config nouns (/v1/ai/router/{policy,defaults,ledger,rewards,artifact-meta} and /v1/ai/org/settings[/list]). It dispatches IN-PROCESS through dispatchGateway — the SAME canonical ZAP gateway registry (zap_registry.go) that the MsgType 200 handler serves over the gateway transport. The native ZAP handler is the ONE and ONLY implementation of these routes; this is purely the api.hanzo.ai HTTP binding, so there is NO controller twin to drift from and the split-brain the router refactor removed stays removed.  Why a bridge and not a twin controller method: every other migrated route (get-records, get-connections, …) carries BOTH a controller method and a ZAP handler — the exact dual-impl drift that silently NULLed customer router settings (the update-router-policy data-wipe). Routing these nouns through the ZAP handler over one adapter keeps a single source of truth.  Identity is the request's own Bearer credential (Authorization header), which the native handlers resolve exactly as the gateway does — every caller (console, chat, app) already sends it. The dispatched handler returns a ZAP message whose status is field 0 and body is field 4 (BuildCloudResponse / BuildGatewayResponse layout); both are relayed verbatim. The route is mapped \"*\" (any verb) because the native handler is method-aware: /v1/ai/router/policy splits GET (read) vs PUT (write), /v1/ai/org/settings GET/PUT/DELETE, and returns 405 for a verb it does not own.
6542pub async fn patch_ai_org_settings_list(configuration: &configuration::Configuration, ) -> Result<(), Error<PatchAiOrgSettingsListError>> {
6543
6544    let uri_str = format!("{}/v1/ai/org/settings/list", configuration.base_path);
6545    let mut req_builder = configuration.client.request(reqwest::Method::PATCH, &uri_str);
6546
6547    if let Some(ref user_agent) = configuration.user_agent {
6548        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
6549    }
6550    if let Some(ref token) = configuration.bearer_access_token {
6551        req_builder = req_builder.bearer_auth(token.to_owned());
6552    };
6553
6554    let req = req_builder.build()?;
6555    let resp = configuration.client.execute(req).await?;
6556
6557    let status = resp.status();
6558
6559    if !status.is_client_error() && !status.is_server_error() {
6560        Ok(())
6561    } else {
6562        let content = resp.text().await?;
6563        let entity: Option<PatchAiOrgSettingsListError> = serde_json::from_str(&content).ok();
6564        Err(Error::ResponseError(ResponseContent { status, content, entity }))
6565    }
6566}
6567
6568pub async fn patch_ai_preferences(configuration: &configuration::Configuration, ) -> Result<(), Error<PatchAiPreferencesError>> {
6569
6570    let uri_str = format!("{}/v1/ai/preferences", configuration.base_path);
6571    let mut req_builder = configuration.client.request(reqwest::Method::PATCH, &uri_str);
6572
6573    if let Some(ref user_agent) = configuration.user_agent {
6574        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
6575    }
6576    if let Some(ref token) = configuration.bearer_access_token {
6577        req_builder = req_builder.bearer_auth(token.to_owned());
6578    };
6579
6580    let req = req_builder.build()?;
6581    let resp = configuration.client.execute(req).await?;
6582
6583    let status = resp.status();
6584
6585    if !status.is_client_error() && !status.is_server_error() {
6586        Ok(())
6587    } else {
6588        let content = resp.text().await?;
6589        let entity: Option<PatchAiPreferencesError> = serde_json::from_str(&content).ok();
6590        Err(Error::ResponseError(ResponseContent { status, content, entity }))
6591    }
6592}
6593
6594/// Update one provider. PATCH and PUT reach the same handler, which has always taken a whole object.
6595pub async fn patch_ai_providers_by_owner_by_name(configuration: &configuration::Configuration, owner: &str, name: &str) -> Result<(), Error<PatchAiProvidersByOwnerByNameError>> {
6596    // add a prefix to parameters to efficiently prevent name collisions
6597    let p_owner = owner;
6598    let p_name = name;
6599
6600    let uri_str = format!("{}/v1/ai/providers/{owner}/{name}", configuration.base_path, owner=crate::apis::urlencode(p_owner), name=crate::apis::urlencode(p_name));
6601    let mut req_builder = configuration.client.request(reqwest::Method::PATCH, &uri_str);
6602
6603    if let Some(ref user_agent) = configuration.user_agent {
6604        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
6605    }
6606    if let Some(ref token) = configuration.bearer_access_token {
6607        req_builder = req_builder.bearer_auth(token.to_owned());
6608    };
6609
6610    let req = req_builder.build()?;
6611    let resp = configuration.client.execute(req).await?;
6612
6613    let status = resp.status();
6614
6615    if !status.is_client_error() && !status.is_server_error() {
6616        Ok(())
6617    } else {
6618        let content = resp.text().await?;
6619        let entity: Option<PatchAiProvidersByOwnerByNameError> = serde_json::from_str(&content).ok();
6620        Err(Error::ResponseError(ResponseContent { status, content, entity }))
6621    }
6622}
6623
6624/// Update one record. PATCH and PUT reach the same handler, which has always taken a whole object.
6625pub async fn patch_ai_records_by_owner_by_name(configuration: &configuration::Configuration, owner: &str, name: &str) -> Result<(), Error<PatchAiRecordsByOwnerByNameError>> {
6626    // add a prefix to parameters to efficiently prevent name collisions
6627    let p_owner = owner;
6628    let p_name = name;
6629
6630    let uri_str = format!("{}/v1/ai/records/{owner}/{name}", configuration.base_path, owner=crate::apis::urlencode(p_owner), name=crate::apis::urlencode(p_name));
6631    let mut req_builder = configuration.client.request(reqwest::Method::PATCH, &uri_str);
6632
6633    if let Some(ref user_agent) = configuration.user_agent {
6634        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
6635    }
6636    if let Some(ref token) = configuration.bearer_access_token {
6637        req_builder = req_builder.bearer_auth(token.to_owned());
6638    };
6639
6640    let req = req_builder.build()?;
6641    let resp = configuration.client.execute(req).await?;
6642
6643    let status = resp.status();
6644
6645    if !status.is_client_error() && !status.is_server_error() {
6646        Ok(())
6647    } else {
6648        let content = resp.text().await?;
6649        let entity: Option<PatchAiRecordsByOwnerByNameError> = serde_json::from_str(&content).ok();
6650        Err(Error::ResponseError(ResponseContent { status, content, entity }))
6651    }
6652}
6653
6654/// Update one connection. PATCH and PUT reach the same handler, which has always taken a whole object.
6655pub async fn patch_ai_remote_connections_by_owner_by_name(configuration: &configuration::Configuration, owner: &str, name: &str) -> Result<(), Error<PatchAiRemoteConnectionsByOwnerByNameError>> {
6656    // add a prefix to parameters to efficiently prevent name collisions
6657    let p_owner = owner;
6658    let p_name = name;
6659
6660    let uri_str = format!("{}/v1/ai/remote-connections/{owner}/{name}", configuration.base_path, owner=crate::apis::urlencode(p_owner), name=crate::apis::urlencode(p_name));
6661    let mut req_builder = configuration.client.request(reqwest::Method::PATCH, &uri_str);
6662
6663    if let Some(ref user_agent) = configuration.user_agent {
6664        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
6665    }
6666    if let Some(ref token) = configuration.bearer_access_token {
6667        req_builder = req_builder.bearer_auth(token.to_owned());
6668    };
6669
6670    let req = req_builder.build()?;
6671    let resp = configuration.client.execute(req).await?;
6672
6673    let status = resp.status();
6674
6675    if !status.is_client_error() && !status.is_server_error() {
6676        Ok(())
6677    } else {
6678        let content = resp.text().await?;
6679        let entity: Option<PatchAiRemoteConnectionsByOwnerByNameError> = serde_json::from_str(&content).ok();
6680        Err(Error::ResponseError(ResponseContent { status, content, entity }))
6681    }
6682}
6683
6684/// The HTTP transport binding for the RESTful router-config nouns (/v1/ai/router/{policy,defaults,ledger,rewards,artifact-meta} and /v1/ai/org/settings[/list]). It dispatches IN-PROCESS through dispatchGateway — the SAME canonical ZAP gateway registry (zap_registry.go) that the MsgType 200 handler serves over the gateway transport. The native ZAP handler is the ONE and ONLY implementation of these routes; this is purely the api.hanzo.ai HTTP binding, so there is NO controller twin to drift from and the split-brain the router refactor removed stays removed.  Why a bridge and not a twin controller method: every other migrated route (get-records, get-connections, …) carries BOTH a controller method and a ZAP handler — the exact dual-impl drift that silently NULLed customer router settings (the update-router-policy data-wipe). Routing these nouns through the ZAP handler over one adapter keeps a single source of truth.  Identity is the request's own Bearer credential (Authorization header), which the native handlers resolve exactly as the gateway does — every caller (console, chat, app) already sends it. The dispatched handler returns a ZAP message whose status is field 0 and body is field 4 (BuildCloudResponse / BuildGatewayResponse layout); both are relayed verbatim. The route is mapped \"*\" (any verb) because the native handler is method-aware: /v1/ai/router/policy splits GET (read) vs PUT (write), /v1/ai/org/settings GET/PUT/DELETE, and returns 405 for a verb it does not own.
6685pub async fn patch_ai_router_artifact_meta(configuration: &configuration::Configuration, ) -> Result<(), Error<PatchAiRouterArtifactMetaError>> {
6686
6687    let uri_str = format!("{}/v1/ai/router/artifact-meta", configuration.base_path);
6688    let mut req_builder = configuration.client.request(reqwest::Method::PATCH, &uri_str);
6689
6690    if let Some(ref user_agent) = configuration.user_agent {
6691        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
6692    }
6693    if let Some(ref token) = configuration.bearer_access_token {
6694        req_builder = req_builder.bearer_auth(token.to_owned());
6695    };
6696
6697    let req = req_builder.build()?;
6698    let resp = configuration.client.execute(req).await?;
6699
6700    let status = resp.status();
6701
6702    if !status.is_client_error() && !status.is_server_error() {
6703        Ok(())
6704    } else {
6705        let content = resp.text().await?;
6706        let entity: Option<PatchAiRouterArtifactMetaError> = serde_json::from_str(&content).ok();
6707        Err(Error::ResponseError(ResponseContent { status, content, entity }))
6708    }
6709}
6710
6711/// The HTTP transport binding for the RESTful router-config nouns (/v1/ai/router/{policy,defaults,ledger,rewards,artifact-meta} and /v1/ai/org/settings[/list]). It dispatches IN-PROCESS through dispatchGateway — the SAME canonical ZAP gateway registry (zap_registry.go) that the MsgType 200 handler serves over the gateway transport. The native ZAP handler is the ONE and ONLY implementation of these routes; this is purely the api.hanzo.ai HTTP binding, so there is NO controller twin to drift from and the split-brain the router refactor removed stays removed.  Why a bridge and not a twin controller method: every other migrated route (get-records, get-connections, …) carries BOTH a controller method and a ZAP handler — the exact dual-impl drift that silently NULLed customer router settings (the update-router-policy data-wipe). Routing these nouns through the ZAP handler over one adapter keeps a single source of truth.  Identity is the request's own Bearer credential (Authorization header), which the native handlers resolve exactly as the gateway does — every caller (console, chat, app) already sends it. The dispatched handler returns a ZAP message whose status is field 0 and body is field 4 (BuildCloudResponse / BuildGatewayResponse layout); both are relayed verbatim. The route is mapped \"*\" (any verb) because the native handler is method-aware: /v1/ai/router/policy splits GET (read) vs PUT (write), /v1/ai/org/settings GET/PUT/DELETE, and returns 405 for a verb it does not own.
6712pub async fn patch_ai_router_defaults(configuration: &configuration::Configuration, ) -> Result<(), Error<PatchAiRouterDefaultsError>> {
6713
6714    let uri_str = format!("{}/v1/ai/router/defaults", configuration.base_path);
6715    let mut req_builder = configuration.client.request(reqwest::Method::PATCH, &uri_str);
6716
6717    if let Some(ref user_agent) = configuration.user_agent {
6718        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
6719    }
6720    if let Some(ref token) = configuration.bearer_access_token {
6721        req_builder = req_builder.bearer_auth(token.to_owned());
6722    };
6723
6724    let req = req_builder.build()?;
6725    let resp = configuration.client.execute(req).await?;
6726
6727    let status = resp.status();
6728
6729    if !status.is_client_error() && !status.is_server_error() {
6730        Ok(())
6731    } else {
6732        let content = resp.text().await?;
6733        let entity: Option<PatchAiRouterDefaultsError> = serde_json::from_str(&content).ok();
6734        Err(Error::ResponseError(ResponseContent { status, content, entity }))
6735    }
6736}
6737
6738/// The HTTP transport binding for the RESTful router-config nouns (/v1/ai/router/{policy,defaults,ledger,rewards,artifact-meta} and /v1/ai/org/settings[/list]). It dispatches IN-PROCESS through dispatchGateway — the SAME canonical ZAP gateway registry (zap_registry.go) that the MsgType 200 handler serves over the gateway transport. The native ZAP handler is the ONE and ONLY implementation of these routes; this is purely the api.hanzo.ai HTTP binding, so there is NO controller twin to drift from and the split-brain the router refactor removed stays removed.  Why a bridge and not a twin controller method: every other migrated route (get-records, get-connections, …) carries BOTH a controller method and a ZAP handler — the exact dual-impl drift that silently NULLed customer router settings (the update-router-policy data-wipe). Routing these nouns through the ZAP handler over one adapter keeps a single source of truth.  Identity is the request's own Bearer credential (Authorization header), which the native handlers resolve exactly as the gateway does — every caller (console, chat, app) already sends it. The dispatched handler returns a ZAP message whose status is field 0 and body is field 4 (BuildCloudResponse / BuildGatewayResponse layout); both are relayed verbatim. The route is mapped \"*\" (any verb) because the native handler is method-aware: /v1/ai/router/policy splits GET (read) vs PUT (write), /v1/ai/org/settings GET/PUT/DELETE, and returns 405 for a verb it does not own.
6739pub async fn patch_ai_router_ledger(configuration: &configuration::Configuration, ) -> Result<(), Error<PatchAiRouterLedgerError>> {
6740
6741    let uri_str = format!("{}/v1/ai/router/ledger", configuration.base_path);
6742    let mut req_builder = configuration.client.request(reqwest::Method::PATCH, &uri_str);
6743
6744    if let Some(ref user_agent) = configuration.user_agent {
6745        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
6746    }
6747    if let Some(ref token) = configuration.bearer_access_token {
6748        req_builder = req_builder.bearer_auth(token.to_owned());
6749    };
6750
6751    let req = req_builder.build()?;
6752    let resp = configuration.client.execute(req).await?;
6753
6754    let status = resp.status();
6755
6756    if !status.is_client_error() && !status.is_server_error() {
6757        Ok(())
6758    } else {
6759        let content = resp.text().await?;
6760        let entity: Option<PatchAiRouterLedgerError> = serde_json::from_str(&content).ok();
6761        Err(Error::ResponseError(ResponseContent { status, content, entity }))
6762    }
6763}
6764
6765/// The HTTP transport binding for the RESTful router-config nouns (/v1/ai/router/{policy,defaults,ledger,rewards,artifact-meta} and /v1/ai/org/settings[/list]). It dispatches IN-PROCESS through dispatchGateway — the SAME canonical ZAP gateway registry (zap_registry.go) that the MsgType 200 handler serves over the gateway transport. The native ZAP handler is the ONE and ONLY implementation of these routes; this is purely the api.hanzo.ai HTTP binding, so there is NO controller twin to drift from and the split-brain the router refactor removed stays removed.  Why a bridge and not a twin controller method: every other migrated route (get-records, get-connections, …) carries BOTH a controller method and a ZAP handler — the exact dual-impl drift that silently NULLed customer router settings (the update-router-policy data-wipe). Routing these nouns through the ZAP handler over one adapter keeps a single source of truth.  Identity is the request's own Bearer credential (Authorization header), which the native handlers resolve exactly as the gateway does — every caller (console, chat, app) already sends it. The dispatched handler returns a ZAP message whose status is field 0 and body is field 4 (BuildCloudResponse / BuildGatewayResponse layout); both are relayed verbatim. The route is mapped \"*\" (any verb) because the native handler is method-aware: /v1/ai/router/policy splits GET (read) vs PUT (write), /v1/ai/org/settings GET/PUT/DELETE, and returns 405 for a verb it does not own.
6766pub async fn patch_ai_router_policy(configuration: &configuration::Configuration, ) -> Result<(), Error<PatchAiRouterPolicyError>> {
6767
6768    let uri_str = format!("{}/v1/ai/router/policy", configuration.base_path);
6769    let mut req_builder = configuration.client.request(reqwest::Method::PATCH, &uri_str);
6770
6771    if let Some(ref user_agent) = configuration.user_agent {
6772        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
6773    }
6774    if let Some(ref token) = configuration.bearer_access_token {
6775        req_builder = req_builder.bearer_auth(token.to_owned());
6776    };
6777
6778    let req = req_builder.build()?;
6779    let resp = configuration.client.execute(req).await?;
6780
6781    let status = resp.status();
6782
6783    if !status.is_client_error() && !status.is_server_error() {
6784        Ok(())
6785    } else {
6786        let content = resp.text().await?;
6787        let entity: Option<PatchAiRouterPolicyError> = serde_json::from_str(&content).ok();
6788        Err(Error::ResponseError(ResponseContent { status, content, entity }))
6789    }
6790}
6791
6792/// The HTTP transport binding for the RESTful router-config nouns (/v1/ai/router/{policy,defaults,ledger,rewards,artifact-meta} and /v1/ai/org/settings[/list]). It dispatches IN-PROCESS through dispatchGateway — the SAME canonical ZAP gateway registry (zap_registry.go) that the MsgType 200 handler serves over the gateway transport. The native ZAP handler is the ONE and ONLY implementation of these routes; this is purely the api.hanzo.ai HTTP binding, so there is NO controller twin to drift from and the split-brain the router refactor removed stays removed.  Why a bridge and not a twin controller method: every other migrated route (get-records, get-connections, …) carries BOTH a controller method and a ZAP handler — the exact dual-impl drift that silently NULLed customer router settings (the update-router-policy data-wipe). Routing these nouns through the ZAP handler over one adapter keeps a single source of truth.  Identity is the request's own Bearer credential (Authorization header), which the native handlers resolve exactly as the gateway does — every caller (console, chat, app) already sends it. The dispatched handler returns a ZAP message whose status is field 0 and body is field 4 (BuildCloudResponse / BuildGatewayResponse layout); both are relayed verbatim. The route is mapped \"*\" (any verb) because the native handler is method-aware: /v1/ai/router/policy splits GET (read) vs PUT (write), /v1/ai/org/settings GET/PUT/DELETE, and returns 405 for a verb it does not own.
6793pub async fn patch_ai_router_rewards(configuration: &configuration::Configuration, ) -> Result<(), Error<PatchAiRouterRewardsError>> {
6794
6795    let uri_str = format!("{}/v1/ai/router/rewards", configuration.base_path);
6796    let mut req_builder = configuration.client.request(reqwest::Method::PATCH, &uri_str);
6797
6798    if let Some(ref user_agent) = configuration.user_agent {
6799        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
6800    }
6801    if let Some(ref token) = configuration.bearer_access_token {
6802        req_builder = req_builder.bearer_auth(token.to_owned());
6803    };
6804
6805    let req = req_builder.build()?;
6806    let resp = configuration.client.execute(req).await?;
6807
6808    let status = resp.status();
6809
6810    if !status.is_client_error() && !status.is_server_error() {
6811        Ok(())
6812    } else {
6813        let content = resp.text().await?;
6814        let entity: Option<PatchAiRouterRewardsError> = serde_json::from_str(&content).ok();
6815        Err(Error::ResponseError(ResponseContent { status, content, entity }))
6816    }
6817}
6818
6819/// Update one model-route. PATCH and PUT reach the same handler, which has always taken a whole object.
6820pub async fn patch_ai_routes_by_owner_by_name(configuration: &configuration::Configuration, owner: &str, name: &str) -> Result<(), Error<PatchAiRoutesByOwnerByNameError>> {
6821    // add a prefix to parameters to efficiently prevent name collisions
6822    let p_owner = owner;
6823    let p_name = name;
6824
6825    let uri_str = format!("{}/v1/ai/routes/{owner}/{name}", configuration.base_path, owner=crate::apis::urlencode(p_owner), name=crate::apis::urlencode(p_name));
6826    let mut req_builder = configuration.client.request(reqwest::Method::PATCH, &uri_str);
6827
6828    if let Some(ref user_agent) = configuration.user_agent {
6829        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
6830    }
6831    if let Some(ref token) = configuration.bearer_access_token {
6832        req_builder = req_builder.bearer_auth(token.to_owned());
6833    };
6834
6835    let req = req_builder.build()?;
6836    let resp = configuration.client.execute(req).await?;
6837
6838    let status = resp.status();
6839
6840    if !status.is_client_error() && !status.is_server_error() {
6841        Ok(())
6842    } else {
6843        let content = resp.text().await?;
6844        let entity: Option<PatchAiRoutesByOwnerByNameError> = serde_json::from_str(&content).ok();
6845        Err(Error::ResponseError(ResponseContent { status, content, entity }))
6846    }
6847}
6848
6849/// Update one scale. PATCH and PUT reach the same handler, which has always taken a whole object.
6850pub async fn patch_ai_scales_by_owner_by_name(configuration: &configuration::Configuration, owner: &str, name: &str) -> Result<(), Error<PatchAiScalesByOwnerByNameError>> {
6851    // add a prefix to parameters to efficiently prevent name collisions
6852    let p_owner = owner;
6853    let p_name = name;
6854
6855    let uri_str = format!("{}/v1/ai/scales/{owner}/{name}", configuration.base_path, owner=crate::apis::urlencode(p_owner), name=crate::apis::urlencode(p_name));
6856    let mut req_builder = configuration.client.request(reqwest::Method::PATCH, &uri_str);
6857
6858    if let Some(ref user_agent) = configuration.user_agent {
6859        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
6860    }
6861    if let Some(ref token) = configuration.bearer_access_token {
6862        req_builder = req_builder.bearer_auth(token.to_owned());
6863    };
6864
6865    let req = req_builder.build()?;
6866    let resp = configuration.client.execute(req).await?;
6867
6868    let status = resp.status();
6869
6870    if !status.is_client_error() && !status.is_server_error() {
6871        Ok(())
6872    } else {
6873        let content = resp.text().await?;
6874        let entity: Option<PatchAiScalesByOwnerByNameError> = serde_json::from_str(&content).ok();
6875        Err(Error::ResponseError(ResponseContent { status, content, entity }))
6876    }
6877}
6878
6879/// Update one scan. PATCH and PUT reach the same handler, which has always taken a whole object.
6880pub async fn patch_ai_scans_by_owner_by_name(configuration: &configuration::Configuration, owner: &str, name: &str) -> Result<(), Error<PatchAiScansByOwnerByNameError>> {
6881    // add a prefix to parameters to efficiently prevent name collisions
6882    let p_owner = owner;
6883    let p_name = name;
6884
6885    let uri_str = format!("{}/v1/ai/scans/{owner}/{name}", configuration.base_path, owner=crate::apis::urlencode(p_owner), name=crate::apis::urlencode(p_name));
6886    let mut req_builder = configuration.client.request(reqwest::Method::PATCH, &uri_str);
6887
6888    if let Some(ref user_agent) = configuration.user_agent {
6889        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
6890    }
6891    if let Some(ref token) = configuration.bearer_access_token {
6892        req_builder = req_builder.bearer_auth(token.to_owned());
6893    };
6894
6895    let req = req_builder.build()?;
6896    let resp = configuration.client.execute(req).await?;
6897
6898    let status = resp.status();
6899
6900    if !status.is_client_error() && !status.is_server_error() {
6901        Ok(())
6902    } else {
6903        let content = resp.text().await?;
6904        let entity: Option<PatchAiScansByOwnerByNameError> = serde_json::from_str(&content).ok();
6905        Err(Error::ResponseError(ResponseContent { status, content, entity }))
6906    }
6907}
6908
6909/// Update one session. PATCH and PUT reach the same handler, which has always taken a whole object.
6910pub async fn patch_ai_signin_sessions_by_owner_by_name(configuration: &configuration::Configuration, owner: &str, name: &str) -> Result<(), Error<PatchAiSigninSessionsByOwnerByNameError>> {
6911    // add a prefix to parameters to efficiently prevent name collisions
6912    let p_owner = owner;
6913    let p_name = name;
6914
6915    let uri_str = format!("{}/v1/ai/signin-sessions/{owner}/{name}", configuration.base_path, owner=crate::apis::urlencode(p_owner), name=crate::apis::urlencode(p_name));
6916    let mut req_builder = configuration.client.request(reqwest::Method::PATCH, &uri_str);
6917
6918    if let Some(ref user_agent) = configuration.user_agent {
6919        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
6920    }
6921    if let Some(ref token) = configuration.bearer_access_token {
6922        req_builder = req_builder.bearer_auth(token.to_owned());
6923    };
6924
6925    let req = req_builder.build()?;
6926    let resp = configuration.client.execute(req).await?;
6927
6928    let status = resp.status();
6929
6930    if !status.is_client_error() && !status.is_server_error() {
6931        Ok(())
6932    } else {
6933        let content = resp.text().await?;
6934        let entity: Option<PatchAiSigninSessionsByOwnerByNameError> = serde_json::from_str(&content).ok();
6935        Err(Error::ResponseError(ResponseContent { status, content, entity }))
6936    }
6937}
6938
6939/// Update one store. PATCH and PUT reach the same handler, which has always taken a whole object.
6940pub async fn patch_ai_stores_by_owner_by_name(configuration: &configuration::Configuration, owner: &str, name: &str) -> Result<(), Error<PatchAiStoresByOwnerByNameError>> {
6941    // add a prefix to parameters to efficiently prevent name collisions
6942    let p_owner = owner;
6943    let p_name = name;
6944
6945    let uri_str = format!("{}/v1/ai/stores/{owner}/{name}", configuration.base_path, owner=crate::apis::urlencode(p_owner), name=crate::apis::urlencode(p_name));
6946    let mut req_builder = configuration.client.request(reqwest::Method::PATCH, &uri_str);
6947
6948    if let Some(ref user_agent) = configuration.user_agent {
6949        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
6950    }
6951    if let Some(ref token) = configuration.bearer_access_token {
6952        req_builder = req_builder.bearer_auth(token.to_owned());
6953    };
6954
6955    let req = req_builder.build()?;
6956    let resp = configuration.client.execute(req).await?;
6957
6958    let status = resp.status();
6959
6960    if !status.is_client_error() && !status.is_server_error() {
6961        Ok(())
6962    } else {
6963        let content = resp.text().await?;
6964        let entity: Option<PatchAiStoresByOwnerByNameError> = serde_json::from_str(&content).ok();
6965        Err(Error::ResponseError(ResponseContent { status, content, entity }))
6966    }
6967}
6968
6969/// Update one task. PATCH and PUT reach the same handler, which has always taken a whole object.
6970pub async fn patch_ai_tasks_by_owner_by_name(configuration: &configuration::Configuration, owner: &str, name: &str) -> Result<(), Error<PatchAiTasksByOwnerByNameError>> {
6971    // add a prefix to parameters to efficiently prevent name collisions
6972    let p_owner = owner;
6973    let p_name = name;
6974
6975    let uri_str = format!("{}/v1/ai/tasks/{owner}/{name}", configuration.base_path, owner=crate::apis::urlencode(p_owner), name=crate::apis::urlencode(p_name));
6976    let mut req_builder = configuration.client.request(reqwest::Method::PATCH, &uri_str);
6977
6978    if let Some(ref user_agent) = configuration.user_agent {
6979        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
6980    }
6981    if let Some(ref token) = configuration.bearer_access_token {
6982        req_builder = req_builder.bearer_auth(token.to_owned());
6983    };
6984
6985    let req = req_builder.build()?;
6986    let resp = configuration.client.execute(req).await?;
6987
6988    let status = resp.status();
6989
6990    if !status.is_client_error() && !status.is_server_error() {
6991        Ok(())
6992    } else {
6993        let content = resp.text().await?;
6994        let entity: Option<PatchAiTasksByOwnerByNameError> = serde_json::from_str(&content).ok();
6995        Err(Error::ResponseError(ResponseContent { status, content, entity }))
6996    }
6997}
6998
6999/// Update one template. PATCH and PUT reach the same handler, which has always taken a whole object.
7000pub async fn patch_ai_templates_by_owner_by_name(configuration: &configuration::Configuration, owner: &str, name: &str) -> Result<(), Error<PatchAiTemplatesByOwnerByNameError>> {
7001    // add a prefix to parameters to efficiently prevent name collisions
7002    let p_owner = owner;
7003    let p_name = name;
7004
7005    let uri_str = format!("{}/v1/ai/templates/{owner}/{name}", configuration.base_path, owner=crate::apis::urlencode(p_owner), name=crate::apis::urlencode(p_name));
7006    let mut req_builder = configuration.client.request(reqwest::Method::PATCH, &uri_str);
7007
7008    if let Some(ref user_agent) = configuration.user_agent {
7009        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
7010    }
7011    if let Some(ref token) = configuration.bearer_access_token {
7012        req_builder = req_builder.bearer_auth(token.to_owned());
7013    };
7014
7015    let req = req_builder.build()?;
7016    let resp = configuration.client.execute(req).await?;
7017
7018    let status = resp.status();
7019
7020    if !status.is_client_error() && !status.is_server_error() {
7021        Ok(())
7022    } else {
7023        let content = resp.text().await?;
7024        let entity: Option<PatchAiTemplatesByOwnerByNameError> = serde_json::from_str(&content).ok();
7025        Err(Error::ResponseError(ResponseContent { status, content, entity }))
7026    }
7027}
7028
7029pub async fn patch_ai_training_contribution(configuration: &configuration::Configuration, ) -> Result<(), Error<PatchAiTrainingContributionError>> {
7030
7031    let uri_str = format!("{}/v1/ai/training-contribution", configuration.base_path);
7032    let mut req_builder = configuration.client.request(reqwest::Method::PATCH, &uri_str);
7033
7034    if let Some(ref user_agent) = configuration.user_agent {
7035        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
7036    }
7037    if let Some(ref token) = configuration.bearer_access_token {
7038        req_builder = req_builder.bearer_auth(token.to_owned());
7039    };
7040
7041    let req = req_builder.build()?;
7042    let resp = configuration.client.execute(req).await?;
7043
7044    let status = resp.status();
7045
7046    if !status.is_client_error() && !status.is_server_error() {
7047        Ok(())
7048    } else {
7049        let content = resp.text().await?;
7050        let entity: Option<PatchAiTrainingContributionError> = serde_json::from_str(&content).ok();
7051        Err(Error::ResponseError(ResponseContent { status, content, entity }))
7052    }
7053}
7054
7055/// Update one tree-file. PATCH and PUT reach the same handler, which has always taken a whole object.
7056pub async fn patch_ai_tree_files_by_owner_by_name(configuration: &configuration::Configuration, owner: &str, name: &str) -> Result<(), Error<PatchAiTreeFilesByOwnerByNameError>> {
7057    // add a prefix to parameters to efficiently prevent name collisions
7058    let p_owner = owner;
7059    let p_name = name;
7060
7061    let uri_str = format!("{}/v1/ai/tree-files/{owner}/{name}", configuration.base_path, owner=crate::apis::urlencode(p_owner), name=crate::apis::urlencode(p_name));
7062    let mut req_builder = configuration.client.request(reqwest::Method::PATCH, &uri_str);
7063
7064    if let Some(ref user_agent) = configuration.user_agent {
7065        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
7066    }
7067    if let Some(ref token) = configuration.bearer_access_token {
7068        req_builder = req_builder.bearer_auth(token.to_owned());
7069    };
7070
7071    let req = req_builder.build()?;
7072    let resp = configuration.client.execute(req).await?;
7073
7074    let status = resp.status();
7075
7076    if !status.is_client_error() && !status.is_server_error() {
7077        Ok(())
7078    } else {
7079        let content = resp.text().await?;
7080        let entity: Option<PatchAiTreeFilesByOwnerByNameError> = serde_json::from_str(&content).ok();
7081        Err(Error::ResponseError(ResponseContent { status, content, entity }))
7082    }
7083}
7084
7085/// Update one vector. PATCH and PUT reach the same handler, which has always taken a whole object.
7086pub async fn patch_ai_vectors_by_owner_by_name(configuration: &configuration::Configuration, owner: &str, name: &str) -> Result<(), Error<PatchAiVectorsByOwnerByNameError>> {
7087    // add a prefix to parameters to efficiently prevent name collisions
7088    let p_owner = owner;
7089    let p_name = name;
7090
7091    let uri_str = format!("{}/v1/ai/vectors/{owner}/{name}", configuration.base_path, owner=crate::apis::urlencode(p_owner), name=crate::apis::urlencode(p_name));
7092    let mut req_builder = configuration.client.request(reqwest::Method::PATCH, &uri_str);
7093
7094    if let Some(ref user_agent) = configuration.user_agent {
7095        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
7096    }
7097    if let Some(ref token) = configuration.bearer_access_token {
7098        req_builder = req_builder.bearer_auth(token.to_owned());
7099    };
7100
7101    let req = req_builder.build()?;
7102    let resp = configuration.client.execute(req).await?;
7103
7104    let status = resp.status();
7105
7106    if !status.is_client_error() && !status.is_server_error() {
7107        Ok(())
7108    } else {
7109        let content = resp.text().await?;
7110        let entity: Option<PatchAiVectorsByOwnerByNameError> = serde_json::from_str(&content).ok();
7111        Err(Error::ResponseError(ResponseContent { status, content, entity }))
7112    }
7113}
7114
7115/// Update one video. PATCH and PUT reach the same handler, which has always taken a whole object.
7116pub async fn patch_ai_videos_by_owner_by_name(configuration: &configuration::Configuration, owner: &str, name: &str) -> Result<(), Error<PatchAiVideosByOwnerByNameError>> {
7117    // add a prefix to parameters to efficiently prevent name collisions
7118    let p_owner = owner;
7119    let p_name = name;
7120
7121    let uri_str = format!("{}/v1/ai/videos/{owner}/{name}", configuration.base_path, owner=crate::apis::urlencode(p_owner), name=crate::apis::urlencode(p_name));
7122    let mut req_builder = configuration.client.request(reqwest::Method::PATCH, &uri_str);
7123
7124    if let Some(ref user_agent) = configuration.user_agent {
7125        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
7126    }
7127    if let Some(ref token) = configuration.bearer_access_token {
7128        req_builder = req_builder.bearer_auth(token.to_owned());
7129    };
7130
7131    let req = req_builder.build()?;
7132    let resp = configuration.client.execute(req).await?;
7133
7134    let status = resp.status();
7135
7136    if !status.is_client_error() && !status.is_server_error() {
7137        Ok(())
7138    } else {
7139        let content = resp.text().await?;
7140        let entity: Option<PatchAiVideosByOwnerByNameError> = serde_json::from_str(&content).ok();
7141        Err(Error::ResponseError(ResponseContent { status, content, entity }))
7142    }
7143}
7144
7145/// Update one workflow. PATCH and PUT reach the same handler, which has always taken a whole object.
7146pub async fn patch_ai_workflows_by_owner_by_name(configuration: &configuration::Configuration, owner: &str, name: &str) -> Result<(), Error<PatchAiWorkflowsByOwnerByNameError>> {
7147    // add a prefix to parameters to efficiently prevent name collisions
7148    let p_owner = owner;
7149    let p_name = name;
7150
7151    let uri_str = format!("{}/v1/ai/workflows/{owner}/{name}", configuration.base_path, owner=crate::apis::urlencode(p_owner), name=crate::apis::urlencode(p_name));
7152    let mut req_builder = configuration.client.request(reqwest::Method::PATCH, &uri_str);
7153
7154    if let Some(ref user_agent) = configuration.user_agent {
7155        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
7156    }
7157    if let Some(ref token) = configuration.bearer_access_token {
7158        req_builder = req_builder.bearer_auth(token.to_owned());
7159    };
7160
7161    let req = req_builder.build()?;
7162    let resp = configuration.client.execute(req).await?;
7163
7164    let status = resp.status();
7165
7166    if !status.is_client_error() && !status.is_server_error() {
7167        Ok(())
7168    } else {
7169        let content = resp.text().await?;
7170        let entity: Option<PatchAiWorkflowsByOwnerByNameError> = serde_json::from_str(&content).ok();
7171        Err(Error::ResponseError(ResponseContent { status, content, entity }))
7172    }
7173}
7174
7175/// Create one article.
7176pub async fn post_ai_articles(configuration: &configuration::Configuration, ) -> Result<(), Error<PostAiArticlesError>> {
7177
7178    let uri_str = format!("{}/v1/ai/articles", configuration.base_path);
7179    let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
7180
7181    if let Some(ref user_agent) = configuration.user_agent {
7182        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
7183    }
7184    if let Some(ref token) = configuration.bearer_access_token {
7185        req_builder = req_builder.bearer_auth(token.to_owned());
7186    };
7187
7188    let req = req_builder.build()?;
7189    let resp = configuration.client.execute(req).await?;
7190
7191    let status = resp.status();
7192
7193    if !status.is_client_error() && !status.is_server_error() {
7194        Ok(())
7195    } else {
7196        let content = resp.text().await?;
7197        let entity: Option<PostAiArticlesError> = serde_json::from_str(&content).ok();
7198        Err(Error::ResponseError(ResponseContent { status, content, entity }))
7199    }
7200}
7201
7202/// Create one asset.
7203pub async fn post_ai_assets(configuration: &configuration::Configuration, ) -> Result<(), Error<PostAiAssetsError>> {
7204
7205    let uri_str = format!("{}/v1/ai/assets", configuration.base_path);
7206    let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
7207
7208    if let Some(ref user_agent) = configuration.user_agent {
7209        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
7210    }
7211    if let Some(ref token) = configuration.bearer_access_token {
7212        req_builder = req_builder.bearer_auth(token.to_owned());
7213    };
7214
7215    let req = req_builder.build()?;
7216    let resp = configuration.client.execute(req).await?;
7217
7218    let status = resp.status();
7219
7220    if !status.is_client_error() && !status.is_server_error() {
7221        Ok(())
7222    } else {
7223        let content = resp.text().await?;
7224        let entity: Option<PostAiAssetsError> = serde_json::from_str(&content).ok();
7225        Err(Error::ResponseError(ResponseContent { status, content, entity }))
7226    }
7227}
7228
7229pub async fn post_ai_assets_by_owner_by_name_scan(configuration: &configuration::Configuration, owner: &str, name: &str) -> Result<(), Error<PostAiAssetsByOwnerByNameScanError>> {
7230    // add a prefix to parameters to efficiently prevent name collisions
7231    let p_owner = owner;
7232    let p_name = name;
7233
7234    let uri_str = format!("{}/v1/ai/assets/{owner}/{name}/scan", configuration.base_path, owner=crate::apis::urlencode(p_owner), name=crate::apis::urlencode(p_name));
7235    let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
7236
7237    if let Some(ref user_agent) = configuration.user_agent {
7238        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
7239    }
7240    if let Some(ref token) = configuration.bearer_access_token {
7241        req_builder = req_builder.bearer_auth(token.to_owned());
7242    };
7243
7244    let req = req_builder.build()?;
7245    let resp = configuration.client.execute(req).await?;
7246
7247    let status = resp.status();
7248
7249    if !status.is_client_error() && !status.is_server_error() {
7250        Ok(())
7251    } else {
7252        let content = resp.text().await?;
7253        let entity: Option<PostAiAssetsByOwnerByNameScanError> = serde_json::from_str(&content).ok();
7254        Err(Error::ResponseError(ResponseContent { status, content, entity }))
7255    }
7256}
7257
7258pub async fn post_ai_assets_scan(configuration: &configuration::Configuration, ) -> Result<(), Error<PostAiAssetsScanError>> {
7259
7260    let uri_str = format!("{}/v1/ai/assets/scan", configuration.base_path);
7261    let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
7262
7263    if let Some(ref user_agent) = configuration.user_agent {
7264        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
7265    }
7266    if let Some(ref token) = configuration.bearer_access_token {
7267        req_builder = req_builder.bearer_auth(token.to_owned());
7268    };
7269
7270    let req = req_builder.build()?;
7271    let resp = configuration.client.execute(req).await?;
7272
7273    let status = resp.status();
7274
7275    if !status.is_client_error() && !status.is_server_error() {
7276        Ok(())
7277    } else {
7278        let content = resp.text().await?;
7279        let entity: Option<PostAiAssetsScanError> = serde_json::from_str(&content).ok();
7280        Err(Error::ResponseError(ResponseContent { status, content, entity }))
7281    }
7282}
7283
7284/// Create one chat.
7285pub async fn post_ai_chats(configuration: &configuration::Configuration, ) -> Result<(), Error<PostAiChatsError>> {
7286
7287    let uri_str = format!("{}/v1/ai/chats", configuration.base_path);
7288    let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
7289
7290    if let Some(ref user_agent) = configuration.user_agent {
7291        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
7292    }
7293    if let Some(ref token) = configuration.bearer_access_token {
7294        req_builder = req_builder.bearer_auth(token.to_owned());
7295    };
7296
7297    let req = req_builder.build()?;
7298    let resp = configuration.client.execute(req).await?;
7299
7300    let status = resp.status();
7301
7302    if !status.is_client_error() && !status.is_server_error() {
7303        Ok(())
7304    } else {
7305        let content = resp.text().await?;
7306        let entity: Option<PostAiChatsError> = serde_json::from_str(&content).ok();
7307        Err(Error::ResponseError(ResponseContent { status, content, entity }))
7308    }
7309}
7310
7311/// Connects (or reconnects) a third-party AI account for the org by sealing the supplied key into KMS and upserting the org's provider row. The raw key is sealed BEFORE the row is built and is never persisted or echoed.
7312pub async fn post_ai_connections(configuration: &configuration::Configuration, ) -> Result<(), Error<PostAiConnectionsError>> {
7313
7314    let uri_str = format!("{}/v1/ai/connections", configuration.base_path);
7315    let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
7316
7317    if let Some(ref user_agent) = configuration.user_agent {
7318        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
7319    }
7320    if let Some(ref token) = configuration.bearer_access_token {
7321        req_builder = req_builder.bearer_auth(token.to_owned());
7322    };
7323
7324    let req = req_builder.build()?;
7325    let resp = configuration.client.execute(req).await?;
7326
7327    let status = resp.status();
7328
7329    if !status.is_client_error() && !status.is_server_error() {
7330        Ok(())
7331    } else {
7332        let content = resp.text().await?;
7333        let entity: Option<PostAiConnectionsError> = serde_json::from_str(&content).ok();
7334        Err(Error::ResponseError(ResponseContent { status, content, entity }))
7335    }
7336}
7337
7338/// Disconnects a third-party AI account: it deactivates the org's row so completion resolution falls back to the global Hanzo account (no BYO), and best-effort tombstones the sealed secret. Idempotent.
7339pub async fn post_ai_connections_by_provider(configuration: &configuration::Configuration, provider: &str) -> Result<(), Error<PostAiConnectionsByProviderError>> {
7340    // add a prefix to parameters to efficiently prevent name collisions
7341    let p_provider = provider;
7342
7343    let uri_str = format!("{}/v1/ai/connections/{provider}", configuration.base_path, provider=crate::apis::urlencode(p_provider));
7344    let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
7345
7346    if let Some(ref user_agent) = configuration.user_agent {
7347        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
7348    }
7349    if let Some(ref token) = configuration.bearer_access_token {
7350        req_builder = req_builder.bearer_auth(token.to_owned());
7351    };
7352
7353    let req = req_builder.build()?;
7354    let resp = configuration.client.execute(req).await?;
7355
7356    let status = resp.status();
7357
7358    if !status.is_client_error() && !status.is_server_error() {
7359        Ok(())
7360    } else {
7361        let content = resp.text().await?;
7362        let entity: Option<PostAiConnectionsByProviderError> = serde_json::from_str(&content).ok();
7363        Err(Error::ResponseError(ResponseContent { status, content, entity }))
7364    }
7365}
7366
7367/// Create one application.
7368pub async fn post_ai_deployments(configuration: &configuration::Configuration, ) -> Result<(), Error<PostAiDeploymentsError>> {
7369
7370    let uri_str = format!("{}/v1/ai/deployments", configuration.base_path);
7371    let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
7372
7373    if let Some(ref user_agent) = configuration.user_agent {
7374        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
7375    }
7376    if let Some(ref token) = configuration.bearer_access_token {
7377        req_builder = req_builder.bearer_auth(token.to_owned());
7378    };
7379
7380    let req = req_builder.build()?;
7381    let resp = configuration.client.execute(req).await?;
7382
7383    let status = resp.status();
7384
7385    if !status.is_client_error() && !status.is_server_error() {
7386        Ok(())
7387    } else {
7388        let content = resp.text().await?;
7389        let entity: Option<PostAiDeploymentsError> = serde_json::from_str(&content).ok();
7390        Err(Error::ResponseError(ResponseContent { status, content, entity }))
7391    }
7392}
7393
7394pub async fn post_ai_deployments_by_owner_by_name_deploy(configuration: &configuration::Configuration, owner: &str, name: &str) -> Result<(), Error<PostAiDeploymentsByOwnerByNameDeployError>> {
7395    // add a prefix to parameters to efficiently prevent name collisions
7396    let p_owner = owner;
7397    let p_name = name;
7398
7399    let uri_str = format!("{}/v1/ai/deployments/{owner}/{name}/deploy", configuration.base_path, owner=crate::apis::urlencode(p_owner), name=crate::apis::urlencode(p_name));
7400    let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
7401
7402    if let Some(ref user_agent) = configuration.user_agent {
7403        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
7404    }
7405    if let Some(ref token) = configuration.bearer_access_token {
7406        req_builder = req_builder.bearer_auth(token.to_owned());
7407    };
7408
7409    let req = req_builder.build()?;
7410    let resp = configuration.client.execute(req).await?;
7411
7412    let status = resp.status();
7413
7414    if !status.is_client_error() && !status.is_server_error() {
7415        Ok(())
7416    } else {
7417        let content = resp.text().await?;
7418        let entity: Option<PostAiDeploymentsByOwnerByNameDeployError> = serde_json::from_str(&content).ok();
7419        Err(Error::ResponseError(ResponseContent { status, content, entity }))
7420    }
7421}
7422
7423pub async fn post_ai_deployments_by_owner_by_name_undeploy(configuration: &configuration::Configuration, owner: &str, name: &str) -> Result<(), Error<PostAiDeploymentsByOwnerByNameUndeployError>> {
7424    // add a prefix to parameters to efficiently prevent name collisions
7425    let p_owner = owner;
7426    let p_name = name;
7427
7428    let uri_str = format!("{}/v1/ai/deployments/{owner}/{name}/undeploy", configuration.base_path, owner=crate::apis::urlencode(p_owner), name=crate::apis::urlencode(p_name));
7429    let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
7430
7431    if let Some(ref user_agent) = configuration.user_agent {
7432        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
7433    }
7434    if let Some(ref token) = configuration.bearer_access_token {
7435        req_builder = req_builder.bearer_auth(token.to_owned());
7436    };
7437
7438    let req = req_builder.build()?;
7439    let resp = configuration.client.execute(req).await?;
7440
7441    let status = resp.status();
7442
7443    if !status.is_client_error() && !status.is_server_error() {
7444        Ok(())
7445    } else {
7446        let content = resp.text().await?;
7447        let entity: Option<PostAiDeploymentsByOwnerByNameUndeployError> = serde_json::from_str(&content).ok();
7448        Err(Error::ResponseError(ResponseContent { status, content, entity }))
7449    }
7450}
7451
7452/// Attaches a per-request outcome reward to the routing decision that served request_id — the enso training loop's quality signal. Org-scoped via the same session-OR-Bearer principal the usage read uses (RequirePrincipal): the reward lands only on the caller's OWN org's event, so a request_id from another org (or unknown) is a 404 — cross-org writes are impossible and unknown ids are indistinguishable from foreign ones. Idempotent: a repeat overwrites. The body carries NO prompt text — only {request_id, reward|rating}.
7453pub async fn post_ai_feedback(configuration: &configuration::Configuration, ) -> Result<(), Error<PostAiFeedbackError>> {
7454
7455    let uri_str = format!("{}/v1/ai/feedback", configuration.base_path);
7456    let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
7457
7458    if let Some(ref user_agent) = configuration.user_agent {
7459        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
7460    }
7461    if let Some(ref token) = configuration.bearer_access_token {
7462        req_builder = req_builder.bearer_auth(token.to_owned());
7463    };
7464
7465    let req = req_builder.build()?;
7466    let resp = configuration.client.execute(req).await?;
7467
7468    let status = resp.status();
7469
7470    if !status.is_client_error() && !status.is_server_error() {
7471        Ok(())
7472    } else {
7473        let content = resp.text().await?;
7474        let entity: Option<PostAiFeedbackError> = serde_json::from_str(&content).ok();
7475        Err(Error::ResponseError(ResponseContent { status, content, entity }))
7476    }
7477}
7478
7479/// Create one file.
7480pub async fn post_ai_files(configuration: &configuration::Configuration, ) -> Result<(), Error<PostAiFilesError>> {
7481
7482    let uri_str = format!("{}/v1/ai/files", configuration.base_path);
7483    let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
7484
7485    if let Some(ref user_agent) = configuration.user_agent {
7486        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
7487    }
7488    if let Some(ref token) = configuration.bearer_access_token {
7489        req_builder = req_builder.bearer_auth(token.to_owned());
7490    };
7491
7492    let req = req_builder.build()?;
7493    let resp = configuration.client.execute(req).await?;
7494
7495    let status = resp.status();
7496
7497    if !status.is_client_error() && !status.is_server_error() {
7498        Ok(())
7499    } else {
7500        let content = resp.text().await?;
7501        let entity: Option<PostAiFilesError> = serde_json::from_str(&content).ok();
7502        Err(Error::ResponseError(ResponseContent { status, content, entity }))
7503    }
7504}
7505
7506pub async fn post_ai_files_activate(configuration: &configuration::Configuration, ) -> Result<(), Error<PostAiFilesActivateError>> {
7507
7508    let uri_str = format!("{}/v1/ai/files/activate", configuration.base_path);
7509    let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
7510
7511    if let Some(ref user_agent) = configuration.user_agent {
7512        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
7513    }
7514    if let Some(ref token) = configuration.bearer_access_token {
7515        req_builder = req_builder.bearer_auth(token.to_owned());
7516    };
7517
7518    let req = req_builder.build()?;
7519    let resp = configuration.client.execute(req).await?;
7520
7521    let status = resp.status();
7522
7523    if !status.is_client_error() && !status.is_server_error() {
7524        Ok(())
7525    } else {
7526        let content = resp.text().await?;
7527        let entity: Option<PostAiFilesActivateError> = serde_json::from_str(&content).ok();
7528        Err(Error::ResponseError(ResponseContent { status, content, entity }))
7529    }
7530}
7531
7532pub async fn post_ai_files_by_owner_by_name_vectors(configuration: &configuration::Configuration, owner: &str, name: &str) -> Result<(), Error<PostAiFilesByOwnerByNameVectorsError>> {
7533    // add a prefix to parameters to efficiently prevent name collisions
7534    let p_owner = owner;
7535    let p_name = name;
7536
7537    let uri_str = format!("{}/v1/ai/files/{owner}/{name}/vectors", configuration.base_path, owner=crate::apis::urlencode(p_owner), name=crate::apis::urlencode(p_name));
7538    let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
7539
7540    if let Some(ref user_agent) = configuration.user_agent {
7541        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
7542    }
7543    if let Some(ref token) = configuration.bearer_access_token {
7544        req_builder = req_builder.bearer_auth(token.to_owned());
7545    };
7546
7547    let req = req_builder.build()?;
7548    let resp = configuration.client.execute(req).await?;
7549
7550    let status = resp.status();
7551
7552    if !status.is_client_error() && !status.is_server_error() {
7553        Ok(())
7554    } else {
7555        let content = resp.text().await?;
7556        let entity: Option<PostAiFilesByOwnerByNameVectorsError> = serde_json::from_str(&content).ok();
7557        Err(Error::ResponseError(ResponseContent { status, content, entity }))
7558    }
7559}
7560
7561pub async fn post_ai_files_upload(configuration: &configuration::Configuration, ) -> Result<(), Error<PostAiFilesUploadError>> {
7562
7563    let uri_str = format!("{}/v1/ai/files/upload", configuration.base_path);
7564    let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
7565
7566    if let Some(ref user_agent) = configuration.user_agent {
7567        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
7568    }
7569    if let Some(ref token) = configuration.bearer_access_token {
7570        req_builder = req_builder.bearer_auth(token.to_owned());
7571    };
7572
7573    let req = req_builder.build()?;
7574    let resp = configuration.client.execute(req).await?;
7575
7576    let status = resp.status();
7577
7578    if !status.is_client_error() && !status.is_server_error() {
7579        Ok(())
7580    } else {
7581        let content = resp.text().await?;
7582        let entity: Option<PostAiFilesUploadError> = serde_json::from_str(&content).ok();
7583        Err(Error::ResponseError(ResponseContent { status, content, entity }))
7584    }
7585}
7586
7587/// Deletes the TrainJob CR, meters the GPU-hours used so far, and marks the job cancelled. ?id= or ?name=
7588pub async fn post_ai_finetune_cancel(configuration: &configuration::Configuration, ) -> Result<(), Error<PostAiFinetuneCancelError>> {
7589
7590    let uri_str = format!("{}/v1/ai/finetune/cancel", configuration.base_path);
7591    let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
7592
7593    if let Some(ref user_agent) = configuration.user_agent {
7594        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
7595    }
7596    if let Some(ref token) = configuration.bearer_access_token {
7597        req_builder = req_builder.bearer_auth(token.to_owned());
7598    };
7599
7600    let req = req_builder.build()?;
7601    let resp = configuration.client.execute(req).await?;
7602
7603    let status = resp.status();
7604
7605    if !status.is_client_error() && !status.is_server_error() {
7606        Ok(())
7607    } else {
7608        let content = resp.text().await?;
7609        let entity: Option<PostAiFinetuneCancelError> = serde_json::from_str(&content).ok();
7610        Err(Error::ResponseError(ResponseContent { status, content, entity }))
7611    }
7612}
7613
7614/// Serves a completed job's checkpoints and registers the result as a routable model on api.hanzo.ai. ?id= or ?name=
7615pub async fn post_ai_finetune_deploy(configuration: &configuration::Configuration, ) -> Result<(), Error<PostAiFinetuneDeployError>> {
7616
7617    let uri_str = format!("{}/v1/ai/finetune/deploy", configuration.base_path);
7618    let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
7619
7620    if let Some(ref user_agent) = configuration.user_agent {
7621        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
7622    }
7623    if let Some(ref token) = configuration.bearer_access_token {
7624        req_builder = req_builder.bearer_auth(token.to_owned());
7625    };
7626
7627    let req = req_builder.build()?;
7628    let resp = configuration.client.execute(req).await?;
7629
7630    let status = resp.status();
7631
7632    if !status.is_client_error() && !status.is_server_error() {
7633        Ok(())
7634    } else {
7635        let content = resp.text().await?;
7636        let entity: Option<PostAiFinetuneDeployError> = serde_json::from_str(&content).ok();
7637        Err(Error::ResponseError(ResponseContent { status, content, entity }))
7638    }
7639}
7640
7641/// Validates the request, resolves efficient defaults, persists the job, and submits a real TrainJob CR. A submit failure (e.g. no cluster wired) is surfaced honestly: the job is saved with status \"failed\" + the reason, never faked.
7642pub async fn post_ai_finetune_jobs(configuration: &configuration::Configuration, ) -> Result<(), Error<PostAiFinetuneJobsError>> {
7643
7644    let uri_str = format!("{}/v1/ai/finetune/jobs", configuration.base_path);
7645    let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
7646
7647    if let Some(ref user_agent) = configuration.user_agent {
7648        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
7649    }
7650    if let Some(ref token) = configuration.bearer_access_token {
7651        req_builder = req_builder.bearer_auth(token.to_owned());
7652    };
7653
7654    let req = req_builder.build()?;
7655    let resp = configuration.client.execute(req).await?;
7656
7657    let status = resp.status();
7658
7659    if !status.is_client_error() && !status.is_server_error() {
7660        Ok(())
7661    } else {
7662        let content = resp.text().await?;
7663        let entity: Option<PostAiFinetuneJobsError> = serde_json::from_str(&content).ok();
7664        Err(Error::ResponseError(ResponseContent { status, content, entity }))
7665    }
7666}
7667
7668/// Create one form.
7669pub async fn post_ai_forms(configuration: &configuration::Configuration, ) -> Result<(), Error<PostAiFormsError>> {
7670
7671    let uri_str = format!("{}/v1/ai/forms", configuration.base_path);
7672    let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
7673
7674    if let Some(ref user_agent) = configuration.user_agent {
7675        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
7676    }
7677    if let Some(ref token) = configuration.bearer_access_token {
7678        req_builder = req_builder.bearer_auth(token.to_owned());
7679    };
7680
7681    let req = req_builder.build()?;
7682    let resp = configuration.client.execute(req).await?;
7683
7684    let status = resp.status();
7685
7686    if !status.is_client_error() && !status.is_server_error() {
7687        Ok(())
7688    } else {
7689        let content = resp.text().await?;
7690        let entity: Option<PostAiFormsError> = serde_json::from_str(&content).ok();
7691        Err(Error::ResponseError(ResponseContent { status, content, entity }))
7692    }
7693}
7694
7695/// Create one graph.
7696pub async fn post_ai_graphs(configuration: &configuration::Configuration, ) -> Result<(), Error<PostAiGraphsError>> {
7697
7698    let uri_str = format!("{}/v1/ai/graphs", configuration.base_path);
7699    let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
7700
7701    if let Some(ref user_agent) = configuration.user_agent {
7702        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
7703    }
7704    if let Some(ref token) = configuration.bearer_access_token {
7705        req_builder = req_builder.bearer_auth(token.to_owned());
7706    };
7707
7708    let req = req_builder.build()?;
7709    let resp = configuration.client.execute(req).await?;
7710
7711    let status = resp.status();
7712
7713    if !status.is_client_error() && !status.is_server_error() {
7714        Ok(())
7715    } else {
7716        let content = resp.text().await?;
7717        let entity: Option<PostAiGraphsError> = serde_json::from_str(&content).ok();
7718        Err(Error::ResponseError(ResponseContent { status, content, entity }))
7719    }
7720}
7721
7722/// Delete one of the authenticated user's memories
7723pub async fn post_ai_memory_delete(configuration: &configuration::Configuration, ) -> Result<(), Error<PostAiMemoryDeleteError>> {
7724
7725    let uri_str = format!("{}/v1/ai/memory/delete", configuration.base_path);
7726    let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
7727
7728    if let Some(ref user_agent) = configuration.user_agent {
7729        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
7730    }
7731    if let Some(ref token) = configuration.bearer_access_token {
7732        req_builder = req_builder.bearer_auth(token.to_owned());
7733    };
7734
7735    let req = req_builder.build()?;
7736    let resp = configuration.client.execute(req).await?;
7737
7738    let status = resp.status();
7739
7740    if !status.is_client_error() && !status.is_server_error() {
7741        Ok(())
7742    } else {
7743        let content = resp.text().await?;
7744        let entity: Option<PostAiMemoryDeleteError> = serde_json::from_str(&content).ok();
7745        Err(Error::ResponseError(ResponseContent { status, content, entity }))
7746    }
7747}
7748
7749/// Store a memory for the authenticated user
7750pub async fn post_ai_memory_remember(configuration: &configuration::Configuration, ) -> Result<(), Error<PostAiMemoryRememberError>> {
7751
7752    let uri_str = format!("{}/v1/ai/memory/remember", configuration.base_path);
7753    let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
7754
7755    if let Some(ref user_agent) = configuration.user_agent {
7756        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
7757    }
7758    if let Some(ref token) = configuration.bearer_access_token {
7759        req_builder = req_builder.bearer_auth(token.to_owned());
7760    };
7761
7762    let req = req_builder.build()?;
7763    let resp = configuration.client.execute(req).await?;
7764
7765    let status = resp.status();
7766
7767    if !status.is_client_error() && !status.is_server_error() {
7768        Ok(())
7769    } else {
7770        let content = resp.text().await?;
7771        let entity: Option<PostAiMemoryRememberError> = serde_json::from_str(&content).ok();
7772        Err(Error::ResponseError(ResponseContent { status, content, entity }))
7773    }
7774}
7775
7776/// Update one of the authenticated user's memories
7777pub async fn post_ai_memory_update(configuration: &configuration::Configuration, ) -> Result<(), Error<PostAiMemoryUpdateError>> {
7778
7779    let uri_str = format!("{}/v1/ai/memory/update", configuration.base_path);
7780    let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
7781
7782    if let Some(ref user_agent) = configuration.user_agent {
7783        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
7784    }
7785    if let Some(ref token) = configuration.bearer_access_token {
7786        req_builder = req_builder.bearer_auth(token.to_owned());
7787    };
7788
7789    let req = req_builder.build()?;
7790    let resp = configuration.client.execute(req).await?;
7791
7792    let status = resp.status();
7793
7794    if !status.is_client_error() && !status.is_server_error() {
7795        Ok(())
7796    } else {
7797        let content = resp.text().await?;
7798        let entity: Option<PostAiMemoryUpdateError> = serde_json::from_str(&content).ok();
7799        Err(Error::ResponseError(ResponseContent { status, content, entity }))
7800    }
7801}
7802
7803/// Create one message.
7804pub async fn post_ai_messages(configuration: &configuration::Configuration, ) -> Result<(), Error<PostAiMessagesError>> {
7805
7806    let uri_str = format!("{}/v1/ai/messages", configuration.base_path);
7807    let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
7808
7809    if let Some(ref user_agent) = configuration.user_agent {
7810        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
7811    }
7812    if let Some(ref token) = configuration.bearer_access_token {
7813        req_builder = req_builder.bearer_auth(token.to_owned());
7814    };
7815
7816    let req = req_builder.build()?;
7817    let resp = configuration.client.execute(req).await?;
7818
7819    let status = resp.status();
7820
7821    if !status.is_client_error() && !status.is_server_error() {
7822        Ok(())
7823    } else {
7824        let content = resp.text().await?;
7825        let entity: Option<PostAiMessagesError> = serde_json::from_str(&content).ok();
7826        Err(Error::ResponseError(ResponseContent { status, content, entity }))
7827    }
7828}
7829
7830/// Create one node.
7831pub async fn post_ai_nodes(configuration: &configuration::Configuration, ) -> Result<(), Error<PostAiNodesError>> {
7832
7833    let uri_str = format!("{}/v1/ai/nodes", configuration.base_path);
7834    let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
7835
7836    if let Some(ref user_agent) = configuration.user_agent {
7837        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
7838    }
7839    if let Some(ref token) = configuration.bearer_access_token {
7840        req_builder = req_builder.bearer_auth(token.to_owned());
7841    };
7842
7843    let req = req_builder.build()?;
7844    let resp = configuration.client.execute(req).await?;
7845
7846    let status = resp.status();
7847
7848    if !status.is_client_error() && !status.is_server_error() {
7849        Ok(())
7850    } else {
7851        let content = resp.text().await?;
7852        let entity: Option<PostAiNodesError> = serde_json::from_str(&content).ok();
7853        Err(Error::ResponseError(ResponseContent { status, content, entity }))
7854    }
7855}
7856
7857pub async fn post_ai_nodes_by_owner_by_name_tunnel(configuration: &configuration::Configuration, owner: &str, name: &str) -> Result<(), Error<PostAiNodesByOwnerByNameTunnelError>> {
7858    // add a prefix to parameters to efficiently prevent name collisions
7859    let p_owner = owner;
7860    let p_name = name;
7861
7862    let uri_str = format!("{}/v1/ai/nodes/{owner}/{name}/tunnel", configuration.base_path, owner=crate::apis::urlencode(p_owner), name=crate::apis::urlencode(p_name));
7863    let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
7864
7865    if let Some(ref user_agent) = configuration.user_agent {
7866        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
7867    }
7868    if let Some(ref token) = configuration.bearer_access_token {
7869        req_builder = req_builder.bearer_auth(token.to_owned());
7870    };
7871
7872    let req = req_builder.build()?;
7873    let resp = configuration.client.execute(req).await?;
7874
7875    let status = resp.status();
7876
7877    if !status.is_client_error() && !status.is_server_error() {
7878        Ok(())
7879    } else {
7880        let content = resp.text().await?;
7881        let entity: Option<PostAiNodesByOwnerByNameTunnelError> = serde_json::from_str(&content).ok();
7882        Err(Error::ResponseError(ResponseContent { status, content, entity }))
7883    }
7884}
7885
7886/// The HTTP transport binding for the RESTful router-config nouns (/v1/ai/router/{policy,defaults,ledger,rewards,artifact-meta} and /v1/ai/org/settings[/list]). It dispatches IN-PROCESS through dispatchGateway — the SAME canonical ZAP gateway registry (zap_registry.go) that the MsgType 200 handler serves over the gateway transport. The native ZAP handler is the ONE and ONLY implementation of these routes; this is purely the api.hanzo.ai HTTP binding, so there is NO controller twin to drift from and the split-brain the router refactor removed stays removed.  Why a bridge and not a twin controller method: every other migrated route (get-records, get-connections, …) carries BOTH a controller method and a ZAP handler — the exact dual-impl drift that silently NULLed customer router settings (the update-router-policy data-wipe). Routing these nouns through the ZAP handler over one adapter keeps a single source of truth.  Identity is the request's own Bearer credential (Authorization header), which the native handlers resolve exactly as the gateway does — every caller (console, chat, app) already sends it. The dispatched handler returns a ZAP message whose status is field 0 and body is field 4 (BuildCloudResponse / BuildGatewayResponse layout); both are relayed verbatim. The route is mapped \"*\" (any verb) because the native handler is method-aware: /v1/ai/router/policy splits GET (read) vs PUT (write), /v1/ai/org/settings GET/PUT/DELETE, and returns 405 for a verb it does not own.
7887pub async fn post_ai_org_settings(configuration: &configuration::Configuration, ) -> Result<(), Error<PostAiOrgSettingsError>> {
7888
7889    let uri_str = format!("{}/v1/ai/org/settings", configuration.base_path);
7890    let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
7891
7892    if let Some(ref user_agent) = configuration.user_agent {
7893        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
7894    }
7895    if let Some(ref token) = configuration.bearer_access_token {
7896        req_builder = req_builder.bearer_auth(token.to_owned());
7897    };
7898
7899    let req = req_builder.build()?;
7900    let resp = configuration.client.execute(req).await?;
7901
7902    let status = resp.status();
7903
7904    if !status.is_client_error() && !status.is_server_error() {
7905        Ok(())
7906    } else {
7907        let content = resp.text().await?;
7908        let entity: Option<PostAiOrgSettingsError> = serde_json::from_str(&content).ok();
7909        Err(Error::ResponseError(ResponseContent { status, content, entity }))
7910    }
7911}
7912
7913/// The HTTP transport binding for the RESTful router-config nouns (/v1/ai/router/{policy,defaults,ledger,rewards,artifact-meta} and /v1/ai/org/settings[/list]). It dispatches IN-PROCESS through dispatchGateway — the SAME canonical ZAP gateway registry (zap_registry.go) that the MsgType 200 handler serves over the gateway transport. The native ZAP handler is the ONE and ONLY implementation of these routes; this is purely the api.hanzo.ai HTTP binding, so there is NO controller twin to drift from and the split-brain the router refactor removed stays removed.  Why a bridge and not a twin controller method: every other migrated route (get-records, get-connections, …) carries BOTH a controller method and a ZAP handler — the exact dual-impl drift that silently NULLed customer router settings (the update-router-policy data-wipe). Routing these nouns through the ZAP handler over one adapter keeps a single source of truth.  Identity is the request's own Bearer credential (Authorization header), which the native handlers resolve exactly as the gateway does — every caller (console, chat, app) already sends it. The dispatched handler returns a ZAP message whose status is field 0 and body is field 4 (BuildCloudResponse / BuildGatewayResponse layout); both are relayed verbatim. The route is mapped \"*\" (any verb) because the native handler is method-aware: /v1/ai/router/policy splits GET (read) vs PUT (write), /v1/ai/org/settings GET/PUT/DELETE, and returns 405 for a verb it does not own.
7914pub async fn post_ai_org_settings_list(configuration: &configuration::Configuration, ) -> Result<(), Error<PostAiOrgSettingsListError>> {
7915
7916    let uri_str = format!("{}/v1/ai/org/settings/list", configuration.base_path);
7917    let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
7918
7919    if let Some(ref user_agent) = configuration.user_agent {
7920        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
7921    }
7922    if let Some(ref token) = configuration.bearer_access_token {
7923        req_builder = req_builder.bearer_auth(token.to_owned());
7924    };
7925
7926    let req = req_builder.build()?;
7927    let resp = configuration.client.execute(req).await?;
7928
7929    let status = resp.status();
7930
7931    if !status.is_client_error() && !status.is_server_error() {
7932        Ok(())
7933    } else {
7934        let content = resp.text().await?;
7935        let entity: Option<PostAiOrgSettingsListError> = serde_json::from_str(&content).ok();
7936        Err(Error::ResponseError(ResponseContent { status, content, entity }))
7937    }
7938}
7939
7940/// Create one provider.
7941pub async fn post_ai_providers(configuration: &configuration::Configuration, ) -> Result<(), Error<PostAiProvidersError>> {
7942
7943    let uri_str = format!("{}/v1/ai/providers", configuration.base_path);
7944    let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
7945
7946    if let Some(ref user_agent) = configuration.user_agent {
7947        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
7948    }
7949    if let Some(ref token) = configuration.bearer_access_token {
7950        req_builder = req_builder.bearer_auth(token.to_owned());
7951    };
7952
7953    let req = req_builder.build()?;
7954    let resp = configuration.client.execute(req).await?;
7955
7956    let status = resp.status();
7957
7958    if !status.is_client_error() && !status.is_server_error() {
7959        Ok(())
7960    } else {
7961        let content = resp.text().await?;
7962        let entity: Option<PostAiProvidersError> = serde_json::from_str(&content).ok();
7963        Err(Error::ResponseError(ResponseContent { status, content, entity }))
7964    }
7965}
7966
7967pub async fn post_ai_providers_mcp_tools(configuration: &configuration::Configuration, ) -> Result<(), Error<PostAiProvidersMcpToolsError>> {
7968
7969    let uri_str = format!("{}/v1/ai/providers/mcp-tools", configuration.base_path);
7970    let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
7971
7972    if let Some(ref user_agent) = configuration.user_agent {
7973        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
7974    }
7975    if let Some(ref token) = configuration.bearer_access_token {
7976        req_builder = req_builder.bearer_auth(token.to_owned());
7977    };
7978
7979    let req = req_builder.build()?;
7980    let resp = configuration.client.execute(req).await?;
7981
7982    let status = resp.status();
7983
7984    if !status.is_client_error() && !status.is_server_error() {
7985        Ok(())
7986    } else {
7987        let content = resp.text().await?;
7988        let entity: Option<PostAiProvidersMcpToolsError> = serde_json::from_str(&content).ok();
7989        Err(Error::ResponseError(ResponseContent { status, content, entity }))
7990    }
7991}
7992
7993/// Delete all chunks of one or more uploaded files (by file_id) from the owner's Search+Vector index. Consolidates the retired chat-rag-api DELETE /documents.
7994pub async fn post_ai_rag_delete(configuration: &configuration::Configuration, ) -> Result<(), Error<PostAiRagDeleteError>> {
7995
7996    let uri_str = format!("{}/v1/ai/rag/delete", configuration.base_path);
7997    let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
7998
7999    if let Some(ref user_agent) = configuration.user_agent {
8000        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
8001    }
8002    if let Some(ref token) = configuration.bearer_access_token {
8003        req_builder = req_builder.bearer_auth(token.to_owned());
8004    };
8005
8006    let req = req_builder.build()?;
8007    let resp = configuration.client.execute(req).await?;
8008
8009    let status = resp.status();
8010
8011    if !status.is_client_error() && !status.is_server_error() {
8012        Ok(())
8013    } else {
8014        let content = resp.text().await?;
8015        let entity: Option<PostAiRagDeleteError> = serde_json::from_str(&content).ok();
8016        Err(Error::ResponseError(ResponseContent { status, content, entity }))
8017    }
8018}
8019
8020/// Parse, chunk, and embed one uploaded file under its file_id into the unified Search+Vector index, scoped to the authenticated owner. Provide inline `content` or a `url` to fetch+parse (PDF/CSV/XLSX/PPTX/…). Re-embedding the same file_id replaces its chunks. Consolidates the retired chat-rag-api POST /embed and /local/embed.
8021pub async fn post_ai_rag_embed(configuration: &configuration::Configuration, ) -> Result<(), Error<PostAiRagEmbedError>> {
8022
8023    let uri_str = format!("{}/v1/ai/rag/embed", configuration.base_path);
8024    let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
8025
8026    if let Some(ref user_agent) = configuration.user_agent {
8027        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
8028    }
8029    if let Some(ref token) = configuration.bearer_access_token {
8030        req_builder = req_builder.bearer_auth(token.to_owned());
8031    };
8032
8033    let req = req_builder.build()?;
8034    let resp = configuration.client.execute(req).await?;
8035
8036    let status = resp.status();
8037
8038    if !status.is_client_error() && !status.is_server_error() {
8039        Ok(())
8040    } else {
8041        let content = resp.text().await?;
8042        let entity: Option<PostAiRagEmbedError> = serde_json::from_str(&content).ok();
8043        Err(Error::ResponseError(ResponseContent { status, content, entity }))
8044    }
8045}
8046
8047/// Unified RAG ingest: parse + chunk + embed documents and pipe them to BOTH Hanzo Vector (semantic) AND Hanzo Search (keyword) under the tenant index {owner}-{store}-docs — the same index /v1/chat retrieval reads. The source is pluggable: \"upload\" (inline files/documents), \"github\" (index a repo), \"crawl\" (web), or \"s3\" (the store's object-storage space). The owner is bound to the authenticated principal; the client-supplied owner is never trusted.
8048pub async fn post_ai_rag_ingest(configuration: &configuration::Configuration, ) -> Result<(), Error<PostAiRagIngestError>> {
8049
8050    let uri_str = format!("{}/v1/ai/rag/ingest", configuration.base_path);
8051    let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
8052
8053    if let Some(ref user_agent) = configuration.user_agent {
8054        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
8055    }
8056    if let Some(ref token) = configuration.bearer_access_token {
8057        req_builder = req_builder.bearer_auth(token.to_owned());
8058    };
8059
8060    let req = req_builder.build()?;
8061    let resp = configuration.client.execute(req).await?;
8062
8063    let status = resp.status();
8064
8065    if !status.is_client_error() && !status.is_server_error() {
8066        Ok(())
8067    } else {
8068        let content = resp.text().await?;
8069        let entity: Option<PostAiRagIngestError> = serde_json::from_str(&content).ok();
8070        Err(Error::ResponseError(ResponseContent { status, content, entity }))
8071    }
8072}
8073
8074/// Retrieve the top-K chunks relevant to a query, scoped to a single uploaded file (`file_id`). Hybrid keyword+vector retrieval over the same index. Consolidates the retired chat-rag-api POST /query.
8075pub async fn post_ai_rag_query(configuration: &configuration::Configuration, ) -> Result<(), Error<PostAiRagQueryError>> {
8076
8077    let uri_str = format!("{}/v1/ai/rag/query", configuration.base_path);
8078    let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
8079
8080    if let Some(ref user_agent) = configuration.user_agent {
8081        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
8082    }
8083    if let Some(ref token) = configuration.bearer_access_token {
8084        req_builder = req_builder.bearer_auth(token.to_owned());
8085    };
8086
8087    let req = req_builder.build()?;
8088    let resp = configuration.client.execute(req).await?;
8089
8090    let status = resp.status();
8091
8092    if !status.is_client_error() && !status.is_server_error() {
8093        Ok(())
8094    } else {
8095        let content = resp.text().await?;
8096        let entity: Option<PostAiRagQueryError> = serde_json::from_str(&content).ok();
8097        Err(Error::ResponseError(ResponseContent { status, content, entity }))
8098    }
8099}
8100
8101/// Retrieve the top-K chunks relevant to a query, scoped to a SET of uploaded files (`file_ids`). Consolidates the retired chat-rag-api POST /query_multiple. Shares one retrieval path with /rag/query.
8102pub async fn post_ai_rag_query_multiple(configuration: &configuration::Configuration, ) -> Result<(), Error<PostAiRagQueryMultipleError>> {
8103
8104    let uri_str = format!("{}/v1/ai/rag/query-multiple", configuration.base_path);
8105    let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
8106
8107    if let Some(ref user_agent) = configuration.user_agent {
8108        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
8109    }
8110    if let Some(ref token) = configuration.bearer_access_token {
8111        req_builder = req_builder.bearer_auth(token.to_owned());
8112    };
8113
8114    let req = req_builder.build()?;
8115    let resp = configuration.client.execute(req).await?;
8116
8117    let status = resp.status();
8118
8119    if !status.is_client_error() && !status.is_server_error() {
8120        Ok(())
8121    } else {
8122        let content = resp.text().await?;
8123        let entity: Option<PostAiRagQueryMultipleError> = serde_json::from_str(&content).ok();
8124        Err(Error::ResponseError(ResponseContent { status, content, entity }))
8125    }
8126}
8127
8128/// Create one record.
8129pub async fn post_ai_records(configuration: &configuration::Configuration, ) -> Result<(), Error<PostAiRecordsError>> {
8130
8131    let uri_str = format!("{}/v1/ai/records", configuration.base_path);
8132    let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
8133
8134    if let Some(ref user_agent) = configuration.user_agent {
8135        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
8136    }
8137    if let Some(ref token) = configuration.bearer_access_token {
8138        req_builder = req_builder.bearer_auth(token.to_owned());
8139    };
8140
8141    let req = req_builder.build()?;
8142    let resp = configuration.client.execute(req).await?;
8143
8144    let status = resp.status();
8145
8146    if !status.is_client_error() && !status.is_server_error() {
8147        Ok(())
8148    } else {
8149        let content = resp.text().await?;
8150        let entity: Option<PostAiRecordsError> = serde_json::from_str(&content).ok();
8151        Err(Error::ResponseError(ResponseContent { status, content, entity }))
8152    }
8153}
8154
8155pub async fn post_ai_records_batch(configuration: &configuration::Configuration, ) -> Result<(), Error<PostAiRecordsBatchError>> {
8156
8157    let uri_str = format!("{}/v1/ai/records/batch", configuration.base_path);
8158    let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
8159
8160    if let Some(ref user_agent) = configuration.user_agent {
8161        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
8162    }
8163    if let Some(ref token) = configuration.bearer_access_token {
8164        req_builder = req_builder.bearer_auth(token.to_owned());
8165    };
8166
8167    let req = req_builder.build()?;
8168    let resp = configuration.client.execute(req).await?;
8169
8170    let status = resp.status();
8171
8172    if !status.is_client_error() && !status.is_server_error() {
8173        Ok(())
8174    } else {
8175        let content = resp.text().await?;
8176        let entity: Option<PostAiRecordsBatchError> = serde_json::from_str(&content).ok();
8177        Err(Error::ResponseError(ResponseContent { status, content, entity }))
8178    }
8179}
8180
8181pub async fn post_ai_records_commit(configuration: &configuration::Configuration, ) -> Result<(), Error<PostAiRecordsCommitError>> {
8182
8183    let uri_str = format!("{}/v1/ai/records/commit", configuration.base_path);
8184    let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
8185
8186    if let Some(ref user_agent) = configuration.user_agent {
8187        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
8188    }
8189    if let Some(ref token) = configuration.bearer_access_token {
8190        req_builder = req_builder.bearer_auth(token.to_owned());
8191    };
8192
8193    let req = req_builder.build()?;
8194    let resp = configuration.client.execute(req).await?;
8195
8196    let status = resp.status();
8197
8198    if !status.is_client_error() && !status.is_server_error() {
8199        Ok(())
8200    } else {
8201        let content = resp.text().await?;
8202        let entity: Option<PostAiRecordsCommitError> = serde_json::from_str(&content).ok();
8203        Err(Error::ResponseError(ResponseContent { status, content, entity }))
8204    }
8205}
8206
8207pub async fn post_ai_records_commit_second(configuration: &configuration::Configuration, ) -> Result<(), Error<PostAiRecordsCommitSecondError>> {
8208
8209    let uri_str = format!("{}/v1/ai/records/commit-second", configuration.base_path);
8210    let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
8211
8212    if let Some(ref user_agent) = configuration.user_agent {
8213        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
8214    }
8215    if let Some(ref token) = configuration.bearer_access_token {
8216        req_builder = req_builder.bearer_auth(token.to_owned());
8217    };
8218
8219    let req = req_builder.build()?;
8220    let resp = configuration.client.execute(req).await?;
8221
8222    let status = resp.status();
8223
8224    if !status.is_client_error() && !status.is_server_error() {
8225        Ok(())
8226    } else {
8227        let content = resp.text().await?;
8228        let entity: Option<PostAiRecordsCommitSecondError> = serde_json::from_str(&content).ok();
8229        Err(Error::ResponseError(ResponseContent { status, content, entity }))
8230    }
8231}
8232
8233/// Create one connection.
8234pub async fn post_ai_remote_connections(configuration: &configuration::Configuration, ) -> Result<(), Error<PostAiRemoteConnectionsError>> {
8235
8236    let uri_str = format!("{}/v1/ai/remote-connections", configuration.base_path);
8237    let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
8238
8239    if let Some(ref user_agent) = configuration.user_agent {
8240        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
8241    }
8242    if let Some(ref token) = configuration.bearer_access_token {
8243        req_builder = req_builder.bearer_auth(token.to_owned());
8244    };
8245
8246    let req = req_builder.build()?;
8247    let resp = configuration.client.execute(req).await?;
8248
8249    let status = resp.status();
8250
8251    if !status.is_client_error() && !status.is_server_error() {
8252        Ok(())
8253    } else {
8254        let content = resp.text().await?;
8255        let entity: Option<PostAiRemoteConnectionsError> = serde_json::from_str(&content).ok();
8256        Err(Error::ResponseError(ResponseContent { status, content, entity }))
8257    }
8258}
8259
8260pub async fn post_ai_remote_connections_by_owner_by_name_start(configuration: &configuration::Configuration, owner: &str, name: &str) -> Result<(), Error<PostAiRemoteConnectionsByOwnerByNameStartError>> {
8261    // add a prefix to parameters to efficiently prevent name collisions
8262    let p_owner = owner;
8263    let p_name = name;
8264
8265    let uri_str = format!("{}/v1/ai/remote-connections/{owner}/{name}/start", configuration.base_path, owner=crate::apis::urlencode(p_owner), name=crate::apis::urlencode(p_name));
8266    let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
8267
8268    if let Some(ref user_agent) = configuration.user_agent {
8269        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
8270    }
8271    if let Some(ref token) = configuration.bearer_access_token {
8272        req_builder = req_builder.bearer_auth(token.to_owned());
8273    };
8274
8275    let req = req_builder.build()?;
8276    let resp = configuration.client.execute(req).await?;
8277
8278    let status = resp.status();
8279
8280    if !status.is_client_error() && !status.is_server_error() {
8281        Ok(())
8282    } else {
8283        let content = resp.text().await?;
8284        let entity: Option<PostAiRemoteConnectionsByOwnerByNameStartError> = serde_json::from_str(&content).ok();
8285        Err(Error::ResponseError(ResponseContent { status, content, entity }))
8286    }
8287}
8288
8289pub async fn post_ai_remote_connections_by_owner_by_name_stop(configuration: &configuration::Configuration, owner: &str, name: &str) -> Result<(), Error<PostAiRemoteConnectionsByOwnerByNameStopError>> {
8290    // add a prefix to parameters to efficiently prevent name collisions
8291    let p_owner = owner;
8292    let p_name = name;
8293
8294    let uri_str = format!("{}/v1/ai/remote-connections/{owner}/{name}/stop", configuration.base_path, owner=crate::apis::urlencode(p_owner), name=crate::apis::urlencode(p_name));
8295    let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
8296
8297    if let Some(ref user_agent) = configuration.user_agent {
8298        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
8299    }
8300    if let Some(ref token) = configuration.bearer_access_token {
8301        req_builder = req_builder.bearer_auth(token.to_owned());
8302    };
8303
8304    let req = req_builder.build()?;
8305    let resp = configuration.client.execute(req).await?;
8306
8307    let status = resp.status();
8308
8309    if !status.is_client_error() && !status.is_server_error() {
8310        Ok(())
8311    } else {
8312        let content = resp.text().await?;
8313        let entity: Option<PostAiRemoteConnectionsByOwnerByNameStopError> = serde_json::from_str(&content).ok();
8314        Err(Error::ResponseError(ResponseContent { status, content, entity }))
8315    }
8316}
8317
8318/// The HTTP transport binding for the RESTful router-config nouns (/v1/ai/router/{policy,defaults,ledger,rewards,artifact-meta} and /v1/ai/org/settings[/list]). It dispatches IN-PROCESS through dispatchGateway — the SAME canonical ZAP gateway registry (zap_registry.go) that the MsgType 200 handler serves over the gateway transport. The native ZAP handler is the ONE and ONLY implementation of these routes; this is purely the api.hanzo.ai HTTP binding, so there is NO controller twin to drift from and the split-brain the router refactor removed stays removed.  Why a bridge and not a twin controller method: every other migrated route (get-records, get-connections, …) carries BOTH a controller method and a ZAP handler — the exact dual-impl drift that silently NULLed customer router settings (the update-router-policy data-wipe). Routing these nouns through the ZAP handler over one adapter keeps a single source of truth.  Identity is the request's own Bearer credential (Authorization header), which the native handlers resolve exactly as the gateway does — every caller (console, chat, app) already sends it. The dispatched handler returns a ZAP message whose status is field 0 and body is field 4 (BuildCloudResponse / BuildGatewayResponse layout); both are relayed verbatim. The route is mapped \"*\" (any verb) because the native handler is method-aware: /v1/ai/router/policy splits GET (read) vs PUT (write), /v1/ai/org/settings GET/PUT/DELETE, and returns 405 for a verb it does not own.
8319pub async fn post_ai_router_artifact_meta(configuration: &configuration::Configuration, ) -> Result<(), Error<PostAiRouterArtifactMetaError>> {
8320
8321    let uri_str = format!("{}/v1/ai/router/artifact-meta", configuration.base_path);
8322    let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
8323
8324    if let Some(ref user_agent) = configuration.user_agent {
8325        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
8326    }
8327    if let Some(ref token) = configuration.bearer_access_token {
8328        req_builder = req_builder.bearer_auth(token.to_owned());
8329    };
8330
8331    let req = req_builder.build()?;
8332    let resp = configuration.client.execute(req).await?;
8333
8334    let status = resp.status();
8335
8336    if !status.is_client_error() && !status.is_server_error() {
8337        Ok(())
8338    } else {
8339        let content = resp.text().await?;
8340        let entity: Option<PostAiRouterArtifactMetaError> = serde_json::from_str(&content).ok();
8341        Err(Error::ResponseError(ResponseContent { status, content, entity }))
8342    }
8343}
8344
8345/// The HTTP transport binding for the RESTful router-config nouns (/v1/ai/router/{policy,defaults,ledger,rewards,artifact-meta} and /v1/ai/org/settings[/list]). It dispatches IN-PROCESS through dispatchGateway — the SAME canonical ZAP gateway registry (zap_registry.go) that the MsgType 200 handler serves over the gateway transport. The native ZAP handler is the ONE and ONLY implementation of these routes; this is purely the api.hanzo.ai HTTP binding, so there is NO controller twin to drift from and the split-brain the router refactor removed stays removed.  Why a bridge and not a twin controller method: every other migrated route (get-records, get-connections, …) carries BOTH a controller method and a ZAP handler — the exact dual-impl drift that silently NULLed customer router settings (the update-router-policy data-wipe). Routing these nouns through the ZAP handler over one adapter keeps a single source of truth.  Identity is the request's own Bearer credential (Authorization header), which the native handlers resolve exactly as the gateway does — every caller (console, chat, app) already sends it. The dispatched handler returns a ZAP message whose status is field 0 and body is field 4 (BuildCloudResponse / BuildGatewayResponse layout); both are relayed verbatim. The route is mapped \"*\" (any verb) because the native handler is method-aware: /v1/ai/router/policy splits GET (read) vs PUT (write), /v1/ai/org/settings GET/PUT/DELETE, and returns 405 for a verb it does not own.
8346pub async fn post_ai_router_defaults(configuration: &configuration::Configuration, ) -> Result<(), Error<PostAiRouterDefaultsError>> {
8347
8348    let uri_str = format!("{}/v1/ai/router/defaults", configuration.base_path);
8349    let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
8350
8351    if let Some(ref user_agent) = configuration.user_agent {
8352        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
8353    }
8354    if let Some(ref token) = configuration.bearer_access_token {
8355        req_builder = req_builder.bearer_auth(token.to_owned());
8356    };
8357
8358    let req = req_builder.build()?;
8359    let resp = configuration.client.execute(req).await?;
8360
8361    let status = resp.status();
8362
8363    if !status.is_client_error() && !status.is_server_error() {
8364        Ok(())
8365    } else {
8366        let content = resp.text().await?;
8367        let entity: Option<PostAiRouterDefaultsError> = serde_json::from_str(&content).ok();
8368        Err(Error::ResponseError(ResponseContent { status, content, entity }))
8369    }
8370}
8371
8372/// The HTTP transport binding for the RESTful router-config nouns (/v1/ai/router/{policy,defaults,ledger,rewards,artifact-meta} and /v1/ai/org/settings[/list]). It dispatches IN-PROCESS through dispatchGateway — the SAME canonical ZAP gateway registry (zap_registry.go) that the MsgType 200 handler serves over the gateway transport. The native ZAP handler is the ONE and ONLY implementation of these routes; this is purely the api.hanzo.ai HTTP binding, so there is NO controller twin to drift from and the split-brain the router refactor removed stays removed.  Why a bridge and not a twin controller method: every other migrated route (get-records, get-connections, …) carries BOTH a controller method and a ZAP handler — the exact dual-impl drift that silently NULLed customer router settings (the update-router-policy data-wipe). Routing these nouns through the ZAP handler over one adapter keeps a single source of truth.  Identity is the request's own Bearer credential (Authorization header), which the native handlers resolve exactly as the gateway does — every caller (console, chat, app) already sends it. The dispatched handler returns a ZAP message whose status is field 0 and body is field 4 (BuildCloudResponse / BuildGatewayResponse layout); both are relayed verbatim. The route is mapped \"*\" (any verb) because the native handler is method-aware: /v1/ai/router/policy splits GET (read) vs PUT (write), /v1/ai/org/settings GET/PUT/DELETE, and returns 405 for a verb it does not own.
8373pub async fn post_ai_router_ledger(configuration: &configuration::Configuration, ) -> Result<(), Error<PostAiRouterLedgerError>> {
8374
8375    let uri_str = format!("{}/v1/ai/router/ledger", configuration.base_path);
8376    let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
8377
8378    if let Some(ref user_agent) = configuration.user_agent {
8379        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
8380    }
8381    if let Some(ref token) = configuration.bearer_access_token {
8382        req_builder = req_builder.bearer_auth(token.to_owned());
8383    };
8384
8385    let req = req_builder.build()?;
8386    let resp = configuration.client.execute(req).await?;
8387
8388    let status = resp.status();
8389
8390    if !status.is_client_error() && !status.is_server_error() {
8391        Ok(())
8392    } else {
8393        let content = resp.text().await?;
8394        let entity: Option<PostAiRouterLedgerError> = serde_json::from_str(&content).ok();
8395        Err(Error::ResponseError(ResponseContent { status, content, entity }))
8396    }
8397}
8398
8399/// The HTTP transport binding for the RESTful router-config nouns (/v1/ai/router/{policy,defaults,ledger,rewards,artifact-meta} and /v1/ai/org/settings[/list]). It dispatches IN-PROCESS through dispatchGateway — the SAME canonical ZAP gateway registry (zap_registry.go) that the MsgType 200 handler serves over the gateway transport. The native ZAP handler is the ONE and ONLY implementation of these routes; this is purely the api.hanzo.ai HTTP binding, so there is NO controller twin to drift from and the split-brain the router refactor removed stays removed.  Why a bridge and not a twin controller method: every other migrated route (get-records, get-connections, …) carries BOTH a controller method and a ZAP handler — the exact dual-impl drift that silently NULLed customer router settings (the update-router-policy data-wipe). Routing these nouns through the ZAP handler over one adapter keeps a single source of truth.  Identity is the request's own Bearer credential (Authorization header), which the native handlers resolve exactly as the gateway does — every caller (console, chat, app) already sends it. The dispatched handler returns a ZAP message whose status is field 0 and body is field 4 (BuildCloudResponse / BuildGatewayResponse layout); both are relayed verbatim. The route is mapped \"*\" (any verb) because the native handler is method-aware: /v1/ai/router/policy splits GET (read) vs PUT (write), /v1/ai/org/settings GET/PUT/DELETE, and returns 405 for a verb it does not own.
8400pub async fn post_ai_router_policy(configuration: &configuration::Configuration, ) -> Result<(), Error<PostAiRouterPolicyError>> {
8401
8402    let uri_str = format!("{}/v1/ai/router/policy", configuration.base_path);
8403    let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
8404
8405    if let Some(ref user_agent) = configuration.user_agent {
8406        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
8407    }
8408    if let Some(ref token) = configuration.bearer_access_token {
8409        req_builder = req_builder.bearer_auth(token.to_owned());
8410    };
8411
8412    let req = req_builder.build()?;
8413    let resp = configuration.client.execute(req).await?;
8414
8415    let status = resp.status();
8416
8417    if !status.is_client_error() && !status.is_server_error() {
8418        Ok(())
8419    } else {
8420        let content = resp.text().await?;
8421        let entity: Option<PostAiRouterPolicyError> = serde_json::from_str(&content).ok();
8422        Err(Error::ResponseError(ResponseContent { status, content, entity }))
8423    }
8424}
8425
8426/// The HTTP transport binding for the RESTful router-config nouns (/v1/ai/router/{policy,defaults,ledger,rewards,artifact-meta} and /v1/ai/org/settings[/list]). It dispatches IN-PROCESS through dispatchGateway — the SAME canonical ZAP gateway registry (zap_registry.go) that the MsgType 200 handler serves over the gateway transport. The native ZAP handler is the ONE and ONLY implementation of these routes; this is purely the api.hanzo.ai HTTP binding, so there is NO controller twin to drift from and the split-brain the router refactor removed stays removed.  Why a bridge and not a twin controller method: every other migrated route (get-records, get-connections, …) carries BOTH a controller method and a ZAP handler — the exact dual-impl drift that silently NULLed customer router settings (the update-router-policy data-wipe). Routing these nouns through the ZAP handler over one adapter keeps a single source of truth.  Identity is the request's own Bearer credential (Authorization header), which the native handlers resolve exactly as the gateway does — every caller (console, chat, app) already sends it. The dispatched handler returns a ZAP message whose status is field 0 and body is field 4 (BuildCloudResponse / BuildGatewayResponse layout); both are relayed verbatim. The route is mapped \"*\" (any verb) because the native handler is method-aware: /v1/ai/router/policy splits GET (read) vs PUT (write), /v1/ai/org/settings GET/PUT/DELETE, and returns 405 for a verb it does not own.
8427pub async fn post_ai_router_rewards(configuration: &configuration::Configuration, ) -> Result<(), Error<PostAiRouterRewardsError>> {
8428
8429    let uri_str = format!("{}/v1/ai/router/rewards", configuration.base_path);
8430    let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
8431
8432    if let Some(ref user_agent) = configuration.user_agent {
8433        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
8434    }
8435    if let Some(ref token) = configuration.bearer_access_token {
8436        req_builder = req_builder.bearer_auth(token.to_owned());
8437    };
8438
8439    let req = req_builder.build()?;
8440    let resp = configuration.client.execute(req).await?;
8441
8442    let status = resp.status();
8443
8444    if !status.is_client_error() && !status.is_server_error() {
8445        Ok(())
8446    } else {
8447        let content = resp.text().await?;
8448        let entity: Option<PostAiRouterRewardsError> = serde_json::from_str(&content).ok();
8449        Err(Error::ResponseError(ResponseContent { status, content, entity }))
8450    }
8451}
8452
8453/// Create one model-route.
8454pub async fn post_ai_routes(configuration: &configuration::Configuration, ) -> Result<(), Error<PostAiRoutesError>> {
8455
8456    let uri_str = format!("{}/v1/ai/routes", configuration.base_path);
8457    let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
8458
8459    if let Some(ref user_agent) = configuration.user_agent {
8460        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
8461    }
8462    if let Some(ref token) = configuration.bearer_access_token {
8463        req_builder = req_builder.bearer_auth(token.to_owned());
8464    };
8465
8466    let req = req_builder.build()?;
8467    let resp = configuration.client.execute(req).await?;
8468
8469    let status = resp.status();
8470
8471    if !status.is_client_error() && !status.is_server_error() {
8472        Ok(())
8473    } else {
8474        let content = resp.text().await?;
8475        let entity: Option<PostAiRoutesError> = serde_json::from_str(&content).ok();
8476        Err(Error::ResponseError(ResponseContent { status, content, entity }))
8477    }
8478}
8479
8480/// Create one scale.
8481pub async fn post_ai_scales(configuration: &configuration::Configuration, ) -> Result<(), Error<PostAiScalesError>> {
8482
8483    let uri_str = format!("{}/v1/ai/scales", configuration.base_path);
8484    let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
8485
8486    if let Some(ref user_agent) = configuration.user_agent {
8487        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
8488    }
8489    if let Some(ref token) = configuration.bearer_access_token {
8490        req_builder = req_builder.bearer_auth(token.to_owned());
8491    };
8492
8493    let req = req_builder.build()?;
8494    let resp = configuration.client.execute(req).await?;
8495
8496    let status = resp.status();
8497
8498    if !status.is_client_error() && !status.is_server_error() {
8499        Ok(())
8500    } else {
8501        let content = resp.text().await?;
8502        let entity: Option<PostAiScalesError> = serde_json::from_str(&content).ok();
8503        Err(Error::ResponseError(ResponseContent { status, content, entity }))
8504    }
8505}
8506
8507/// Create one scan.
8508pub async fn post_ai_scans(configuration: &configuration::Configuration, ) -> Result<(), Error<PostAiScansError>> {
8509
8510    let uri_str = format!("{}/v1/ai/scans", configuration.base_path);
8511    let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
8512
8513    if let Some(ref user_agent) = configuration.user_agent {
8514        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
8515    }
8516    if let Some(ref token) = configuration.bearer_access_token {
8517        req_builder = req_builder.bearer_auth(token.to_owned());
8518    };
8519
8520    let req = req_builder.build()?;
8521    let resp = configuration.client.execute(req).await?;
8522
8523    let status = resp.status();
8524
8525    if !status.is_client_error() && !status.is_server_error() {
8526        Ok(())
8527    } else {
8528        let content = resp.text().await?;
8529        let entity: Option<PostAiScansError> = serde_json::from_str(&content).ok();
8530        Err(Error::ResponseError(ResponseContent { status, content, entity }))
8531    }
8532}
8533
8534pub async fn post_ai_signin(configuration: &configuration::Configuration, ) -> Result<(), Error<PostAiSigninError>> {
8535
8536    let uri_str = format!("{}/v1/ai/signin", configuration.base_path);
8537    let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
8538
8539    if let Some(ref user_agent) = configuration.user_agent {
8540        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
8541    }
8542    if let Some(ref token) = configuration.bearer_access_token {
8543        req_builder = req_builder.bearer_auth(token.to_owned());
8544    };
8545
8546    let req = req_builder.build()?;
8547    let resp = configuration.client.execute(req).await?;
8548
8549    let status = resp.status();
8550
8551    if !status.is_client_error() && !status.is_server_error() {
8552        Ok(())
8553    } else {
8554        let content = resp.text().await?;
8555        let entity: Option<PostAiSigninError> = serde_json::from_str(&content).ok();
8556        Err(Error::ResponseError(ResponseContent { status, content, entity }))
8557    }
8558}
8559
8560/// Create one session.
8561pub async fn post_ai_signin_sessions(configuration: &configuration::Configuration, ) -> Result<(), Error<PostAiSigninSessionsError>> {
8562
8563    let uri_str = format!("{}/v1/ai/signin-sessions", configuration.base_path);
8564    let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
8565
8566    if let Some(ref user_agent) = configuration.user_agent {
8567        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
8568    }
8569    if let Some(ref token) = configuration.bearer_access_token {
8570        req_builder = req_builder.bearer_auth(token.to_owned());
8571    };
8572
8573    let req = req_builder.build()?;
8574    let resp = configuration.client.execute(req).await?;
8575
8576    let status = resp.status();
8577
8578    if !status.is_client_error() && !status.is_server_error() {
8579        Ok(())
8580    } else {
8581        let content = resp.text().await?;
8582        let entity: Option<PostAiSigninSessionsError> = serde_json::from_str(&content).ok();
8583        Err(Error::ResponseError(ResponseContent { status, content, entity }))
8584    }
8585}
8586
8587pub async fn post_ai_signout(configuration: &configuration::Configuration, ) -> Result<(), Error<PostAiSignoutError>> {
8588
8589    let uri_str = format!("{}/v1/ai/signout", configuration.base_path);
8590    let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
8591
8592    if let Some(ref user_agent) = configuration.user_agent {
8593        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
8594    }
8595    if let Some(ref token) = configuration.bearer_access_token {
8596        req_builder = req_builder.bearer_auth(token.to_owned());
8597    };
8598
8599    let req = req_builder.build()?;
8600    let resp = configuration.client.execute(req).await?;
8601
8602    let status = resp.status();
8603
8604    if !status.is_client_error() && !status.is_server_error() {
8605        Ok(())
8606    } else {
8607        let content = resp.text().await?;
8608        let entity: Option<PostAiSignoutError> = serde_json::from_str(&content).ok();
8609        Err(Error::ResponseError(ResponseContent { status, content, entity }))
8610    }
8611}
8612
8613/// Create one store.
8614pub async fn post_ai_stores(configuration: &configuration::Configuration, ) -> Result<(), Error<PostAiStoresError>> {
8615
8616    let uri_str = format!("{}/v1/ai/stores", configuration.base_path);
8617    let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
8618
8619    if let Some(ref user_agent) = configuration.user_agent {
8620        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
8621    }
8622    if let Some(ref token) = configuration.bearer_access_token {
8623        req_builder = req_builder.bearer_auth(token.to_owned());
8624    };
8625
8626    let req = req_builder.build()?;
8627    let resp = configuration.client.execute(req).await?;
8628
8629    let status = resp.status();
8630
8631    if !status.is_client_error() && !status.is_server_error() {
8632        Ok(())
8633    } else {
8634        let content = resp.text().await?;
8635        let entity: Option<PostAiStoresError> = serde_json::from_str(&content).ok();
8636        Err(Error::ResponseError(ResponseContent { status, content, entity }))
8637    }
8638}
8639
8640pub async fn post_ai_stores_by_owner_by_name_vectors(configuration: &configuration::Configuration, owner: &str, name: &str) -> Result<(), Error<PostAiStoresByOwnerByNameVectorsError>> {
8641    // add a prefix to parameters to efficiently prevent name collisions
8642    let p_owner = owner;
8643    let p_name = name;
8644
8645    let uri_str = format!("{}/v1/ai/stores/{owner}/{name}/vectors", configuration.base_path, owner=crate::apis::urlencode(p_owner), name=crate::apis::urlencode(p_name));
8646    let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
8647
8648    if let Some(ref user_agent) = configuration.user_agent {
8649        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
8650    }
8651    if let Some(ref token) = configuration.bearer_access_token {
8652        req_builder = req_builder.bearer_auth(token.to_owned());
8653    };
8654
8655    let req = req_builder.build()?;
8656    let resp = configuration.client.execute(req).await?;
8657
8658    let status = resp.status();
8659
8660    if !status.is_client_error() && !status.is_server_error() {
8661        Ok(())
8662    } else {
8663        let content = resp.text().await?;
8664        let entity: Option<PostAiStoresByOwnerByNameVectorsError> = serde_json::from_str(&content).ok();
8665        Err(Error::ResponseError(ResponseContent { status, content, entity }))
8666    }
8667}
8668
8669/// Create one task.
8670pub async fn post_ai_tasks(configuration: &configuration::Configuration, ) -> Result<(), Error<PostAiTasksError>> {
8671
8672    let uri_str = format!("{}/v1/ai/tasks", configuration.base_path);
8673    let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
8674
8675    if let Some(ref user_agent) = configuration.user_agent {
8676        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
8677    }
8678    if let Some(ref token) = configuration.bearer_access_token {
8679        req_builder = req_builder.bearer_auth(token.to_owned());
8680    };
8681
8682    let req = req_builder.build()?;
8683    let resp = configuration.client.execute(req).await?;
8684
8685    let status = resp.status();
8686
8687    if !status.is_client_error() && !status.is_server_error() {
8688        Ok(())
8689    } else {
8690        let content = resp.text().await?;
8691        let entity: Option<PostAiTasksError> = serde_json::from_str(&content).ok();
8692        Err(Error::ResponseError(ResponseContent { status, content, entity }))
8693    }
8694}
8695
8696pub async fn post_ai_tasks_by_owner_by_name_analyze(configuration: &configuration::Configuration, owner: &str, name: &str) -> Result<(), Error<PostAiTasksByOwnerByNameAnalyzeError>> {
8697    // add a prefix to parameters to efficiently prevent name collisions
8698    let p_owner = owner;
8699    let p_name = name;
8700
8701    let uri_str = format!("{}/v1/ai/tasks/{owner}/{name}/analyze", configuration.base_path, owner=crate::apis::urlencode(p_owner), name=crate::apis::urlencode(p_name));
8702    let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
8703
8704    if let Some(ref user_agent) = configuration.user_agent {
8705        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
8706    }
8707    if let Some(ref token) = configuration.bearer_access_token {
8708        req_builder = req_builder.bearer_auth(token.to_owned());
8709    };
8710
8711    let req = req_builder.build()?;
8712    let resp = configuration.client.execute(req).await?;
8713
8714    let status = resp.status();
8715
8716    if !status.is_client_error() && !status.is_server_error() {
8717        Ok(())
8718    } else {
8719        let content = resp.text().await?;
8720        let entity: Option<PostAiTasksByOwnerByNameAnalyzeError> = serde_json::from_str(&content).ok();
8721        Err(Error::ResponseError(ResponseContent { status, content, entity }))
8722    }
8723}
8724
8725pub async fn post_ai_tasks_by_owner_by_name_document(configuration: &configuration::Configuration, owner: &str, name: &str) -> Result<(), Error<PostAiTasksByOwnerByNameDocumentError>> {
8726    // add a prefix to parameters to efficiently prevent name collisions
8727    let p_owner = owner;
8728    let p_name = name;
8729
8730    let uri_str = format!("{}/v1/ai/tasks/{owner}/{name}/document", configuration.base_path, owner=crate::apis::urlencode(p_owner), name=crate::apis::urlencode(p_name));
8731    let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
8732
8733    if let Some(ref user_agent) = configuration.user_agent {
8734        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
8735    }
8736    if let Some(ref token) = configuration.bearer_access_token {
8737        req_builder = req_builder.bearer_auth(token.to_owned());
8738    };
8739
8740    let req = req_builder.build()?;
8741    let resp = configuration.client.execute(req).await?;
8742
8743    let status = resp.status();
8744
8745    if !status.is_client_error() && !status.is_server_error() {
8746        Ok(())
8747    } else {
8748        let content = resp.text().await?;
8749        let entity: Option<PostAiTasksByOwnerByNameDocumentError> = serde_json::from_str(&content).ok();
8750        Err(Error::ResponseError(ResponseContent { status, content, entity }))
8751    }
8752}
8753
8754/// Create one template.
8755pub async fn post_ai_templates(configuration: &configuration::Configuration, ) -> Result<(), Error<PostAiTemplatesError>> {
8756
8757    let uri_str = format!("{}/v1/ai/templates", configuration.base_path);
8758    let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
8759
8760    if let Some(ref user_agent) = configuration.user_agent {
8761        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
8762    }
8763    if let Some(ref token) = configuration.bearer_access_token {
8764        req_builder = req_builder.bearer_auth(token.to_owned());
8765    };
8766
8767    let req = req_builder.build()?;
8768    let resp = configuration.client.execute(req).await?;
8769
8770    let status = resp.status();
8771
8772    if !status.is_client_error() && !status.is_server_error() {
8773        Ok(())
8774    } else {
8775        let content = resp.text().await?;
8776        let entity: Option<PostAiTemplatesError> = serde_json::from_str(&content).ok();
8777        Err(Error::ResponseError(ResponseContent { status, content, entity }))
8778    }
8779}
8780
8781/// Create one tree-file.
8782pub async fn post_ai_tree_files(configuration: &configuration::Configuration, ) -> Result<(), Error<PostAiTreeFilesError>> {
8783
8784    let uri_str = format!("{}/v1/ai/tree-files", configuration.base_path);
8785    let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
8786
8787    if let Some(ref user_agent) = configuration.user_agent {
8788        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
8789    }
8790    if let Some(ref token) = configuration.bearer_access_token {
8791        req_builder = req_builder.bearer_auth(token.to_owned());
8792    };
8793
8794    let req = req_builder.build()?;
8795    let resp = configuration.client.execute(req).await?;
8796
8797    let status = resp.status();
8798
8799    if !status.is_client_error() && !status.is_server_error() {
8800        Ok(())
8801    } else {
8802        let content = resp.text().await?;
8803        let entity: Option<PostAiTreeFilesError> = serde_json::from_str(&content).ok();
8804        Err(Error::ResponseError(ResponseContent { status, content, entity }))
8805    }
8806}
8807
8808/// Create one vector.
8809pub async fn post_ai_vectors(configuration: &configuration::Configuration, ) -> Result<(), Error<PostAiVectorsError>> {
8810
8811    let uri_str = format!("{}/v1/ai/vectors", configuration.base_path);
8812    let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
8813
8814    if let Some(ref user_agent) = configuration.user_agent {
8815        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
8816    }
8817    if let Some(ref token) = configuration.bearer_access_token {
8818        req_builder = req_builder.bearer_auth(token.to_owned());
8819    };
8820
8821    let req = req_builder.build()?;
8822    let resp = configuration.client.execute(req).await?;
8823
8824    let status = resp.status();
8825
8826    if !status.is_client_error() && !status.is_server_error() {
8827        Ok(())
8828    } else {
8829        let content = resp.text().await?;
8830        let entity: Option<PostAiVectorsError> = serde_json::from_str(&content).ok();
8831        Err(Error::ResponseError(ResponseContent { status, content, entity }))
8832    }
8833}
8834
8835/// Create one video.
8836pub async fn post_ai_videos(configuration: &configuration::Configuration, ) -> Result<(), Error<PostAiVideosError>> {
8837
8838    let uri_str = format!("{}/v1/ai/videos", configuration.base_path);
8839    let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
8840
8841    if let Some(ref user_agent) = configuration.user_agent {
8842        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
8843    }
8844    if let Some(ref token) = configuration.bearer_access_token {
8845        req_builder = req_builder.bearer_auth(token.to_owned());
8846    };
8847
8848    let req = req_builder.build()?;
8849    let resp = configuration.client.execute(req).await?;
8850
8851    let status = resp.status();
8852
8853    if !status.is_client_error() && !status.is_server_error() {
8854        Ok(())
8855    } else {
8856        let content = resp.text().await?;
8857        let entity: Option<PostAiVideosError> = serde_json::from_str(&content).ok();
8858        Err(Error::ResponseError(ResponseContent { status, content, entity }))
8859    }
8860}
8861
8862pub async fn post_ai_videos_upload(configuration: &configuration::Configuration, ) -> Result<(), Error<PostAiVideosUploadError>> {
8863
8864    let uri_str = format!("{}/v1/ai/videos/upload", configuration.base_path);
8865    let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
8866
8867    if let Some(ref user_agent) = configuration.user_agent {
8868        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
8869    }
8870    if let Some(ref token) = configuration.bearer_access_token {
8871        req_builder = req_builder.bearer_auth(token.to_owned());
8872    };
8873
8874    let req = req_builder.build()?;
8875    let resp = configuration.client.execute(req).await?;
8876
8877    let status = resp.status();
8878
8879    if !status.is_client_error() && !status.is_server_error() {
8880        Ok(())
8881    } else {
8882        let content = resp.text().await?;
8883        let entity: Option<PostAiVideosUploadError> = serde_json::from_str(&content).ok();
8884        Err(Error::ResponseError(ResponseContent { status, content, entity }))
8885    }
8886}
8887
8888/// Create one workflow.
8889pub async fn post_ai_workflows(configuration: &configuration::Configuration, ) -> Result<(), Error<PostAiWorkflowsError>> {
8890
8891    let uri_str = format!("{}/v1/ai/workflows", configuration.base_path);
8892    let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
8893
8894    if let Some(ref user_agent) = configuration.user_agent {
8895        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
8896    }
8897    if let Some(ref token) = configuration.bearer_access_token {
8898        req_builder = req_builder.bearer_auth(token.to_owned());
8899    };
8900
8901    let req = req_builder.build()?;
8902    let resp = configuration.client.execute(req).await?;
8903
8904    let status = resp.status();
8905
8906    if !status.is_client_error() && !status.is_server_error() {
8907        Ok(())
8908    } else {
8909        let content = resp.text().await?;
8910        let entity: Option<PostAiWorkflowsError> = serde_json::from_str(&content).ok();
8911        Err(Error::ResponseError(ResponseContent { status, content, entity }))
8912    }
8913}
8914
8915/// Serves the generative audio verbs — /v1/audio/voice (TTS), /music, /foley — that the Zen family serves natively. It resolves the SKU and, for a Zen model, forwards to zen's matching verb billed per call at the discovered price. These verbs are Zen-native; a non-Zen model is rejected.
8916pub async fn post_audio_foley(configuration: &configuration::Configuration, ) -> Result<(), Error<PostAudioFoleyError>> {
8917
8918    let uri_str = format!("{}/v1/audio/foley", configuration.base_path);
8919    let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
8920
8921    if let Some(ref user_agent) = configuration.user_agent {
8922        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
8923    }
8924    if let Some(ref token) = configuration.bearer_access_token {
8925        req_builder = req_builder.bearer_auth(token.to_owned());
8926    };
8927
8928    let req = req_builder.build()?;
8929    let resp = configuration.client.execute(req).await?;
8930
8931    let status = resp.status();
8932
8933    if !status.is_client_error() && !status.is_server_error() {
8934        Ok(())
8935    } else {
8936        let content = resp.text().await?;
8937        let entity: Option<PostAudioFoleyError> = serde_json::from_str(&content).ok();
8938        Err(Error::ResponseError(ResponseContent { status, content, entity }))
8939    }
8940}
8941
8942/// Serves the generative audio verbs — /v1/audio/voice (TTS), /music, /foley — that the Zen family serves natively. It resolves the SKU and, for a Zen model, forwards to zen's matching verb billed per call at the discovered price. These verbs are Zen-native; a non-Zen model is rejected.
8943pub async fn post_audio_music(configuration: &configuration::Configuration, ) -> Result<(), Error<PostAudioMusicError>> {
8944
8945    let uri_str = format!("{}/v1/audio/music", configuration.base_path);
8946    let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
8947
8948    if let Some(ref user_agent) = configuration.user_agent {
8949        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
8950    }
8951    if let Some(ref token) = configuration.bearer_access_token {
8952        req_builder = req_builder.bearer_auth(token.to_owned());
8953    };
8954
8955    let req = req_builder.build()?;
8956    let resp = configuration.client.execute(req).await?;
8957
8958    let status = resp.status();
8959
8960    if !status.is_client_error() && !status.is_server_error() {
8961        Ok(())
8962    } else {
8963        let content = resp.text().await?;
8964        let entity: Option<PostAudioMusicError> = serde_json::from_str(&content).ok();
8965        Err(Error::ResponseError(ResponseContent { status, content, entity }))
8966    }
8967}
8968
8969/// The OpenAI-compatible TTS endpoint (POST /v1/audio/speech). It authenticates the caller, resolves `model` to its TTS provider (the SAME model-route resolution the chat/images/video endpoints use — so a BYO node registered as a TTS provider works transparently), synthesizes the audio, and streams the bytes back. This is the ONE way to synthesize speech: OpenAI-shaped, with no store or message coupling, so a caller needs no chat to speak.
8970pub async fn post_audio_speech(configuration: &configuration::Configuration, ) -> Result<(), Error<PostAudioSpeechError>> {
8971
8972    let uri_str = format!("{}/v1/audio/speech", configuration.base_path);
8973    let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
8974
8975    if let Some(ref user_agent) = configuration.user_agent {
8976        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
8977    }
8978    if let Some(ref token) = configuration.bearer_access_token {
8979        req_builder = req_builder.bearer_auth(token.to_owned());
8980    };
8981
8982    let req = req_builder.build()?;
8983    let resp = configuration.client.execute(req).await?;
8984
8985    let status = resp.status();
8986
8987    if !status.is_client_error() && !status.is_server_error() {
8988        Ok(())
8989    } else {
8990        let content = resp.text().await?;
8991        let entity: Option<PostAudioSpeechError> = serde_json::from_str(&content).ok();
8992        Err(Error::ResponseError(ResponseContent { status, content, entity }))
8993    }
8994}
8995
8996/// The OpenAI-compatible STT endpoint (POST /v1/audio/transcriptions, multipart: file + model [+ language + response_format]). It mirrors AudioSpeech exactly: authenticate the caller, resolve `model` to its STT provider through the SAME model-route resolution (so the in-cluster speech service — or any BYO node registered as an STT provider — works transparently), transcribe, and return the OpenAI body. This is the ONE way to transcribe: OpenAI-shaped, with no store coupling, so a caller needs no chat to be heard.
8997pub async fn post_audio_transcriptions(configuration: &configuration::Configuration, ) -> Result<(), Error<PostAudioTranscriptionsError>> {
8998
8999    let uri_str = format!("{}/v1/audio/transcriptions", configuration.base_path);
9000    let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
9001
9002    if let Some(ref user_agent) = configuration.user_agent {
9003        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
9004    }
9005    if let Some(ref token) = configuration.bearer_access_token {
9006        req_builder = req_builder.bearer_auth(token.to_owned());
9007    };
9008
9009    let req = req_builder.build()?;
9010    let resp = configuration.client.execute(req).await?;
9011
9012    let status = resp.status();
9013
9014    if !status.is_client_error() && !status.is_server_error() {
9015        Ok(())
9016    } else {
9017        let content = resp.text().await?;
9018        let entity: Option<PostAudioTranscriptionsError> = serde_json::from_str(&content).ok();
9019        Err(Error::ResponseError(ResponseContent { status, content, entity }))
9020    }
9021}
9022
9023/// Serves the generative audio verbs — /v1/audio/voice (TTS), /music, /foley — that the Zen family serves natively. It resolves the SKU and, for a Zen model, forwards to zen's matching verb billed per call at the discovered price. These verbs are Zen-native; a non-Zen model is rejected.
9024pub async fn post_audio_voice(configuration: &configuration::Configuration, ) -> Result<(), Error<PostAudioVoiceError>> {
9025
9026    let uri_str = format!("{}/v1/audio/voice", configuration.base_path);
9027    let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
9028
9029    if let Some(ref user_agent) = configuration.user_agent {
9030        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
9031    }
9032    if let Some(ref token) = configuration.bearer_access_token {
9033        req_builder = req_builder.bearer_auth(token.to_owned());
9034    };
9035
9036    let req = req_builder.build()?;
9037    let resp = configuration.client.execute(req).await?;
9038
9039    let status = resp.status();
9040
9041    if !status.is_client_error() && !status.is_server_error() {
9042        Ok(())
9043    } else {
9044        let content = resp.text().await?;
9045        let entity: Option<PostAudioVoiceError> = serde_json::from_str(&content).ok();
9046        Err(Error::ResponseError(ResponseContent { status, content, entity }))
9047    }
9048}
9049
9050/// Implements the OpenAI-compatible chat completions API
9051pub async fn post_chat(configuration: &configuration::Configuration, ) -> Result<(), Error<PostChatError>> {
9052
9053    let uri_str = format!("{}/v1/chat", configuration.base_path);
9054    let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
9055
9056    if let Some(ref user_agent) = configuration.user_agent {
9057        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
9058    }
9059    if let Some(ref token) = configuration.bearer_access_token {
9060        req_builder = req_builder.bearer_auth(token.to_owned());
9061    };
9062
9063    let req = req_builder.build()?;
9064    let resp = configuration.client.execute(req).await?;
9065
9066    let status = resp.status();
9067
9068    if !status.is_client_error() && !status.is_server_error() {
9069        Ok(())
9070    } else {
9071        let content = resp.text().await?;
9072        let entity: Option<PostChatError> = serde_json::from_str(&content).ok();
9073        Err(Error::ResponseError(ResponseContent { status, content, entity }))
9074    }
9075}
9076
9077/// Implements the OpenAI-compatible chat completions API
9078pub async fn post_chat_completions(configuration: &configuration::Configuration, ) -> Result<(), Error<PostChatCompletionsError>> {
9079
9080    let uri_str = format!("{}/v1/chat/completions", configuration.base_path);
9081    let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
9082
9083    if let Some(ref user_agent) = configuration.user_agent {
9084        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
9085    }
9086    if let Some(ref token) = configuration.bearer_access_token {
9087        req_builder = req_builder.bearer_auth(token.to_owned());
9088    };
9089
9090    let req = req_builder.build()?;
9091    let resp = configuration.client.execute(req).await?;
9092
9093    let status = resp.status();
9094
9095    if !status.is_client_error() && !status.is_server_error() {
9096        Ok(())
9097    } else {
9098        let content = resp.text().await?;
9099        let entity: Option<PostChatCompletionsError> = serde_json::from_str(&content).ok();
9100        Err(Error::ResponseError(ResponseContent { status, content, entity }))
9101    }
9102}
9103
9104/// Serves one completion to a caller with no account.
9105pub async fn post_chat_public(configuration: &configuration::Configuration, ) -> Result<(), Error<PostChatPublicError>> {
9106
9107    let uri_str = format!("{}/v1/chat/public", configuration.base_path);
9108    let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
9109
9110    if let Some(ref user_agent) = configuration.user_agent {
9111        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
9112    }
9113    if let Some(ref token) = configuration.bearer_access_token {
9114        req_builder = req_builder.bearer_auth(token.to_owned());
9115    };
9116
9117    let req = req_builder.build()?;
9118    let resp = configuration.client.execute(req).await?;
9119
9120    let status = resp.status();
9121
9122    if !status.is_client_error() && !status.is_server_error() {
9123        Ok(())
9124    } else {
9125        let content = resp.text().await?;
9126        let entity: Option<PostChatPublicError> = serde_json::from_str(&content).ok();
9127        Err(Error::ResponseError(ResponseContent { status, content, entity }))
9128    }
9129}
9130
9131/// Implements the OpenAI-compatible chat completions API
9132pub async fn post_completions(configuration: &configuration::Configuration, ) -> Result<(), Error<PostCompletionsError>> {
9133
9134    let uri_str = format!("{}/v1/completions", configuration.base_path);
9135    let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
9136
9137    if let Some(ref user_agent) = configuration.user_agent {
9138        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
9139    }
9140    if let Some(ref token) = configuration.bearer_access_token {
9141        req_builder = req_builder.bearer_auth(token.to_owned());
9142    };
9143
9144    let req = req_builder.build()?;
9145    let resp = configuration.client.execute(req).await?;
9146
9147    let status = resp.status();
9148
9149    if !status.is_client_error() && !status.is_server_error() {
9150        Ok(())
9151    } else {
9152        let content = resp.text().await?;
9153        let entity: Option<PostCompletionsError> = serde_json::from_str(&content).ok();
9154        Err(Error::ResponseError(ResponseContent { status, content, entity }))
9155    }
9156}
9157
9158/// Implements POST /v1/embeddings (OpenAI-compatible).  Body: {\"model\": \"...\", \"input\": \"...\"|[\"...\", ...], \"encoding_format\"?, \"dimensions\"?} It authenticates the caller, resolves the model to its upstream provider via the shared routing table, rewrites the user-facing model name to the upstream id, and proxies the request to the provider's /embeddings endpoint verbatim.
9159pub async fn post_embeddings(configuration: &configuration::Configuration, ) -> Result<(), Error<PostEmbeddingsError>> {
9160
9161    let uri_str = format!("{}/v1/embeddings", configuration.base_path);
9162    let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
9163
9164    if let Some(ref user_agent) = configuration.user_agent {
9165        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
9166    }
9167    if let Some(ref token) = configuration.bearer_access_token {
9168        req_builder = req_builder.bearer_auth(token.to_owned());
9169    };
9170
9171    let req = req_builder.build()?;
9172    let resp = configuration.client.execute(req).await?;
9173
9174    let status = resp.status();
9175
9176    if !status.is_client_error() && !status.is_server_error() {
9177        Ok(())
9178    } else {
9179        let content = resp.text().await?;
9180        let entity: Option<PostEmbeddingsError> = serde_json::from_str(&content).ok();
9181        Err(Error::ResponseError(ResponseContent { status, content, entity }))
9182    }
9183}
9184
9185/// Implements POST /v1/images/generations (OpenAI-compatible).  Body: {\"model\": \"...\", \"prompt\": \"...\", \"n\"?: int, \"size\"?: \"1024x1024\",   \"response_format\"?: \"url\"|\"b64_json\"}  It authenticates the caller, resolves the model to its upstream provider via the shared routing table (zen3-image* → do-ai fal diffusion), reserves the per-image budget, generates the image(s) through the do-ai async image client, records usage for billing, and returns the OpenAI images response.
9186pub async fn post_images_generations(configuration: &configuration::Configuration, ) -> Result<(), Error<PostImagesGenerationsError>> {
9187
9188    let uri_str = format!("{}/v1/images/generations", configuration.base_path);
9189    let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
9190
9191    if let Some(ref user_agent) = configuration.user_agent {
9192        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
9193    }
9194    if let Some(ref token) = configuration.bearer_access_token {
9195        req_builder = req_builder.bearer_auth(token.to_owned());
9196    };
9197
9198    let req = req_builder.build()?;
9199    let resp = configuration.client.execute(req).await?;
9200
9201    let status = resp.status();
9202
9203    if !status.is_client_error() && !status.is_server_error() {
9204        Ok(())
9205    } else {
9206        let content = resp.text().await?;
9207        let entity: Option<PostImagesGenerationsError> = serde_json::from_str(&content).ok();
9208        Err(Error::ResponseError(ResponseContent { status, content, entity }))
9209    }
9210}
9211
9212/// Implements the Anthropic Messages API.
9213pub async fn post_messages(configuration: &configuration::Configuration, ) -> Result<(), Error<PostMessagesError>> {
9214
9215    let uri_str = format!("{}/v1/messages", configuration.base_path);
9216    let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
9217
9218    if let Some(ref user_agent) = configuration.user_agent {
9219        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
9220    }
9221    if let Some(ref token) = configuration.bearer_access_token {
9222        req_builder = req_builder.bearer_auth(token.to_owned());
9223    };
9224
9225    let req = req_builder.build()?;
9226    let resp = configuration.client.execute(req).await?;
9227
9228    let status = resp.status();
9229
9230    if !status.is_client_error() && !status.is_server_error() {
9231        Ok(())
9232    } else {
9233        let content = resp.text().await?;
9234        let entity: Option<PostMessagesError> = serde_json::from_str(&content).ok();
9235        Err(Error::ResponseError(ResponseContent { status, content, entity }))
9236    }
9237}
9238
9239/// Implements POST /v1/messages/count_tokens. Claude Code calls it before a request; it returns {\"input_tokens\": N} for the given model + messages + tools.
9240pub async fn post_messages_count_tokens(configuration: &configuration::Configuration, ) -> Result<(), Error<PostMessagesCountTokensError>> {
9241
9242    let uri_str = format!("{}/v1/messages/count_tokens", configuration.base_path);
9243    let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
9244
9245    if let Some(ref user_agent) = configuration.user_agent {
9246        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
9247    }
9248    if let Some(ref token) = configuration.bearer_access_token {
9249        req_builder = req_builder.bearer_auth(token.to_owned());
9250    };
9251
9252    let req = req_builder.build()?;
9253    let resp = configuration.client.execute(req).await?;
9254
9255    let status = resp.status();
9256
9257    if !status.is_client_error() && !status.is_server_error() {
9258        Ok(())
9259    } else {
9260        let content = resp.text().await?;
9261        let entity: Option<PostMessagesCountTokensError> = serde_json::from_str(&content).ok();
9262        Err(Error::ResponseError(ResponseContent { status, content, entity }))
9263    }
9264}
9265
9266/// Records the caller's waitlist request for a gated model and answers their new standing. Authed, idempotent, and self-scoped: the row is keyed to the caller's own org and identity, never to a body-supplied owner.
9267pub async fn post_models_by_model_access(configuration: &configuration::Configuration, model: &str) -> Result<(), Error<PostModelsByModelAccessError>> {
9268    // add a prefix to parameters to efficiently prevent name collisions
9269    let p_model = model;
9270
9271    let uri_str = format!("{}/v1/models/{model}/access", configuration.base_path, model=crate::apis::urlencode(p_model));
9272    let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
9273
9274    if let Some(ref user_agent) = configuration.user_agent {
9275        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
9276    }
9277    if let Some(ref token) = configuration.bearer_access_token {
9278        req_builder = req_builder.bearer_auth(token.to_owned());
9279    };
9280
9281    let req = req_builder.build()?;
9282    let resp = configuration.client.execute(req).await?;
9283
9284    let status = resp.status();
9285
9286    if !status.is_client_error() && !status.is_server_error() {
9287        Ok(())
9288    } else {
9289        let content = resp.text().await?;
9290        let entity: Option<PostModelsByModelAccessError> = serde_json::from_str(&content).ok();
9291        Err(Error::ResponseError(ResponseContent { status, content, entity }))
9292    }
9293}
9294
9295/// Implements POST /v1/rerank (Cohere/Jina-compatible).  Body: {\"model\": \"...\", \"query\": \"...\", \"documents\": [\"...\", ...]|[{\"text\":\"...\"}],   \"top_n\"?: int, \"return_documents\"?: bool}  Response: {\"object\":\"list\",\"model\":...,\"results\":[{\"index\",\"relevance_score\",\"document\"?}],\"usage\":{...}}  Backend selection is provider-driven (one endpoint, one contract):   - If the model routes to a native rerank provider (Jina/Cohere/Voyage) the     request is proxied to that provider's /rerank endpoint.   - Otherwise scores are computed as a real bi-encoder ranking: embed the     query and documents through the resolved embedding model and rank by     cosine similarity. No rerank-specific key required.
9296pub async fn post_rerank(configuration: &configuration::Configuration, ) -> Result<(), Error<PostRerankError>> {
9297
9298    let uri_str = format!("{}/v1/rerank", configuration.base_path);
9299    let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
9300
9301    if let Some(ref user_agent) = configuration.user_agent {
9302        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
9303    }
9304    if let Some(ref token) = configuration.bearer_access_token {
9305        req_builder = req_builder.bearer_auth(token.to_owned());
9306    };
9307
9308    let req = req_builder.build()?;
9309    let resp = configuration.client.execute(req).await?;
9310
9311    let status = resp.status();
9312
9313    if !status.is_client_error() && !status.is_server_error() {
9314        Ok(())
9315    } else {
9316        let content = resp.text().await?;
9317        let entity: Option<PostRerankError> = serde_json::from_str(&content).ok();
9318        Err(Error::ResponseError(ResponseContent { status, content, entity }))
9319    }
9320}
9321
9322/// Implements POST /v1/responses. The converted request is completed by the chat path, which is handed a sink saying where the answer goes: a stream is translated as it is produced, a whole body is translated entire.
9323pub async fn post_responses(configuration: &configuration::Configuration, ) -> Result<(), Error<PostResponsesError>> {
9324
9325    let uri_str = format!("{}/v1/responses", configuration.base_path);
9326    let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
9327
9328    if let Some(ref user_agent) = configuration.user_agent {
9329        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
9330    }
9331    if let Some(ref token) = configuration.bearer_access_token {
9332        req_builder = req_builder.bearer_auth(token.to_owned());
9333    };
9334
9335    let req = req_builder.build()?;
9336    let resp = configuration.client.execute(req).await?;
9337
9338    let status = resp.status();
9339
9340    if !status.is_client_error() && !status.is_server_error() {
9341        Ok(())
9342    } else {
9343        let content = resp.text().await?;
9344        let entity: Option<PostResponsesError> = serde_json::from_str(&content).ok();
9345        Err(Error::ResponseError(ResponseContent { status, content, entity }))
9346    }
9347}
9348
9349/// Implements POST /v1/videos/generations — the ASYNC create.  Body: {\"model\": \"...\", \"prompt\": \"...\", \"size\"?: \"1280x720\", \"seconds\"?: int}  It authenticates the caller, resolves the model to its upstream provider via the shared routing table (zen3-video* / wan2-2-t2v-a14b → the spark-video backend), reserves the per-video budget (the balance gate), creates ONE upstream job, registers it in the in-pod store, and returns the OpenAI-shaped video object with status \"queued\" IMMEDIATELY. The client then polls GET /v1/videos/{id} and downloads GET /v1/videos/{id}/content. Nothing is billed here — the debit lands on completion.
9350pub async fn post_videos_generations(configuration: &configuration::Configuration, ) -> Result<(), Error<PostVideosGenerationsError>> {
9351
9352    let uri_str = format!("{}/v1/videos/generations", configuration.base_path);
9353    let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
9354
9355    if let Some(ref user_agent) = configuration.user_agent {
9356        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
9357    }
9358    if let Some(ref token) = configuration.bearer_access_token {
9359        req_builder = req_builder.bearer_auth(token.to_owned());
9360    };
9361
9362    let req = req_builder.build()?;
9363    let resp = configuration.client.execute(req).await?;
9364
9365    let status = resp.status();
9366
9367    if !status.is_client_error() && !status.is_server_error() {
9368        Ok(())
9369    } else {
9370        let content = resp.text().await?;
9371        let entity: Option<PostVideosGenerationsError> = serde_json::from_str(&content).ok();
9372        Err(Error::ResponseError(ResponseContent { status, content, entity }))
9373    }
9374}
9375
9376/// Identical to PATCH — the handler takes a whole object either way.
9377pub async fn put_ai_articles_by_owner_by_name(configuration: &configuration::Configuration, owner: &str, name: &str) -> Result<(), Error<PutAiArticlesByOwnerByNameError>> {
9378    // add a prefix to parameters to efficiently prevent name collisions
9379    let p_owner = owner;
9380    let p_name = name;
9381
9382    let uri_str = format!("{}/v1/ai/articles/{owner}/{name}", configuration.base_path, owner=crate::apis::urlencode(p_owner), name=crate::apis::urlencode(p_name));
9383    let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str);
9384
9385    if let Some(ref user_agent) = configuration.user_agent {
9386        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
9387    }
9388    if let Some(ref token) = configuration.bearer_access_token {
9389        req_builder = req_builder.bearer_auth(token.to_owned());
9390    };
9391
9392    let req = req_builder.build()?;
9393    let resp = configuration.client.execute(req).await?;
9394
9395    let status = resp.status();
9396
9397    if !status.is_client_error() && !status.is_server_error() {
9398        Ok(())
9399    } else {
9400        let content = resp.text().await?;
9401        let entity: Option<PutAiArticlesByOwnerByNameError> = serde_json::from_str(&content).ok();
9402        Err(Error::ResponseError(ResponseContent { status, content, entity }))
9403    }
9404}
9405
9406/// Identical to PATCH — the handler takes a whole object either way.
9407pub async fn put_ai_assets_by_owner_by_name(configuration: &configuration::Configuration, owner: &str, name: &str) -> Result<(), Error<PutAiAssetsByOwnerByNameError>> {
9408    // add a prefix to parameters to efficiently prevent name collisions
9409    let p_owner = owner;
9410    let p_name = name;
9411
9412    let uri_str = format!("{}/v1/ai/assets/{owner}/{name}", configuration.base_path, owner=crate::apis::urlencode(p_owner), name=crate::apis::urlencode(p_name));
9413    let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str);
9414
9415    if let Some(ref user_agent) = configuration.user_agent {
9416        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
9417    }
9418    if let Some(ref token) = configuration.bearer_access_token {
9419        req_builder = req_builder.bearer_auth(token.to_owned());
9420    };
9421
9422    let req = req_builder.build()?;
9423    let resp = configuration.client.execute(req).await?;
9424
9425    let status = resp.status();
9426
9427    if !status.is_client_error() && !status.is_server_error() {
9428        Ok(())
9429    } else {
9430        let content = resp.text().await?;
9431        let entity: Option<PutAiAssetsByOwnerByNameError> = serde_json::from_str(&content).ok();
9432        Err(Error::ResponseError(ResponseContent { status, content, entity }))
9433    }
9434}
9435
9436/// Identical to PATCH — the handler takes a whole object either way.
9437pub async fn put_ai_chats_by_owner_by_name(configuration: &configuration::Configuration, owner: &str, name: &str) -> Result<(), Error<PutAiChatsByOwnerByNameError>> {
9438    // add a prefix to parameters to efficiently prevent name collisions
9439    let p_owner = owner;
9440    let p_name = name;
9441
9442    let uri_str = format!("{}/v1/ai/chats/{owner}/{name}", configuration.base_path, owner=crate::apis::urlencode(p_owner), name=crate::apis::urlencode(p_name));
9443    let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str);
9444
9445    if let Some(ref user_agent) = configuration.user_agent {
9446        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
9447    }
9448    if let Some(ref token) = configuration.bearer_access_token {
9449        req_builder = req_builder.bearer_auth(token.to_owned());
9450    };
9451
9452    let req = req_builder.build()?;
9453    let resp = configuration.client.execute(req).await?;
9454
9455    let status = resp.status();
9456
9457    if !status.is_client_error() && !status.is_server_error() {
9458        Ok(())
9459    } else {
9460        let content = resp.text().await?;
9461        let entity: Option<PutAiChatsByOwnerByNameError> = serde_json::from_str(&content).ok();
9462        Err(Error::ResponseError(ResponseContent { status, content, entity }))
9463    }
9464}
9465
9466/// Identical to PATCH — the handler takes a whole object either way.
9467pub async fn put_ai_deployments_by_owner_by_name(configuration: &configuration::Configuration, owner: &str, name: &str) -> Result<(), Error<PutAiDeploymentsByOwnerByNameError>> {
9468    // add a prefix to parameters to efficiently prevent name collisions
9469    let p_owner = owner;
9470    let p_name = name;
9471
9472    let uri_str = format!("{}/v1/ai/deployments/{owner}/{name}", configuration.base_path, owner=crate::apis::urlencode(p_owner), name=crate::apis::urlencode(p_name));
9473    let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str);
9474
9475    if let Some(ref user_agent) = configuration.user_agent {
9476        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
9477    }
9478    if let Some(ref token) = configuration.bearer_access_token {
9479        req_builder = req_builder.bearer_auth(token.to_owned());
9480    };
9481
9482    let req = req_builder.build()?;
9483    let resp = configuration.client.execute(req).await?;
9484
9485    let status = resp.status();
9486
9487    if !status.is_client_error() && !status.is_server_error() {
9488        Ok(())
9489    } else {
9490        let content = resp.text().await?;
9491        let entity: Option<PutAiDeploymentsByOwnerByNameError> = serde_json::from_str(&content).ok();
9492        Err(Error::ResponseError(ResponseContent { status, content, entity }))
9493    }
9494}
9495
9496/// Identical to PATCH — the handler takes a whole object either way.
9497pub async fn put_ai_files_by_owner_by_name(configuration: &configuration::Configuration, owner: &str, name: &str) -> Result<(), Error<PutAiFilesByOwnerByNameError>> {
9498    // add a prefix to parameters to efficiently prevent name collisions
9499    let p_owner = owner;
9500    let p_name = name;
9501
9502    let uri_str = format!("{}/v1/ai/files/{owner}/{name}", configuration.base_path, owner=crate::apis::urlencode(p_owner), name=crate::apis::urlencode(p_name));
9503    let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str);
9504
9505    if let Some(ref user_agent) = configuration.user_agent {
9506        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
9507    }
9508    if let Some(ref token) = configuration.bearer_access_token {
9509        req_builder = req_builder.bearer_auth(token.to_owned());
9510    };
9511
9512    let req = req_builder.build()?;
9513    let resp = configuration.client.execute(req).await?;
9514
9515    let status = resp.status();
9516
9517    if !status.is_client_error() && !status.is_server_error() {
9518        Ok(())
9519    } else {
9520        let content = resp.text().await?;
9521        let entity: Option<PutAiFilesByOwnerByNameError> = serde_json::from_str(&content).ok();
9522        Err(Error::ResponseError(ResponseContent { status, content, entity }))
9523    }
9524}
9525
9526/// Identical to PATCH — the handler takes a whole object either way.
9527pub async fn put_ai_forms_by_owner_by_name(configuration: &configuration::Configuration, owner: &str, name: &str) -> Result<(), Error<PutAiFormsByOwnerByNameError>> {
9528    // add a prefix to parameters to efficiently prevent name collisions
9529    let p_owner = owner;
9530    let p_name = name;
9531
9532    let uri_str = format!("{}/v1/ai/forms/{owner}/{name}", configuration.base_path, owner=crate::apis::urlencode(p_owner), name=crate::apis::urlencode(p_name));
9533    let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str);
9534
9535    if let Some(ref user_agent) = configuration.user_agent {
9536        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
9537    }
9538    if let Some(ref token) = configuration.bearer_access_token {
9539        req_builder = req_builder.bearer_auth(token.to_owned());
9540    };
9541
9542    let req = req_builder.build()?;
9543    let resp = configuration.client.execute(req).await?;
9544
9545    let status = resp.status();
9546
9547    if !status.is_client_error() && !status.is_server_error() {
9548        Ok(())
9549    } else {
9550        let content = resp.text().await?;
9551        let entity: Option<PutAiFormsByOwnerByNameError> = serde_json::from_str(&content).ok();
9552        Err(Error::ResponseError(ResponseContent { status, content, entity }))
9553    }
9554}
9555
9556/// Identical to PATCH — the handler takes a whole object either way.
9557pub async fn put_ai_graphs_by_owner_by_name(configuration: &configuration::Configuration, owner: &str, name: &str) -> Result<(), Error<PutAiGraphsByOwnerByNameError>> {
9558    // add a prefix to parameters to efficiently prevent name collisions
9559    let p_owner = owner;
9560    let p_name = name;
9561
9562    let uri_str = format!("{}/v1/ai/graphs/{owner}/{name}", configuration.base_path, owner=crate::apis::urlencode(p_owner), name=crate::apis::urlencode(p_name));
9563    let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str);
9564
9565    if let Some(ref user_agent) = configuration.user_agent {
9566        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
9567    }
9568    if let Some(ref token) = configuration.bearer_access_token {
9569        req_builder = req_builder.bearer_auth(token.to_owned());
9570    };
9571
9572    let req = req_builder.build()?;
9573    let resp = configuration.client.execute(req).await?;
9574
9575    let status = resp.status();
9576
9577    if !status.is_client_error() && !status.is_server_error() {
9578        Ok(())
9579    } else {
9580        let content = resp.text().await?;
9581        let entity: Option<PutAiGraphsByOwnerByNameError> = serde_json::from_str(&content).ok();
9582        Err(Error::ResponseError(ResponseContent { status, content, entity }))
9583    }
9584}
9585
9586/// Identical to PATCH — the handler takes a whole object either way.
9587pub async fn put_ai_messages_by_owner_by_name(configuration: &configuration::Configuration, owner: &str, name: &str) -> Result<(), Error<PutAiMessagesByOwnerByNameError>> {
9588    // add a prefix to parameters to efficiently prevent name collisions
9589    let p_owner = owner;
9590    let p_name = name;
9591
9592    let uri_str = format!("{}/v1/ai/messages/{owner}/{name}", configuration.base_path, owner=crate::apis::urlencode(p_owner), name=crate::apis::urlencode(p_name));
9593    let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str);
9594
9595    if let Some(ref user_agent) = configuration.user_agent {
9596        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
9597    }
9598    if let Some(ref token) = configuration.bearer_access_token {
9599        req_builder = req_builder.bearer_auth(token.to_owned());
9600    };
9601
9602    let req = req_builder.build()?;
9603    let resp = configuration.client.execute(req).await?;
9604
9605    let status = resp.status();
9606
9607    if !status.is_client_error() && !status.is_server_error() {
9608        Ok(())
9609    } else {
9610        let content = resp.text().await?;
9611        let entity: Option<PutAiMessagesByOwnerByNameError> = serde_json::from_str(&content).ok();
9612        Err(Error::ResponseError(ResponseContent { status, content, entity }))
9613    }
9614}
9615
9616/// Identical to PATCH — the handler takes a whole object either way.
9617pub async fn put_ai_nodes_by_owner_by_name(configuration: &configuration::Configuration, owner: &str, name: &str) -> Result<(), Error<PutAiNodesByOwnerByNameError>> {
9618    // add a prefix to parameters to efficiently prevent name collisions
9619    let p_owner = owner;
9620    let p_name = name;
9621
9622    let uri_str = format!("{}/v1/ai/nodes/{owner}/{name}", configuration.base_path, owner=crate::apis::urlencode(p_owner), name=crate::apis::urlencode(p_name));
9623    let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str);
9624
9625    if let Some(ref user_agent) = configuration.user_agent {
9626        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
9627    }
9628    if let Some(ref token) = configuration.bearer_access_token {
9629        req_builder = req_builder.bearer_auth(token.to_owned());
9630    };
9631
9632    let req = req_builder.build()?;
9633    let resp = configuration.client.execute(req).await?;
9634
9635    let status = resp.status();
9636
9637    if !status.is_client_error() && !status.is_server_error() {
9638        Ok(())
9639    } else {
9640        let content = resp.text().await?;
9641        let entity: Option<PutAiNodesByOwnerByNameError> = serde_json::from_str(&content).ok();
9642        Err(Error::ResponseError(ResponseContent { status, content, entity }))
9643    }
9644}
9645
9646/// The HTTP transport binding for the RESTful router-config nouns (/v1/ai/router/{policy,defaults,ledger,rewards,artifact-meta} and /v1/ai/org/settings[/list]). It dispatches IN-PROCESS through dispatchGateway — the SAME canonical ZAP gateway registry (zap_registry.go) that the MsgType 200 handler serves over the gateway transport. The native ZAP handler is the ONE and ONLY implementation of these routes; this is purely the api.hanzo.ai HTTP binding, so there is NO controller twin to drift from and the split-brain the router refactor removed stays removed.  Why a bridge and not a twin controller method: every other migrated route (get-records, get-connections, …) carries BOTH a controller method and a ZAP handler — the exact dual-impl drift that silently NULLed customer router settings (the update-router-policy data-wipe). Routing these nouns through the ZAP handler over one adapter keeps a single source of truth.  Identity is the request's own Bearer credential (Authorization header), which the native handlers resolve exactly as the gateway does — every caller (console, chat, app) already sends it. The dispatched handler returns a ZAP message whose status is field 0 and body is field 4 (BuildCloudResponse / BuildGatewayResponse layout); both are relayed verbatim. The route is mapped \"*\" (any verb) because the native handler is method-aware: /v1/ai/router/policy splits GET (read) vs PUT (write), /v1/ai/org/settings GET/PUT/DELETE, and returns 405 for a verb it does not own.
9647pub async fn put_ai_org_settings(configuration: &configuration::Configuration, ) -> Result<(), Error<PutAiOrgSettingsError>> {
9648
9649    let uri_str = format!("{}/v1/ai/org/settings", configuration.base_path);
9650    let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str);
9651
9652    if let Some(ref user_agent) = configuration.user_agent {
9653        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
9654    }
9655    if let Some(ref token) = configuration.bearer_access_token {
9656        req_builder = req_builder.bearer_auth(token.to_owned());
9657    };
9658
9659    let req = req_builder.build()?;
9660    let resp = configuration.client.execute(req).await?;
9661
9662    let status = resp.status();
9663
9664    if !status.is_client_error() && !status.is_server_error() {
9665        Ok(())
9666    } else {
9667        let content = resp.text().await?;
9668        let entity: Option<PutAiOrgSettingsError> = serde_json::from_str(&content).ok();
9669        Err(Error::ResponseError(ResponseContent { status, content, entity }))
9670    }
9671}
9672
9673/// The HTTP transport binding for the RESTful router-config nouns (/v1/ai/router/{policy,defaults,ledger,rewards,artifact-meta} and /v1/ai/org/settings[/list]). It dispatches IN-PROCESS through dispatchGateway — the SAME canonical ZAP gateway registry (zap_registry.go) that the MsgType 200 handler serves over the gateway transport. The native ZAP handler is the ONE and ONLY implementation of these routes; this is purely the api.hanzo.ai HTTP binding, so there is NO controller twin to drift from and the split-brain the router refactor removed stays removed.  Why a bridge and not a twin controller method: every other migrated route (get-records, get-connections, …) carries BOTH a controller method and a ZAP handler — the exact dual-impl drift that silently NULLed customer router settings (the update-router-policy data-wipe). Routing these nouns through the ZAP handler over one adapter keeps a single source of truth.  Identity is the request's own Bearer credential (Authorization header), which the native handlers resolve exactly as the gateway does — every caller (console, chat, app) already sends it. The dispatched handler returns a ZAP message whose status is field 0 and body is field 4 (BuildCloudResponse / BuildGatewayResponse layout); both are relayed verbatim. The route is mapped \"*\" (any verb) because the native handler is method-aware: /v1/ai/router/policy splits GET (read) vs PUT (write), /v1/ai/org/settings GET/PUT/DELETE, and returns 405 for a verb it does not own.
9674pub async fn put_ai_org_settings_list(configuration: &configuration::Configuration, ) -> Result<(), Error<PutAiOrgSettingsListError>> {
9675
9676    let uri_str = format!("{}/v1/ai/org/settings/list", configuration.base_path);
9677    let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str);
9678
9679    if let Some(ref user_agent) = configuration.user_agent {
9680        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
9681    }
9682    if let Some(ref token) = configuration.bearer_access_token {
9683        req_builder = req_builder.bearer_auth(token.to_owned());
9684    };
9685
9686    let req = req_builder.build()?;
9687    let resp = configuration.client.execute(req).await?;
9688
9689    let status = resp.status();
9690
9691    if !status.is_client_error() && !status.is_server_error() {
9692        Ok(())
9693    } else {
9694        let content = resp.text().await?;
9695        let entity: Option<PutAiOrgSettingsListError> = serde_json::from_str(&content).ok();
9696        Err(Error::ResponseError(ResponseContent { status, content, entity }))
9697    }
9698}
9699
9700pub async fn put_ai_preferences(configuration: &configuration::Configuration, ) -> Result<(), Error<PutAiPreferencesError>> {
9701
9702    let uri_str = format!("{}/v1/ai/preferences", configuration.base_path);
9703    let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str);
9704
9705    if let Some(ref user_agent) = configuration.user_agent {
9706        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
9707    }
9708    if let Some(ref token) = configuration.bearer_access_token {
9709        req_builder = req_builder.bearer_auth(token.to_owned());
9710    };
9711
9712    let req = req_builder.build()?;
9713    let resp = configuration.client.execute(req).await?;
9714
9715    let status = resp.status();
9716
9717    if !status.is_client_error() && !status.is_server_error() {
9718        Ok(())
9719    } else {
9720        let content = resp.text().await?;
9721        let entity: Option<PutAiPreferencesError> = serde_json::from_str(&content).ok();
9722        Err(Error::ResponseError(ResponseContent { status, content, entity }))
9723    }
9724}
9725
9726/// Identical to PATCH — the handler takes a whole object either way.
9727pub async fn put_ai_providers_by_owner_by_name(configuration: &configuration::Configuration, owner: &str, name: &str) -> Result<(), Error<PutAiProvidersByOwnerByNameError>> {
9728    // add a prefix to parameters to efficiently prevent name collisions
9729    let p_owner = owner;
9730    let p_name = name;
9731
9732    let uri_str = format!("{}/v1/ai/providers/{owner}/{name}", configuration.base_path, owner=crate::apis::urlencode(p_owner), name=crate::apis::urlencode(p_name));
9733    let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str);
9734
9735    if let Some(ref user_agent) = configuration.user_agent {
9736        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
9737    }
9738    if let Some(ref token) = configuration.bearer_access_token {
9739        req_builder = req_builder.bearer_auth(token.to_owned());
9740    };
9741
9742    let req = req_builder.build()?;
9743    let resp = configuration.client.execute(req).await?;
9744
9745    let status = resp.status();
9746
9747    if !status.is_client_error() && !status.is_server_error() {
9748        Ok(())
9749    } else {
9750        let content = resp.text().await?;
9751        let entity: Option<PutAiProvidersByOwnerByNameError> = serde_json::from_str(&content).ok();
9752        Err(Error::ResponseError(ResponseContent { status, content, entity }))
9753    }
9754}
9755
9756/// Identical to PATCH — the handler takes a whole object either way.
9757pub async fn put_ai_records_by_owner_by_name(configuration: &configuration::Configuration, owner: &str, name: &str) -> Result<(), Error<PutAiRecordsByOwnerByNameError>> {
9758    // add a prefix to parameters to efficiently prevent name collisions
9759    let p_owner = owner;
9760    let p_name = name;
9761
9762    let uri_str = format!("{}/v1/ai/records/{owner}/{name}", configuration.base_path, owner=crate::apis::urlencode(p_owner), name=crate::apis::urlencode(p_name));
9763    let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str);
9764
9765    if let Some(ref user_agent) = configuration.user_agent {
9766        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
9767    }
9768    if let Some(ref token) = configuration.bearer_access_token {
9769        req_builder = req_builder.bearer_auth(token.to_owned());
9770    };
9771
9772    let req = req_builder.build()?;
9773    let resp = configuration.client.execute(req).await?;
9774
9775    let status = resp.status();
9776
9777    if !status.is_client_error() && !status.is_server_error() {
9778        Ok(())
9779    } else {
9780        let content = resp.text().await?;
9781        let entity: Option<PutAiRecordsByOwnerByNameError> = serde_json::from_str(&content).ok();
9782        Err(Error::ResponseError(ResponseContent { status, content, entity }))
9783    }
9784}
9785
9786/// Identical to PATCH — the handler takes a whole object either way.
9787pub async fn put_ai_remote_connections_by_owner_by_name(configuration: &configuration::Configuration, owner: &str, name: &str) -> Result<(), Error<PutAiRemoteConnectionsByOwnerByNameError>> {
9788    // add a prefix to parameters to efficiently prevent name collisions
9789    let p_owner = owner;
9790    let p_name = name;
9791
9792    let uri_str = format!("{}/v1/ai/remote-connections/{owner}/{name}", configuration.base_path, owner=crate::apis::urlencode(p_owner), name=crate::apis::urlencode(p_name));
9793    let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str);
9794
9795    if let Some(ref user_agent) = configuration.user_agent {
9796        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
9797    }
9798    if let Some(ref token) = configuration.bearer_access_token {
9799        req_builder = req_builder.bearer_auth(token.to_owned());
9800    };
9801
9802    let req = req_builder.build()?;
9803    let resp = configuration.client.execute(req).await?;
9804
9805    let status = resp.status();
9806
9807    if !status.is_client_error() && !status.is_server_error() {
9808        Ok(())
9809    } else {
9810        let content = resp.text().await?;
9811        let entity: Option<PutAiRemoteConnectionsByOwnerByNameError> = serde_json::from_str(&content).ok();
9812        Err(Error::ResponseError(ResponseContent { status, content, entity }))
9813    }
9814}
9815
9816/// The HTTP transport binding for the RESTful router-config nouns (/v1/ai/router/{policy,defaults,ledger,rewards,artifact-meta} and /v1/ai/org/settings[/list]). It dispatches IN-PROCESS through dispatchGateway — the SAME canonical ZAP gateway registry (zap_registry.go) that the MsgType 200 handler serves over the gateway transport. The native ZAP handler is the ONE and ONLY implementation of these routes; this is purely the api.hanzo.ai HTTP binding, so there is NO controller twin to drift from and the split-brain the router refactor removed stays removed.  Why a bridge and not a twin controller method: every other migrated route (get-records, get-connections, …) carries BOTH a controller method and a ZAP handler — the exact dual-impl drift that silently NULLed customer router settings (the update-router-policy data-wipe). Routing these nouns through the ZAP handler over one adapter keeps a single source of truth.  Identity is the request's own Bearer credential (Authorization header), which the native handlers resolve exactly as the gateway does — every caller (console, chat, app) already sends it. The dispatched handler returns a ZAP message whose status is field 0 and body is field 4 (BuildCloudResponse / BuildGatewayResponse layout); both are relayed verbatim. The route is mapped \"*\" (any verb) because the native handler is method-aware: /v1/ai/router/policy splits GET (read) vs PUT (write), /v1/ai/org/settings GET/PUT/DELETE, and returns 405 for a verb it does not own.
9817pub async fn put_ai_router_artifact_meta(configuration: &configuration::Configuration, ) -> Result<(), Error<PutAiRouterArtifactMetaError>> {
9818
9819    let uri_str = format!("{}/v1/ai/router/artifact-meta", configuration.base_path);
9820    let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str);
9821
9822    if let Some(ref user_agent) = configuration.user_agent {
9823        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
9824    }
9825    if let Some(ref token) = configuration.bearer_access_token {
9826        req_builder = req_builder.bearer_auth(token.to_owned());
9827    };
9828
9829    let req = req_builder.build()?;
9830    let resp = configuration.client.execute(req).await?;
9831
9832    let status = resp.status();
9833
9834    if !status.is_client_error() && !status.is_server_error() {
9835        Ok(())
9836    } else {
9837        let content = resp.text().await?;
9838        let entity: Option<PutAiRouterArtifactMetaError> = serde_json::from_str(&content).ok();
9839        Err(Error::ResponseError(ResponseContent { status, content, entity }))
9840    }
9841}
9842
9843/// The HTTP transport binding for the RESTful router-config nouns (/v1/ai/router/{policy,defaults,ledger,rewards,artifact-meta} and /v1/ai/org/settings[/list]). It dispatches IN-PROCESS through dispatchGateway — the SAME canonical ZAP gateway registry (zap_registry.go) that the MsgType 200 handler serves over the gateway transport. The native ZAP handler is the ONE and ONLY implementation of these routes; this is purely the api.hanzo.ai HTTP binding, so there is NO controller twin to drift from and the split-brain the router refactor removed stays removed.  Why a bridge and not a twin controller method: every other migrated route (get-records, get-connections, …) carries BOTH a controller method and a ZAP handler — the exact dual-impl drift that silently NULLed customer router settings (the update-router-policy data-wipe). Routing these nouns through the ZAP handler over one adapter keeps a single source of truth.  Identity is the request's own Bearer credential (Authorization header), which the native handlers resolve exactly as the gateway does — every caller (console, chat, app) already sends it. The dispatched handler returns a ZAP message whose status is field 0 and body is field 4 (BuildCloudResponse / BuildGatewayResponse layout); both are relayed verbatim. The route is mapped \"*\" (any verb) because the native handler is method-aware: /v1/ai/router/policy splits GET (read) vs PUT (write), /v1/ai/org/settings GET/PUT/DELETE, and returns 405 for a verb it does not own.
9844pub async fn put_ai_router_defaults(configuration: &configuration::Configuration, ) -> Result<(), Error<PutAiRouterDefaultsError>> {
9845
9846    let uri_str = format!("{}/v1/ai/router/defaults", configuration.base_path);
9847    let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str);
9848
9849    if let Some(ref user_agent) = configuration.user_agent {
9850        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
9851    }
9852    if let Some(ref token) = configuration.bearer_access_token {
9853        req_builder = req_builder.bearer_auth(token.to_owned());
9854    };
9855
9856    let req = req_builder.build()?;
9857    let resp = configuration.client.execute(req).await?;
9858
9859    let status = resp.status();
9860
9861    if !status.is_client_error() && !status.is_server_error() {
9862        Ok(())
9863    } else {
9864        let content = resp.text().await?;
9865        let entity: Option<PutAiRouterDefaultsError> = serde_json::from_str(&content).ok();
9866        Err(Error::ResponseError(ResponseContent { status, content, entity }))
9867    }
9868}
9869
9870/// The HTTP transport binding for the RESTful router-config nouns (/v1/ai/router/{policy,defaults,ledger,rewards,artifact-meta} and /v1/ai/org/settings[/list]). It dispatches IN-PROCESS through dispatchGateway — the SAME canonical ZAP gateway registry (zap_registry.go) that the MsgType 200 handler serves over the gateway transport. The native ZAP handler is the ONE and ONLY implementation of these routes; this is purely the api.hanzo.ai HTTP binding, so there is NO controller twin to drift from and the split-brain the router refactor removed stays removed.  Why a bridge and not a twin controller method: every other migrated route (get-records, get-connections, …) carries BOTH a controller method and a ZAP handler — the exact dual-impl drift that silently NULLed customer router settings (the update-router-policy data-wipe). Routing these nouns through the ZAP handler over one adapter keeps a single source of truth.  Identity is the request's own Bearer credential (Authorization header), which the native handlers resolve exactly as the gateway does — every caller (console, chat, app) already sends it. The dispatched handler returns a ZAP message whose status is field 0 and body is field 4 (BuildCloudResponse / BuildGatewayResponse layout); both are relayed verbatim. The route is mapped \"*\" (any verb) because the native handler is method-aware: /v1/ai/router/policy splits GET (read) vs PUT (write), /v1/ai/org/settings GET/PUT/DELETE, and returns 405 for a verb it does not own.
9871pub async fn put_ai_router_ledger(configuration: &configuration::Configuration, ) -> Result<(), Error<PutAiRouterLedgerError>> {
9872
9873    let uri_str = format!("{}/v1/ai/router/ledger", configuration.base_path);
9874    let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str);
9875
9876    if let Some(ref user_agent) = configuration.user_agent {
9877        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
9878    }
9879    if let Some(ref token) = configuration.bearer_access_token {
9880        req_builder = req_builder.bearer_auth(token.to_owned());
9881    };
9882
9883    let req = req_builder.build()?;
9884    let resp = configuration.client.execute(req).await?;
9885
9886    let status = resp.status();
9887
9888    if !status.is_client_error() && !status.is_server_error() {
9889        Ok(())
9890    } else {
9891        let content = resp.text().await?;
9892        let entity: Option<PutAiRouterLedgerError> = serde_json::from_str(&content).ok();
9893        Err(Error::ResponseError(ResponseContent { status, content, entity }))
9894    }
9895}
9896
9897/// The HTTP transport binding for the RESTful router-config nouns (/v1/ai/router/{policy,defaults,ledger,rewards,artifact-meta} and /v1/ai/org/settings[/list]). It dispatches IN-PROCESS through dispatchGateway — the SAME canonical ZAP gateway registry (zap_registry.go) that the MsgType 200 handler serves over the gateway transport. The native ZAP handler is the ONE and ONLY implementation of these routes; this is purely the api.hanzo.ai HTTP binding, so there is NO controller twin to drift from and the split-brain the router refactor removed stays removed.  Why a bridge and not a twin controller method: every other migrated route (get-records, get-connections, …) carries BOTH a controller method and a ZAP handler — the exact dual-impl drift that silently NULLed customer router settings (the update-router-policy data-wipe). Routing these nouns through the ZAP handler over one adapter keeps a single source of truth.  Identity is the request's own Bearer credential (Authorization header), which the native handlers resolve exactly as the gateway does — every caller (console, chat, app) already sends it. The dispatched handler returns a ZAP message whose status is field 0 and body is field 4 (BuildCloudResponse / BuildGatewayResponse layout); both are relayed verbatim. The route is mapped \"*\" (any verb) because the native handler is method-aware: /v1/ai/router/policy splits GET (read) vs PUT (write), /v1/ai/org/settings GET/PUT/DELETE, and returns 405 for a verb it does not own.
9898pub async fn put_ai_router_policy(configuration: &configuration::Configuration, ) -> Result<(), Error<PutAiRouterPolicyError>> {
9899
9900    let uri_str = format!("{}/v1/ai/router/policy", configuration.base_path);
9901    let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str);
9902
9903    if let Some(ref user_agent) = configuration.user_agent {
9904        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
9905    }
9906    if let Some(ref token) = configuration.bearer_access_token {
9907        req_builder = req_builder.bearer_auth(token.to_owned());
9908    };
9909
9910    let req = req_builder.build()?;
9911    let resp = configuration.client.execute(req).await?;
9912
9913    let status = resp.status();
9914
9915    if !status.is_client_error() && !status.is_server_error() {
9916        Ok(())
9917    } else {
9918        let content = resp.text().await?;
9919        let entity: Option<PutAiRouterPolicyError> = serde_json::from_str(&content).ok();
9920        Err(Error::ResponseError(ResponseContent { status, content, entity }))
9921    }
9922}
9923
9924/// The HTTP transport binding for the RESTful router-config nouns (/v1/ai/router/{policy,defaults,ledger,rewards,artifact-meta} and /v1/ai/org/settings[/list]). It dispatches IN-PROCESS through dispatchGateway — the SAME canonical ZAP gateway registry (zap_registry.go) that the MsgType 200 handler serves over the gateway transport. The native ZAP handler is the ONE and ONLY implementation of these routes; this is purely the api.hanzo.ai HTTP binding, so there is NO controller twin to drift from and the split-brain the router refactor removed stays removed.  Why a bridge and not a twin controller method: every other migrated route (get-records, get-connections, …) carries BOTH a controller method and a ZAP handler — the exact dual-impl drift that silently NULLed customer router settings (the update-router-policy data-wipe). Routing these nouns through the ZAP handler over one adapter keeps a single source of truth.  Identity is the request's own Bearer credential (Authorization header), which the native handlers resolve exactly as the gateway does — every caller (console, chat, app) already sends it. The dispatched handler returns a ZAP message whose status is field 0 and body is field 4 (BuildCloudResponse / BuildGatewayResponse layout); both are relayed verbatim. The route is mapped \"*\" (any verb) because the native handler is method-aware: /v1/ai/router/policy splits GET (read) vs PUT (write), /v1/ai/org/settings GET/PUT/DELETE, and returns 405 for a verb it does not own.
9925pub async fn put_ai_router_rewards(configuration: &configuration::Configuration, ) -> Result<(), Error<PutAiRouterRewardsError>> {
9926
9927    let uri_str = format!("{}/v1/ai/router/rewards", configuration.base_path);
9928    let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str);
9929
9930    if let Some(ref user_agent) = configuration.user_agent {
9931        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
9932    }
9933    if let Some(ref token) = configuration.bearer_access_token {
9934        req_builder = req_builder.bearer_auth(token.to_owned());
9935    };
9936
9937    let req = req_builder.build()?;
9938    let resp = configuration.client.execute(req).await?;
9939
9940    let status = resp.status();
9941
9942    if !status.is_client_error() && !status.is_server_error() {
9943        Ok(())
9944    } else {
9945        let content = resp.text().await?;
9946        let entity: Option<PutAiRouterRewardsError> = serde_json::from_str(&content).ok();
9947        Err(Error::ResponseError(ResponseContent { status, content, entity }))
9948    }
9949}
9950
9951/// Identical to PATCH — the handler takes a whole object either way.
9952pub async fn put_ai_routes_by_owner_by_name(configuration: &configuration::Configuration, owner: &str, name: &str) -> Result<(), Error<PutAiRoutesByOwnerByNameError>> {
9953    // add a prefix to parameters to efficiently prevent name collisions
9954    let p_owner = owner;
9955    let p_name = name;
9956
9957    let uri_str = format!("{}/v1/ai/routes/{owner}/{name}", configuration.base_path, owner=crate::apis::urlencode(p_owner), name=crate::apis::urlencode(p_name));
9958    let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str);
9959
9960    if let Some(ref user_agent) = configuration.user_agent {
9961        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
9962    }
9963    if let Some(ref token) = configuration.bearer_access_token {
9964        req_builder = req_builder.bearer_auth(token.to_owned());
9965    };
9966
9967    let req = req_builder.build()?;
9968    let resp = configuration.client.execute(req).await?;
9969
9970    let status = resp.status();
9971
9972    if !status.is_client_error() && !status.is_server_error() {
9973        Ok(())
9974    } else {
9975        let content = resp.text().await?;
9976        let entity: Option<PutAiRoutesByOwnerByNameError> = serde_json::from_str(&content).ok();
9977        Err(Error::ResponseError(ResponseContent { status, content, entity }))
9978    }
9979}
9980
9981/// Identical to PATCH — the handler takes a whole object either way.
9982pub async fn put_ai_scales_by_owner_by_name(configuration: &configuration::Configuration, owner: &str, name: &str) -> Result<(), Error<PutAiScalesByOwnerByNameError>> {
9983    // add a prefix to parameters to efficiently prevent name collisions
9984    let p_owner = owner;
9985    let p_name = name;
9986
9987    let uri_str = format!("{}/v1/ai/scales/{owner}/{name}", configuration.base_path, owner=crate::apis::urlencode(p_owner), name=crate::apis::urlencode(p_name));
9988    let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str);
9989
9990    if let Some(ref user_agent) = configuration.user_agent {
9991        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
9992    }
9993    if let Some(ref token) = configuration.bearer_access_token {
9994        req_builder = req_builder.bearer_auth(token.to_owned());
9995    };
9996
9997    let req = req_builder.build()?;
9998    let resp = configuration.client.execute(req).await?;
9999
10000    let status = resp.status();
10001
10002    if !status.is_client_error() && !status.is_server_error() {
10003        Ok(())
10004    } else {
10005        let content = resp.text().await?;
10006        let entity: Option<PutAiScalesByOwnerByNameError> = serde_json::from_str(&content).ok();
10007        Err(Error::ResponseError(ResponseContent { status, content, entity }))
10008    }
10009}
10010
10011/// Identical to PATCH — the handler takes a whole object either way.
10012pub async fn put_ai_scans_by_owner_by_name(configuration: &configuration::Configuration, owner: &str, name: &str) -> Result<(), Error<PutAiScansByOwnerByNameError>> {
10013    // add a prefix to parameters to efficiently prevent name collisions
10014    let p_owner = owner;
10015    let p_name = name;
10016
10017    let uri_str = format!("{}/v1/ai/scans/{owner}/{name}", configuration.base_path, owner=crate::apis::urlencode(p_owner), name=crate::apis::urlencode(p_name));
10018    let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str);
10019
10020    if let Some(ref user_agent) = configuration.user_agent {
10021        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
10022    }
10023    if let Some(ref token) = configuration.bearer_access_token {
10024        req_builder = req_builder.bearer_auth(token.to_owned());
10025    };
10026
10027    let req = req_builder.build()?;
10028    let resp = configuration.client.execute(req).await?;
10029
10030    let status = resp.status();
10031
10032    if !status.is_client_error() && !status.is_server_error() {
10033        Ok(())
10034    } else {
10035        let content = resp.text().await?;
10036        let entity: Option<PutAiScansByOwnerByNameError> = serde_json::from_str(&content).ok();
10037        Err(Error::ResponseError(ResponseContent { status, content, entity }))
10038    }
10039}
10040
10041/// Identical to PATCH — the handler takes a whole object either way.
10042pub async fn put_ai_signin_sessions_by_owner_by_name(configuration: &configuration::Configuration, owner: &str, name: &str) -> Result<(), Error<PutAiSigninSessionsByOwnerByNameError>> {
10043    // add a prefix to parameters to efficiently prevent name collisions
10044    let p_owner = owner;
10045    let p_name = name;
10046
10047    let uri_str = format!("{}/v1/ai/signin-sessions/{owner}/{name}", configuration.base_path, owner=crate::apis::urlencode(p_owner), name=crate::apis::urlencode(p_name));
10048    let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str);
10049
10050    if let Some(ref user_agent) = configuration.user_agent {
10051        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
10052    }
10053    if let Some(ref token) = configuration.bearer_access_token {
10054        req_builder = req_builder.bearer_auth(token.to_owned());
10055    };
10056
10057    let req = req_builder.build()?;
10058    let resp = configuration.client.execute(req).await?;
10059
10060    let status = resp.status();
10061
10062    if !status.is_client_error() && !status.is_server_error() {
10063        Ok(())
10064    } else {
10065        let content = resp.text().await?;
10066        let entity: Option<PutAiSigninSessionsByOwnerByNameError> = serde_json::from_str(&content).ok();
10067        Err(Error::ResponseError(ResponseContent { status, content, entity }))
10068    }
10069}
10070
10071/// Identical to PATCH — the handler takes a whole object either way.
10072pub async fn put_ai_stores_by_owner_by_name(configuration: &configuration::Configuration, owner: &str, name: &str) -> Result<(), Error<PutAiStoresByOwnerByNameError>> {
10073    // add a prefix to parameters to efficiently prevent name collisions
10074    let p_owner = owner;
10075    let p_name = name;
10076
10077    let uri_str = format!("{}/v1/ai/stores/{owner}/{name}", configuration.base_path, owner=crate::apis::urlencode(p_owner), name=crate::apis::urlencode(p_name));
10078    let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str);
10079
10080    if let Some(ref user_agent) = configuration.user_agent {
10081        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
10082    }
10083    if let Some(ref token) = configuration.bearer_access_token {
10084        req_builder = req_builder.bearer_auth(token.to_owned());
10085    };
10086
10087    let req = req_builder.build()?;
10088    let resp = configuration.client.execute(req).await?;
10089
10090    let status = resp.status();
10091
10092    if !status.is_client_error() && !status.is_server_error() {
10093        Ok(())
10094    } else {
10095        let content = resp.text().await?;
10096        let entity: Option<PutAiStoresByOwnerByNameError> = serde_json::from_str(&content).ok();
10097        Err(Error::ResponseError(ResponseContent { status, content, entity }))
10098    }
10099}
10100
10101/// Identical to PATCH — the handler takes a whole object either way.
10102pub async fn put_ai_tasks_by_owner_by_name(configuration: &configuration::Configuration, owner: &str, name: &str) -> Result<(), Error<PutAiTasksByOwnerByNameError>> {
10103    // add a prefix to parameters to efficiently prevent name collisions
10104    let p_owner = owner;
10105    let p_name = name;
10106
10107    let uri_str = format!("{}/v1/ai/tasks/{owner}/{name}", configuration.base_path, owner=crate::apis::urlencode(p_owner), name=crate::apis::urlencode(p_name));
10108    let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str);
10109
10110    if let Some(ref user_agent) = configuration.user_agent {
10111        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
10112    }
10113    if let Some(ref token) = configuration.bearer_access_token {
10114        req_builder = req_builder.bearer_auth(token.to_owned());
10115    };
10116
10117    let req = req_builder.build()?;
10118    let resp = configuration.client.execute(req).await?;
10119
10120    let status = resp.status();
10121
10122    if !status.is_client_error() && !status.is_server_error() {
10123        Ok(())
10124    } else {
10125        let content = resp.text().await?;
10126        let entity: Option<PutAiTasksByOwnerByNameError> = serde_json::from_str(&content).ok();
10127        Err(Error::ResponseError(ResponseContent { status, content, entity }))
10128    }
10129}
10130
10131/// Identical to PATCH — the handler takes a whole object either way.
10132pub async fn put_ai_templates_by_owner_by_name(configuration: &configuration::Configuration, owner: &str, name: &str) -> Result<(), Error<PutAiTemplatesByOwnerByNameError>> {
10133    // add a prefix to parameters to efficiently prevent name collisions
10134    let p_owner = owner;
10135    let p_name = name;
10136
10137    let uri_str = format!("{}/v1/ai/templates/{owner}/{name}", configuration.base_path, owner=crate::apis::urlencode(p_owner), name=crate::apis::urlencode(p_name));
10138    let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str);
10139
10140    if let Some(ref user_agent) = configuration.user_agent {
10141        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
10142    }
10143    if let Some(ref token) = configuration.bearer_access_token {
10144        req_builder = req_builder.bearer_auth(token.to_owned());
10145    };
10146
10147    let req = req_builder.build()?;
10148    let resp = configuration.client.execute(req).await?;
10149
10150    let status = resp.status();
10151
10152    if !status.is_client_error() && !status.is_server_error() {
10153        Ok(())
10154    } else {
10155        let content = resp.text().await?;
10156        let entity: Option<PutAiTemplatesByOwnerByNameError> = serde_json::from_str(&content).ok();
10157        Err(Error::ResponseError(ResponseContent { status, content, entity }))
10158    }
10159}
10160
10161pub async fn put_ai_training_contribution(configuration: &configuration::Configuration, ) -> Result<(), Error<PutAiTrainingContributionError>> {
10162
10163    let uri_str = format!("{}/v1/ai/training-contribution", configuration.base_path);
10164    let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str);
10165
10166    if let Some(ref user_agent) = configuration.user_agent {
10167        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
10168    }
10169    if let Some(ref token) = configuration.bearer_access_token {
10170        req_builder = req_builder.bearer_auth(token.to_owned());
10171    };
10172
10173    let req = req_builder.build()?;
10174    let resp = configuration.client.execute(req).await?;
10175
10176    let status = resp.status();
10177
10178    if !status.is_client_error() && !status.is_server_error() {
10179        Ok(())
10180    } else {
10181        let content = resp.text().await?;
10182        let entity: Option<PutAiTrainingContributionError> = serde_json::from_str(&content).ok();
10183        Err(Error::ResponseError(ResponseContent { status, content, entity }))
10184    }
10185}
10186
10187/// Identical to PATCH — the handler takes a whole object either way.
10188pub async fn put_ai_tree_files_by_owner_by_name(configuration: &configuration::Configuration, owner: &str, name: &str) -> Result<(), Error<PutAiTreeFilesByOwnerByNameError>> {
10189    // add a prefix to parameters to efficiently prevent name collisions
10190    let p_owner = owner;
10191    let p_name = name;
10192
10193    let uri_str = format!("{}/v1/ai/tree-files/{owner}/{name}", configuration.base_path, owner=crate::apis::urlencode(p_owner), name=crate::apis::urlencode(p_name));
10194    let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str);
10195
10196    if let Some(ref user_agent) = configuration.user_agent {
10197        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
10198    }
10199    if let Some(ref token) = configuration.bearer_access_token {
10200        req_builder = req_builder.bearer_auth(token.to_owned());
10201    };
10202
10203    let req = req_builder.build()?;
10204    let resp = configuration.client.execute(req).await?;
10205
10206    let status = resp.status();
10207
10208    if !status.is_client_error() && !status.is_server_error() {
10209        Ok(())
10210    } else {
10211        let content = resp.text().await?;
10212        let entity: Option<PutAiTreeFilesByOwnerByNameError> = serde_json::from_str(&content).ok();
10213        Err(Error::ResponseError(ResponseContent { status, content, entity }))
10214    }
10215}
10216
10217/// Identical to PATCH — the handler takes a whole object either way.
10218pub async fn put_ai_vectors_by_owner_by_name(configuration: &configuration::Configuration, owner: &str, name: &str) -> Result<(), Error<PutAiVectorsByOwnerByNameError>> {
10219    // add a prefix to parameters to efficiently prevent name collisions
10220    let p_owner = owner;
10221    let p_name = name;
10222
10223    let uri_str = format!("{}/v1/ai/vectors/{owner}/{name}", configuration.base_path, owner=crate::apis::urlencode(p_owner), name=crate::apis::urlencode(p_name));
10224    let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str);
10225
10226    if let Some(ref user_agent) = configuration.user_agent {
10227        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
10228    }
10229    if let Some(ref token) = configuration.bearer_access_token {
10230        req_builder = req_builder.bearer_auth(token.to_owned());
10231    };
10232
10233    let req = req_builder.build()?;
10234    let resp = configuration.client.execute(req).await?;
10235
10236    let status = resp.status();
10237
10238    if !status.is_client_error() && !status.is_server_error() {
10239        Ok(())
10240    } else {
10241        let content = resp.text().await?;
10242        let entity: Option<PutAiVectorsByOwnerByNameError> = serde_json::from_str(&content).ok();
10243        Err(Error::ResponseError(ResponseContent { status, content, entity }))
10244    }
10245}
10246
10247/// Identical to PATCH — the handler takes a whole object either way.
10248pub async fn put_ai_videos_by_owner_by_name(configuration: &configuration::Configuration, owner: &str, name: &str) -> Result<(), Error<PutAiVideosByOwnerByNameError>> {
10249    // add a prefix to parameters to efficiently prevent name collisions
10250    let p_owner = owner;
10251    let p_name = name;
10252
10253    let uri_str = format!("{}/v1/ai/videos/{owner}/{name}", configuration.base_path, owner=crate::apis::urlencode(p_owner), name=crate::apis::urlencode(p_name));
10254    let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str);
10255
10256    if let Some(ref user_agent) = configuration.user_agent {
10257        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
10258    }
10259    if let Some(ref token) = configuration.bearer_access_token {
10260        req_builder = req_builder.bearer_auth(token.to_owned());
10261    };
10262
10263    let req = req_builder.build()?;
10264    let resp = configuration.client.execute(req).await?;
10265
10266    let status = resp.status();
10267
10268    if !status.is_client_error() && !status.is_server_error() {
10269        Ok(())
10270    } else {
10271        let content = resp.text().await?;
10272        let entity: Option<PutAiVideosByOwnerByNameError> = serde_json::from_str(&content).ok();
10273        Err(Error::ResponseError(ResponseContent { status, content, entity }))
10274    }
10275}
10276
10277/// Identical to PATCH — the handler takes a whole object either way.
10278pub async fn put_ai_workflows_by_owner_by_name(configuration: &configuration::Configuration, owner: &str, name: &str) -> Result<(), Error<PutAiWorkflowsByOwnerByNameError>> {
10279    // add a prefix to parameters to efficiently prevent name collisions
10280    let p_owner = owner;
10281    let p_name = name;
10282
10283    let uri_str = format!("{}/v1/ai/workflows/{owner}/{name}", configuration.base_path, owner=crate::apis::urlencode(p_owner), name=crate::apis::urlencode(p_name));
10284    let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str);
10285
10286    if let Some(ref user_agent) = configuration.user_agent {
10287        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
10288    }
10289    if let Some(ref token) = configuration.bearer_access_token {
10290        req_builder = req_builder.bearer_auth(token.to_owned());
10291    };
10292
10293    let req = req_builder.build()?;
10294    let resp = configuration.client.execute(req).await?;
10295
10296    let status = resp.status();
10297
10298    if !status.is_client_error() && !status.is_server_error() {
10299        Ok(())
10300    } else {
10301        let content = resp.text().await?;
10302        let entity: Option<PutAiWorkflowsByOwnerByNameError> = serde_json::from_str(&content).ok();
10303        Err(Error::ResponseError(ResponseContent { status, content, entity }))
10304    }
10305}
10306