1use reqwest;
13use serde::{Deserialize, Serialize, de::Error as _};
14use crate::{apis::ResponseContent, models};
15use super::{Error, configuration, ContentType};
16
17
18#[derive(Debug, Clone, Serialize, Deserialize)]
20#[serde(untagged)]
21pub enum AgentCheckInError {
22 UnknownValue(serde_json::Value),
23}
24
25#[derive(Debug, Clone, Serialize, Deserialize)]
27#[serde(untagged)]
28pub enum AgentCheckInDeprecatedError {
29 UnknownValue(serde_json::Value),
30}
31
32#[derive(Debug, Clone, Serialize, Deserialize)]
34#[serde(untagged)]
35pub enum AuthzCheckError {
36 UnknownValue(serde_json::Value),
37}
38
39#[derive(Debug, Clone, Serialize, Deserialize)]
41#[serde(untagged)]
42pub enum CloneDashboardV2Error {
43 UnknownValue(serde_json::Value),
44}
45
46#[derive(Debug, Clone, Serialize, Deserialize)]
48#[serde(untagged)]
49pub enum CreateAccountError {
50 UnknownValue(serde_json::Value),
51}
52
53#[derive(Debug, Clone, Serialize, Deserialize)]
55#[serde(untagged)]
56pub enum CreateAuthDomainError {
57 UnknownValue(serde_json::Value),
58}
59
60#[derive(Debug, Clone, Serialize, Deserialize)]
62#[serde(untagged)]
63pub enum CreateBulkInviteError {
64 UnknownValue(serde_json::Value),
65}
66
67#[derive(Debug, Clone, Serialize, Deserialize)]
69#[serde(untagged)]
70pub enum CreateChannelError {
71 UnknownValue(serde_json::Value),
72}
73
74#[derive(Debug, Clone, Serialize, Deserialize)]
76#[serde(untagged)]
77pub enum CreateDashboardV2Error {
78 UnknownValue(serde_json::Value),
79}
80
81#[derive(Debug, Clone, Serialize, Deserialize)]
83#[serde(untagged)]
84pub enum CreateDashboardViewError {
85 UnknownValue(serde_json::Value),
86}
87
88#[derive(Debug, Clone, Serialize, Deserialize)]
90#[serde(untagged)]
91pub enum CreateDowntimeScheduleError {
92 UnknownValue(serde_json::Value),
93}
94
95#[derive(Debug, Clone, Serialize, Deserialize)]
97#[serde(untagged)]
98pub enum CreateIngestionKeyError {
99 UnknownValue(serde_json::Value),
100}
101
102#[derive(Debug, Clone, Serialize, Deserialize)]
104#[serde(untagged)]
105pub enum CreateIngestionKeyLimitError {
106 UnknownValue(serde_json::Value),
107}
108
109#[derive(Debug, Clone, Serialize, Deserialize)]
111#[serde(untagged)]
112pub enum CreateInviteError {
113 UnknownValue(serde_json::Value),
114}
115
116#[derive(Debug, Clone, Serialize, Deserialize)]
118#[serde(untagged)]
119pub enum CreateLlmAnnotationError {
120 UnknownValue(serde_json::Value),
121}
122
123#[derive(Debug, Clone, Serialize, Deserialize)]
125#[serde(untagged)]
126pub enum CreateLlmScoreError {
127 UnknownValue(serde_json::Value),
128}
129
130#[derive(Debug, Clone, Serialize, Deserialize)]
132#[serde(untagged)]
133pub enum CreateMetricReductionRuleError {
134 UnknownValue(serde_json::Value),
135}
136
137#[derive(Debug, Clone, Serialize, Deserialize)]
139#[serde(untagged)]
140pub enum CreateOrUpdateLlmPricingRulesError {
141 UnknownValue(serde_json::Value),
142}
143
144#[derive(Debug, Clone, Serialize, Deserialize)]
146#[serde(untagged)]
147pub enum CreatePublicDashboardError {
148 UnknownValue(serde_json::Value),
149}
150
151#[derive(Debug, Clone, Serialize, Deserialize)]
153#[serde(untagged)]
154pub enum CreateResetPasswordTokenError {
155 UnknownValue(serde_json::Value),
156}
157
158#[derive(Debug, Clone, Serialize, Deserialize)]
160#[serde(untagged)]
161pub enum CreateRoleError {
162 UnknownValue(serde_json::Value),
163}
164
165#[derive(Debug, Clone, Serialize, Deserialize)]
167#[serde(untagged)]
168pub enum CreateRoutePolicyError {
169 UnknownValue(serde_json::Value),
170}
171
172#[derive(Debug, Clone, Serialize, Deserialize)]
174#[serde(untagged)]
175pub enum CreateRuleError {
176 UnknownValue(serde_json::Value),
177}
178
179#[derive(Debug, Clone, Serialize, Deserialize)]
181#[serde(untagged)]
182pub enum CreateServiceAccountError {
183 UnknownValue(serde_json::Value),
184}
185
186#[derive(Debug, Clone, Serialize, Deserialize)]
188#[serde(untagged)]
189pub enum CreateServiceAccountKeyError {
190 UnknownValue(serde_json::Value),
191}
192
193#[derive(Debug, Clone, Serialize, Deserialize)]
195#[serde(untagged)]
196pub enum CreateServiceAccountRoleError {
197 UnknownValue(serde_json::Value),
198}
199
200#[derive(Debug, Clone, Serialize, Deserialize)]
202#[serde(untagged)]
203pub enum CreateSessionByEmailPasswordError {
204 UnknownValue(serde_json::Value),
205}
206
207#[derive(Debug, Clone, Serialize, Deserialize)]
209#[serde(untagged)]
210pub enum CreateSpanMapperError {
211 UnknownValue(serde_json::Value),
212}
213
214#[derive(Debug, Clone, Serialize, Deserialize)]
216#[serde(untagged)]
217pub enum CreateSpanMapperGroupError {
218 UnknownValue(serde_json::Value),
219}
220
221#[derive(Debug, Clone, Serialize, Deserialize)]
223#[serde(untagged)]
224pub enum CreateTraceFunnelError {
225 UnknownValue(serde_json::Value),
226}
227
228#[derive(Debug, Clone, Serialize, Deserialize)]
230#[serde(untagged)]
231pub enum CreateUserError {
232 UnknownValue(serde_json::Value),
233}
234
235#[derive(Debug, Clone, Serialize, Deserialize)]
237#[serde(untagged)]
238pub enum DeleteAuthDomainError {
239 UnknownValue(serde_json::Value),
240}
241
242#[derive(Debug, Clone, Serialize, Deserialize)]
244#[serde(untagged)]
245pub enum DeleteChannelByIdError {
246 UnknownValue(serde_json::Value),
247}
248
249#[derive(Debug, Clone, Serialize, Deserialize)]
251#[serde(untagged)]
252pub enum DeleteDashboardV2Error {
253 UnknownValue(serde_json::Value),
254}
255
256#[derive(Debug, Clone, Serialize, Deserialize)]
258#[serde(untagged)]
259pub enum DeleteDashboardViewError {
260 UnknownValue(serde_json::Value),
261}
262
263#[derive(Debug, Clone, Serialize, Deserialize)]
265#[serde(untagged)]
266pub enum DeleteDowntimeScheduleByIdError {
267 UnknownValue(serde_json::Value),
268}
269
270#[derive(Debug, Clone, Serialize, Deserialize)]
272#[serde(untagged)]
273pub enum DeleteIngestionKeyError {
274 UnknownValue(serde_json::Value),
275}
276
277#[derive(Debug, Clone, Serialize, Deserialize)]
279#[serde(untagged)]
280pub enum DeleteIngestionKeyLimitError {
281 UnknownValue(serde_json::Value),
282}
283
284#[derive(Debug, Clone, Serialize, Deserialize)]
286#[serde(untagged)]
287pub enum DeleteLlmPricingRuleError {
288 UnknownValue(serde_json::Value),
289}
290
291#[derive(Debug, Clone, Serialize, Deserialize)]
293#[serde(untagged)]
294pub enum DeleteLlmScoreError {
295 UnknownValue(serde_json::Value),
296}
297
298#[derive(Debug, Clone, Serialize, Deserialize)]
300#[serde(untagged)]
301pub enum DeleteMetricReductionRuleByIdError {
302 UnknownValue(serde_json::Value),
303}
304
305#[derive(Debug, Clone, Serialize, Deserialize)]
307#[serde(untagged)]
308pub enum DeleteO11yExplorerViewsByViewidError {
309 UnknownValue(serde_json::Value),
310}
311
312#[derive(Debug, Clone, Serialize, Deserialize)]
314#[serde(untagged)]
315pub enum DeleteO11yReviewsByIdError {
316 UnknownValue(serde_json::Value),
317}
318
319#[derive(Debug, Clone, Serialize, Deserialize)]
321#[serde(untagged)]
322pub enum DeleteO11ySentinelProjectsByIdError {
323 UnknownValue(serde_json::Value),
324}
325
326#[derive(Debug, Clone, Serialize, Deserialize)]
328#[serde(untagged)]
329pub enum DeletePublicDashboardError {
330 UnknownValue(serde_json::Value),
331}
332
333#[derive(Debug, Clone, Serialize, Deserialize)]
335#[serde(untagged)]
336pub enum DeleteRoleError {
337 UnknownValue(serde_json::Value),
338}
339
340#[derive(Debug, Clone, Serialize, Deserialize)]
342#[serde(untagged)]
343pub enum DeleteRoutePolicyByIdError {
344 UnknownValue(serde_json::Value),
345}
346
347#[derive(Debug, Clone, Serialize, Deserialize)]
349#[serde(untagged)]
350pub enum DeleteRuleByIdError {
351 UnknownValue(serde_json::Value),
352}
353
354#[derive(Debug, Clone, Serialize, Deserialize)]
356#[serde(untagged)]
357pub enum DeleteServiceAccountError {
358 UnknownValue(serde_json::Value),
359}
360
361#[derive(Debug, Clone, Serialize, Deserialize)]
363#[serde(untagged)]
364pub enum DeleteServiceAccountRoleError {
365 UnknownValue(serde_json::Value),
366}
367
368#[derive(Debug, Clone, Serialize, Deserialize)]
370#[serde(untagged)]
371pub enum DeleteSessionError {
372 UnknownValue(serde_json::Value),
373}
374
375#[derive(Debug, Clone, Serialize, Deserialize)]
377#[serde(untagged)]
378pub enum DeleteSpanMapperError {
379 UnknownValue(serde_json::Value),
380}
381
382#[derive(Debug, Clone, Serialize, Deserialize)]
384#[serde(untagged)]
385pub enum DeleteSpanMapperGroupError {
386 UnknownValue(serde_json::Value),
387}
388
389#[derive(Debug, Clone, Serialize, Deserialize)]
391#[serde(untagged)]
392pub enum DeleteTraceFunnelError {
393 UnknownValue(serde_json::Value),
394}
395
396#[derive(Debug, Clone, Serialize, Deserialize)]
398#[serde(untagged)]
399pub enum DeleteUserError {
400 UnknownValue(serde_json::Value),
401}
402
403#[derive(Debug, Clone, Serialize, Deserialize)]
405#[serde(untagged)]
406pub enum DeleteUserDeprecatedError {
407 UnknownValue(serde_json::Value),
408}
409
410#[derive(Debug, Clone, Serialize, Deserialize)]
412#[serde(untagged)]
413pub enum DisconnectAccountError {
414 UnknownValue(serde_json::Value),
415}
416
417#[derive(Debug, Clone, Serialize, Deserialize)]
419#[serde(untagged)]
420pub enum ForgotPasswordError {
421 UnknownValue(serde_json::Value),
422}
423
424#[derive(Debug, Clone, Serialize, Deserialize)]
426#[serde(untagged)]
427pub enum GetAccountError {
428 UnknownValue(serde_json::Value),
429}
430
431#[derive(Debug, Clone, Serialize, Deserialize)]
433#[serde(untagged)]
434pub enum GetAccountServiceError {
435 UnknownValue(serde_json::Value),
436}
437
438#[derive(Debug, Clone, Serialize, Deserialize)]
440#[serde(untagged)]
441pub enum GetAlertsError {
442 UnknownValue(serde_json::Value),
443}
444
445#[derive(Debug, Clone, Serialize, Deserialize)]
447#[serde(untagged)]
448pub enum GetAllRoutePoliciesError {
449 UnknownValue(serde_json::Value),
450}
451
452#[derive(Debug, Clone, Serialize, Deserialize)]
454#[serde(untagged)]
455pub enum GetAuthDomainError {
456 UnknownValue(serde_json::Value),
457}
458
459#[derive(Debug, Clone, Serialize, Deserialize)]
461#[serde(untagged)]
462pub enum GetChannelByIdError {
463 UnknownValue(serde_json::Value),
464}
465
466#[derive(Debug, Clone, Serialize, Deserialize)]
468#[serde(untagged)]
469pub enum GetConnectionCredentialsError {
470 UnknownValue(serde_json::Value),
471}
472
473#[derive(Debug, Clone, Serialize, Deserialize)]
475#[serde(untagged)]
476pub enum GetDashboardV2Error {
477 UnknownValue(serde_json::Value),
478}
479
480#[derive(Debug, Clone, Serialize, Deserialize)]
482#[serde(untagged)]
483pub enum GetDowntimeScheduleByIdError {
484 UnknownValue(serde_json::Value),
485}
486
487#[derive(Debug, Clone, Serialize, Deserialize)]
489#[serde(untagged)]
490pub enum GetDraftFunnelErrorTracesError {
491 UnknownValue(serde_json::Value),
492}
493
494#[derive(Debug, Clone, Serialize, Deserialize)]
496#[serde(untagged)]
497pub enum GetDraftFunnelOverviewError {
498 UnknownValue(serde_json::Value),
499}
500
501#[derive(Debug, Clone, Serialize, Deserialize)]
503#[serde(untagged)]
504pub enum GetDraftFunnelSlowTracesError {
505 UnknownValue(serde_json::Value),
506}
507
508#[derive(Debug, Clone, Serialize, Deserialize)]
510#[serde(untagged)]
511pub enum GetDraftFunnelStepMetricsError {
512 UnknownValue(serde_json::Value),
513}
514
515#[derive(Debug, Clone, Serialize, Deserialize)]
517#[serde(untagged)]
518pub enum GetDraftFunnelStepOverviewError {
519 UnknownValue(serde_json::Value),
520}
521
522#[derive(Debug, Clone, Serialize, Deserialize)]
524#[serde(untagged)]
525pub enum GetFlamegraphError {
526 UnknownValue(serde_json::Value),
527}
528
529#[derive(Debug, Clone, Serialize, Deserialize)]
531#[serde(untagged)]
532pub enum GetHostsError {
533 UnknownValue(serde_json::Value),
534}
535
536#[derive(Debug, Clone, Serialize, Deserialize)]
538#[serde(untagged)]
539pub enum GetIngestionKeysError {
540 UnknownValue(serde_json::Value),
541}
542
543#[derive(Debug, Clone, Serialize, Deserialize)]
545#[serde(untagged)]
546pub enum GetIntegrationError {
547 UnknownValue(serde_json::Value),
548}
549
550#[derive(Debug, Clone, Serialize, Deserialize)]
552#[serde(untagged)]
553pub enum GetIntegrationConnectionStatusError {
554 UnknownValue(serde_json::Value),
555}
556
557#[derive(Debug, Clone, Serialize, Deserialize)]
559#[serde(untagged)]
560pub enum GetLlmPricingRuleError {
561 UnknownValue(serde_json::Value),
562}
563
564#[derive(Debug, Clone, Serialize, Deserialize)]
566#[serde(untagged)]
567pub enum GetLlmScoreError {
568 UnknownValue(serde_json::Value),
569}
570
571#[derive(Debug, Clone, Serialize, Deserialize)]
573#[serde(untagged)]
574pub enum GetMetricAlertsError {
575 UnknownValue(serde_json::Value),
576}
577
578#[derive(Debug, Clone, Serialize, Deserialize)]
580#[serde(untagged)]
581pub enum GetMetricAttributesError {
582 UnknownValue(serde_json::Value),
583}
584
585#[derive(Debug, Clone, Serialize, Deserialize)]
587#[serde(untagged)]
588pub enum GetMetricDashboardsV2Error {
589 UnknownValue(serde_json::Value),
590}
591
592#[derive(Debug, Clone, Serialize, Deserialize)]
594#[serde(untagged)]
595pub enum GetMetricHighlightsError {
596 UnknownValue(serde_json::Value),
597}
598
599#[derive(Debug, Clone, Serialize, Deserialize)]
601#[serde(untagged)]
602pub enum GetMetricMetadataError {
603 UnknownValue(serde_json::Value),
604}
605
606#[derive(Debug, Clone, Serialize, Deserialize)]
608#[serde(untagged)]
609pub enum GetMetricReductionRuleByIdError {
610 UnknownValue(serde_json::Value),
611}
612
613#[derive(Debug, Clone, Serialize, Deserialize)]
615#[serde(untagged)]
616pub enum GetMetricReductionRuleStatsError {
617 UnknownValue(serde_json::Value),
618}
619
620#[derive(Debug, Clone, Serialize, Deserialize)]
622#[serde(untagged)]
623pub enum GetMetricReductionRuleTimeseriesError {
624 UnknownValue(serde_json::Value),
625}
626
627#[derive(Debug, Clone, Serialize, Deserialize)]
629#[serde(untagged)]
630pub enum GetMetricsOnboardingStatusError {
631 UnknownValue(serde_json::Value),
632}
633
634#[derive(Debug, Clone, Serialize, Deserialize)]
636#[serde(untagged)]
637pub enum GetMetricsStatsError {
638 UnknownValue(serde_json::Value),
639}
640
641#[derive(Debug, Clone, Serialize, Deserialize)]
643#[serde(untagged)]
644pub enum GetMetricsTreemapError {
645 UnknownValue(serde_json::Value),
646}
647
648#[derive(Debug, Clone, Serialize, Deserialize)]
650#[serde(untagged)]
651pub enum GetMyOrganizationError {
652 UnknownValue(serde_json::Value),
653}
654
655#[derive(Debug, Clone, Serialize, Deserialize)]
657#[serde(untagged)]
658pub enum GetMyServiceAccountError {
659 UnknownValue(serde_json::Value),
660}
661
662#[derive(Debug, Clone, Serialize, Deserialize)]
664#[serde(untagged)]
665pub enum GetMyUserError {
666 UnknownValue(serde_json::Value),
667}
668
669#[derive(Debug, Clone, Serialize, Deserialize)]
671#[serde(untagged)]
672pub enum GetMyUserDeprecatedError {
673 UnknownValue(serde_json::Value),
674}
675
676#[derive(Debug, Clone, Serialize, Deserialize)]
678#[serde(untagged)]
679pub enum GetO11yAlertsLastError {
680 UnknownValue(serde_json::Value),
681}
682
683#[derive(Debug, Clone, Serialize, Deserialize)]
685#[serde(untagged)]
686pub enum GetO11yAutocompleteAggregateAttributesError {
687 UnknownValue(serde_json::Value),
688}
689
690#[derive(Debug, Clone, Serialize, Deserialize)]
692#[serde(untagged)]
693pub enum GetO11yAutocompleteAttributeKeysError {
694 UnknownValue(serde_json::Value),
695}
696
697#[derive(Debug, Clone, Serialize, Deserialize)]
699#[serde(untagged)]
700pub enum GetO11yAutocompleteAttributeValuesError {
701 UnknownValue(serde_json::Value),
702}
703
704#[derive(Debug, Clone, Serialize, Deserialize)]
706#[serde(untagged)]
707pub enum GetO11yAvailabilityError {
708 UnknownValue(serde_json::Value),
709}
710
711#[derive(Debug, Clone, Serialize, Deserialize)]
713#[serde(untagged)]
714pub enum GetO11yClustersAttributeKeysError {
715 UnknownValue(serde_json::Value),
716}
717
718#[derive(Debug, Clone, Serialize, Deserialize)]
720#[serde(untagged)]
721pub enum GetO11yClustersAttributeValuesError {
722 UnknownValue(serde_json::Value),
723}
724
725#[derive(Debug, Clone, Serialize, Deserialize)]
727#[serde(untagged)]
728pub enum GetO11yCompleteGoogleError {
729 UnknownValue(serde_json::Value),
730}
731
732#[derive(Debug, Clone, Serialize, Deserialize)]
734#[serde(untagged)]
735pub enum GetO11yCompleteOidcError {
736 UnknownValue(serde_json::Value),
737}
738
739#[derive(Debug, Clone, Serialize, Deserialize)]
741#[serde(untagged)]
742pub enum GetO11yDaemonsetsAttributeKeysError {
743 UnknownValue(serde_json::Value),
744}
745
746#[derive(Debug, Clone, Serialize, Deserialize)]
748#[serde(untagged)]
749pub enum GetO11yDaemonsetsAttributeValuesError {
750 UnknownValue(serde_json::Value),
751}
752
753#[derive(Debug, Clone, Serialize, Deserialize)]
755#[serde(untagged)]
756pub enum GetO11yDeploymentsAttributeKeysError {
757 UnknownValue(serde_json::Value),
758}
759
760#[derive(Debug, Clone, Serialize, Deserialize)]
762#[serde(untagged)]
763pub enum GetO11yDeploymentsAttributeValuesError {
764 UnknownValue(serde_json::Value),
765}
766
767#[derive(Debug, Clone, Serialize, Deserialize)]
769#[serde(untagged)]
770pub enum GetO11yDisksError {
771 UnknownValue(serde_json::Value),
772}
773
774#[derive(Debug, Clone, Serialize, Deserialize)]
776#[serde(untagged)]
777pub enum GetO11yErrorfromerroridError {
778 UnknownValue(serde_json::Value),
779}
780
781#[derive(Debug, Clone, Serialize, Deserialize)]
783#[serde(untagged)]
784pub enum GetO11yErrorfromgroupidError {
785 UnknownValue(serde_json::Value),
786}
787
788#[derive(Debug, Clone, Serialize, Deserialize)]
790#[serde(untagged)]
791pub enum GetO11yErrortrackingIssuesError {
792 UnknownValue(serde_json::Value),
793}
794
795#[derive(Debug, Clone, Serialize, Deserialize)]
797#[serde(untagged)]
798pub enum GetO11yErrortrackingIssuesByIdError {
799 UnknownValue(serde_json::Value),
800}
801
802#[derive(Debug, Clone, Serialize, Deserialize)]
804#[serde(untagged)]
805pub enum GetO11yExplorerViewsError {
806 UnknownValue(serde_json::Value),
807}
808
809#[derive(Debug, Clone, Serialize, Deserialize)]
811#[serde(untagged)]
812pub enum GetO11yExplorerViewsByViewidError {
813 UnknownValue(serde_json::Value),
814}
815
816#[derive(Debug, Clone, Serialize, Deserialize)]
818#[serde(untagged)]
819pub enum GetO11yFeaturesError {
820 UnknownValue(serde_json::Value),
821}
822
823#[derive(Debug, Clone, Serialize, Deserialize)]
825#[serde(untagged)]
826pub enum GetO11yFieldsKeysError {
827 UnknownValue(serde_json::Value),
828}
829
830#[derive(Debug, Clone, Serialize, Deserialize)]
832#[serde(untagged)]
833pub enum GetO11yFieldsValuesError {
834 UnknownValue(serde_json::Value),
835}
836
837#[derive(Debug, Clone, Serialize, Deserialize)]
839#[serde(untagged)]
840pub enum GetO11yFilterSuggestionsError {
841 UnknownValue(serde_json::Value),
842}
843
844#[derive(Debug, Clone, Serialize, Deserialize)]
846#[serde(untagged)]
847pub enum GetO11yGlobalConfigError {
848 UnknownValue(serde_json::Value),
849}
850
851#[derive(Debug, Clone, Serialize, Deserialize)]
853#[serde(untagged)]
854pub enum GetO11yHealthError {
855 UnknownValue(serde_json::Value),
856}
857
858#[derive(Debug, Clone, Serialize, Deserialize)]
860#[serde(untagged)]
861pub enum GetO11yHealthzError {
862 UnknownValue(serde_json::Value),
863}
864
865#[derive(Debug, Clone, Serialize, Deserialize)]
867#[serde(untagged)]
868pub enum GetO11yHostsAttributeKeysError {
869 UnknownValue(serde_json::Value),
870}
871
872#[derive(Debug, Clone, Serialize, Deserialize)]
874#[serde(untagged)]
875pub enum GetO11yHostsAttributeValuesError {
876 UnknownValue(serde_json::Value),
877}
878
879#[derive(Debug, Clone, Serialize, Deserialize)]
881#[serde(untagged)]
882pub enum GetO11yInfraMonitoringChecksError {
883 UnknownValue(serde_json::Value),
884}
885
886#[derive(Debug, Clone, Serialize, Deserialize)]
888#[serde(untagged)]
889pub enum GetO11yInfraOnboardingK8sStatusError {
890 UnknownValue(serde_json::Value),
891}
892
893#[derive(Debug, Clone, Serialize, Deserialize)]
895#[serde(untagged)]
896pub enum GetO11yJobsAttributeKeysError {
897 UnknownValue(serde_json::Value),
898}
899
900#[derive(Debug, Clone, Serialize, Deserialize)]
902#[serde(untagged)]
903pub enum GetO11yJobsAttributeValuesError {
904 UnknownValue(serde_json::Value),
905}
906
907#[derive(Debug, Clone, Serialize, Deserialize)]
909#[serde(untagged)]
910pub enum GetO11yLicensesError {
911 UnknownValue(serde_json::Value),
912}
913
914#[derive(Debug, Clone, Serialize, Deserialize)]
916#[serde(untagged)]
917pub enum GetO11yLicensesActiveError {
918 UnknownValue(serde_json::Value),
919}
920
921#[derive(Debug, Clone, Serialize, Deserialize)]
923#[serde(untagged)]
924pub enum GetO11yLivezError {
925 UnknownValue(serde_json::Value),
926}
927
928#[derive(Debug, Clone, Serialize, Deserialize)]
930#[serde(untagged)]
931pub enum GetO11yLoginError {
932 UnknownValue(serde_json::Value),
933}
934
935#[derive(Debug, Clone, Serialize, Deserialize)]
937#[serde(untagged)]
938pub enum GetO11yLogsError {
939 UnknownValue(serde_json::Value),
940}
941
942#[derive(Debug, Clone, Serialize, Deserialize)]
944#[serde(untagged)]
945pub enum GetO11yLogsAggregateError {
946 UnknownValue(serde_json::Value),
947}
948
949#[derive(Debug, Clone, Serialize, Deserialize)]
951#[serde(untagged)]
952pub enum GetO11yLogsFieldsError {
953 UnknownValue(serde_json::Value),
954}
955
956#[derive(Debug, Clone, Serialize, Deserialize)]
958#[serde(untagged)]
959pub enum GetO11yLogsLivetailError {
960 UnknownValue(serde_json::Value),
961}
962
963#[derive(Debug, Clone, Serialize, Deserialize)]
965#[serde(untagged)]
966pub enum GetO11yLogsPipelinesByVersionError {
967 UnknownValue(serde_json::Value),
968}
969
970#[derive(Debug, Clone, Serialize, Deserialize)]
972#[serde(untagged)]
973pub enum GetO11yLogsPromotePathsError {
974 UnknownValue(serde_json::Value),
975}
976
977#[derive(Debug, Clone, Serialize, Deserialize)]
979#[serde(untagged)]
980pub enum GetO11yMetricMetricMetadataError {
981 UnknownValue(serde_json::Value),
982}
983
984#[derive(Debug, Clone, Serialize, Deserialize)]
986#[serde(untagged)]
987pub enum GetO11yNamespacesAttributeKeysError {
988 UnknownValue(serde_json::Value),
989}
990
991#[derive(Debug, Clone, Serialize, Deserialize)]
993#[serde(untagged)]
994pub enum GetO11yNamespacesAttributeValuesError {
995 UnknownValue(serde_json::Value),
996}
997
998#[derive(Debug, Clone, Serialize, Deserialize)]
1000#[serde(untagged)]
1001pub enum GetO11yNextpreverroridsError {
1002 UnknownValue(serde_json::Value),
1003}
1004
1005#[derive(Debug, Clone, Serialize, Deserialize)]
1007#[serde(untagged)]
1008pub enum GetO11yNodesAttributeKeysError {
1009 UnknownValue(serde_json::Value),
1010}
1011
1012#[derive(Debug, Clone, Serialize, Deserialize)]
1014#[serde(untagged)]
1015pub enum GetO11yNodesAttributeValuesError {
1016 UnknownValue(serde_json::Value),
1017}
1018
1019#[derive(Debug, Clone, Serialize, Deserialize)]
1021#[serde(untagged)]
1022pub enum GetO11yPodsAttributeKeysError {
1023 UnknownValue(serde_json::Value),
1024}
1025
1026#[derive(Debug, Clone, Serialize, Deserialize)]
1028#[serde(untagged)]
1029pub enum GetO11yPodsAttributeValuesError {
1030 UnknownValue(serde_json::Value),
1031}
1032
1033#[derive(Debug, Clone, Serialize, Deserialize)]
1035#[serde(untagged)]
1036pub enum GetO11yProcessesAttributeKeysError {
1037 UnknownValue(serde_json::Value),
1038}
1039
1040#[derive(Debug, Clone, Serialize, Deserialize)]
1042#[serde(untagged)]
1043pub enum GetO11yProcessesAttributeValuesError {
1044 UnknownValue(serde_json::Value),
1045}
1046
1047#[derive(Debug, Clone, Serialize, Deserialize)]
1049#[serde(untagged)]
1050pub enum GetO11yProductMetricsError {
1051 UnknownValue(serde_json::Value),
1052}
1053
1054#[derive(Debug, Clone, Serialize, Deserialize)]
1056#[serde(untagged)]
1057pub enum GetO11yPvcsAttributeKeysError {
1058 UnknownValue(serde_json::Value),
1059}
1060
1061#[derive(Debug, Clone, Serialize, Deserialize)]
1063#[serde(untagged)]
1064pub enum GetO11yPvcsAttributeValuesError {
1065 UnknownValue(serde_json::Value),
1066}
1067
1068#[derive(Debug, Clone, Serialize, Deserialize)]
1070#[serde(untagged)]
1071pub enum GetO11yQueryError {
1072 UnknownValue(serde_json::Value),
1073}
1074
1075#[derive(Debug, Clone, Serialize, Deserialize)]
1077#[serde(untagged)]
1078pub enum GetO11yQueryProgressError {
1079 UnknownValue(serde_json::Value),
1080}
1081
1082#[derive(Debug, Clone, Serialize, Deserialize)]
1084#[serde(untagged)]
1085pub enum GetO11yQueryRangeError {
1086 UnknownValue(serde_json::Value),
1087}
1088
1089#[derive(Debug, Clone, Serialize, Deserialize)]
1091#[serde(untagged)]
1092pub enum GetO11yReadyzError {
1093 UnknownValue(serde_json::Value),
1094}
1095
1096#[derive(Debug, Clone, Serialize, Deserialize)]
1098#[serde(untagged)]
1099pub enum GetO11yReviewsError {
1100 UnknownValue(serde_json::Value),
1101}
1102
1103#[derive(Debug, Clone, Serialize, Deserialize)]
1105#[serde(untagged)]
1106pub enum GetO11yReviewsByIdError {
1107 UnknownValue(serde_json::Value),
1108}
1109
1110#[derive(Debug, Clone, Serialize, Deserialize)]
1112#[serde(untagged)]
1113pub enum GetO11yReviewsByIdItemsError {
1114 UnknownValue(serde_json::Value),
1115}
1116
1117#[derive(Debug, Clone, Serialize, Deserialize)]
1119#[serde(untagged)]
1120pub enum GetO11ySentinelEventsByIdError {
1121 UnknownValue(serde_json::Value),
1122}
1123
1124#[derive(Debug, Clone, Serialize, Deserialize)]
1126#[serde(untagged)]
1127pub enum GetO11ySentinelIssuesError {
1128 UnknownValue(serde_json::Value),
1129}
1130
1131#[derive(Debug, Clone, Serialize, Deserialize)]
1133#[serde(untagged)]
1134pub enum GetO11ySentinelIssuesByIdError {
1135 UnknownValue(serde_json::Value),
1136}
1137
1138#[derive(Debug, Clone, Serialize, Deserialize)]
1140#[serde(untagged)]
1141pub enum GetO11ySentinelIssuesByIdEventsError {
1142 UnknownValue(serde_json::Value),
1143}
1144
1145#[derive(Debug, Clone, Serialize, Deserialize)]
1147#[serde(untagged)]
1148pub enum GetO11ySentinelLogsError {
1149 UnknownValue(serde_json::Value),
1150}
1151
1152#[derive(Debug, Clone, Serialize, Deserialize)]
1154#[serde(untagged)]
1155pub enum GetO11ySentinelProjectsError {
1156 UnknownValue(serde_json::Value),
1157}
1158
1159#[derive(Debug, Clone, Serialize, Deserialize)]
1161#[serde(untagged)]
1162pub enum GetO11ySentinelProjectsByIdError {
1163 UnknownValue(serde_json::Value),
1164}
1165
1166#[derive(Debug, Clone, Serialize, Deserialize)]
1168#[serde(untagged)]
1169pub enum GetO11ySentinelStatsError {
1170 UnknownValue(serde_json::Value),
1171}
1172
1173#[derive(Debug, Clone, Serialize, Deserialize)]
1175#[serde(untagged)]
1176pub enum GetO11ySentinelTracesError {
1177 UnknownValue(serde_json::Value),
1178}
1179
1180#[derive(Debug, Clone, Serialize, Deserialize)]
1182#[serde(untagged)]
1183pub enum GetO11ySentinelTracesByIdError {
1184 UnknownValue(serde_json::Value),
1185}
1186
1187#[derive(Debug, Clone, Serialize, Deserialize)]
1189#[serde(untagged)]
1190pub enum GetO11yServicesListError {
1191 UnknownValue(serde_json::Value),
1192}
1193
1194#[derive(Debug, Clone, Serialize, Deserialize)]
1196#[serde(untagged)]
1197pub enum GetO11ySessionsError {
1198 UnknownValue(serde_json::Value),
1199}
1200
1201#[derive(Debug, Clone, Serialize, Deserialize)]
1203#[serde(untagged)]
1204pub enum GetO11ySettingsApdexError {
1205 UnknownValue(serde_json::Value),
1206}
1207
1208#[derive(Debug, Clone, Serialize, Deserialize)]
1210#[serde(untagged)]
1211pub enum GetO11ySettingsTtlError {
1212 UnknownValue(serde_json::Value),
1213}
1214
1215#[derive(Debug, Clone, Serialize, Deserialize)]
1217#[serde(untagged)]
1218pub enum GetO11yStatefulsetsAttributeKeysError {
1219 UnknownValue(serde_json::Value),
1220}
1221
1222#[derive(Debug, Clone, Serialize, Deserialize)]
1224#[serde(untagged)]
1225pub enum GetO11yStatefulsetsAttributeValuesError {
1226 UnknownValue(serde_json::Value),
1227}
1228
1229#[derive(Debug, Clone, Serialize, Deserialize)]
1231#[serde(untagged)]
1232pub enum GetO11yStatsError {
1233 UnknownValue(serde_json::Value),
1234}
1235
1236#[derive(Debug, Clone, Serialize, Deserialize)]
1238#[serde(untagged)]
1239pub enum GetO11yStatusError {
1240 UnknownValue(serde_json::Value),
1241}
1242
1243#[derive(Debug, Clone, Serialize, Deserialize)]
1245#[serde(untagged)]
1246pub enum GetO11ySummaryError {
1247 UnknownValue(serde_json::Value),
1248}
1249
1250#[derive(Debug, Clone, Serialize, Deserialize)]
1252#[serde(untagged)]
1253pub enum GetO11yTracesError {
1254 UnknownValue(serde_json::Value),
1255}
1256
1257#[derive(Debug, Clone, Serialize, Deserialize)]
1259#[serde(untagged)]
1260pub enum GetO11yUsageError {
1261 UnknownValue(serde_json::Value),
1262}
1263
1264#[derive(Debug, Clone, Serialize, Deserialize)]
1266#[serde(untagged)]
1267pub enum GetO11yVersionError {
1268 UnknownValue(serde_json::Value),
1269}
1270
1271#[derive(Debug, Clone, Serialize, Deserialize)]
1273#[serde(untagged)]
1274pub enum GetOrgPreferenceError {
1275 UnknownValue(serde_json::Value),
1276}
1277
1278#[derive(Debug, Clone, Serialize, Deserialize)]
1280#[serde(untagged)]
1281pub enum GetOverallStateTransitionsError {
1282 UnknownValue(serde_json::Value),
1283}
1284
1285#[derive(Debug, Clone, Serialize, Deserialize)]
1287#[serde(untagged)]
1288pub enum GetPublicDashboardError {
1289 UnknownValue(serde_json::Value),
1290}
1291
1292#[derive(Debug, Clone, Serialize, Deserialize)]
1294#[serde(untagged)]
1295pub enum GetPublicDashboardDataError {
1296 UnknownValue(serde_json::Value),
1297}
1298
1299#[derive(Debug, Clone, Serialize, Deserialize)]
1301#[serde(untagged)]
1302pub enum GetPublicDashboardWidgetQueryRangeError {
1303 UnknownValue(serde_json::Value),
1304}
1305
1306#[derive(Debug, Clone, Serialize, Deserialize)]
1308#[serde(untagged)]
1309pub enum GetQuickFiltersError {
1310 UnknownValue(serde_json::Value),
1311}
1312
1313#[derive(Debug, Clone, Serialize, Deserialize)]
1315#[serde(untagged)]
1316pub enum GetResetPasswordTokenError {
1317 UnknownValue(serde_json::Value),
1318}
1319
1320#[derive(Debug, Clone, Serialize, Deserialize)]
1322#[serde(untagged)]
1323pub enum GetResetPasswordTokenDeprecatedError {
1324 UnknownValue(serde_json::Value),
1325}
1326
1327#[derive(Debug, Clone, Serialize, Deserialize)]
1329#[serde(untagged)]
1330pub enum GetRoleError {
1331 UnknownValue(serde_json::Value),
1332}
1333
1334#[derive(Debug, Clone, Serialize, Deserialize)]
1336#[serde(untagged)]
1337pub enum GetRolesByUserIdError {
1338 UnknownValue(serde_json::Value),
1339}
1340
1341#[derive(Debug, Clone, Serialize, Deserialize)]
1343#[serde(untagged)]
1344pub enum GetRoutePolicyByIdError {
1345 UnknownValue(serde_json::Value),
1346}
1347
1348#[derive(Debug, Clone, Serialize, Deserialize)]
1350#[serde(untagged)]
1351pub enum GetRuleByIdError {
1352 UnknownValue(serde_json::Value),
1353}
1354
1355#[derive(Debug, Clone, Serialize, Deserialize)]
1357#[serde(untagged)]
1358pub enum GetRuleHistoryFilterKeysError {
1359 UnknownValue(serde_json::Value),
1360}
1361
1362#[derive(Debug, Clone, Serialize, Deserialize)]
1364#[serde(untagged)]
1365pub enum GetRuleHistoryFilterValuesError {
1366 UnknownValue(serde_json::Value),
1367}
1368
1369#[derive(Debug, Clone, Serialize, Deserialize)]
1371#[serde(untagged)]
1372pub enum GetRuleHistoryOverallStatusError {
1373 UnknownValue(serde_json::Value),
1374}
1375
1376#[derive(Debug, Clone, Serialize, Deserialize)]
1378#[serde(untagged)]
1379pub enum GetRuleHistoryStatsError {
1380 UnknownValue(serde_json::Value),
1381}
1382
1383#[derive(Debug, Clone, Serialize, Deserialize)]
1385#[serde(untagged)]
1386pub enum GetRuleHistoryTimelineError {
1387 UnknownValue(serde_json::Value),
1388}
1389
1390#[derive(Debug, Clone, Serialize, Deserialize)]
1392#[serde(untagged)]
1393pub enum GetRuleHistoryTopContributorsError {
1394 UnknownValue(serde_json::Value),
1395}
1396
1397#[derive(Debug, Clone, Serialize, Deserialize)]
1399#[serde(untagged)]
1400pub enum GetRuleStateHistoryError {
1401 UnknownValue(serde_json::Value),
1402}
1403
1404#[derive(Debug, Clone, Serialize, Deserialize)]
1406#[serde(untagged)]
1407pub enum GetRuleStateHistoryTopContributorsError {
1408 UnknownValue(serde_json::Value),
1409}
1410
1411#[derive(Debug, Clone, Serialize, Deserialize)]
1413#[serde(untagged)]
1414pub enum GetRuleStatsError {
1415 UnknownValue(serde_json::Value),
1416}
1417
1418#[derive(Debug, Clone, Serialize, Deserialize)]
1420#[serde(untagged)]
1421pub enum GetServiceError {
1422 UnknownValue(serde_json::Value),
1423}
1424
1425#[derive(Debug, Clone, Serialize, Deserialize)]
1427#[serde(untagged)]
1428pub enum GetServiceAccountError {
1429 UnknownValue(serde_json::Value),
1430}
1431
1432#[derive(Debug, Clone, Serialize, Deserialize)]
1434#[serde(untagged)]
1435pub enum GetServiceAccountRolesError {
1436 UnknownValue(serde_json::Value),
1437}
1438
1439#[derive(Debug, Clone, Serialize, Deserialize)]
1441#[serde(untagged)]
1442pub enum GetSessionContextError {
1443 UnknownValue(serde_json::Value),
1444}
1445
1446#[derive(Debug, Clone, Serialize, Deserialize)]
1448#[serde(untagged)]
1449pub enum GetSignalFiltersError {
1450 UnknownValue(serde_json::Value),
1451}
1452
1453#[derive(Debug, Clone, Serialize, Deserialize)]
1455#[serde(untagged)]
1456pub enum GetTraceAggregationsError {
1457 UnknownValue(serde_json::Value),
1458}
1459
1460#[derive(Debug, Clone, Serialize, Deserialize)]
1462#[serde(untagged)]
1463pub enum GetTraceFieldsError {
1464 UnknownValue(serde_json::Value),
1465}
1466
1467#[derive(Debug, Clone, Serialize, Deserialize)]
1469#[serde(untagged)]
1470pub enum GetTraceFunnelError {
1471 UnknownValue(serde_json::Value),
1472}
1473
1474#[derive(Debug, Clone, Serialize, Deserialize)]
1476#[serde(untagged)]
1477pub enum GetTraceFunnelErrorTracesError {
1478 UnknownValue(serde_json::Value),
1479}
1480
1481#[derive(Debug, Clone, Serialize, Deserialize)]
1483#[serde(untagged)]
1484pub enum GetTraceFunnelOverviewError {
1485 UnknownValue(serde_json::Value),
1486}
1487
1488#[derive(Debug, Clone, Serialize, Deserialize)]
1490#[serde(untagged)]
1491pub enum GetTraceFunnelSlowTracesError {
1492 UnknownValue(serde_json::Value),
1493}
1494
1495#[derive(Debug, Clone, Serialize, Deserialize)]
1497#[serde(untagged)]
1498pub enum GetTraceFunnelStepMetricsError {
1499 UnknownValue(serde_json::Value),
1500}
1501
1502#[derive(Debug, Clone, Serialize, Deserialize)]
1504#[serde(untagged)]
1505pub enum GetTraceFunnelStepOverviewError {
1506 UnknownValue(serde_json::Value),
1507}
1508
1509#[derive(Debug, Clone, Serialize, Deserialize)]
1511#[serde(untagged)]
1512pub enum GetUserError {
1513 UnknownValue(serde_json::Value),
1514}
1515
1516#[derive(Debug, Clone, Serialize, Deserialize)]
1518#[serde(untagged)]
1519pub enum GetUserDeprecatedError {
1520 UnknownValue(serde_json::Value),
1521}
1522
1523#[derive(Debug, Clone, Serialize, Deserialize)]
1525#[serde(untagged)]
1526pub enum GetUserPreferenceError {
1527 UnknownValue(serde_json::Value),
1528}
1529
1530#[derive(Debug, Clone, Serialize, Deserialize)]
1532#[serde(untagged)]
1533pub enum GetUsersByRoleIdError {
1534 UnknownValue(serde_json::Value),
1535}
1536
1537#[derive(Debug, Clone, Serialize, Deserialize)]
1539#[serde(untagged)]
1540pub enum GetWaterfallV4Error {
1541 UnknownValue(serde_json::Value),
1542}
1543
1544#[derive(Debug, Clone, Serialize, Deserialize)]
1546#[serde(untagged)]
1547pub enum InspectMetricsError {
1548 UnknownValue(serde_json::Value),
1549}
1550
1551#[derive(Debug, Clone, Serialize, Deserialize)]
1553#[serde(untagged)]
1554pub enum InstallIntegrationError {
1555 UnknownValue(serde_json::Value),
1556}
1557
1558#[derive(Debug, Clone, Serialize, Deserialize)]
1560#[serde(untagged)]
1561pub enum ListAccountServicesMetadataError {
1562 UnknownValue(serde_json::Value),
1563}
1564
1565#[derive(Debug, Clone, Serialize, Deserialize)]
1567#[serde(untagged)]
1568pub enum ListAccountsError {
1569 UnknownValue(serde_json::Value),
1570}
1571
1572#[derive(Debug, Clone, Serialize, Deserialize)]
1574#[serde(untagged)]
1575pub enum ListAuthDomainsError {
1576 UnknownValue(serde_json::Value),
1577}
1578
1579#[derive(Debug, Clone, Serialize, Deserialize)]
1581#[serde(untagged)]
1582pub enum ListChannelsError {
1583 UnknownValue(serde_json::Value),
1584}
1585
1586#[derive(Debug, Clone, Serialize, Deserialize)]
1588#[serde(untagged)]
1589pub enum ListDashboardViewsError {
1590 UnknownValue(serde_json::Value),
1591}
1592
1593#[derive(Debug, Clone, Serialize, Deserialize)]
1595#[serde(untagged)]
1596pub enum ListDashboardsForUserV2Error {
1597 UnknownValue(serde_json::Value),
1598}
1599
1600#[derive(Debug, Clone, Serialize, Deserialize)]
1602#[serde(untagged)]
1603pub enum ListDashboardsV2Error {
1604 UnknownValue(serde_json::Value),
1605}
1606
1607#[derive(Debug, Clone, Serialize, Deserialize)]
1609#[serde(untagged)]
1610pub enum ListDowntimeSchedulesError {
1611 UnknownValue(serde_json::Value),
1612}
1613
1614#[derive(Debug, Clone, Serialize, Deserialize)]
1616#[serde(untagged)]
1617pub enum ListIntegrationsError {
1618 UnknownValue(serde_json::Value),
1619}
1620
1621#[derive(Debug, Clone, Serialize, Deserialize)]
1623#[serde(untagged)]
1624pub enum ListLlmAnnotationsError {
1625 UnknownValue(serde_json::Value),
1626}
1627
1628#[derive(Debug, Clone, Serialize, Deserialize)]
1630#[serde(untagged)]
1631pub enum ListLlmObservationsError {
1632 UnknownValue(serde_json::Value),
1633}
1634
1635#[derive(Debug, Clone, Serialize, Deserialize)]
1637#[serde(untagged)]
1638pub enum ListLlmPricingRulesError {
1639 UnknownValue(serde_json::Value),
1640}
1641
1642#[derive(Debug, Clone, Serialize, Deserialize)]
1644#[serde(untagged)]
1645pub enum ListLlmScoresError {
1646 UnknownValue(serde_json::Value),
1647}
1648
1649#[derive(Debug, Clone, Serialize, Deserialize)]
1651#[serde(untagged)]
1652pub enum ListLlmSessionsError {
1653 UnknownValue(serde_json::Value),
1654}
1655
1656#[derive(Debug, Clone, Serialize, Deserialize)]
1658#[serde(untagged)]
1659pub enum ListLlmTracesError {
1660 UnknownValue(serde_json::Value),
1661}
1662
1663#[derive(Debug, Clone, Serialize, Deserialize)]
1665#[serde(untagged)]
1666pub enum ListLlmUsersError {
1667 UnknownValue(serde_json::Value),
1668}
1669
1670#[derive(Debug, Clone, Serialize, Deserialize)]
1672#[serde(untagged)]
1673pub enum ListMetricReductionRulesError {
1674 UnknownValue(serde_json::Value),
1675}
1676
1677#[derive(Debug, Clone, Serialize, Deserialize)]
1679#[serde(untagged)]
1680pub enum ListMetricsError {
1681 UnknownValue(serde_json::Value),
1682}
1683
1684#[derive(Debug, Clone, Serialize, Deserialize)]
1686#[serde(untagged)]
1687pub enum ListOrgPreferencesError {
1688 UnknownValue(serde_json::Value),
1689}
1690
1691#[derive(Debug, Clone, Serialize, Deserialize)]
1693#[serde(untagged)]
1694pub enum ListRolesError {
1695 UnknownValue(serde_json::Value),
1696}
1697
1698#[derive(Debug, Clone, Serialize, Deserialize)]
1700#[serde(untagged)]
1701pub enum ListRulesError {
1702 UnknownValue(serde_json::Value),
1703}
1704
1705#[derive(Debug, Clone, Serialize, Deserialize)]
1707#[serde(untagged)]
1708pub enum ListServiceAccountKeysError {
1709 UnknownValue(serde_json::Value),
1710}
1711
1712#[derive(Debug, Clone, Serialize, Deserialize)]
1714#[serde(untagged)]
1715pub enum ListServiceAccountsError {
1716 UnknownValue(serde_json::Value),
1717}
1718
1719#[derive(Debug, Clone, Serialize, Deserialize)]
1721#[serde(untagged)]
1722pub enum ListServicesMetadataError {
1723 UnknownValue(serde_json::Value),
1724}
1725
1726#[derive(Debug, Clone, Serialize, Deserialize)]
1728#[serde(untagged)]
1729pub enum ListSpanMapperGroupsError {
1730 UnknownValue(serde_json::Value),
1731}
1732
1733#[derive(Debug, Clone, Serialize, Deserialize)]
1735#[serde(untagged)]
1736pub enum ListSpanMappersError {
1737 UnknownValue(serde_json::Value),
1738}
1739
1740#[derive(Debug, Clone, Serialize, Deserialize)]
1742#[serde(untagged)]
1743pub enum ListTraceFunnelsError {
1744 UnknownValue(serde_json::Value),
1745}
1746
1747#[derive(Debug, Clone, Serialize, Deserialize)]
1749#[serde(untagged)]
1750pub enum ListUserPreferencesError {
1751 UnknownValue(serde_json::Value),
1752}
1753
1754#[derive(Debug, Clone, Serialize, Deserialize)]
1756#[serde(untagged)]
1757pub enum ListUsersError {
1758 UnknownValue(serde_json::Value),
1759}
1760
1761#[derive(Debug, Clone, Serialize, Deserialize)]
1763#[serde(untagged)]
1764pub enum ListUsersDeprecatedError {
1765 UnknownValue(serde_json::Value),
1766}
1767
1768#[derive(Debug, Clone, Serialize, Deserialize)]
1770#[serde(untagged)]
1771pub enum LockDashboardV2Error {
1772 UnknownValue(serde_json::Value),
1773}
1774
1775#[derive(Debug, Clone, Serialize, Deserialize)]
1777#[serde(untagged)]
1778pub enum PatchDashboardV2Error {
1779 UnknownValue(serde_json::Value),
1780}
1781
1782#[derive(Debug, Clone, Serialize, Deserialize)]
1784#[serde(untagged)]
1785pub enum PatchO11yReviewsByIdError {
1786 UnknownValue(serde_json::Value),
1787}
1788
1789#[derive(Debug, Clone, Serialize, Deserialize)]
1791#[serde(untagged)]
1792pub enum PatchO11yReviewsByIdItemsByItemidError {
1793 UnknownValue(serde_json::Value),
1794}
1795
1796#[derive(Debug, Clone, Serialize, Deserialize)]
1798#[serde(untagged)]
1799pub enum PatchRuleByIdError {
1800 UnknownValue(serde_json::Value),
1801}
1802
1803#[derive(Debug, Clone, Serialize, Deserialize)]
1805#[serde(untagged)]
1806pub enum PinDashboardV2Error {
1807 UnknownValue(serde_json::Value),
1808}
1809
1810#[derive(Debug, Clone, Serialize, Deserialize)]
1812#[serde(untagged)]
1813pub enum PostO11yAlertsByReceiverError {
1814 UnknownValue(serde_json::Value),
1815}
1816
1817#[derive(Debug, Clone, Serialize, Deserialize)]
1819#[serde(untagged)]
1820pub enum PostO11yApiByProjectIdEnvelopeError {
1821 UnknownValue(serde_json::Value),
1822}
1823
1824#[derive(Debug, Clone, Serialize, Deserialize)]
1826#[serde(untagged)]
1827pub enum PostO11yApiByProjectIdStoreError {
1828 UnknownValue(serde_json::Value),
1829}
1830
1831#[derive(Debug, Clone, Serialize, Deserialize)]
1833#[serde(untagged)]
1834pub enum PostO11yAutoCompleteAttributeValuesError {
1835 UnknownValue(serde_json::Value),
1836}
1837
1838#[derive(Debug, Clone, Serialize, Deserialize)]
1840#[serde(untagged)]
1841pub enum PostO11yClustersListError {
1842 UnknownValue(serde_json::Value),
1843}
1844
1845#[derive(Debug, Clone, Serialize, Deserialize)]
1847#[serde(untagged)]
1848pub enum PostO11yCompleteSamlError {
1849 UnknownValue(serde_json::Value),
1850}
1851
1852#[derive(Debug, Clone, Serialize, Deserialize)]
1854#[serde(untagged)]
1855pub enum PostO11yCounterrorsError {
1856 UnknownValue(serde_json::Value),
1857}
1858
1859#[derive(Debug, Clone, Serialize, Deserialize)]
1861#[serde(untagged)]
1862pub enum PostO11yDaemonsetsListError {
1863 UnknownValue(serde_json::Value),
1864}
1865
1866#[derive(Debug, Clone, Serialize, Deserialize)]
1868#[serde(untagged)]
1869pub enum PostO11yDependencyGraphError {
1870 UnknownValue(serde_json::Value),
1871}
1872
1873#[derive(Debug, Clone, Serialize, Deserialize)]
1875#[serde(untagged)]
1876pub enum PostO11yDeploymentsListError {
1877 UnknownValue(serde_json::Value),
1878}
1879
1880#[derive(Debug, Clone, Serialize, Deserialize)]
1882#[serde(untagged)]
1883pub enum PostO11yErrortrackingIssuesByIdError {
1884 UnknownValue(serde_json::Value),
1885}
1886
1887#[derive(Debug, Clone, Serialize, Deserialize)]
1889#[serde(untagged)]
1890pub enum PostO11yEventError {
1891 UnknownValue(serde_json::Value),
1892}
1893
1894#[derive(Debug, Clone, Serialize, Deserialize)]
1896#[serde(untagged)]
1897pub enum PostO11yExplorerViewsError {
1898 UnknownValue(serde_json::Value),
1899}
1900
1901#[derive(Debug, Clone, Serialize, Deserialize)]
1903#[serde(untagged)]
1904pub enum PostO11yExportRawDataError {
1905 UnknownValue(serde_json::Value),
1906}
1907
1908#[derive(Debug, Clone, Serialize, Deserialize)]
1910#[serde(untagged)]
1911pub enum PostO11yHostsListError {
1912 UnknownValue(serde_json::Value),
1913}
1914
1915#[derive(Debug, Clone, Serialize, Deserialize)]
1917#[serde(untagged)]
1918pub enum PostO11yInfraMonitoringClustersError {
1919 UnknownValue(serde_json::Value),
1920}
1921
1922#[derive(Debug, Clone, Serialize, Deserialize)]
1924#[serde(untagged)]
1925pub enum PostO11yInfraMonitoringDaemonsetsError {
1926 UnknownValue(serde_json::Value),
1927}
1928
1929#[derive(Debug, Clone, Serialize, Deserialize)]
1931#[serde(untagged)]
1932pub enum PostO11yInfraMonitoringDeploymentsError {
1933 UnknownValue(serde_json::Value),
1934}
1935
1936#[derive(Debug, Clone, Serialize, Deserialize)]
1938#[serde(untagged)]
1939pub enum PostO11yInfraMonitoringHostsError {
1940 UnknownValue(serde_json::Value),
1941}
1942
1943#[derive(Debug, Clone, Serialize, Deserialize)]
1945#[serde(untagged)]
1946pub enum PostO11yInfraMonitoringJobsError {
1947 UnknownValue(serde_json::Value),
1948}
1949
1950#[derive(Debug, Clone, Serialize, Deserialize)]
1952#[serde(untagged)]
1953pub enum PostO11yInfraMonitoringNamespacesError {
1954 UnknownValue(serde_json::Value),
1955}
1956
1957#[derive(Debug, Clone, Serialize, Deserialize)]
1959#[serde(untagged)]
1960pub enum PostO11yInfraMonitoringNodesError {
1961 UnknownValue(serde_json::Value),
1962}
1963
1964#[derive(Debug, Clone, Serialize, Deserialize)]
1966#[serde(untagged)]
1967pub enum PostO11yInfraMonitoringPodsError {
1968 UnknownValue(serde_json::Value),
1969}
1970
1971#[derive(Debug, Clone, Serialize, Deserialize)]
1973#[serde(untagged)]
1974pub enum PostO11yInfraMonitoringPvcsError {
1975 UnknownValue(serde_json::Value),
1976}
1977
1978#[derive(Debug, Clone, Serialize, Deserialize)]
1980#[serde(untagged)]
1981pub enum PostO11yInfraMonitoringStatefulsetsError {
1982 UnknownValue(serde_json::Value),
1983}
1984
1985#[derive(Debug, Clone, Serialize, Deserialize)]
1987#[serde(untagged)]
1988pub enum PostO11yJobsListError {
1989 UnknownValue(serde_json::Value),
1990}
1991
1992#[derive(Debug, Clone, Serialize, Deserialize)]
1994#[serde(untagged)]
1995pub enum PostO11yListerrorsError {
1996 UnknownValue(serde_json::Value),
1997}
1998
1999#[derive(Debug, Clone, Serialize, Deserialize)]
2001#[serde(untagged)]
2002pub enum PostO11yLogsFieldsError {
2003 UnknownValue(serde_json::Value),
2004}
2005
2006#[derive(Debug, Clone, Serialize, Deserialize)]
2008#[serde(untagged)]
2009pub enum PostO11yLogsPipelinesError {
2010 UnknownValue(serde_json::Value),
2011}
2012
2013#[derive(Debug, Clone, Serialize, Deserialize)]
2015#[serde(untagged)]
2016pub enum PostO11yLogsPipelinesPreviewError {
2017 UnknownValue(serde_json::Value),
2018}
2019
2020#[derive(Debug, Clone, Serialize, Deserialize)]
2022#[serde(untagged)]
2023pub enum PostO11yLogsPromotePathsError {
2024 UnknownValue(serde_json::Value),
2025}
2026
2027#[derive(Debug, Clone, Serialize, Deserialize)]
2029#[serde(untagged)]
2030pub enum PostO11yMessagingQueuesKafkaConsumerLagConsumerDetailsError {
2031 UnknownValue(serde_json::Value),
2032}
2033
2034#[derive(Debug, Clone, Serialize, Deserialize)]
2036#[serde(untagged)]
2037pub enum PostO11yMessagingQueuesKafkaConsumerLagNetworkLatencyError {
2038 UnknownValue(serde_json::Value),
2039}
2040
2041#[derive(Debug, Clone, Serialize, Deserialize)]
2043#[serde(untagged)]
2044pub enum PostO11yMessagingQueuesKafkaConsumerLagProducerDetailsError {
2045 UnknownValue(serde_json::Value),
2046}
2047
2048#[derive(Debug, Clone, Serialize, Deserialize)]
2050#[serde(untagged)]
2051pub enum PostO11yMessagingQueuesKafkaOnboardingConsumersError {
2052 UnknownValue(serde_json::Value),
2053}
2054
2055#[derive(Debug, Clone, Serialize, Deserialize)]
2057#[serde(untagged)]
2058pub enum PostO11yMessagingQueuesKafkaOnboardingKafkaError {
2059 UnknownValue(serde_json::Value),
2060}
2061
2062#[derive(Debug, Clone, Serialize, Deserialize)]
2064#[serde(untagged)]
2065pub enum PostO11yMessagingQueuesKafkaOnboardingProducersError {
2066 UnknownValue(serde_json::Value),
2067}
2068
2069#[derive(Debug, Clone, Serialize, Deserialize)]
2071#[serde(untagged)]
2072pub enum PostO11yMessagingQueuesKafkaPartitionLatencyConsumerError {
2073 UnknownValue(serde_json::Value),
2074}
2075
2076#[derive(Debug, Clone, Serialize, Deserialize)]
2078#[serde(untagged)]
2079pub enum PostO11yMessagingQueuesKafkaPartitionLatencyOverviewError {
2080 UnknownValue(serde_json::Value),
2081}
2082
2083#[derive(Debug, Clone, Serialize, Deserialize)]
2085#[serde(untagged)]
2086pub enum PostO11yMessagingQueuesKafkaSpanEvaluationError {
2087 UnknownValue(serde_json::Value),
2088}
2089
2090#[derive(Debug, Clone, Serialize, Deserialize)]
2092#[serde(untagged)]
2093pub enum PostO11yMessagingQueuesKafkaTopicThroughputConsumerError {
2094 UnknownValue(serde_json::Value),
2095}
2096
2097#[derive(Debug, Clone, Serialize, Deserialize)]
2099#[serde(untagged)]
2100pub enum PostO11yMessagingQueuesKafkaTopicThroughputConsumerDetailsError {
2101 UnknownValue(serde_json::Value),
2102}
2103
2104#[derive(Debug, Clone, Serialize, Deserialize)]
2106#[serde(untagged)]
2107pub enum PostO11yMessagingQueuesKafkaTopicThroughputProducerError {
2108 UnknownValue(serde_json::Value),
2109}
2110
2111#[derive(Debug, Clone, Serialize, Deserialize)]
2113#[serde(untagged)]
2114pub enum PostO11yMessagingQueuesKafkaTopicThroughputProducerDetailsError {
2115 UnknownValue(serde_json::Value),
2116}
2117
2118#[derive(Debug, Clone, Serialize, Deserialize)]
2120#[serde(untagged)]
2121pub enum PostO11yMessagingQueuesQueueOverviewError {
2122 UnknownValue(serde_json::Value),
2123}
2124
2125#[derive(Debug, Clone, Serialize, Deserialize)]
2127#[serde(untagged)]
2128pub enum PostO11yNamespacesListError {
2129 UnknownValue(serde_json::Value),
2130}
2131
2132#[derive(Debug, Clone, Serialize, Deserialize)]
2134#[serde(untagged)]
2135pub enum PostO11yNodesListError {
2136 UnknownValue(serde_json::Value),
2137}
2138
2139#[derive(Debug, Clone, Serialize, Deserialize)]
2141#[serde(untagged)]
2142pub enum PostO11yPodsListError {
2143 UnknownValue(serde_json::Value),
2144}
2145
2146#[derive(Debug, Clone, Serialize, Deserialize)]
2148#[serde(untagged)]
2149pub enum PostO11yProcessesListError {
2150 UnknownValue(serde_json::Value),
2151}
2152
2153#[derive(Debug, Clone, Serialize, Deserialize)]
2155#[serde(untagged)]
2156pub enum PostO11yPvcsListError {
2157 UnknownValue(serde_json::Value),
2158}
2159
2160#[derive(Debug, Clone, Serialize, Deserialize)]
2162#[serde(untagged)]
2163pub enum PostO11yQueryFilterAnalyzeError {
2164 UnknownValue(serde_json::Value),
2165}
2166
2167#[derive(Debug, Clone, Serialize, Deserialize)]
2169#[serde(untagged)]
2170pub enum PostO11yQueryRangeError {
2171 UnknownValue(serde_json::Value),
2172}
2173
2174#[derive(Debug, Clone, Serialize, Deserialize)]
2176#[serde(untagged)]
2177pub enum PostO11yQueryRangeFormatError {
2178 UnknownValue(serde_json::Value),
2179}
2180
2181#[derive(Debug, Clone, Serialize, Deserialize)]
2183#[serde(untagged)]
2184pub enum PostO11yQueryRangePreviewError {
2185 UnknownValue(serde_json::Value),
2186}
2187
2188#[derive(Debug, Clone, Serialize, Deserialize)]
2190#[serde(untagged)]
2191pub enum PostO11yRegisterError {
2192 UnknownValue(serde_json::Value),
2193}
2194
2195#[derive(Debug, Clone, Serialize, Deserialize)]
2197#[serde(untagged)]
2198pub enum PostO11yReviewsError {
2199 UnknownValue(serde_json::Value),
2200}
2201
2202#[derive(Debug, Clone, Serialize, Deserialize)]
2204#[serde(untagged)]
2205pub enum PostO11yReviewsByIdItemsError {
2206 UnknownValue(serde_json::Value),
2207}
2208
2209#[derive(Debug, Clone, Serialize, Deserialize)]
2211#[serde(untagged)]
2212pub enum PostO11ySentinelDiscoverError {
2213 UnknownValue(serde_json::Value),
2214}
2215
2216#[derive(Debug, Clone, Serialize, Deserialize)]
2218#[serde(untagged)]
2219pub enum PostO11ySentinelProjectsError {
2220 UnknownValue(serde_json::Value),
2221}
2222
2223#[derive(Debug, Clone, Serialize, Deserialize)]
2225#[serde(untagged)]
2226pub enum PostO11ySentinelProjectsByIdKeysRotateError {
2227 UnknownValue(serde_json::Value),
2228}
2229
2230#[derive(Debug, Clone, Serialize, Deserialize)]
2232#[serde(untagged)]
2233pub enum PostO11yServiceEntryPointOperationsError {
2234 UnknownValue(serde_json::Value),
2235}
2236
2237#[derive(Debug, Clone, Serialize, Deserialize)]
2239#[serde(untagged)]
2240pub enum PostO11yServiceTopLevelOperationsError {
2241 UnknownValue(serde_json::Value),
2242}
2243
2244#[derive(Debug, Clone, Serialize, Deserialize)]
2246#[serde(untagged)]
2247pub enum PostO11yServiceTopOperationsError {
2248 UnknownValue(serde_json::Value),
2249}
2250
2251#[derive(Debug, Clone, Serialize, Deserialize)]
2253#[serde(untagged)]
2254pub enum PostO11yServicesError {
2255 UnknownValue(serde_json::Value),
2256}
2257
2258#[derive(Debug, Clone, Serialize, Deserialize)]
2260#[serde(untagged)]
2261pub enum PostO11ySettingsApdexError {
2262 UnknownValue(serde_json::Value),
2263}
2264
2265#[derive(Debug, Clone, Serialize, Deserialize)]
2267#[serde(untagged)]
2268pub enum PostO11ySettingsTtlError {
2269 UnknownValue(serde_json::Value),
2270}
2271
2272#[derive(Debug, Clone, Serialize, Deserialize)]
2274#[serde(untagged)]
2275pub enum PostO11ySpanPercentileError {
2276 UnknownValue(serde_json::Value),
2277}
2278
2279#[derive(Debug, Clone, Serialize, Deserialize)]
2281#[serde(untagged)]
2282pub enum PostO11yStatefulsetsListError {
2283 UnknownValue(serde_json::Value),
2284}
2285
2286#[derive(Debug, Clone, Serialize, Deserialize)]
2288#[serde(untagged)]
2289pub enum PostO11ySubstituteVarsError {
2290 UnknownValue(serde_json::Value),
2291}
2292
2293#[derive(Debug, Clone, Serialize, Deserialize)]
2295#[serde(untagged)]
2296pub enum PostO11yThirdPartyApisOverviewDomainError {
2297 UnknownValue(serde_json::Value),
2298}
2299
2300#[derive(Debug, Clone, Serialize, Deserialize)]
2302#[serde(untagged)]
2303pub enum PostO11yThirdPartyApisOverviewListError {
2304 UnknownValue(serde_json::Value),
2305}
2306
2307#[derive(Debug, Clone, Serialize, Deserialize)]
2309#[serde(untagged)]
2310pub enum PostO11yVariablesQueryError {
2311 UnknownValue(serde_json::Value),
2312}
2313
2314#[derive(Debug, Clone, Serialize, Deserialize)]
2316#[serde(untagged)]
2317pub enum PreviewMetricReductionRuleError {
2318 UnknownValue(serde_json::Value),
2319}
2320
2321#[derive(Debug, Clone, Serialize, Deserialize)]
2323#[serde(untagged)]
2324pub enum PutHostError {
2325 UnknownValue(serde_json::Value),
2326}
2327
2328#[derive(Debug, Clone, Serialize, Deserialize)]
2330#[serde(untagged)]
2331pub enum PutO11yExplorerViewsByViewidError {
2332 UnknownValue(serde_json::Value),
2333}
2334
2335#[derive(Debug, Clone, Serialize, Deserialize)]
2337#[serde(untagged)]
2338pub enum PutO11ySentinelIssuesByIdError {
2339 UnknownValue(serde_json::Value),
2340}
2341
2342#[derive(Debug, Clone, Serialize, Deserialize)]
2344#[serde(untagged)]
2345pub enum PutProfileError {
2346 UnknownValue(serde_json::Value),
2347}
2348
2349#[derive(Debug, Clone, Serialize, Deserialize)]
2351#[serde(untagged)]
2352pub enum RemoveUserRoleByUserIdAndRoleIdError {
2353 UnknownValue(serde_json::Value),
2354}
2355
2356#[derive(Debug, Clone, Serialize, Deserialize)]
2358#[serde(untagged)]
2359pub enum ResetPasswordError {
2360 UnknownValue(serde_json::Value),
2361}
2362
2363#[derive(Debug, Clone, Serialize, Deserialize)]
2365#[serde(untagged)]
2366pub enum RevokeServiceAccountKeyError {
2367 UnknownValue(serde_json::Value),
2368}
2369
2370#[derive(Debug, Clone, Serialize, Deserialize)]
2372#[serde(untagged)]
2373pub enum RotateSessionError {
2374 UnknownValue(serde_json::Value),
2375}
2376
2377#[derive(Debug, Clone, Serialize, Deserialize)]
2379#[serde(untagged)]
2380pub enum SearchIngestionKeysError {
2381 UnknownValue(serde_json::Value),
2382}
2383
2384#[derive(Debug, Clone, Serialize, Deserialize)]
2386#[serde(untagged)]
2387pub enum SearchTracesError {
2388 UnknownValue(serde_json::Value),
2389}
2390
2391#[derive(Debug, Clone, Serialize, Deserialize)]
2393#[serde(untagged)]
2394pub enum SetRoleByUserIdError {
2395 UnknownValue(serde_json::Value),
2396}
2397
2398#[derive(Debug, Clone, Serialize, Deserialize)]
2400#[serde(untagged)]
2401pub enum TestChannelError {
2402 UnknownValue(serde_json::Value),
2403}
2404
2405#[derive(Debug, Clone, Serialize, Deserialize)]
2407#[serde(untagged)]
2408pub enum TestChannelDeprecatedError {
2409 UnknownValue(serde_json::Value),
2410}
2411
2412#[derive(Debug, Clone, Serialize, Deserialize)]
2414#[serde(untagged)]
2415pub enum TestRuleError {
2416 UnknownValue(serde_json::Value),
2417}
2418
2419#[derive(Debug, Clone, Serialize, Deserialize)]
2421#[serde(untagged)]
2422pub enum TestRuleNotificationError {
2423 UnknownValue(serde_json::Value),
2424}
2425
2426#[derive(Debug, Clone, Serialize, Deserialize)]
2428#[serde(untagged)]
2429pub enum UninstallIntegrationError {
2430 UnknownValue(serde_json::Value),
2431}
2432
2433#[derive(Debug, Clone, Serialize, Deserialize)]
2435#[serde(untagged)]
2436pub enum UnlockDashboardV2Error {
2437 UnknownValue(serde_json::Value),
2438}
2439
2440#[derive(Debug, Clone, Serialize, Deserialize)]
2442#[serde(untagged)]
2443pub enum UnpinDashboardV2Error {
2444 UnknownValue(serde_json::Value),
2445}
2446
2447#[derive(Debug, Clone, Serialize, Deserialize)]
2449#[serde(untagged)]
2450pub enum UpdateAccountError {
2451 UnknownValue(serde_json::Value),
2452}
2453
2454#[derive(Debug, Clone, Serialize, Deserialize)]
2456#[serde(untagged)]
2457pub enum UpdateAuthDomainError {
2458 UnknownValue(serde_json::Value),
2459}
2460
2461#[derive(Debug, Clone, Serialize, Deserialize)]
2463#[serde(untagged)]
2464pub enum UpdateChannelByIdError {
2465 UnknownValue(serde_json::Value),
2466}
2467
2468#[derive(Debug, Clone, Serialize, Deserialize)]
2470#[serde(untagged)]
2471pub enum UpdateDashboardV2Error {
2472 UnknownValue(serde_json::Value),
2473}
2474
2475#[derive(Debug, Clone, Serialize, Deserialize)]
2477#[serde(untagged)]
2478pub enum UpdateDashboardViewError {
2479 UnknownValue(serde_json::Value),
2480}
2481
2482#[derive(Debug, Clone, Serialize, Deserialize)]
2484#[serde(untagged)]
2485pub enum UpdateDowntimeScheduleByIdError {
2486 UnknownValue(serde_json::Value),
2487}
2488
2489#[derive(Debug, Clone, Serialize, Deserialize)]
2491#[serde(untagged)]
2492pub enum UpdateIngestionKeyError {
2493 UnknownValue(serde_json::Value),
2494}
2495
2496#[derive(Debug, Clone, Serialize, Deserialize)]
2498#[serde(untagged)]
2499pub enum UpdateIngestionKeyLimitError {
2500 UnknownValue(serde_json::Value),
2501}
2502
2503#[derive(Debug, Clone, Serialize, Deserialize)]
2505#[serde(untagged)]
2506pub enum UpdateMetricMetadataError {
2507 UnknownValue(serde_json::Value),
2508}
2509
2510#[derive(Debug, Clone, Serialize, Deserialize)]
2512#[serde(untagged)]
2513pub enum UpdateMetricReductionRuleByIdError {
2514 UnknownValue(serde_json::Value),
2515}
2516
2517#[derive(Debug, Clone, Serialize, Deserialize)]
2519#[serde(untagged)]
2520pub enum UpdateMyOrganizationError {
2521 UnknownValue(serde_json::Value),
2522}
2523
2524#[derive(Debug, Clone, Serialize, Deserialize)]
2526#[serde(untagged)]
2527pub enum UpdateMyPasswordError {
2528 UnknownValue(serde_json::Value),
2529}
2530
2531#[derive(Debug, Clone, Serialize, Deserialize)]
2533#[serde(untagged)]
2534pub enum UpdateMyServiceAccountError {
2535 UnknownValue(serde_json::Value),
2536}
2537
2538#[derive(Debug, Clone, Serialize, Deserialize)]
2540#[serde(untagged)]
2541pub enum UpdateMyUserV2Error {
2542 UnknownValue(serde_json::Value),
2543}
2544
2545#[derive(Debug, Clone, Serialize, Deserialize)]
2547#[serde(untagged)]
2548pub enum UpdateOrgPreferenceError {
2549 UnknownValue(serde_json::Value),
2550}
2551
2552#[derive(Debug, Clone, Serialize, Deserialize)]
2554#[serde(untagged)]
2555pub enum UpdatePublicDashboardError {
2556 UnknownValue(serde_json::Value),
2557}
2558
2559#[derive(Debug, Clone, Serialize, Deserialize)]
2561#[serde(untagged)]
2562pub enum UpdateQuickFiltersError {
2563 UnknownValue(serde_json::Value),
2564}
2565
2566#[derive(Debug, Clone, Serialize, Deserialize)]
2568#[serde(untagged)]
2569pub enum UpdateRoleError {
2570 UnknownValue(serde_json::Value),
2571}
2572
2573#[derive(Debug, Clone, Serialize, Deserialize)]
2575#[serde(untagged)]
2576pub enum UpdateRoutePolicyError {
2577 UnknownValue(serde_json::Value),
2578}
2579
2580#[derive(Debug, Clone, Serialize, Deserialize)]
2582#[serde(untagged)]
2583pub enum UpdateRuleByIdError {
2584 UnknownValue(serde_json::Value),
2585}
2586
2587#[derive(Debug, Clone, Serialize, Deserialize)]
2589#[serde(untagged)]
2590pub enum UpdateServiceError {
2591 UnknownValue(serde_json::Value),
2592}
2593
2594#[derive(Debug, Clone, Serialize, Deserialize)]
2596#[serde(untagged)]
2597pub enum UpdateServiceAccountError {
2598 UnknownValue(serde_json::Value),
2599}
2600
2601#[derive(Debug, Clone, Serialize, Deserialize)]
2603#[serde(untagged)]
2604pub enum UpdateServiceAccountKeyError {
2605 UnknownValue(serde_json::Value),
2606}
2607
2608#[derive(Debug, Clone, Serialize, Deserialize)]
2610#[serde(untagged)]
2611pub enum UpdateSpanMapperError {
2612 UnknownValue(serde_json::Value),
2613}
2614
2615#[derive(Debug, Clone, Serialize, Deserialize)]
2617#[serde(untagged)]
2618pub enum UpdateSpanMapperGroupError {
2619 UnknownValue(serde_json::Value),
2620}
2621
2622#[derive(Debug, Clone, Serialize, Deserialize)]
2624#[serde(untagged)]
2625pub enum UpdateTraceFieldError {
2626 UnknownValue(serde_json::Value),
2627}
2628
2629#[derive(Debug, Clone, Serialize, Deserialize)]
2631#[serde(untagged)]
2632pub enum UpdateTraceFunnelError {
2633 UnknownValue(serde_json::Value),
2634}
2635
2636#[derive(Debug, Clone, Serialize, Deserialize)]
2638#[serde(untagged)]
2639pub enum UpdateTraceFunnelStepsError {
2640 UnknownValue(serde_json::Value),
2641}
2642
2643#[derive(Debug, Clone, Serialize, Deserialize)]
2645#[serde(untagged)]
2646pub enum UpdateUserError {
2647 UnknownValue(serde_json::Value),
2648}
2649
2650#[derive(Debug, Clone, Serialize, Deserialize)]
2652#[serde(untagged)]
2653pub enum UpdateUserDeprecatedError {
2654 UnknownValue(serde_json::Value),
2655}
2656
2657#[derive(Debug, Clone, Serialize, Deserialize)]
2659#[serde(untagged)]
2660pub enum UpdateUserPreferenceError {
2661 UnknownValue(serde_json::Value),
2662}
2663
2664#[derive(Debug, Clone, Serialize, Deserialize)]
2666#[serde(untagged)]
2667pub enum ValidateDraftFunnelTracesError {
2668 UnknownValue(serde_json::Value),
2669}
2670
2671#[derive(Debug, Clone, Serialize, Deserialize)]
2673#[serde(untagged)]
2674pub enum ValidateTraceFunnelTracesError {
2675 UnknownValue(serde_json::Value),
2676}
2677
2678#[derive(Debug, Clone, Serialize, Deserialize)]
2680#[serde(untagged)]
2681pub enum VerifyResetPasswordTokenError {
2682 UnknownValue(serde_json::Value),
2683}
2684
2685
2686pub async fn agent_check_in(configuration: &configuration::Configuration, cloud_provider: &str, o11y_period_o11y_agent_check_in_in: models::O11yPeriodO11yAgentCheckInIn) -> Result<models::O11yPeriodO11yAgentCheckInOut, Error<AgentCheckInError>> {
2688 let p_cloud_provider = cloud_provider;
2690 let p_o11y_period_o11y_agent_check_in_in = o11y_period_o11y_agent_check_in_in;
2691
2692 let uri_str = format!("{}/v1/o11y/cloud_integrations/{cloud_provider}/accounts/check_in", configuration.base_path, cloud_provider=crate::apis::urlencode(p_cloud_provider));
2693 let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
2694
2695 if let Some(ref user_agent) = configuration.user_agent {
2696 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
2697 }
2698 if let Some(ref token) = configuration.bearer_access_token {
2699 req_builder = req_builder.bearer_auth(token.to_owned());
2700 };
2701 req_builder = req_builder.json(&p_o11y_period_o11y_agent_check_in_in);
2702
2703 let req = req_builder.build()?;
2704 let resp = configuration.client.execute(req).await?;
2705
2706 let status = resp.status();
2707 let content_type = resp
2708 .headers()
2709 .get("content-type")
2710 .and_then(|v| v.to_str().ok())
2711 .unwrap_or("application/octet-stream");
2712 let content_type = super::ContentType::from(content_type);
2713
2714 if !status.is_client_error() && !status.is_server_error() {
2715 let content = resp.text().await?;
2716 match content_type {
2717 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
2718 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yAgentCheckInOut`"))),
2719 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::O11yPeriodO11yAgentCheckInOut`")))),
2720 }
2721 } else {
2722 let content = resp.text().await?;
2723 let entity: Option<AgentCheckInError> = serde_json::from_str(&content).ok();
2724 Err(Error::ResponseError(ResponseContent { status, content, entity }))
2725 }
2726}
2727
2728pub async fn agent_check_in_deprecated(configuration: &configuration::Configuration, cloud_provider: &str, o11y_period_o11y_agent_check_in_in: models::O11yPeriodO11yAgentCheckInIn) -> Result<models::O11yPeriodO11yAgentCheckInOut, Error<AgentCheckInDeprecatedError>> {
2730 let p_cloud_provider = cloud_provider;
2732 let p_o11y_period_o11y_agent_check_in_in = o11y_period_o11y_agent_check_in_in;
2733
2734 let uri_str = format!("{}/v1/o11y/cloud-integrations/{cloud_provider}/agent-check-in", configuration.base_path, cloud_provider=crate::apis::urlencode(p_cloud_provider));
2735 let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
2736
2737 if let Some(ref user_agent) = configuration.user_agent {
2738 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
2739 }
2740 if let Some(ref token) = configuration.bearer_access_token {
2741 req_builder = req_builder.bearer_auth(token.to_owned());
2742 };
2743 req_builder = req_builder.json(&p_o11y_period_o11y_agent_check_in_in);
2744
2745 let req = req_builder.build()?;
2746 let resp = configuration.client.execute(req).await?;
2747
2748 let status = resp.status();
2749 let content_type = resp
2750 .headers()
2751 .get("content-type")
2752 .and_then(|v| v.to_str().ok())
2753 .unwrap_or("application/octet-stream");
2754 let content_type = super::ContentType::from(content_type);
2755
2756 if !status.is_client_error() && !status.is_server_error() {
2757 let content = resp.text().await?;
2758 match content_type {
2759 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
2760 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yAgentCheckInOut`"))),
2761 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::O11yPeriodO11yAgentCheckInOut`")))),
2762 }
2763 } else {
2764 let content = resp.text().await?;
2765 let entity: Option<AgentCheckInDeprecatedError> = serde_json::from_str(&content).ok();
2766 Err(Error::ResponseError(ResponseContent { status, content, entity }))
2767 }
2768}
2769
2770pub async fn authz_check(configuration: &configuration::Configuration, o11y_period_o11y_transaction: Vec<models::O11yPeriodO11yTransaction>) -> Result<models::O11yPeriodO11yCheckOut, Error<AuthzCheckError>> {
2772 let p_o11y_period_o11y_transaction = o11y_period_o11y_transaction;
2774
2775 let uri_str = format!("{}/v1/o11y/authz/check", configuration.base_path);
2776 let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
2777
2778 if let Some(ref user_agent) = configuration.user_agent {
2779 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
2780 }
2781 if let Some(ref token) = configuration.bearer_access_token {
2782 req_builder = req_builder.bearer_auth(token.to_owned());
2783 };
2784 req_builder = req_builder.json(&p_o11y_period_o11y_transaction);
2785
2786 let req = req_builder.build()?;
2787 let resp = configuration.client.execute(req).await?;
2788
2789 let status = resp.status();
2790 let content_type = resp
2791 .headers()
2792 .get("content-type")
2793 .and_then(|v| v.to_str().ok())
2794 .unwrap_or("application/octet-stream");
2795 let content_type = super::ContentType::from(content_type);
2796
2797 if !status.is_client_error() && !status.is_server_error() {
2798 let content = resp.text().await?;
2799 match content_type {
2800 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
2801 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yCheckOut`"))),
2802 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::O11yPeriodO11yCheckOut`")))),
2803 }
2804 } else {
2805 let content = resp.text().await?;
2806 let entity: Option<AuthzCheckError> = serde_json::from_str(&content).ok();
2807 Err(Error::ResponseError(ResponseContent { status, content, entity }))
2808 }
2809}
2810
2811pub async fn clone_dashboard_v2(configuration: &configuration::Configuration, id: &str) -> Result<models::O11yPeriodO11yDashboardOut, Error<CloneDashboardV2Error>> {
2813 let p_id = id;
2815
2816 let uri_str = format!("{}/v1/o11y/dashboards/{id}/clone", configuration.base_path, id=crate::apis::urlencode(p_id));
2817 let mut req_builder = configuration.client.request(reqwest::Method::POST, &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 let content_type = resp
2831 .headers()
2832 .get("content-type")
2833 .and_then(|v| v.to_str().ok())
2834 .unwrap_or("application/octet-stream");
2835 let content_type = super::ContentType::from(content_type);
2836
2837 if !status.is_client_error() && !status.is_server_error() {
2838 let content = resp.text().await?;
2839 match content_type {
2840 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
2841 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yDashboardOut`"))),
2842 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::O11yPeriodO11yDashboardOut`")))),
2843 }
2844 } else {
2845 let content = resp.text().await?;
2846 let entity: Option<CloneDashboardV2Error> = serde_json::from_str(&content).ok();
2847 Err(Error::ResponseError(ResponseContent { status, content, entity }))
2848 }
2849}
2850
2851pub async fn create_account(configuration: &configuration::Configuration, cloud_provider: &str, o11y_period_o11y_create_account_in: models::O11yPeriodO11yCreateAccountIn) -> Result<models::O11yPeriodO11yCreateAccountOut, Error<CreateAccountError>> {
2853 let p_cloud_provider = cloud_provider;
2855 let p_o11y_period_o11y_create_account_in = o11y_period_o11y_create_account_in;
2856
2857 let uri_str = format!("{}/v1/o11y/cloud_integrations/{cloud_provider}/accounts", configuration.base_path, cloud_provider=crate::apis::urlencode(p_cloud_provider));
2858 let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
2859
2860 if let Some(ref user_agent) = configuration.user_agent {
2861 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
2862 }
2863 if let Some(ref token) = configuration.bearer_access_token {
2864 req_builder = req_builder.bearer_auth(token.to_owned());
2865 };
2866 req_builder = req_builder.json(&p_o11y_period_o11y_create_account_in);
2867
2868 let req = req_builder.build()?;
2869 let resp = configuration.client.execute(req).await?;
2870
2871 let status = resp.status();
2872 let content_type = resp
2873 .headers()
2874 .get("content-type")
2875 .and_then(|v| v.to_str().ok())
2876 .unwrap_or("application/octet-stream");
2877 let content_type = super::ContentType::from(content_type);
2878
2879 if !status.is_client_error() && !status.is_server_error() {
2880 let content = resp.text().await?;
2881 match content_type {
2882 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
2883 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yCreateAccountOut`"))),
2884 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::O11yPeriodO11yCreateAccountOut`")))),
2885 }
2886 } else {
2887 let content = resp.text().await?;
2888 let entity: Option<CreateAccountError> = serde_json::from_str(&content).ok();
2889 Err(Error::ResponseError(ResponseContent { status, content, entity }))
2890 }
2891}
2892
2893pub async fn create_auth_domain(configuration: &configuration::Configuration, o11y_period_o11y_postable_auth_domain: models::O11yPeriodO11yPostableAuthDomain) -> Result<models::O11yPeriodO11yCreatedOut, Error<CreateAuthDomainError>> {
2895 let p_o11y_period_o11y_postable_auth_domain = o11y_period_o11y_postable_auth_domain;
2897
2898 let uri_str = format!("{}/v1/o11y/domains", configuration.base_path);
2899 let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
2900
2901 if let Some(ref user_agent) = configuration.user_agent {
2902 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
2903 }
2904 if let Some(ref token) = configuration.bearer_access_token {
2905 req_builder = req_builder.bearer_auth(token.to_owned());
2906 };
2907 req_builder = req_builder.json(&p_o11y_period_o11y_postable_auth_domain);
2908
2909 let req = req_builder.build()?;
2910 let resp = configuration.client.execute(req).await?;
2911
2912 let status = resp.status();
2913 let content_type = resp
2914 .headers()
2915 .get("content-type")
2916 .and_then(|v| v.to_str().ok())
2917 .unwrap_or("application/octet-stream");
2918 let content_type = super::ContentType::from(content_type);
2919
2920 if !status.is_client_error() && !status.is_server_error() {
2921 let content = resp.text().await?;
2922 match content_type {
2923 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
2924 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yCreatedOut`"))),
2925 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::O11yPeriodO11yCreatedOut`")))),
2926 }
2927 } else {
2928 let content = resp.text().await?;
2929 let entity: Option<CreateAuthDomainError> = serde_json::from_str(&content).ok();
2930 Err(Error::ResponseError(ResponseContent { status, content, entity }))
2931 }
2932}
2933
2934pub async fn create_bulk_invite(configuration: &configuration::Configuration, o11y_period_o11y_bulk_invite_in: models::O11yPeriodO11yBulkInviteIn) -> Result<models::O11yPeriodO11yAck, Error<CreateBulkInviteError>> {
2936 let p_o11y_period_o11y_bulk_invite_in = o11y_period_o11y_bulk_invite_in;
2938
2939 let uri_str = format!("{}/v1/o11y/invite/bulk", configuration.base_path);
2940 let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
2941
2942 if let Some(ref user_agent) = configuration.user_agent {
2943 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
2944 }
2945 if let Some(ref token) = configuration.bearer_access_token {
2946 req_builder = req_builder.bearer_auth(token.to_owned());
2947 };
2948 req_builder = req_builder.json(&p_o11y_period_o11y_bulk_invite_in);
2949
2950 let req = req_builder.build()?;
2951 let resp = configuration.client.execute(req).await?;
2952
2953 let status = resp.status();
2954 let content_type = resp
2955 .headers()
2956 .get("content-type")
2957 .and_then(|v| v.to_str().ok())
2958 .unwrap_or("application/octet-stream");
2959 let content_type = super::ContentType::from(content_type);
2960
2961 if !status.is_client_error() && !status.is_server_error() {
2962 let content = resp.text().await?;
2963 match content_type {
2964 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
2965 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yAck`"))),
2966 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::O11yPeriodO11yAck`")))),
2967 }
2968 } else {
2969 let content = resp.text().await?;
2970 let entity: Option<CreateBulkInviteError> = serde_json::from_str(&content).ok();
2971 Err(Error::ResponseError(ResponseContent { status, content, entity }))
2972 }
2973}
2974
2975pub async fn create_channel(configuration: &configuration::Configuration, o11y_period_postable_channel: models::O11yPeriodPostableChannel) -> Result<models::O11yPeriodO11yChannelOut, Error<CreateChannelError>> {
2977 let p_o11y_period_postable_channel = o11y_period_postable_channel;
2979
2980 let uri_str = format!("{}/v1/o11y/channels", configuration.base_path);
2981 let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
2982
2983 if let Some(ref user_agent) = configuration.user_agent {
2984 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
2985 }
2986 if let Some(ref token) = configuration.bearer_access_token {
2987 req_builder = req_builder.bearer_auth(token.to_owned());
2988 };
2989 req_builder = req_builder.json(&p_o11y_period_postable_channel);
2990
2991 let req = req_builder.build()?;
2992 let resp = configuration.client.execute(req).await?;
2993
2994 let status = resp.status();
2995 let content_type = resp
2996 .headers()
2997 .get("content-type")
2998 .and_then(|v| v.to_str().ok())
2999 .unwrap_or("application/octet-stream");
3000 let content_type = super::ContentType::from(content_type);
3001
3002 if !status.is_client_error() && !status.is_server_error() {
3003 let content = resp.text().await?;
3004 match content_type {
3005 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
3006 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yChannelOut`"))),
3007 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::O11yPeriodO11yChannelOut`")))),
3008 }
3009 } else {
3010 let content = resp.text().await?;
3011 let entity: Option<CreateChannelError> = serde_json::from_str(&content).ok();
3012 Err(Error::ResponseError(ResponseContent { status, content, entity }))
3013 }
3014}
3015
3016pub async fn create_dashboard_v2(configuration: &configuration::Configuration, o11y_period_o11y_dashboard_postable: models::O11yPeriodO11yDashboardPostable) -> Result<models::O11yPeriodO11yDashboardOut, Error<CreateDashboardV2Error>> {
3018 let p_o11y_period_o11y_dashboard_postable = o11y_period_o11y_dashboard_postable;
3020
3021 let uri_str = format!("{}/v1/o11y/dashboards", configuration.base_path);
3022 let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
3023
3024 if let Some(ref user_agent) = configuration.user_agent {
3025 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
3026 }
3027 if let Some(ref token) = configuration.bearer_access_token {
3028 req_builder = req_builder.bearer_auth(token.to_owned());
3029 };
3030 req_builder = req_builder.json(&p_o11y_period_o11y_dashboard_postable);
3031
3032 let req = req_builder.build()?;
3033 let resp = configuration.client.execute(req).await?;
3034
3035 let status = resp.status();
3036 let content_type = resp
3037 .headers()
3038 .get("content-type")
3039 .and_then(|v| v.to_str().ok())
3040 .unwrap_or("application/octet-stream");
3041 let content_type = super::ContentType::from(content_type);
3042
3043 if !status.is_client_error() && !status.is_server_error() {
3044 let content = resp.text().await?;
3045 match content_type {
3046 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
3047 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yDashboardOut`"))),
3048 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::O11yPeriodO11yDashboardOut`")))),
3049 }
3050 } else {
3051 let content = resp.text().await?;
3052 let entity: Option<CreateDashboardV2Error> = serde_json::from_str(&content).ok();
3053 Err(Error::ResponseError(ResponseContent { status, content, entity }))
3054 }
3055}
3056
3057pub async fn create_dashboard_view(configuration: &configuration::Configuration, o11y_period_o11y_dashboard_view_postable: models::O11yPeriodO11yDashboardViewPostable) -> Result<models::O11yPeriodO11yDashboardViewOut, Error<CreateDashboardViewError>> {
3059 let p_o11y_period_o11y_dashboard_view_postable = o11y_period_o11y_dashboard_view_postable;
3061
3062 let uri_str = format!("{}/v1/o11y/dashboard_views", configuration.base_path);
3063 let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
3064
3065 if let Some(ref user_agent) = configuration.user_agent {
3066 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
3067 }
3068 if let Some(ref token) = configuration.bearer_access_token {
3069 req_builder = req_builder.bearer_auth(token.to_owned());
3070 };
3071 req_builder = req_builder.json(&p_o11y_period_o11y_dashboard_view_postable);
3072
3073 let req = req_builder.build()?;
3074 let resp = configuration.client.execute(req).await?;
3075
3076 let status = resp.status();
3077 let content_type = resp
3078 .headers()
3079 .get("content-type")
3080 .and_then(|v| v.to_str().ok())
3081 .unwrap_or("application/octet-stream");
3082 let content_type = super::ContentType::from(content_type);
3083
3084 if !status.is_client_error() && !status.is_server_error() {
3085 let content = resp.text().await?;
3086 match content_type {
3087 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
3088 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yDashboardViewOut`"))),
3089 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::O11yPeriodO11yDashboardViewOut`")))),
3090 }
3091 } else {
3092 let content = resp.text().await?;
3093 let entity: Option<CreateDashboardViewError> = serde_json::from_str(&content).ok();
3094 Err(Error::ResponseError(ResponseContent { status, content, entity }))
3095 }
3096}
3097
3098pub async fn create_downtime_schedule(configuration: &configuration::Configuration, o11y_period_postable_planned_maintenance: models::O11yPeriodPostablePlannedMaintenance) -> Result<models::O11yPeriodO11yDowntimeScheduleOut, Error<CreateDowntimeScheduleError>> {
3100 let p_o11y_period_postable_planned_maintenance = o11y_period_postable_planned_maintenance;
3102
3103 let uri_str = format!("{}/v1/o11y/downtime_schedules", configuration.base_path);
3104 let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
3105
3106 if let Some(ref user_agent) = configuration.user_agent {
3107 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
3108 }
3109 if let Some(ref token) = configuration.bearer_access_token {
3110 req_builder = req_builder.bearer_auth(token.to_owned());
3111 };
3112 req_builder = req_builder.json(&p_o11y_period_postable_planned_maintenance);
3113
3114 let req = req_builder.build()?;
3115 let resp = configuration.client.execute(req).await?;
3116
3117 let status = resp.status();
3118 let content_type = resp
3119 .headers()
3120 .get("content-type")
3121 .and_then(|v| v.to_str().ok())
3122 .unwrap_or("application/octet-stream");
3123 let content_type = super::ContentType::from(content_type);
3124
3125 if !status.is_client_error() && !status.is_server_error() {
3126 let content = resp.text().await?;
3127 match content_type {
3128 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
3129 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yDowntimeScheduleOut`"))),
3130 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::O11yPeriodO11yDowntimeScheduleOut`")))),
3131 }
3132 } else {
3133 let content = resp.text().await?;
3134 let entity: Option<CreateDowntimeScheduleError> = serde_json::from_str(&content).ok();
3135 Err(Error::ResponseError(ResponseContent { status, content, entity }))
3136 }
3137}
3138
3139pub async fn create_ingestion_key(configuration: &configuration::Configuration, o11y_period_postable_ingestion_key: models::O11yPeriodPostableIngestionKey) -> Result<models::O11yPeriodO11yCreatedIngestionKeyOut, Error<CreateIngestionKeyError>> {
3141 let p_o11y_period_postable_ingestion_key = o11y_period_postable_ingestion_key;
3143
3144 let uri_str = format!("{}/v1/o11y/gateway/ingestion_keys", configuration.base_path);
3145 let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
3146
3147 if let Some(ref user_agent) = configuration.user_agent {
3148 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
3149 }
3150 if let Some(ref token) = configuration.bearer_access_token {
3151 req_builder = req_builder.bearer_auth(token.to_owned());
3152 };
3153 req_builder = req_builder.json(&p_o11y_period_postable_ingestion_key);
3154
3155 let req = req_builder.build()?;
3156 let resp = configuration.client.execute(req).await?;
3157
3158 let status = resp.status();
3159 let content_type = resp
3160 .headers()
3161 .get("content-type")
3162 .and_then(|v| v.to_str().ok())
3163 .unwrap_or("application/octet-stream");
3164 let content_type = super::ContentType::from(content_type);
3165
3166 if !status.is_client_error() && !status.is_server_error() {
3167 let content = resp.text().await?;
3168 match content_type {
3169 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
3170 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yCreatedIngestionKeyOut`"))),
3171 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::O11yPeriodO11yCreatedIngestionKeyOut`")))),
3172 }
3173 } else {
3174 let content = resp.text().await?;
3175 let entity: Option<CreateIngestionKeyError> = serde_json::from_str(&content).ok();
3176 Err(Error::ResponseError(ResponseContent { status, content, entity }))
3177 }
3178}
3179
3180pub async fn create_ingestion_key_limit(configuration: &configuration::Configuration, key_id: &str, o11y_period_o11y_create_limit_in: models::O11yPeriodO11yCreateLimitIn) -> Result<models::O11yPeriodO11yCreatedLimitOut, Error<CreateIngestionKeyLimitError>> {
3182 let p_key_id = key_id;
3184 let p_o11y_period_o11y_create_limit_in = o11y_period_o11y_create_limit_in;
3185
3186 let uri_str = format!("{}/v1/o11y/gateway/ingestion_keys/{keyId}/limits", configuration.base_path, keyId=crate::apis::urlencode(p_key_id));
3187 let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
3188
3189 if let Some(ref user_agent) = configuration.user_agent {
3190 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
3191 }
3192 if let Some(ref token) = configuration.bearer_access_token {
3193 req_builder = req_builder.bearer_auth(token.to_owned());
3194 };
3195 req_builder = req_builder.json(&p_o11y_period_o11y_create_limit_in);
3196
3197 let req = req_builder.build()?;
3198 let resp = configuration.client.execute(req).await?;
3199
3200 let status = resp.status();
3201 let content_type = resp
3202 .headers()
3203 .get("content-type")
3204 .and_then(|v| v.to_str().ok())
3205 .unwrap_or("application/octet-stream");
3206 let content_type = super::ContentType::from(content_type);
3207
3208 if !status.is_client_error() && !status.is_server_error() {
3209 let content = resp.text().await?;
3210 match content_type {
3211 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
3212 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yCreatedLimitOut`"))),
3213 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::O11yPeriodO11yCreatedLimitOut`")))),
3214 }
3215 } else {
3216 let content = resp.text().await?;
3217 let entity: Option<CreateIngestionKeyLimitError> = serde_json::from_str(&content).ok();
3218 Err(Error::ResponseError(ResponseContent { status, content, entity }))
3219 }
3220}
3221
3222pub async fn create_invite(configuration: &configuration::Configuration, o11y_period_o11y_invite_in: models::O11yPeriodO11yInviteIn) -> Result<models::O11yPeriodO11yInviteOut, Error<CreateInviteError>> {
3224 let p_o11y_period_o11y_invite_in = o11y_period_o11y_invite_in;
3226
3227 let uri_str = format!("{}/v1/o11y/invite", configuration.base_path);
3228 let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
3229
3230 if let Some(ref user_agent) = configuration.user_agent {
3231 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
3232 }
3233 if let Some(ref token) = configuration.bearer_access_token {
3234 req_builder = req_builder.bearer_auth(token.to_owned());
3235 };
3236 req_builder = req_builder.json(&p_o11y_period_o11y_invite_in);
3237
3238 let req = req_builder.build()?;
3239 let resp = configuration.client.execute(req).await?;
3240
3241 let status = resp.status();
3242 let content_type = resp
3243 .headers()
3244 .get("content-type")
3245 .and_then(|v| v.to_str().ok())
3246 .unwrap_or("application/octet-stream");
3247 let content_type = super::ContentType::from(content_type);
3248
3249 if !status.is_client_error() && !status.is_server_error() {
3250 let content = resp.text().await?;
3251 match content_type {
3252 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
3253 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yInviteOut`"))),
3254 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::O11yPeriodO11yInviteOut`")))),
3255 }
3256 } else {
3257 let content = resp.text().await?;
3258 let entity: Option<CreateInviteError> = serde_json::from_str(&content).ok();
3259 Err(Error::ResponseError(ResponseContent { status, content, entity }))
3260 }
3261}
3262
3263pub async fn create_llm_annotation(configuration: &configuration::Configuration, o11y_period_o11y_llm_ingest_annotation: models::O11yPeriodO11yLlmIngestAnnotation) -> Result<models::O11yPeriodO11yLlmAnnotationOut, Error<CreateLlmAnnotationError>> {
3265 let p_o11y_period_o11y_llm_ingest_annotation = o11y_period_o11y_llm_ingest_annotation;
3267
3268 let uri_str = format!("{}/v1/o11y/llm/annotation", configuration.base_path);
3269 let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
3270
3271 if let Some(ref user_agent) = configuration.user_agent {
3272 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
3273 }
3274 if let Some(ref token) = configuration.bearer_access_token {
3275 req_builder = req_builder.bearer_auth(token.to_owned());
3276 };
3277 req_builder = req_builder.json(&p_o11y_period_o11y_llm_ingest_annotation);
3278
3279 let req = req_builder.build()?;
3280 let resp = configuration.client.execute(req).await?;
3281
3282 let status = resp.status();
3283 let content_type = resp
3284 .headers()
3285 .get("content-type")
3286 .and_then(|v| v.to_str().ok())
3287 .unwrap_or("application/octet-stream");
3288 let content_type = super::ContentType::from(content_type);
3289
3290 if !status.is_client_error() && !status.is_server_error() {
3291 let content = resp.text().await?;
3292 match content_type {
3293 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
3294 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yLlmAnnotationOut`"))),
3295 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::O11yPeriodO11yLlmAnnotationOut`")))),
3296 }
3297 } else {
3298 let content = resp.text().await?;
3299 let entity: Option<CreateLlmAnnotationError> = serde_json::from_str(&content).ok();
3300 Err(Error::ResponseError(ResponseContent { status, content, entity }))
3301 }
3302}
3303
3304pub async fn create_llm_score(configuration: &configuration::Configuration, o11y_period_o11y_llm_ingest_score: models::O11yPeriodO11yLlmIngestScore) -> Result<models::O11yPeriodO11yLlmScoreOut, Error<CreateLlmScoreError>> {
3306 let p_o11y_period_o11y_llm_ingest_score = o11y_period_o11y_llm_ingest_score;
3308
3309 let uri_str = format!("{}/v1/o11y/llm/scores", configuration.base_path);
3310 let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
3311
3312 if let Some(ref user_agent) = configuration.user_agent {
3313 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
3314 }
3315 if let Some(ref token) = configuration.bearer_access_token {
3316 req_builder = req_builder.bearer_auth(token.to_owned());
3317 };
3318 req_builder = req_builder.json(&p_o11y_period_o11y_llm_ingest_score);
3319
3320 let req = req_builder.build()?;
3321 let resp = configuration.client.execute(req).await?;
3322
3323 let status = resp.status();
3324 let content_type = resp
3325 .headers()
3326 .get("content-type")
3327 .and_then(|v| v.to_str().ok())
3328 .unwrap_or("application/octet-stream");
3329 let content_type = super::ContentType::from(content_type);
3330
3331 if !status.is_client_error() && !status.is_server_error() {
3332 let content = resp.text().await?;
3333 match content_type {
3334 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
3335 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yLlmScoreOut`"))),
3336 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::O11yPeriodO11yLlmScoreOut`")))),
3337 }
3338 } else {
3339 let content = resp.text().await?;
3340 let entity: Option<CreateLlmScoreError> = serde_json::from_str(&content).ok();
3341 Err(Error::ResponseError(ResponseContent { status, content, entity }))
3342 }
3343}
3344
3345pub async fn create_metric_reduction_rule(configuration: &configuration::Configuration, o11y_period_o11y_reduction_rule_create_in: models::O11yPeriodO11yReductionRuleCreateIn) -> Result<models::O11yPeriodO11yReductionRuleOut, Error<CreateMetricReductionRuleError>> {
3347 let p_o11y_period_o11y_reduction_rule_create_in = o11y_period_o11y_reduction_rule_create_in;
3349
3350 let uri_str = format!("{}/v1/o11y/metric_reduction_rules", configuration.base_path);
3351 let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
3352
3353 if let Some(ref user_agent) = configuration.user_agent {
3354 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
3355 }
3356 if let Some(ref token) = configuration.bearer_access_token {
3357 req_builder = req_builder.bearer_auth(token.to_owned());
3358 };
3359 req_builder = req_builder.json(&p_o11y_period_o11y_reduction_rule_create_in);
3360
3361 let req = req_builder.build()?;
3362 let resp = configuration.client.execute(req).await?;
3363
3364 let status = resp.status();
3365 let content_type = resp
3366 .headers()
3367 .get("content-type")
3368 .and_then(|v| v.to_str().ok())
3369 .unwrap_or("application/octet-stream");
3370 let content_type = super::ContentType::from(content_type);
3371
3372 if !status.is_client_error() && !status.is_server_error() {
3373 let content = resp.text().await?;
3374 match content_type {
3375 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
3376 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yReductionRuleOut`"))),
3377 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::O11yPeriodO11yReductionRuleOut`")))),
3378 }
3379 } else {
3380 let content = resp.text().await?;
3381 let entity: Option<CreateMetricReductionRuleError> = serde_json::from_str(&content).ok();
3382 Err(Error::ResponseError(ResponseContent { status, content, entity }))
3383 }
3384}
3385
3386pub async fn create_or_update_llm_pricing_rules(configuration: &configuration::Configuration, o11y_period_o11y_llm_updatable_pricing_rules: models::O11yPeriodO11yLlmUpdatablePricingRules) -> Result<(), Error<CreateOrUpdateLlmPricingRulesError>> {
3388 let p_o11y_period_o11y_llm_updatable_pricing_rules = o11y_period_o11y_llm_updatable_pricing_rules;
3390
3391 let uri_str = format!("{}/v1/o11y/llm_pricing_rules", configuration.base_path);
3392 let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str);
3393
3394 if let Some(ref user_agent) = configuration.user_agent {
3395 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
3396 }
3397 if let Some(ref token) = configuration.bearer_access_token {
3398 req_builder = req_builder.bearer_auth(token.to_owned());
3399 };
3400 req_builder = req_builder.json(&p_o11y_period_o11y_llm_updatable_pricing_rules);
3401
3402 let req = req_builder.build()?;
3403 let resp = configuration.client.execute(req).await?;
3404
3405 let status = resp.status();
3406
3407 if !status.is_client_error() && !status.is_server_error() {
3408 Ok(())
3409 } else {
3410 let content = resp.text().await?;
3411 let entity: Option<CreateOrUpdateLlmPricingRulesError> = serde_json::from_str(&content).ok();
3412 Err(Error::ResponseError(ResponseContent { status, content, entity }))
3413 }
3414}
3415
3416pub async fn create_public_dashboard(configuration: &configuration::Configuration, id: &str, o11y_period_o11y_public_dashboard_write_in: models::O11yPeriodO11yPublicDashboardWriteIn) -> Result<models::O11yPeriodO11yIdentifiableOut, Error<CreatePublicDashboardError>> {
3418 let p_id = id;
3420 let p_o11y_period_o11y_public_dashboard_write_in = o11y_period_o11y_public_dashboard_write_in;
3421
3422 let uri_str = format!("{}/v1/o11y/dashboards/{id}/public", configuration.base_path, id=crate::apis::urlencode(p_id));
3423 let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
3424
3425 if let Some(ref user_agent) = configuration.user_agent {
3426 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
3427 }
3428 if let Some(ref token) = configuration.bearer_access_token {
3429 req_builder = req_builder.bearer_auth(token.to_owned());
3430 };
3431 req_builder = req_builder.json(&p_o11y_period_o11y_public_dashboard_write_in);
3432
3433 let req = req_builder.build()?;
3434 let resp = configuration.client.execute(req).await?;
3435
3436 let status = resp.status();
3437 let content_type = resp
3438 .headers()
3439 .get("content-type")
3440 .and_then(|v| v.to_str().ok())
3441 .unwrap_or("application/octet-stream");
3442 let content_type = super::ContentType::from(content_type);
3443
3444 if !status.is_client_error() && !status.is_server_error() {
3445 let content = resp.text().await?;
3446 match content_type {
3447 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
3448 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yIdentifiableOut`"))),
3449 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::O11yPeriodO11yIdentifiableOut`")))),
3450 }
3451 } else {
3452 let content = resp.text().await?;
3453 let entity: Option<CreatePublicDashboardError> = serde_json::from_str(&content).ok();
3454 Err(Error::ResponseError(ResponseContent { status, content, entity }))
3455 }
3456}
3457
3458pub async fn create_reset_password_token(configuration: &configuration::Configuration, id: &str) -> Result<models::O11yPeriodO11yResetTokenOut, Error<CreateResetPasswordTokenError>> {
3460 let p_id = id;
3462
3463 let uri_str = format!("{}/v1/o11y/users/{id}/reset_password_tokens", configuration.base_path, id=crate::apis::urlencode(p_id));
3464 let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str);
3465
3466 if let Some(ref user_agent) = configuration.user_agent {
3467 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
3468 }
3469 if let Some(ref token) = configuration.bearer_access_token {
3470 req_builder = req_builder.bearer_auth(token.to_owned());
3471 };
3472
3473 let req = req_builder.build()?;
3474 let resp = configuration.client.execute(req).await?;
3475
3476 let status = resp.status();
3477 let content_type = resp
3478 .headers()
3479 .get("content-type")
3480 .and_then(|v| v.to_str().ok())
3481 .unwrap_or("application/octet-stream");
3482 let content_type = super::ContentType::from(content_type);
3483
3484 if !status.is_client_error() && !status.is_server_error() {
3485 let content = resp.text().await?;
3486 match content_type {
3487 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
3488 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yResetTokenOut`"))),
3489 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::O11yPeriodO11yResetTokenOut`")))),
3490 }
3491 } else {
3492 let content = resp.text().await?;
3493 let entity: Option<CreateResetPasswordTokenError> = serde_json::from_str(&content).ok();
3494 Err(Error::ResponseError(ResponseContent { status, content, entity }))
3495 }
3496}
3497
3498pub async fn create_role(configuration: &configuration::Configuration, o11y_period_o11y_role_create_in: models::O11yPeriodO11yRoleCreateIn) -> Result<models::O11yPeriodO11yRoleCreateOut, Error<CreateRoleError>> {
3500 let p_o11y_period_o11y_role_create_in = o11y_period_o11y_role_create_in;
3502
3503 let uri_str = format!("{}/v1/o11y/roles", configuration.base_path);
3504 let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
3505
3506 if let Some(ref user_agent) = configuration.user_agent {
3507 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
3508 }
3509 if let Some(ref token) = configuration.bearer_access_token {
3510 req_builder = req_builder.bearer_auth(token.to_owned());
3511 };
3512 req_builder = req_builder.json(&p_o11y_period_o11y_role_create_in);
3513
3514 let req = req_builder.build()?;
3515 let resp = configuration.client.execute(req).await?;
3516
3517 let status = resp.status();
3518 let content_type = resp
3519 .headers()
3520 .get("content-type")
3521 .and_then(|v| v.to_str().ok())
3522 .unwrap_or("application/octet-stream");
3523 let content_type = super::ContentType::from(content_type);
3524
3525 if !status.is_client_error() && !status.is_server_error() {
3526 let content = resp.text().await?;
3527 match content_type {
3528 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
3529 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yRoleCreateOut`"))),
3530 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::O11yPeriodO11yRoleCreateOut`")))),
3531 }
3532 } else {
3533 let content = resp.text().await?;
3534 let entity: Option<CreateRoleError> = serde_json::from_str(&content).ok();
3535 Err(Error::ResponseError(ResponseContent { status, content, entity }))
3536 }
3537}
3538
3539pub async fn create_route_policy(configuration: &configuration::Configuration, o11y_period_postable_route_policy: models::O11yPeriodPostableRoutePolicy) -> Result<models::O11yPeriodO11yRoutePolicyOut, Error<CreateRoutePolicyError>> {
3541 let p_o11y_period_postable_route_policy = o11y_period_postable_route_policy;
3543
3544 let uri_str = format!("{}/v1/o11y/route_policies", configuration.base_path);
3545 let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
3546
3547 if let Some(ref user_agent) = configuration.user_agent {
3548 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
3549 }
3550 if let Some(ref token) = configuration.bearer_access_token {
3551 req_builder = req_builder.bearer_auth(token.to_owned());
3552 };
3553 req_builder = req_builder.json(&p_o11y_period_postable_route_policy);
3554
3555 let req = req_builder.build()?;
3556 let resp = configuration.client.execute(req).await?;
3557
3558 let status = resp.status();
3559 let content_type = resp
3560 .headers()
3561 .get("content-type")
3562 .and_then(|v| v.to_str().ok())
3563 .unwrap_or("application/octet-stream");
3564 let content_type = super::ContentType::from(content_type);
3565
3566 if !status.is_client_error() && !status.is_server_error() {
3567 let content = resp.text().await?;
3568 match content_type {
3569 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
3570 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yRoutePolicyOut`"))),
3571 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::O11yPeriodO11yRoutePolicyOut`")))),
3572 }
3573 } else {
3574 let content = resp.text().await?;
3575 let entity: Option<CreateRoutePolicyError> = serde_json::from_str(&content).ok();
3576 Err(Error::ResponseError(ResponseContent { status, content, entity }))
3577 }
3578}
3579
3580pub async fn create_rule(configuration: &configuration::Configuration, body: Option<serde_json::Value>) -> Result<models::O11yPeriodO11yRuleOut, Error<CreateRuleError>> {
3582 let p_body = body;
3584
3585 let uri_str = format!("{}/v1/o11y/rules", configuration.base_path);
3586 let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
3587
3588 if let Some(ref user_agent) = configuration.user_agent {
3589 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
3590 }
3591 if let Some(ref token) = configuration.bearer_access_token {
3592 req_builder = req_builder.bearer_auth(token.to_owned());
3593 };
3594 req_builder = req_builder.json(&p_body);
3595
3596 let req = req_builder.build()?;
3597 let resp = configuration.client.execute(req).await?;
3598
3599 let status = resp.status();
3600 let content_type = resp
3601 .headers()
3602 .get("content-type")
3603 .and_then(|v| v.to_str().ok())
3604 .unwrap_or("application/octet-stream");
3605 let content_type = super::ContentType::from(content_type);
3606
3607 if !status.is_client_error() && !status.is_server_error() {
3608 let content = resp.text().await?;
3609 match content_type {
3610 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
3611 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yRuleOut`"))),
3612 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::O11yPeriodO11yRuleOut`")))),
3613 }
3614 } else {
3615 let content = resp.text().await?;
3616 let entity: Option<CreateRuleError> = serde_json::from_str(&content).ok();
3617 Err(Error::ResponseError(ResponseContent { status, content, entity }))
3618 }
3619}
3620
3621pub async fn create_service_account(configuration: &configuration::Configuration, o11y_period_o11y_service_account_create_in: models::O11yPeriodO11yServiceAccountCreateIn) -> Result<models::O11yPeriodO11yServiceAccountCreateOut, Error<CreateServiceAccountError>> {
3623 let p_o11y_period_o11y_service_account_create_in = o11y_period_o11y_service_account_create_in;
3625
3626 let uri_str = format!("{}/v1/o11y/service_accounts", configuration.base_path);
3627 let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
3628
3629 if let Some(ref user_agent) = configuration.user_agent {
3630 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
3631 }
3632 if let Some(ref token) = configuration.bearer_access_token {
3633 req_builder = req_builder.bearer_auth(token.to_owned());
3634 };
3635 req_builder = req_builder.json(&p_o11y_period_o11y_service_account_create_in);
3636
3637 let req = req_builder.build()?;
3638 let resp = configuration.client.execute(req).await?;
3639
3640 let status = resp.status();
3641 let content_type = resp
3642 .headers()
3643 .get("content-type")
3644 .and_then(|v| v.to_str().ok())
3645 .unwrap_or("application/octet-stream");
3646 let content_type = super::ContentType::from(content_type);
3647
3648 if !status.is_client_error() && !status.is_server_error() {
3649 let content = resp.text().await?;
3650 match content_type {
3651 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
3652 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yServiceAccountCreateOut`"))),
3653 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::O11yPeriodO11yServiceAccountCreateOut`")))),
3654 }
3655 } else {
3656 let content = resp.text().await?;
3657 let entity: Option<CreateServiceAccountError> = serde_json::from_str(&content).ok();
3658 Err(Error::ResponseError(ResponseContent { status, content, entity }))
3659 }
3660}
3661
3662pub async fn create_service_account_key(configuration: &configuration::Configuration, id: &str, o11y_period_o11y_api_key_create_in: models::O11yPeriodO11yApiKeyCreateIn) -> Result<models::O11yPeriodO11yApiKeyCreateOut, Error<CreateServiceAccountKeyError>> {
3664 let p_id = id;
3666 let p_o11y_period_o11y_api_key_create_in = o11y_period_o11y_api_key_create_in;
3667
3668 let uri_str = format!("{}/v1/o11y/service_accounts/{id}/keys", configuration.base_path, id=crate::apis::urlencode(p_id));
3669 let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
3670
3671 if let Some(ref user_agent) = configuration.user_agent {
3672 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
3673 }
3674 if let Some(ref token) = configuration.bearer_access_token {
3675 req_builder = req_builder.bearer_auth(token.to_owned());
3676 };
3677 req_builder = req_builder.json(&p_o11y_period_o11y_api_key_create_in);
3678
3679 let req = req_builder.build()?;
3680 let resp = configuration.client.execute(req).await?;
3681
3682 let status = resp.status();
3683 let content_type = resp
3684 .headers()
3685 .get("content-type")
3686 .and_then(|v| v.to_str().ok())
3687 .unwrap_or("application/octet-stream");
3688 let content_type = super::ContentType::from(content_type);
3689
3690 if !status.is_client_error() && !status.is_server_error() {
3691 let content = resp.text().await?;
3692 match content_type {
3693 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
3694 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yApiKeyCreateOut`"))),
3695 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::O11yPeriodO11yApiKeyCreateOut`")))),
3696 }
3697 } else {
3698 let content = resp.text().await?;
3699 let entity: Option<CreateServiceAccountKeyError> = serde_json::from_str(&content).ok();
3700 Err(Error::ResponseError(ResponseContent { status, content, entity }))
3701 }
3702}
3703
3704pub async fn create_service_account_role(configuration: &configuration::Configuration, id: &str, o11y_period_o11y_service_account_role_grant_in: models::O11yPeriodO11yServiceAccountRoleGrantIn) -> Result<(), Error<CreateServiceAccountRoleError>> {
3706 let p_id = id;
3708 let p_o11y_period_o11y_service_account_role_grant_in = o11y_period_o11y_service_account_role_grant_in;
3709
3710 let uri_str = format!("{}/v1/o11y/service_accounts/{id}/roles", configuration.base_path, id=crate::apis::urlencode(p_id));
3711 let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
3712
3713 if let Some(ref user_agent) = configuration.user_agent {
3714 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
3715 }
3716 if let Some(ref token) = configuration.bearer_access_token {
3717 req_builder = req_builder.bearer_auth(token.to_owned());
3718 };
3719 req_builder = req_builder.json(&p_o11y_period_o11y_service_account_role_grant_in);
3720
3721 let req = req_builder.build()?;
3722 let resp = configuration.client.execute(req).await?;
3723
3724 let status = resp.status();
3725
3726 if !status.is_client_error() && !status.is_server_error() {
3727 Ok(())
3728 } else {
3729 let content = resp.text().await?;
3730 let entity: Option<CreateServiceAccountRoleError> = serde_json::from_str(&content).ok();
3731 Err(Error::ResponseError(ResponseContent { status, content, entity }))
3732 }
3733}
3734
3735pub async fn create_session_by_email_password(configuration: &configuration::Configuration, o11y_period_o11y_email_password_session_in: models::O11yPeriodO11yEmailPasswordSessionIn) -> Result<models::O11yPeriodO11yTokenOut, Error<CreateSessionByEmailPasswordError>> {
3737 let p_o11y_period_o11y_email_password_session_in = o11y_period_o11y_email_password_session_in;
3739
3740 let uri_str = format!("{}/v1/o11y/sessions/email_password", configuration.base_path);
3741 let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
3742
3743 if let Some(ref user_agent) = configuration.user_agent {
3744 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
3745 }
3746 if let Some(ref token) = configuration.bearer_access_token {
3747 req_builder = req_builder.bearer_auth(token.to_owned());
3748 };
3749 req_builder = req_builder.json(&p_o11y_period_o11y_email_password_session_in);
3750
3751 let req = req_builder.build()?;
3752 let resp = configuration.client.execute(req).await?;
3753
3754 let status = resp.status();
3755 let content_type = resp
3756 .headers()
3757 .get("content-type")
3758 .and_then(|v| v.to_str().ok())
3759 .unwrap_or("application/octet-stream");
3760 let content_type = super::ContentType::from(content_type);
3761
3762 if !status.is_client_error() && !status.is_server_error() {
3763 let content = resp.text().await?;
3764 match content_type {
3765 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
3766 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yTokenOut`"))),
3767 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::O11yPeriodO11yTokenOut`")))),
3768 }
3769 } else {
3770 let content = resp.text().await?;
3771 let entity: Option<CreateSessionByEmailPasswordError> = serde_json::from_str(&content).ok();
3772 Err(Error::ResponseError(ResponseContent { status, content, entity }))
3773 }
3774}
3775
3776pub async fn create_span_mapper(configuration: &configuration::Configuration, group_id: &str, o11y_period_o11y_span_mapper_create_in: models::O11yPeriodO11ySpanMapperCreateIn) -> Result<models::O11yPeriodO11ySpanMapperOut, Error<CreateSpanMapperError>> {
3778 let p_group_id = group_id;
3780 let p_o11y_period_o11y_span_mapper_create_in = o11y_period_o11y_span_mapper_create_in;
3781
3782 let uri_str = format!("{}/v1/o11y/span_mapper_groups/{groupId}/span_mappers", configuration.base_path, groupId=crate::apis::urlencode(p_group_id));
3783 let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
3784
3785 if let Some(ref user_agent) = configuration.user_agent {
3786 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
3787 }
3788 if let Some(ref token) = configuration.bearer_access_token {
3789 req_builder = req_builder.bearer_auth(token.to_owned());
3790 };
3791 req_builder = req_builder.json(&p_o11y_period_o11y_span_mapper_create_in);
3792
3793 let req = req_builder.build()?;
3794 let resp = configuration.client.execute(req).await?;
3795
3796 let status = resp.status();
3797 let content_type = resp
3798 .headers()
3799 .get("content-type")
3800 .and_then(|v| v.to_str().ok())
3801 .unwrap_or("application/octet-stream");
3802 let content_type = super::ContentType::from(content_type);
3803
3804 if !status.is_client_error() && !status.is_server_error() {
3805 let content = resp.text().await?;
3806 match content_type {
3807 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
3808 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11ySpanMapperOut`"))),
3809 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::O11yPeriodO11ySpanMapperOut`")))),
3810 }
3811 } else {
3812 let content = resp.text().await?;
3813 let entity: Option<CreateSpanMapperError> = serde_json::from_str(&content).ok();
3814 Err(Error::ResponseError(ResponseContent { status, content, entity }))
3815 }
3816}
3817
3818pub async fn create_span_mapper_group(configuration: &configuration::Configuration, o11y_period_postable_span_mapper_group: models::O11yPeriodPostableSpanMapperGroup) -> Result<models::O11yPeriodO11ySpanMapperGroupOut, Error<CreateSpanMapperGroupError>> {
3820 let p_o11y_period_postable_span_mapper_group = o11y_period_postable_span_mapper_group;
3822
3823 let uri_str = format!("{}/v1/o11y/span_mapper_groups", configuration.base_path);
3824 let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
3825
3826 if let Some(ref user_agent) = configuration.user_agent {
3827 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
3828 }
3829 if let Some(ref token) = configuration.bearer_access_token {
3830 req_builder = req_builder.bearer_auth(token.to_owned());
3831 };
3832 req_builder = req_builder.json(&p_o11y_period_postable_span_mapper_group);
3833
3834 let req = req_builder.build()?;
3835 let resp = configuration.client.execute(req).await?;
3836
3837 let status = resp.status();
3838 let content_type = resp
3839 .headers()
3840 .get("content-type")
3841 .and_then(|v| v.to_str().ok())
3842 .unwrap_or("application/octet-stream");
3843 let content_type = super::ContentType::from(content_type);
3844
3845 if !status.is_client_error() && !status.is_server_error() {
3846 let content = resp.text().await?;
3847 match content_type {
3848 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
3849 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11ySpanMapperGroupOut`"))),
3850 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::O11yPeriodO11ySpanMapperGroupOut`")))),
3851 }
3852 } else {
3853 let content = resp.text().await?;
3854 let entity: Option<CreateSpanMapperGroupError> = serde_json::from_str(&content).ok();
3855 Err(Error::ResponseError(ResponseContent { status, content, entity }))
3856 }
3857}
3858
3859pub async fn create_trace_funnel(configuration: &configuration::Configuration, o11y_period_o11y_funnel_create_in: models::O11yPeriodO11yFunnelCreateIn) -> Result<models::O11yPeriodO11yFunnelOut, Error<CreateTraceFunnelError>> {
3861 let p_o11y_period_o11y_funnel_create_in = o11y_period_o11y_funnel_create_in;
3863
3864 let uri_str = format!("{}/v1/o11y/trace-funnels/new", configuration.base_path);
3865 let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
3866
3867 if let Some(ref user_agent) = configuration.user_agent {
3868 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
3869 }
3870 if let Some(ref token) = configuration.bearer_access_token {
3871 req_builder = req_builder.bearer_auth(token.to_owned());
3872 };
3873 req_builder = req_builder.json(&p_o11y_period_o11y_funnel_create_in);
3874
3875 let req = req_builder.build()?;
3876 let resp = configuration.client.execute(req).await?;
3877
3878 let status = resp.status();
3879 let content_type = resp
3880 .headers()
3881 .get("content-type")
3882 .and_then(|v| v.to_str().ok())
3883 .unwrap_or("application/octet-stream");
3884 let content_type = super::ContentType::from(content_type);
3885
3886 if !status.is_client_error() && !status.is_server_error() {
3887 let content = resp.text().await?;
3888 match content_type {
3889 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
3890 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yFunnelOut`"))),
3891 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::O11yPeriodO11yFunnelOut`")))),
3892 }
3893 } else {
3894 let content = resp.text().await?;
3895 let entity: Option<CreateTraceFunnelError> = serde_json::from_str(&content).ok();
3896 Err(Error::ResponseError(ResponseContent { status, content, entity }))
3897 }
3898}
3899
3900pub async fn create_user(configuration: &configuration::Configuration, o11y_period_o11y_postable_user: models::O11yPeriodO11yPostableUser) -> Result<models::O11yPeriodO11yCreatedOut, Error<CreateUserError>> {
3902 let p_o11y_period_o11y_postable_user = o11y_period_o11y_postable_user;
3904
3905 let uri_str = format!("{}/v1/o11y/users", configuration.base_path);
3906 let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
3907
3908 if let Some(ref user_agent) = configuration.user_agent {
3909 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
3910 }
3911 if let Some(ref token) = configuration.bearer_access_token {
3912 req_builder = req_builder.bearer_auth(token.to_owned());
3913 };
3914 req_builder = req_builder.json(&p_o11y_period_o11y_postable_user);
3915
3916 let req = req_builder.build()?;
3917 let resp = configuration.client.execute(req).await?;
3918
3919 let status = resp.status();
3920 let content_type = resp
3921 .headers()
3922 .get("content-type")
3923 .and_then(|v| v.to_str().ok())
3924 .unwrap_or("application/octet-stream");
3925 let content_type = super::ContentType::from(content_type);
3926
3927 if !status.is_client_error() && !status.is_server_error() {
3928 let content = resp.text().await?;
3929 match content_type {
3930 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
3931 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yCreatedOut`"))),
3932 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::O11yPeriodO11yCreatedOut`")))),
3933 }
3934 } else {
3935 let content = resp.text().await?;
3936 let entity: Option<CreateUserError> = serde_json::from_str(&content).ok();
3937 Err(Error::ResponseError(ResponseContent { status, content, entity }))
3938 }
3939}
3940
3941pub async fn delete_auth_domain(configuration: &configuration::Configuration, id: &str) -> Result<(), Error<DeleteAuthDomainError>> {
3943 let p_id = id;
3945
3946 let uri_str = format!("{}/v1/o11y/domains/{id}", configuration.base_path, id=crate::apis::urlencode(p_id));
3947 let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str);
3948
3949 if let Some(ref user_agent) = configuration.user_agent {
3950 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
3951 }
3952 if let Some(ref token) = configuration.bearer_access_token {
3953 req_builder = req_builder.bearer_auth(token.to_owned());
3954 };
3955
3956 let req = req_builder.build()?;
3957 let resp = configuration.client.execute(req).await?;
3958
3959 let status = resp.status();
3960
3961 if !status.is_client_error() && !status.is_server_error() {
3962 Ok(())
3963 } else {
3964 let content = resp.text().await?;
3965 let entity: Option<DeleteAuthDomainError> = serde_json::from_str(&content).ok();
3966 Err(Error::ResponseError(ResponseContent { status, content, entity }))
3967 }
3968}
3969
3970pub async fn delete_channel_by_id(configuration: &configuration::Configuration, id: &str) -> Result<(), Error<DeleteChannelByIdError>> {
3972 let p_id = id;
3974
3975 let uri_str = format!("{}/v1/o11y/channels/{id}", configuration.base_path, id=crate::apis::urlencode(p_id));
3976 let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str);
3977
3978 if let Some(ref user_agent) = configuration.user_agent {
3979 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
3980 }
3981 if let Some(ref token) = configuration.bearer_access_token {
3982 req_builder = req_builder.bearer_auth(token.to_owned());
3983 };
3984
3985 let req = req_builder.build()?;
3986 let resp = configuration.client.execute(req).await?;
3987
3988 let status = resp.status();
3989
3990 if !status.is_client_error() && !status.is_server_error() {
3991 Ok(())
3992 } else {
3993 let content = resp.text().await?;
3994 let entity: Option<DeleteChannelByIdError> = serde_json::from_str(&content).ok();
3995 Err(Error::ResponseError(ResponseContent { status, content, entity }))
3996 }
3997}
3998
3999pub async fn delete_dashboard_v2(configuration: &configuration::Configuration, id: &str) -> Result<(), Error<DeleteDashboardV2Error>> {
4001 let p_id = id;
4003
4004 let uri_str = format!("{}/v1/o11y/dashboards/{id}", configuration.base_path, id=crate::apis::urlencode(p_id));
4005 let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str);
4006
4007 if let Some(ref user_agent) = configuration.user_agent {
4008 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
4009 }
4010 if let Some(ref token) = configuration.bearer_access_token {
4011 req_builder = req_builder.bearer_auth(token.to_owned());
4012 };
4013
4014 let req = req_builder.build()?;
4015 let resp = configuration.client.execute(req).await?;
4016
4017 let status = resp.status();
4018
4019 if !status.is_client_error() && !status.is_server_error() {
4020 Ok(())
4021 } else {
4022 let content = resp.text().await?;
4023 let entity: Option<DeleteDashboardV2Error> = serde_json::from_str(&content).ok();
4024 Err(Error::ResponseError(ResponseContent { status, content, entity }))
4025 }
4026}
4027
4028pub async fn delete_dashboard_view(configuration: &configuration::Configuration, id: &str) -> Result<(), Error<DeleteDashboardViewError>> {
4030 let p_id = id;
4032
4033 let uri_str = format!("{}/v1/o11y/dashboard_views/{id}", configuration.base_path, id=crate::apis::urlencode(p_id));
4034 let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str);
4035
4036 if let Some(ref user_agent) = configuration.user_agent {
4037 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
4038 }
4039 if let Some(ref token) = configuration.bearer_access_token {
4040 req_builder = req_builder.bearer_auth(token.to_owned());
4041 };
4042
4043 let req = req_builder.build()?;
4044 let resp = configuration.client.execute(req).await?;
4045
4046 let status = resp.status();
4047
4048 if !status.is_client_error() && !status.is_server_error() {
4049 Ok(())
4050 } else {
4051 let content = resp.text().await?;
4052 let entity: Option<DeleteDashboardViewError> = serde_json::from_str(&content).ok();
4053 Err(Error::ResponseError(ResponseContent { status, content, entity }))
4054 }
4055}
4056
4057pub async fn delete_downtime_schedule_by_id(configuration: &configuration::Configuration, id: &str) -> Result<(), Error<DeleteDowntimeScheduleByIdError>> {
4059 let p_id = id;
4061
4062 let uri_str = format!("{}/v1/o11y/downtime_schedules/{id}", configuration.base_path, id=crate::apis::urlencode(p_id));
4063 let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str);
4064
4065 if let Some(ref user_agent) = configuration.user_agent {
4066 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
4067 }
4068 if let Some(ref token) = configuration.bearer_access_token {
4069 req_builder = req_builder.bearer_auth(token.to_owned());
4070 };
4071
4072 let req = req_builder.build()?;
4073 let resp = configuration.client.execute(req).await?;
4074
4075 let status = resp.status();
4076
4077 if !status.is_client_error() && !status.is_server_error() {
4078 Ok(())
4079 } else {
4080 let content = resp.text().await?;
4081 let entity: Option<DeleteDowntimeScheduleByIdError> = serde_json::from_str(&content).ok();
4082 Err(Error::ResponseError(ResponseContent { status, content, entity }))
4083 }
4084}
4085
4086pub async fn delete_ingestion_key(configuration: &configuration::Configuration, key_id: &str) -> Result<(), Error<DeleteIngestionKeyError>> {
4088 let p_key_id = key_id;
4090
4091 let uri_str = format!("{}/v1/o11y/gateway/ingestion_keys/{keyId}", configuration.base_path, keyId=crate::apis::urlencode(p_key_id));
4092 let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str);
4093
4094 if let Some(ref user_agent) = configuration.user_agent {
4095 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
4096 }
4097 if let Some(ref token) = configuration.bearer_access_token {
4098 req_builder = req_builder.bearer_auth(token.to_owned());
4099 };
4100
4101 let req = req_builder.build()?;
4102 let resp = configuration.client.execute(req).await?;
4103
4104 let status = resp.status();
4105
4106 if !status.is_client_error() && !status.is_server_error() {
4107 Ok(())
4108 } else {
4109 let content = resp.text().await?;
4110 let entity: Option<DeleteIngestionKeyError> = serde_json::from_str(&content).ok();
4111 Err(Error::ResponseError(ResponseContent { status, content, entity }))
4112 }
4113}
4114
4115pub async fn delete_ingestion_key_limit(configuration: &configuration::Configuration, limit_id: &str) -> Result<(), Error<DeleteIngestionKeyLimitError>> {
4117 let p_limit_id = limit_id;
4119
4120 let uri_str = format!("{}/v1/o11y/gateway/ingestion_keys/limits/{limitId}", configuration.base_path, limitId=crate::apis::urlencode(p_limit_id));
4121 let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str);
4122
4123 if let Some(ref user_agent) = configuration.user_agent {
4124 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
4125 }
4126 if let Some(ref token) = configuration.bearer_access_token {
4127 req_builder = req_builder.bearer_auth(token.to_owned());
4128 };
4129
4130 let req = req_builder.build()?;
4131 let resp = configuration.client.execute(req).await?;
4132
4133 let status = resp.status();
4134
4135 if !status.is_client_error() && !status.is_server_error() {
4136 Ok(())
4137 } else {
4138 let content = resp.text().await?;
4139 let entity: Option<DeleteIngestionKeyLimitError> = serde_json::from_str(&content).ok();
4140 Err(Error::ResponseError(ResponseContent { status, content, entity }))
4141 }
4142}
4143
4144pub async fn delete_llm_pricing_rule(configuration: &configuration::Configuration, id: &str) -> Result<(), Error<DeleteLlmPricingRuleError>> {
4146 let p_id = id;
4148
4149 let uri_str = format!("{}/v1/o11y/llm_pricing_rules/{id}", configuration.base_path, id=crate::apis::urlencode(p_id));
4150 let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str);
4151
4152 if let Some(ref user_agent) = configuration.user_agent {
4153 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
4154 }
4155 if let Some(ref token) = configuration.bearer_access_token {
4156 req_builder = req_builder.bearer_auth(token.to_owned());
4157 };
4158
4159 let req = req_builder.build()?;
4160 let resp = configuration.client.execute(req).await?;
4161
4162 let status = resp.status();
4163
4164 if !status.is_client_error() && !status.is_server_error() {
4165 Ok(())
4166 } else {
4167 let content = resp.text().await?;
4168 let entity: Option<DeleteLlmPricingRuleError> = serde_json::from_str(&content).ok();
4169 Err(Error::ResponseError(ResponseContent { status, content, entity }))
4170 }
4171}
4172
4173pub async fn delete_llm_score(configuration: &configuration::Configuration, id: &str) -> Result<(), Error<DeleteLlmScoreError>> {
4175 let p_id = id;
4177
4178 let uri_str = format!("{}/v1/o11y/llm/score/{id}", configuration.base_path, id=crate::apis::urlencode(p_id));
4179 let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str);
4180
4181 if let Some(ref user_agent) = configuration.user_agent {
4182 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
4183 }
4184 if let Some(ref token) = configuration.bearer_access_token {
4185 req_builder = req_builder.bearer_auth(token.to_owned());
4186 };
4187
4188 let req = req_builder.build()?;
4189 let resp = configuration.client.execute(req).await?;
4190
4191 let status = resp.status();
4192
4193 if !status.is_client_error() && !status.is_server_error() {
4194 Ok(())
4195 } else {
4196 let content = resp.text().await?;
4197 let entity: Option<DeleteLlmScoreError> = serde_json::from_str(&content).ok();
4198 Err(Error::ResponseError(ResponseContent { status, content, entity }))
4199 }
4200}
4201
4202pub async fn delete_metric_reduction_rule_by_id(configuration: &configuration::Configuration, id: &str) -> Result<(), Error<DeleteMetricReductionRuleByIdError>> {
4204 let p_id = id;
4206
4207 let uri_str = format!("{}/v1/o11y/metric_reduction_rules/{id}", configuration.base_path, id=crate::apis::urlencode(p_id));
4208 let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str);
4209
4210 if let Some(ref user_agent) = configuration.user_agent {
4211 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
4212 }
4213 if let Some(ref token) = configuration.bearer_access_token {
4214 req_builder = req_builder.bearer_auth(token.to_owned());
4215 };
4216
4217 let req = req_builder.build()?;
4218 let resp = configuration.client.execute(req).await?;
4219
4220 let status = resp.status();
4221
4222 if !status.is_client_error() && !status.is_server_error() {
4223 Ok(())
4224 } else {
4225 let content = resp.text().await?;
4226 let entity: Option<DeleteMetricReductionRuleByIdError> = serde_json::from_str(&content).ok();
4227 Err(Error::ResponseError(ResponseContent { status, content, entity }))
4228 }
4229}
4230
4231pub async fn delete_o11y_explorer_views_by_viewid(configuration: &configuration::Configuration, view_id: &str) -> Result<models::O11yPeriodO11ySavedViewDeleteOut, Error<DeleteO11yExplorerViewsByViewidError>> {
4233 let p_view_id = view_id;
4235
4236 let uri_str = format!("{}/v1/o11y/explorer/views/{viewId}", configuration.base_path, viewId=crate::apis::urlencode(p_view_id));
4237 let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &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 let content_type = resp
4251 .headers()
4252 .get("content-type")
4253 .and_then(|v| v.to_str().ok())
4254 .unwrap_or("application/octet-stream");
4255 let content_type = super::ContentType::from(content_type);
4256
4257 if !status.is_client_error() && !status.is_server_error() {
4258 let content = resp.text().await?;
4259 match content_type {
4260 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
4261 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11ySavedViewDeleteOut`"))),
4262 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::O11yPeriodO11ySavedViewDeleteOut`")))),
4263 }
4264 } else {
4265 let content = resp.text().await?;
4266 let entity: Option<DeleteO11yExplorerViewsByViewidError> = serde_json::from_str(&content).ok();
4267 Err(Error::ResponseError(ResponseContent { status, content, entity }))
4268 }
4269}
4270
4271pub async fn delete_o11y_reviews_by_id(configuration: &configuration::Configuration, id: &str) -> Result<models::O11yPeriodAnnQueueDeleted, Error<DeleteO11yReviewsByIdError>> {
4273 let p_id = id;
4275
4276 let uri_str = format!("{}/v1/o11y/reviews/{id}", configuration.base_path, id=crate::apis::urlencode(p_id));
4277 let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str);
4278
4279 if let Some(ref user_agent) = configuration.user_agent {
4280 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
4281 }
4282 if let Some(ref token) = configuration.bearer_access_token {
4283 req_builder = req_builder.bearer_auth(token.to_owned());
4284 };
4285
4286 let req = req_builder.build()?;
4287 let resp = configuration.client.execute(req).await?;
4288
4289 let status = resp.status();
4290 let content_type = resp
4291 .headers()
4292 .get("content-type")
4293 .and_then(|v| v.to_str().ok())
4294 .unwrap_or("application/octet-stream");
4295 let content_type = super::ContentType::from(content_type);
4296
4297 if !status.is_client_error() && !status.is_server_error() {
4298 let content = resp.text().await?;
4299 match content_type {
4300 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
4301 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodAnnQueueDeleted`"))),
4302 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::O11yPeriodAnnQueueDeleted`")))),
4303 }
4304 } else {
4305 let content = resp.text().await?;
4306 let entity: Option<DeleteO11yReviewsByIdError> = serde_json::from_str(&content).ok();
4307 Err(Error::ResponseError(ResponseContent { status, content, entity }))
4308 }
4309}
4310
4311pub async fn delete_o11y_sentinel_projects_by_id(configuration: &configuration::Configuration, id: &str) -> Result<(), Error<DeleteO11ySentinelProjectsByIdError>> {
4313 let p_id = id;
4315
4316 let uri_str = format!("{}/v1/o11y/sentinel/projects/{id}", configuration.base_path, id=crate::apis::urlencode(p_id));
4317 let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str);
4318
4319 if let Some(ref user_agent) = configuration.user_agent {
4320 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
4321 }
4322 if let Some(ref token) = configuration.bearer_access_token {
4323 req_builder = req_builder.bearer_auth(token.to_owned());
4324 };
4325
4326 let req = req_builder.build()?;
4327 let resp = configuration.client.execute(req).await?;
4328
4329 let status = resp.status();
4330
4331 if !status.is_client_error() && !status.is_server_error() {
4332 Ok(())
4333 } else {
4334 let content = resp.text().await?;
4335 let entity: Option<DeleteO11ySentinelProjectsByIdError> = serde_json::from_str(&content).ok();
4336 Err(Error::ResponseError(ResponseContent { status, content, entity }))
4337 }
4338}
4339
4340pub async fn delete_public_dashboard(configuration: &configuration::Configuration, id: &str) -> Result<(), Error<DeletePublicDashboardError>> {
4342 let p_id = id;
4344
4345 let uri_str = format!("{}/v1/o11y/dashboards/{id}/public", configuration.base_path, id=crate::apis::urlencode(p_id));
4346 let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str);
4347
4348 if let Some(ref user_agent) = configuration.user_agent {
4349 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
4350 }
4351 if let Some(ref token) = configuration.bearer_access_token {
4352 req_builder = req_builder.bearer_auth(token.to_owned());
4353 };
4354
4355 let req = req_builder.build()?;
4356 let resp = configuration.client.execute(req).await?;
4357
4358 let status = resp.status();
4359
4360 if !status.is_client_error() && !status.is_server_error() {
4361 Ok(())
4362 } else {
4363 let content = resp.text().await?;
4364 let entity: Option<DeletePublicDashboardError> = serde_json::from_str(&content).ok();
4365 Err(Error::ResponseError(ResponseContent { status, content, entity }))
4366 }
4367}
4368
4369pub async fn delete_role(configuration: &configuration::Configuration, id: &str) -> Result<(), Error<DeleteRoleError>> {
4371 let p_id = id;
4373
4374 let uri_str = format!("{}/v1/o11y/roles/{id}", configuration.base_path, id=crate::apis::urlencode(p_id));
4375 let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str);
4376
4377 if let Some(ref user_agent) = configuration.user_agent {
4378 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
4379 }
4380 if let Some(ref token) = configuration.bearer_access_token {
4381 req_builder = req_builder.bearer_auth(token.to_owned());
4382 };
4383
4384 let req = req_builder.build()?;
4385 let resp = configuration.client.execute(req).await?;
4386
4387 let status = resp.status();
4388
4389 if !status.is_client_error() && !status.is_server_error() {
4390 Ok(())
4391 } else {
4392 let content = resp.text().await?;
4393 let entity: Option<DeleteRoleError> = serde_json::from_str(&content).ok();
4394 Err(Error::ResponseError(ResponseContent { status, content, entity }))
4395 }
4396}
4397
4398pub async fn delete_route_policy_by_id(configuration: &configuration::Configuration, id: &str) -> Result<(), Error<DeleteRoutePolicyByIdError>> {
4400 let p_id = id;
4402
4403 let uri_str = format!("{}/v1/o11y/route_policies/{id}", configuration.base_path, id=crate::apis::urlencode(p_id));
4404 let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str);
4405
4406 if let Some(ref user_agent) = configuration.user_agent {
4407 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
4408 }
4409 if let Some(ref token) = configuration.bearer_access_token {
4410 req_builder = req_builder.bearer_auth(token.to_owned());
4411 };
4412
4413 let req = req_builder.build()?;
4414 let resp = configuration.client.execute(req).await?;
4415
4416 let status = resp.status();
4417
4418 if !status.is_client_error() && !status.is_server_error() {
4419 Ok(())
4420 } else {
4421 let content = resp.text().await?;
4422 let entity: Option<DeleteRoutePolicyByIdError> = serde_json::from_str(&content).ok();
4423 Err(Error::ResponseError(ResponseContent { status, content, entity }))
4424 }
4425}
4426
4427pub async fn delete_rule_by_id(configuration: &configuration::Configuration, id: &str) -> Result<(), Error<DeleteRuleByIdError>> {
4429 let p_id = id;
4431
4432 let uri_str = format!("{}/v1/o11y/rules/{id}", configuration.base_path, id=crate::apis::urlencode(p_id));
4433 let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str);
4434
4435 if let Some(ref user_agent) = configuration.user_agent {
4436 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
4437 }
4438 if let Some(ref token) = configuration.bearer_access_token {
4439 req_builder = req_builder.bearer_auth(token.to_owned());
4440 };
4441
4442 let req = req_builder.build()?;
4443 let resp = configuration.client.execute(req).await?;
4444
4445 let status = resp.status();
4446
4447 if !status.is_client_error() && !status.is_server_error() {
4448 Ok(())
4449 } else {
4450 let content = resp.text().await?;
4451 let entity: Option<DeleteRuleByIdError> = serde_json::from_str(&content).ok();
4452 Err(Error::ResponseError(ResponseContent { status, content, entity }))
4453 }
4454}
4455
4456pub async fn delete_service_account(configuration: &configuration::Configuration, id: &str) -> Result<(), Error<DeleteServiceAccountError>> {
4458 let p_id = id;
4460
4461 let uri_str = format!("{}/v1/o11y/service_accounts/{id}", configuration.base_path, id=crate::apis::urlencode(p_id));
4462 let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str);
4463
4464 if let Some(ref user_agent) = configuration.user_agent {
4465 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
4466 }
4467 if let Some(ref token) = configuration.bearer_access_token {
4468 req_builder = req_builder.bearer_auth(token.to_owned());
4469 };
4470
4471 let req = req_builder.build()?;
4472 let resp = configuration.client.execute(req).await?;
4473
4474 let status = resp.status();
4475
4476 if !status.is_client_error() && !status.is_server_error() {
4477 Ok(())
4478 } else {
4479 let content = resp.text().await?;
4480 let entity: Option<DeleteServiceAccountError> = serde_json::from_str(&content).ok();
4481 Err(Error::ResponseError(ResponseContent { status, content, entity }))
4482 }
4483}
4484
4485pub async fn delete_service_account_role(configuration: &configuration::Configuration, id: &str, rid: &str) -> Result<(), Error<DeleteServiceAccountRoleError>> {
4487 let p_id = id;
4489 let p_rid = rid;
4490
4491 let uri_str = format!("{}/v1/o11y/service_accounts/{id}/roles/{rid}", configuration.base_path, id=crate::apis::urlencode(p_id), rid=crate::apis::urlencode(p_rid));
4492 let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str);
4493
4494 if let Some(ref user_agent) = configuration.user_agent {
4495 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
4496 }
4497 if let Some(ref token) = configuration.bearer_access_token {
4498 req_builder = req_builder.bearer_auth(token.to_owned());
4499 };
4500
4501 let req = req_builder.build()?;
4502 let resp = configuration.client.execute(req).await?;
4503
4504 let status = resp.status();
4505
4506 if !status.is_client_error() && !status.is_server_error() {
4507 Ok(())
4508 } else {
4509 let content = resp.text().await?;
4510 let entity: Option<DeleteServiceAccountRoleError> = serde_json::from_str(&content).ok();
4511 Err(Error::ResponseError(ResponseContent { status, content, entity }))
4512 }
4513}
4514
4515pub async fn delete_session(configuration: &configuration::Configuration, ) -> Result<(), Error<DeleteSessionError>> {
4517
4518 let uri_str = format!("{}/v1/o11y/sessions", configuration.base_path);
4519 let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str);
4520
4521 if let Some(ref user_agent) = configuration.user_agent {
4522 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
4523 }
4524 if let Some(ref token) = configuration.bearer_access_token {
4525 req_builder = req_builder.bearer_auth(token.to_owned());
4526 };
4527
4528 let req = req_builder.build()?;
4529 let resp = configuration.client.execute(req).await?;
4530
4531 let status = resp.status();
4532
4533 if !status.is_client_error() && !status.is_server_error() {
4534 Ok(())
4535 } else {
4536 let content = resp.text().await?;
4537 let entity: Option<DeleteSessionError> = serde_json::from_str(&content).ok();
4538 Err(Error::ResponseError(ResponseContent { status, content, entity }))
4539 }
4540}
4541
4542pub async fn delete_span_mapper(configuration: &configuration::Configuration, group_id: &str, mapper_id: &str) -> Result<(), Error<DeleteSpanMapperError>> {
4544 let p_group_id = group_id;
4546 let p_mapper_id = mapper_id;
4547
4548 let uri_str = format!("{}/v1/o11y/span_mapper_groups/{groupId}/span_mappers/{mapperId}", configuration.base_path, groupId=crate::apis::urlencode(p_group_id), mapperId=crate::apis::urlencode(p_mapper_id));
4549 let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str);
4550
4551 if let Some(ref user_agent) = configuration.user_agent {
4552 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
4553 }
4554 if let Some(ref token) = configuration.bearer_access_token {
4555 req_builder = req_builder.bearer_auth(token.to_owned());
4556 };
4557
4558 let req = req_builder.build()?;
4559 let resp = configuration.client.execute(req).await?;
4560
4561 let status = resp.status();
4562
4563 if !status.is_client_error() && !status.is_server_error() {
4564 Ok(())
4565 } else {
4566 let content = resp.text().await?;
4567 let entity: Option<DeleteSpanMapperError> = serde_json::from_str(&content).ok();
4568 Err(Error::ResponseError(ResponseContent { status, content, entity }))
4569 }
4570}
4571
4572pub async fn delete_span_mapper_group(configuration: &configuration::Configuration, group_id: &str) -> Result<(), Error<DeleteSpanMapperGroupError>> {
4574 let p_group_id = group_id;
4576
4577 let uri_str = format!("{}/v1/o11y/span_mapper_groups/{groupId}", configuration.base_path, groupId=crate::apis::urlencode(p_group_id));
4578 let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str);
4579
4580 if let Some(ref user_agent) = configuration.user_agent {
4581 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
4582 }
4583 if let Some(ref token) = configuration.bearer_access_token {
4584 req_builder = req_builder.bearer_auth(token.to_owned());
4585 };
4586
4587 let req = req_builder.build()?;
4588 let resp = configuration.client.execute(req).await?;
4589
4590 let status = resp.status();
4591
4592 if !status.is_client_error() && !status.is_server_error() {
4593 Ok(())
4594 } else {
4595 let content = resp.text().await?;
4596 let entity: Option<DeleteSpanMapperGroupError> = serde_json::from_str(&content).ok();
4597 Err(Error::ResponseError(ResponseContent { status, content, entity }))
4598 }
4599}
4600
4601pub async fn delete_trace_funnel(configuration: &configuration::Configuration, funnel_id: &str) -> Result<models::O11yPeriodO11yFunnelDeleteOut, Error<DeleteTraceFunnelError>> {
4603 let p_funnel_id = funnel_id;
4605
4606 let uri_str = format!("{}/v1/o11y/trace-funnels/{funnel_id}", configuration.base_path, funnel_id=crate::apis::urlencode(p_funnel_id));
4607 let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str);
4608
4609 if let Some(ref user_agent) = configuration.user_agent {
4610 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
4611 }
4612 if let Some(ref token) = configuration.bearer_access_token {
4613 req_builder = req_builder.bearer_auth(token.to_owned());
4614 };
4615
4616 let req = req_builder.build()?;
4617 let resp = configuration.client.execute(req).await?;
4618
4619 let status = resp.status();
4620 let content_type = resp
4621 .headers()
4622 .get("content-type")
4623 .and_then(|v| v.to_str().ok())
4624 .unwrap_or("application/octet-stream");
4625 let content_type = super::ContentType::from(content_type);
4626
4627 if !status.is_client_error() && !status.is_server_error() {
4628 let content = resp.text().await?;
4629 match content_type {
4630 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
4631 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yFunnelDeleteOut`"))),
4632 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::O11yPeriodO11yFunnelDeleteOut`")))),
4633 }
4634 } else {
4635 let content = resp.text().await?;
4636 let entity: Option<DeleteTraceFunnelError> = serde_json::from_str(&content).ok();
4637 Err(Error::ResponseError(ResponseContent { status, content, entity }))
4638 }
4639}
4640
4641pub async fn delete_user(configuration: &configuration::Configuration, id: &str) -> Result<(), Error<DeleteUserError>> {
4643 let p_id = id;
4645
4646 let uri_str = format!("{}/v1/o11y/users/{id}", configuration.base_path, id=crate::apis::urlencode(p_id));
4647 let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str);
4648
4649 if let Some(ref user_agent) = configuration.user_agent {
4650 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
4651 }
4652 if let Some(ref token) = configuration.bearer_access_token {
4653 req_builder = req_builder.bearer_auth(token.to_owned());
4654 };
4655
4656 let req = req_builder.build()?;
4657 let resp = configuration.client.execute(req).await?;
4658
4659 let status = resp.status();
4660
4661 if !status.is_client_error() && !status.is_server_error() {
4662 Ok(())
4663 } else {
4664 let content = resp.text().await?;
4665 let entity: Option<DeleteUserError> = serde_json::from_str(&content).ok();
4666 Err(Error::ResponseError(ResponseContent { status, content, entity }))
4667 }
4668}
4669
4670pub async fn delete_user_deprecated(configuration: &configuration::Configuration, id: &str) -> Result<(), Error<DeleteUserDeprecatedError>> {
4672 let p_id = id;
4674
4675 let uri_str = format!("{}/v1/o11y/user/{id}", configuration.base_path, id=crate::apis::urlencode(p_id));
4676 let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str);
4677
4678 if let Some(ref user_agent) = configuration.user_agent {
4679 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
4680 }
4681 if let Some(ref token) = configuration.bearer_access_token {
4682 req_builder = req_builder.bearer_auth(token.to_owned());
4683 };
4684
4685 let req = req_builder.build()?;
4686 let resp = configuration.client.execute(req).await?;
4687
4688 let status = resp.status();
4689
4690 if !status.is_client_error() && !status.is_server_error() {
4691 Ok(())
4692 } else {
4693 let content = resp.text().await?;
4694 let entity: Option<DeleteUserDeprecatedError> = serde_json::from_str(&content).ok();
4695 Err(Error::ResponseError(ResponseContent { status, content, entity }))
4696 }
4697}
4698
4699pub async fn disconnect_account(configuration: &configuration::Configuration, cloud_provider: &str, id: &str) -> Result<(), Error<DisconnectAccountError>> {
4701 let p_cloud_provider = cloud_provider;
4703 let p_id = id;
4704
4705 let uri_str = format!("{}/v1/o11y/cloud_integrations/{cloud_provider}/accounts/{id}", configuration.base_path, cloud_provider=crate::apis::urlencode(p_cloud_provider), id=crate::apis::urlencode(p_id));
4706 let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str);
4707
4708 if let Some(ref user_agent) = configuration.user_agent {
4709 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
4710 }
4711 if let Some(ref token) = configuration.bearer_access_token {
4712 req_builder = req_builder.bearer_auth(token.to_owned());
4713 };
4714
4715 let req = req_builder.build()?;
4716 let resp = configuration.client.execute(req).await?;
4717
4718 let status = resp.status();
4719
4720 if !status.is_client_error() && !status.is_server_error() {
4721 Ok(())
4722 } else {
4723 let content = resp.text().await?;
4724 let entity: Option<DisconnectAccountError> = serde_json::from_str(&content).ok();
4725 Err(Error::ResponseError(ResponseContent { status, content, entity }))
4726 }
4727}
4728
4729pub async fn forgot_password(configuration: &configuration::Configuration, o11y_period_o11y_forgot_password_in: models::O11yPeriodO11yForgotPasswordIn) -> Result<(), Error<ForgotPasswordError>> {
4731 let p_o11y_period_o11y_forgot_password_in = o11y_period_o11y_forgot_password_in;
4733
4734 let uri_str = format!("{}/v1/o11y/factor_password/forgot", configuration.base_path);
4735 let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
4736
4737 if let Some(ref user_agent) = configuration.user_agent {
4738 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
4739 }
4740 if let Some(ref token) = configuration.bearer_access_token {
4741 req_builder = req_builder.bearer_auth(token.to_owned());
4742 };
4743 req_builder = req_builder.json(&p_o11y_period_o11y_forgot_password_in);
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<ForgotPasswordError> = serde_json::from_str(&content).ok();
4755 Err(Error::ResponseError(ResponseContent { status, content, entity }))
4756 }
4757}
4758
4759pub async fn get_account(configuration: &configuration::Configuration, cloud_provider: &str, id: &str) -> Result<models::O11yPeriodO11yAccountOut, Error<GetAccountError>> {
4761 let p_cloud_provider = cloud_provider;
4763 let p_id = id;
4764
4765 let uri_str = format!("{}/v1/o11y/cloud_integrations/{cloud_provider}/accounts/{id}", configuration.base_path, cloud_provider=crate::apis::urlencode(p_cloud_provider), id=crate::apis::urlencode(p_id));
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 let content_type = resp
4780 .headers()
4781 .get("content-type")
4782 .and_then(|v| v.to_str().ok())
4783 .unwrap_or("application/octet-stream");
4784 let content_type = super::ContentType::from(content_type);
4785
4786 if !status.is_client_error() && !status.is_server_error() {
4787 let content = resp.text().await?;
4788 match content_type {
4789 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
4790 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yAccountOut`"))),
4791 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::O11yPeriodO11yAccountOut`")))),
4792 }
4793 } else {
4794 let content = resp.text().await?;
4795 let entity: Option<GetAccountError> = serde_json::from_str(&content).ok();
4796 Err(Error::ResponseError(ResponseContent { status, content, entity }))
4797 }
4798}
4799
4800pub async fn get_account_service(configuration: &configuration::Configuration, cloud_provider: &str, id: &str, service_id: &str) -> Result<models::O11yPeriodO11yServiceOut, Error<GetAccountServiceError>> {
4802 let p_cloud_provider = cloud_provider;
4804 let p_id = id;
4805 let p_service_id = service_id;
4806
4807 let uri_str = format!("{}/v1/o11y/cloud_integrations/{cloud_provider}/accounts/{id}/services/{service_id}", configuration.base_path, cloud_provider=crate::apis::urlencode(p_cloud_provider), id=crate::apis::urlencode(p_id), service_id=crate::apis::urlencode(p_service_id));
4808 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
4809
4810 if let Some(ref user_agent) = configuration.user_agent {
4811 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
4812 }
4813 if let Some(ref token) = configuration.bearer_access_token {
4814 req_builder = req_builder.bearer_auth(token.to_owned());
4815 };
4816
4817 let req = req_builder.build()?;
4818 let resp = configuration.client.execute(req).await?;
4819
4820 let status = resp.status();
4821 let content_type = resp
4822 .headers()
4823 .get("content-type")
4824 .and_then(|v| v.to_str().ok())
4825 .unwrap_or("application/octet-stream");
4826 let content_type = super::ContentType::from(content_type);
4827
4828 if !status.is_client_error() && !status.is_server_error() {
4829 let content = resp.text().await?;
4830 match content_type {
4831 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
4832 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yServiceOut`"))),
4833 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::O11yPeriodO11yServiceOut`")))),
4834 }
4835 } else {
4836 let content = resp.text().await?;
4837 let entity: Option<GetAccountServiceError> = serde_json::from_str(&content).ok();
4838 Err(Error::ResponseError(ResponseContent { status, content, entity }))
4839 }
4840}
4841
4842pub async fn get_alerts(configuration: &configuration::Configuration, ) -> Result<models::O11yPeriodO11yAlertsOut, Error<GetAlertsError>> {
4844
4845 let uri_str = format!("{}/v1/o11y/alerts", 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 let content_type = resp
4860 .headers()
4861 .get("content-type")
4862 .and_then(|v| v.to_str().ok())
4863 .unwrap_or("application/octet-stream");
4864 let content_type = super::ContentType::from(content_type);
4865
4866 if !status.is_client_error() && !status.is_server_error() {
4867 let content = resp.text().await?;
4868 match content_type {
4869 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
4870 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yAlertsOut`"))),
4871 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::O11yPeriodO11yAlertsOut`")))),
4872 }
4873 } else {
4874 let content = resp.text().await?;
4875 let entity: Option<GetAlertsError> = serde_json::from_str(&content).ok();
4876 Err(Error::ResponseError(ResponseContent { status, content, entity }))
4877 }
4878}
4879
4880pub async fn get_all_route_policies(configuration: &configuration::Configuration, ) -> Result<models::O11yPeriodO11yRoutePoliciesOut, Error<GetAllRoutePoliciesError>> {
4882
4883 let uri_str = format!("{}/v1/o11y/route_policies", configuration.base_path);
4884 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
4885
4886 if let Some(ref user_agent) = configuration.user_agent {
4887 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
4888 }
4889 if let Some(ref token) = configuration.bearer_access_token {
4890 req_builder = req_builder.bearer_auth(token.to_owned());
4891 };
4892
4893 let req = req_builder.build()?;
4894 let resp = configuration.client.execute(req).await?;
4895
4896 let status = resp.status();
4897 let content_type = resp
4898 .headers()
4899 .get("content-type")
4900 .and_then(|v| v.to_str().ok())
4901 .unwrap_or("application/octet-stream");
4902 let content_type = super::ContentType::from(content_type);
4903
4904 if !status.is_client_error() && !status.is_server_error() {
4905 let content = resp.text().await?;
4906 match content_type {
4907 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
4908 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yRoutePoliciesOut`"))),
4909 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::O11yPeriodO11yRoutePoliciesOut`")))),
4910 }
4911 } else {
4912 let content = resp.text().await?;
4913 let entity: Option<GetAllRoutePoliciesError> = serde_json::from_str(&content).ok();
4914 Err(Error::ResponseError(ResponseContent { status, content, entity }))
4915 }
4916}
4917
4918pub async fn get_auth_domain(configuration: &configuration::Configuration, id: &str) -> Result<models::O11yPeriodO11yAuthDomainOut, Error<GetAuthDomainError>> {
4920 let p_id = id;
4922
4923 let uri_str = format!("{}/v1/o11y/domains/{id}", configuration.base_path, id=crate::apis::urlencode(p_id));
4924 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
4925
4926 if let Some(ref user_agent) = configuration.user_agent {
4927 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
4928 }
4929 if let Some(ref token) = configuration.bearer_access_token {
4930 req_builder = req_builder.bearer_auth(token.to_owned());
4931 };
4932
4933 let req = req_builder.build()?;
4934 let resp = configuration.client.execute(req).await?;
4935
4936 let status = resp.status();
4937 let content_type = resp
4938 .headers()
4939 .get("content-type")
4940 .and_then(|v| v.to_str().ok())
4941 .unwrap_or("application/octet-stream");
4942 let content_type = super::ContentType::from(content_type);
4943
4944 if !status.is_client_error() && !status.is_server_error() {
4945 let content = resp.text().await?;
4946 match content_type {
4947 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
4948 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yAuthDomainOut`"))),
4949 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::O11yPeriodO11yAuthDomainOut`")))),
4950 }
4951 } else {
4952 let content = resp.text().await?;
4953 let entity: Option<GetAuthDomainError> = serde_json::from_str(&content).ok();
4954 Err(Error::ResponseError(ResponseContent { status, content, entity }))
4955 }
4956}
4957
4958pub async fn get_channel_by_id(configuration: &configuration::Configuration, id: &str) -> Result<models::O11yPeriodO11yChannelOut, Error<GetChannelByIdError>> {
4960 let p_id = id;
4962
4963 let uri_str = format!("{}/v1/o11y/channels/{id}", configuration.base_path, id=crate::apis::urlencode(p_id));
4964 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
4965
4966 if let Some(ref user_agent) = configuration.user_agent {
4967 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
4968 }
4969 if let Some(ref token) = configuration.bearer_access_token {
4970 req_builder = req_builder.bearer_auth(token.to_owned());
4971 };
4972
4973 let req = req_builder.build()?;
4974 let resp = configuration.client.execute(req).await?;
4975
4976 let status = resp.status();
4977 let content_type = resp
4978 .headers()
4979 .get("content-type")
4980 .and_then(|v| v.to_str().ok())
4981 .unwrap_or("application/octet-stream");
4982 let content_type = super::ContentType::from(content_type);
4983
4984 if !status.is_client_error() && !status.is_server_error() {
4985 let content = resp.text().await?;
4986 match content_type {
4987 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
4988 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yChannelOut`"))),
4989 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::O11yPeriodO11yChannelOut`")))),
4990 }
4991 } else {
4992 let content = resp.text().await?;
4993 let entity: Option<GetChannelByIdError> = serde_json::from_str(&content).ok();
4994 Err(Error::ResponseError(ResponseContent { status, content, entity }))
4995 }
4996}
4997
4998pub async fn get_connection_credentials(configuration: &configuration::Configuration, cloud_provider: &str) -> Result<models::O11yPeriodO11yCredentialsOut, Error<GetConnectionCredentialsError>> {
5000 let p_cloud_provider = cloud_provider;
5002
5003 let uri_str = format!("{}/v1/o11y/cloud_integrations/{cloud_provider}/credentials", configuration.base_path, cloud_provider=crate::apis::urlencode(p_cloud_provider));
5004 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
5005
5006 if let Some(ref user_agent) = configuration.user_agent {
5007 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
5008 }
5009 if let Some(ref token) = configuration.bearer_access_token {
5010 req_builder = req_builder.bearer_auth(token.to_owned());
5011 };
5012
5013 let req = req_builder.build()?;
5014 let resp = configuration.client.execute(req).await?;
5015
5016 let status = resp.status();
5017 let content_type = resp
5018 .headers()
5019 .get("content-type")
5020 .and_then(|v| v.to_str().ok())
5021 .unwrap_or("application/octet-stream");
5022 let content_type = super::ContentType::from(content_type);
5023
5024 if !status.is_client_error() && !status.is_server_error() {
5025 let content = resp.text().await?;
5026 match content_type {
5027 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
5028 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yCredentialsOut`"))),
5029 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::O11yPeriodO11yCredentialsOut`")))),
5030 }
5031 } else {
5032 let content = resp.text().await?;
5033 let entity: Option<GetConnectionCredentialsError> = serde_json::from_str(&content).ok();
5034 Err(Error::ResponseError(ResponseContent { status, content, entity }))
5035 }
5036}
5037
5038pub async fn get_dashboard_v2(configuration: &configuration::Configuration, id: &str) -> Result<models::O11yPeriodO11yDashboardOut, Error<GetDashboardV2Error>> {
5040 let p_id = id;
5042
5043 let uri_str = format!("{}/v1/o11y/dashboards/{id}", configuration.base_path, id=crate::apis::urlencode(p_id));
5044 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
5045
5046 if let Some(ref user_agent) = configuration.user_agent {
5047 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
5048 }
5049 if let Some(ref token) = configuration.bearer_access_token {
5050 req_builder = req_builder.bearer_auth(token.to_owned());
5051 };
5052
5053 let req = req_builder.build()?;
5054 let resp = configuration.client.execute(req).await?;
5055
5056 let status = resp.status();
5057 let content_type = resp
5058 .headers()
5059 .get("content-type")
5060 .and_then(|v| v.to_str().ok())
5061 .unwrap_or("application/octet-stream");
5062 let content_type = super::ContentType::from(content_type);
5063
5064 if !status.is_client_error() && !status.is_server_error() {
5065 let content = resp.text().await?;
5066 match content_type {
5067 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
5068 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yDashboardOut`"))),
5069 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::O11yPeriodO11yDashboardOut`")))),
5070 }
5071 } else {
5072 let content = resp.text().await?;
5073 let entity: Option<GetDashboardV2Error> = serde_json::from_str(&content).ok();
5074 Err(Error::ResponseError(ResponseContent { status, content, entity }))
5075 }
5076}
5077
5078pub async fn get_downtime_schedule_by_id(configuration: &configuration::Configuration, id: &str) -> Result<models::O11yPeriodO11yDowntimeScheduleOut, Error<GetDowntimeScheduleByIdError>> {
5080 let p_id = id;
5082
5083 let uri_str = format!("{}/v1/o11y/downtime_schedules/{id}", configuration.base_path, id=crate::apis::urlencode(p_id));
5084 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
5085
5086 if let Some(ref user_agent) = configuration.user_agent {
5087 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
5088 }
5089 if let Some(ref token) = configuration.bearer_access_token {
5090 req_builder = req_builder.bearer_auth(token.to_owned());
5091 };
5092
5093 let req = req_builder.build()?;
5094 let resp = configuration.client.execute(req).await?;
5095
5096 let status = resp.status();
5097 let content_type = resp
5098 .headers()
5099 .get("content-type")
5100 .and_then(|v| v.to_str().ok())
5101 .unwrap_or("application/octet-stream");
5102 let content_type = super::ContentType::from(content_type);
5103
5104 if !status.is_client_error() && !status.is_server_error() {
5105 let content = resp.text().await?;
5106 match content_type {
5107 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
5108 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yDowntimeScheduleOut`"))),
5109 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::O11yPeriodO11yDowntimeScheduleOut`")))),
5110 }
5111 } else {
5112 let content = resp.text().await?;
5113 let entity: Option<GetDowntimeScheduleByIdError> = serde_json::from_str(&content).ok();
5114 Err(Error::ResponseError(ResponseContent { status, content, entity }))
5115 }
5116}
5117
5118pub async fn get_draft_funnel_error_traces(configuration: &configuration::Configuration, o11y_period_o11y_draft_funnel_in: models::O11yPeriodO11yDraftFunnelIn) -> Result<models::O11yPeriodO11yFunnelRowsOut, Error<GetDraftFunnelErrorTracesError>> {
5120 let p_o11y_period_o11y_draft_funnel_in = o11y_period_o11y_draft_funnel_in;
5122
5123 let uri_str = format!("{}/v1/o11y/trace-funnels/analytics/error-traces", configuration.base_path);
5124 let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
5125
5126 if let Some(ref user_agent) = configuration.user_agent {
5127 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
5128 }
5129 if let Some(ref token) = configuration.bearer_access_token {
5130 req_builder = req_builder.bearer_auth(token.to_owned());
5131 };
5132 req_builder = req_builder.json(&p_o11y_period_o11y_draft_funnel_in);
5133
5134 let req = req_builder.build()?;
5135 let resp = configuration.client.execute(req).await?;
5136
5137 let status = resp.status();
5138 let content_type = resp
5139 .headers()
5140 .get("content-type")
5141 .and_then(|v| v.to_str().ok())
5142 .unwrap_or("application/octet-stream");
5143 let content_type = super::ContentType::from(content_type);
5144
5145 if !status.is_client_error() && !status.is_server_error() {
5146 let content = resp.text().await?;
5147 match content_type {
5148 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
5149 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yFunnelRowsOut`"))),
5150 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::O11yPeriodO11yFunnelRowsOut`")))),
5151 }
5152 } else {
5153 let content = resp.text().await?;
5154 let entity: Option<GetDraftFunnelErrorTracesError> = serde_json::from_str(&content).ok();
5155 Err(Error::ResponseError(ResponseContent { status, content, entity }))
5156 }
5157}
5158
5159pub async fn get_draft_funnel_overview(configuration: &configuration::Configuration, o11y_period_o11y_draft_funnel_in: models::O11yPeriodO11yDraftFunnelIn) -> Result<models::O11yPeriodO11yFunnelRowsOut, Error<GetDraftFunnelOverviewError>> {
5161 let p_o11y_period_o11y_draft_funnel_in = o11y_period_o11y_draft_funnel_in;
5163
5164 let uri_str = format!("{}/v1/o11y/trace-funnels/analytics/overview", configuration.base_path);
5165 let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
5166
5167 if let Some(ref user_agent) = configuration.user_agent {
5168 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
5169 }
5170 if let Some(ref token) = configuration.bearer_access_token {
5171 req_builder = req_builder.bearer_auth(token.to_owned());
5172 };
5173 req_builder = req_builder.json(&p_o11y_period_o11y_draft_funnel_in);
5174
5175 let req = req_builder.build()?;
5176 let resp = configuration.client.execute(req).await?;
5177
5178 let status = resp.status();
5179 let content_type = resp
5180 .headers()
5181 .get("content-type")
5182 .and_then(|v| v.to_str().ok())
5183 .unwrap_or("application/octet-stream");
5184 let content_type = super::ContentType::from(content_type);
5185
5186 if !status.is_client_error() && !status.is_server_error() {
5187 let content = resp.text().await?;
5188 match content_type {
5189 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
5190 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yFunnelRowsOut`"))),
5191 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::O11yPeriodO11yFunnelRowsOut`")))),
5192 }
5193 } else {
5194 let content = resp.text().await?;
5195 let entity: Option<GetDraftFunnelOverviewError> = serde_json::from_str(&content).ok();
5196 Err(Error::ResponseError(ResponseContent { status, content, entity }))
5197 }
5198}
5199
5200pub async fn get_draft_funnel_slow_traces(configuration: &configuration::Configuration, o11y_period_o11y_draft_funnel_in: models::O11yPeriodO11yDraftFunnelIn) -> Result<models::O11yPeriodO11yFunnelRowsOut, Error<GetDraftFunnelSlowTracesError>> {
5202 let p_o11y_period_o11y_draft_funnel_in = o11y_period_o11y_draft_funnel_in;
5204
5205 let uri_str = format!("{}/v1/o11y/trace-funnels/analytics/slow-traces", configuration.base_path);
5206 let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
5207
5208 if let Some(ref user_agent) = configuration.user_agent {
5209 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
5210 }
5211 if let Some(ref token) = configuration.bearer_access_token {
5212 req_builder = req_builder.bearer_auth(token.to_owned());
5213 };
5214 req_builder = req_builder.json(&p_o11y_period_o11y_draft_funnel_in);
5215
5216 let req = req_builder.build()?;
5217 let resp = configuration.client.execute(req).await?;
5218
5219 let status = resp.status();
5220 let content_type = resp
5221 .headers()
5222 .get("content-type")
5223 .and_then(|v| v.to_str().ok())
5224 .unwrap_or("application/octet-stream");
5225 let content_type = super::ContentType::from(content_type);
5226
5227 if !status.is_client_error() && !status.is_server_error() {
5228 let content = resp.text().await?;
5229 match content_type {
5230 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
5231 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yFunnelRowsOut`"))),
5232 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::O11yPeriodO11yFunnelRowsOut`")))),
5233 }
5234 } else {
5235 let content = resp.text().await?;
5236 let entity: Option<GetDraftFunnelSlowTracesError> = serde_json::from_str(&content).ok();
5237 Err(Error::ResponseError(ResponseContent { status, content, entity }))
5238 }
5239}
5240
5241pub async fn get_draft_funnel_step_metrics(configuration: &configuration::Configuration, o11y_period_o11y_draft_funnel_in: models::O11yPeriodO11yDraftFunnelIn) -> Result<models::O11yPeriodO11yFunnelRowsOut, Error<GetDraftFunnelStepMetricsError>> {
5243 let p_o11y_period_o11y_draft_funnel_in = o11y_period_o11y_draft_funnel_in;
5245
5246 let uri_str = format!("{}/v1/o11y/trace-funnels/analytics/steps", configuration.base_path);
5247 let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
5248
5249 if let Some(ref user_agent) = configuration.user_agent {
5250 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
5251 }
5252 if let Some(ref token) = configuration.bearer_access_token {
5253 req_builder = req_builder.bearer_auth(token.to_owned());
5254 };
5255 req_builder = req_builder.json(&p_o11y_period_o11y_draft_funnel_in);
5256
5257 let req = req_builder.build()?;
5258 let resp = configuration.client.execute(req).await?;
5259
5260 let status = resp.status();
5261 let content_type = resp
5262 .headers()
5263 .get("content-type")
5264 .and_then(|v| v.to_str().ok())
5265 .unwrap_or("application/octet-stream");
5266 let content_type = super::ContentType::from(content_type);
5267
5268 if !status.is_client_error() && !status.is_server_error() {
5269 let content = resp.text().await?;
5270 match content_type {
5271 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
5272 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yFunnelRowsOut`"))),
5273 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::O11yPeriodO11yFunnelRowsOut`")))),
5274 }
5275 } else {
5276 let content = resp.text().await?;
5277 let entity: Option<GetDraftFunnelStepMetricsError> = serde_json::from_str(&content).ok();
5278 Err(Error::ResponseError(ResponseContent { status, content, entity }))
5279 }
5280}
5281
5282pub async fn get_draft_funnel_step_overview(configuration: &configuration::Configuration, o11y_period_o11y_draft_funnel_in: models::O11yPeriodO11yDraftFunnelIn) -> Result<models::O11yPeriodO11yFunnelRowsOut, Error<GetDraftFunnelStepOverviewError>> {
5284 let p_o11y_period_o11y_draft_funnel_in = o11y_period_o11y_draft_funnel_in;
5286
5287 let uri_str = format!("{}/v1/o11y/trace-funnels/analytics/steps/overview", configuration.base_path);
5288 let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
5289
5290 if let Some(ref user_agent) = configuration.user_agent {
5291 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
5292 }
5293 if let Some(ref token) = configuration.bearer_access_token {
5294 req_builder = req_builder.bearer_auth(token.to_owned());
5295 };
5296 req_builder = req_builder.json(&p_o11y_period_o11y_draft_funnel_in);
5297
5298 let req = req_builder.build()?;
5299 let resp = configuration.client.execute(req).await?;
5300
5301 let status = resp.status();
5302 let content_type = resp
5303 .headers()
5304 .get("content-type")
5305 .and_then(|v| v.to_str().ok())
5306 .unwrap_or("application/octet-stream");
5307 let content_type = super::ContentType::from(content_type);
5308
5309 if !status.is_client_error() && !status.is_server_error() {
5310 let content = resp.text().await?;
5311 match content_type {
5312 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
5313 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yFunnelRowsOut`"))),
5314 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::O11yPeriodO11yFunnelRowsOut`")))),
5315 }
5316 } else {
5317 let content = resp.text().await?;
5318 let entity: Option<GetDraftFunnelStepOverviewError> = serde_json::from_str(&content).ok();
5319 Err(Error::ResponseError(ResponseContent { status, content, entity }))
5320 }
5321}
5322
5323pub async fn get_flamegraph(configuration: &configuration::Configuration, trace_id: &str, o11y_period_o11y_trace_flamegraph_in: models::O11yPeriodO11yTraceFlamegraphIn) -> Result<models::O11yPeriodO11yTraceFlamegraphOut, Error<GetFlamegraphError>> {
5325 let p_trace_id = trace_id;
5327 let p_o11y_period_o11y_trace_flamegraph_in = o11y_period_o11y_trace_flamegraph_in;
5328
5329 let uri_str = format!("{}/v1/o11y/traces/{traceId}/flamegraph", configuration.base_path, traceId=crate::apis::urlencode(p_trace_id));
5330 let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
5331
5332 if let Some(ref user_agent) = configuration.user_agent {
5333 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
5334 }
5335 if let Some(ref token) = configuration.bearer_access_token {
5336 req_builder = req_builder.bearer_auth(token.to_owned());
5337 };
5338 req_builder = req_builder.json(&p_o11y_period_o11y_trace_flamegraph_in);
5339
5340 let req = req_builder.build()?;
5341 let resp = configuration.client.execute(req).await?;
5342
5343 let status = resp.status();
5344 let content_type = resp
5345 .headers()
5346 .get("content-type")
5347 .and_then(|v| v.to_str().ok())
5348 .unwrap_or("application/octet-stream");
5349 let content_type = super::ContentType::from(content_type);
5350
5351 if !status.is_client_error() && !status.is_server_error() {
5352 let content = resp.text().await?;
5353 match content_type {
5354 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
5355 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yTraceFlamegraphOut`"))),
5356 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::O11yPeriodO11yTraceFlamegraphOut`")))),
5357 }
5358 } else {
5359 let content = resp.text().await?;
5360 let entity: Option<GetFlamegraphError> = serde_json::from_str(&content).ok();
5361 Err(Error::ResponseError(ResponseContent { status, content, entity }))
5362 }
5363}
5364
5365pub async fn get_hosts(configuration: &configuration::Configuration, ) -> Result<models::O11yPeriodO11yGettableHostOut, Error<GetHostsError>> {
5367
5368 let uri_str = format!("{}/v1/o11y/zeus/hosts", configuration.base_path);
5369 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
5370
5371 if let Some(ref user_agent) = configuration.user_agent {
5372 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
5373 }
5374 if let Some(ref token) = configuration.bearer_access_token {
5375 req_builder = req_builder.bearer_auth(token.to_owned());
5376 };
5377
5378 let req = req_builder.build()?;
5379 let resp = configuration.client.execute(req).await?;
5380
5381 let status = resp.status();
5382 let content_type = resp
5383 .headers()
5384 .get("content-type")
5385 .and_then(|v| v.to_str().ok())
5386 .unwrap_or("application/octet-stream");
5387 let content_type = super::ContentType::from(content_type);
5388
5389 if !status.is_client_error() && !status.is_server_error() {
5390 let content = resp.text().await?;
5391 match content_type {
5392 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
5393 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yGettableHostOut`"))),
5394 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::O11yPeriodO11yGettableHostOut`")))),
5395 }
5396 } else {
5397 let content = resp.text().await?;
5398 let entity: Option<GetHostsError> = serde_json::from_str(&content).ok();
5399 Err(Error::ResponseError(ResponseContent { status, content, entity }))
5400 }
5401}
5402
5403pub async fn get_ingestion_keys(configuration: &configuration::Configuration, page: Option<i32>, per_page: Option<i32>) -> Result<models::O11yPeriodO11yIngestionKeysOut, Error<GetIngestionKeysError>> {
5405 let p_page = page;
5407 let p_per_page = per_page;
5408
5409 let uri_str = format!("{}/v1/o11y/gateway/ingestion_keys", configuration.base_path);
5410 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
5411
5412 if let Some(ref param_value) = p_page {
5413 req_builder = req_builder.query(&[("page", ¶m_value.to_string())]);
5414 }
5415 if let Some(ref param_value) = p_per_page {
5416 req_builder = req_builder.query(&[("per_page", ¶m_value.to_string())]);
5417 }
5418 if let Some(ref user_agent) = configuration.user_agent {
5419 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
5420 }
5421 if let Some(ref token) = configuration.bearer_access_token {
5422 req_builder = req_builder.bearer_auth(token.to_owned());
5423 };
5424
5425 let req = req_builder.build()?;
5426 let resp = configuration.client.execute(req).await?;
5427
5428 let status = resp.status();
5429 let content_type = resp
5430 .headers()
5431 .get("content-type")
5432 .and_then(|v| v.to_str().ok())
5433 .unwrap_or("application/octet-stream");
5434 let content_type = super::ContentType::from(content_type);
5435
5436 if !status.is_client_error() && !status.is_server_error() {
5437 let content = resp.text().await?;
5438 match content_type {
5439 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
5440 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yIngestionKeysOut`"))),
5441 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::O11yPeriodO11yIngestionKeysOut`")))),
5442 }
5443 } else {
5444 let content = resp.text().await?;
5445 let entity: Option<GetIngestionKeysError> = serde_json::from_str(&content).ok();
5446 Err(Error::ResponseError(ResponseContent { status, content, entity }))
5447 }
5448}
5449
5450pub async fn get_integration(configuration: &configuration::Configuration, integration_id: &str) -> Result<models::O11yPeriodO11yIntegrationOut, Error<GetIntegrationError>> {
5452 let p_integration_id = integration_id;
5454
5455 let uri_str = format!("{}/v1/o11y/integrations/{integrationId}", configuration.base_path, integrationId=crate::apis::urlencode(p_integration_id));
5456 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
5457
5458 if let Some(ref user_agent) = configuration.user_agent {
5459 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
5460 }
5461 if let Some(ref token) = configuration.bearer_access_token {
5462 req_builder = req_builder.bearer_auth(token.to_owned());
5463 };
5464
5465 let req = req_builder.build()?;
5466 let resp = configuration.client.execute(req).await?;
5467
5468 let status = resp.status();
5469 let content_type = resp
5470 .headers()
5471 .get("content-type")
5472 .and_then(|v| v.to_str().ok())
5473 .unwrap_or("application/octet-stream");
5474 let content_type = super::ContentType::from(content_type);
5475
5476 if !status.is_client_error() && !status.is_server_error() {
5477 let content = resp.text().await?;
5478 match content_type {
5479 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
5480 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yIntegrationOut`"))),
5481 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::O11yPeriodO11yIntegrationOut`")))),
5482 }
5483 } else {
5484 let content = resp.text().await?;
5485 let entity: Option<GetIntegrationError> = serde_json::from_str(&content).ok();
5486 Err(Error::ResponseError(ResponseContent { status, content, entity }))
5487 }
5488}
5489
5490pub async fn get_integration_connection_status(configuration: &configuration::Configuration, integration_id: &str, lookback_seconds: Option<i32>) -> Result<models::O11yPeriodO11yConnectionStatusOut, Error<GetIntegrationConnectionStatusError>> {
5492 let p_integration_id = integration_id;
5494 let p_lookback_seconds = lookback_seconds;
5495
5496 let uri_str = format!("{}/v1/o11y/integrations/{integrationId}/connection_status", configuration.base_path, integrationId=crate::apis::urlencode(p_integration_id));
5497 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
5498
5499 if let Some(ref param_value) = p_lookback_seconds {
5500 req_builder = req_builder.query(&[("lookback_seconds", ¶m_value.to_string())]);
5501 }
5502 if let Some(ref user_agent) = configuration.user_agent {
5503 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
5504 }
5505 if let Some(ref token) = configuration.bearer_access_token {
5506 req_builder = req_builder.bearer_auth(token.to_owned());
5507 };
5508
5509 let req = req_builder.build()?;
5510 let resp = configuration.client.execute(req).await?;
5511
5512 let status = resp.status();
5513 let content_type = resp
5514 .headers()
5515 .get("content-type")
5516 .and_then(|v| v.to_str().ok())
5517 .unwrap_or("application/octet-stream");
5518 let content_type = super::ContentType::from(content_type);
5519
5520 if !status.is_client_error() && !status.is_server_error() {
5521 let content = resp.text().await?;
5522 match content_type {
5523 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
5524 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yConnectionStatusOut`"))),
5525 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::O11yPeriodO11yConnectionStatusOut`")))),
5526 }
5527 } else {
5528 let content = resp.text().await?;
5529 let entity: Option<GetIntegrationConnectionStatusError> = serde_json::from_str(&content).ok();
5530 Err(Error::ResponseError(ResponseContent { status, content, entity }))
5531 }
5532}
5533
5534pub async fn get_llm_pricing_rule(configuration: &configuration::Configuration, id: &str) -> Result<models::O11yPeriodO11yLlmPricingRuleOut, Error<GetLlmPricingRuleError>> {
5536 let p_id = id;
5538
5539 let uri_str = format!("{}/v1/o11y/llm_pricing_rules/{id}", configuration.base_path, id=crate::apis::urlencode(p_id));
5540 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
5541
5542 if let Some(ref user_agent) = configuration.user_agent {
5543 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
5544 }
5545 if let Some(ref token) = configuration.bearer_access_token {
5546 req_builder = req_builder.bearer_auth(token.to_owned());
5547 };
5548
5549 let req = req_builder.build()?;
5550 let resp = configuration.client.execute(req).await?;
5551
5552 let status = resp.status();
5553 let content_type = resp
5554 .headers()
5555 .get("content-type")
5556 .and_then(|v| v.to_str().ok())
5557 .unwrap_or("application/octet-stream");
5558 let content_type = super::ContentType::from(content_type);
5559
5560 if !status.is_client_error() && !status.is_server_error() {
5561 let content = resp.text().await?;
5562 match content_type {
5563 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
5564 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yLlmPricingRuleOut`"))),
5565 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::O11yPeriodO11yLlmPricingRuleOut`")))),
5566 }
5567 } else {
5568 let content = resp.text().await?;
5569 let entity: Option<GetLlmPricingRuleError> = serde_json::from_str(&content).ok();
5570 Err(Error::ResponseError(ResponseContent { status, content, entity }))
5571 }
5572}
5573
5574pub async fn get_llm_score(configuration: &configuration::Configuration, id: &str) -> Result<models::O11yPeriodO11yLlmScoreOut, Error<GetLlmScoreError>> {
5576 let p_id = id;
5578
5579 let uri_str = format!("{}/v1/o11y/llm/score/{id}", configuration.base_path, id=crate::apis::urlencode(p_id));
5580 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
5581
5582 if let Some(ref user_agent) = configuration.user_agent {
5583 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
5584 }
5585 if let Some(ref token) = configuration.bearer_access_token {
5586 req_builder = req_builder.bearer_auth(token.to_owned());
5587 };
5588
5589 let req = req_builder.build()?;
5590 let resp = configuration.client.execute(req).await?;
5591
5592 let status = resp.status();
5593 let content_type = resp
5594 .headers()
5595 .get("content-type")
5596 .and_then(|v| v.to_str().ok())
5597 .unwrap_or("application/octet-stream");
5598 let content_type = super::ContentType::from(content_type);
5599
5600 if !status.is_client_error() && !status.is_server_error() {
5601 let content = resp.text().await?;
5602 match content_type {
5603 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
5604 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yLlmScoreOut`"))),
5605 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::O11yPeriodO11yLlmScoreOut`")))),
5606 }
5607 } else {
5608 let content = resp.text().await?;
5609 let entity: Option<GetLlmScoreError> = serde_json::from_str(&content).ok();
5610 Err(Error::ResponseError(ResponseContent { status, content, entity }))
5611 }
5612}
5613
5614pub async fn get_metric_alerts(configuration: &configuration::Configuration, metric_name: &str) -> Result<models::O11yPeriodO11yMetricAlertsOut, Error<GetMetricAlertsError>> {
5616 let p_metric_name = metric_name;
5618
5619 let uri_str = format!("{}/v1/o11y/metrics/alerts", configuration.base_path);
5620 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
5621
5622 req_builder = req_builder.query(&[("metricName", &p_metric_name.to_string())]);
5623 if let Some(ref user_agent) = configuration.user_agent {
5624 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
5625 }
5626 if let Some(ref token) = configuration.bearer_access_token {
5627 req_builder = req_builder.bearer_auth(token.to_owned());
5628 };
5629
5630 let req = req_builder.build()?;
5631 let resp = configuration.client.execute(req).await?;
5632
5633 let status = resp.status();
5634 let content_type = resp
5635 .headers()
5636 .get("content-type")
5637 .and_then(|v| v.to_str().ok())
5638 .unwrap_or("application/octet-stream");
5639 let content_type = super::ContentType::from(content_type);
5640
5641 if !status.is_client_error() && !status.is_server_error() {
5642 let content = resp.text().await?;
5643 match content_type {
5644 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
5645 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yMetricAlertsOut`"))),
5646 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::O11yPeriodO11yMetricAlertsOut`")))),
5647 }
5648 } else {
5649 let content = resp.text().await?;
5650 let entity: Option<GetMetricAlertsError> = serde_json::from_str(&content).ok();
5651 Err(Error::ResponseError(ResponseContent { status, content, entity }))
5652 }
5653}
5654
5655pub async fn get_metric_attributes(configuration: &configuration::Configuration, metric_name: &str, start: Option<i32>, end: Option<i32>) -> Result<models::O11yPeriodO11yMetricAttributesOut, Error<GetMetricAttributesError>> {
5657 let p_metric_name = metric_name;
5659 let p_start = start;
5660 let p_end = end;
5661
5662 let uri_str = format!("{}/v1/o11y/metrics/attributes", configuration.base_path);
5663 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
5664
5665 req_builder = req_builder.query(&[("metricName", &p_metric_name.to_string())]);
5666 if let Some(ref param_value) = p_start {
5667 req_builder = req_builder.query(&[("start", ¶m_value.to_string())]);
5668 }
5669 if let Some(ref param_value) = p_end {
5670 req_builder = req_builder.query(&[("end", ¶m_value.to_string())]);
5671 }
5672 if let Some(ref user_agent) = configuration.user_agent {
5673 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
5674 }
5675 if let Some(ref token) = configuration.bearer_access_token {
5676 req_builder = req_builder.bearer_auth(token.to_owned());
5677 };
5678
5679 let req = req_builder.build()?;
5680 let resp = configuration.client.execute(req).await?;
5681
5682 let status = resp.status();
5683 let content_type = resp
5684 .headers()
5685 .get("content-type")
5686 .and_then(|v| v.to_str().ok())
5687 .unwrap_or("application/octet-stream");
5688 let content_type = super::ContentType::from(content_type);
5689
5690 if !status.is_client_error() && !status.is_server_error() {
5691 let content = resp.text().await?;
5692 match content_type {
5693 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
5694 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yMetricAttributesOut`"))),
5695 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::O11yPeriodO11yMetricAttributesOut`")))),
5696 }
5697 } else {
5698 let content = resp.text().await?;
5699 let entity: Option<GetMetricAttributesError> = serde_json::from_str(&content).ok();
5700 Err(Error::ResponseError(ResponseContent { status, content, entity }))
5701 }
5702}
5703
5704pub async fn get_metric_dashboards_v2(configuration: &configuration::Configuration, metric_name: &str) -> Result<models::O11yPeriodO11yMetricDashboardsOut, Error<GetMetricDashboardsV2Error>> {
5706 let p_metric_name = metric_name;
5708
5709 let uri_str = format!("{}/v1/o11y/metrics/dashboards", configuration.base_path);
5710 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
5711
5712 req_builder = req_builder.query(&[("metricName", &p_metric_name.to_string())]);
5713 if let Some(ref user_agent) = configuration.user_agent {
5714 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
5715 }
5716 if let Some(ref token) = configuration.bearer_access_token {
5717 req_builder = req_builder.bearer_auth(token.to_owned());
5718 };
5719
5720 let req = req_builder.build()?;
5721 let resp = configuration.client.execute(req).await?;
5722
5723 let status = resp.status();
5724 let content_type = resp
5725 .headers()
5726 .get("content-type")
5727 .and_then(|v| v.to_str().ok())
5728 .unwrap_or("application/octet-stream");
5729 let content_type = super::ContentType::from(content_type);
5730
5731 if !status.is_client_error() && !status.is_server_error() {
5732 let content = resp.text().await?;
5733 match content_type {
5734 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
5735 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yMetricDashboardsOut`"))),
5736 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::O11yPeriodO11yMetricDashboardsOut`")))),
5737 }
5738 } else {
5739 let content = resp.text().await?;
5740 let entity: Option<GetMetricDashboardsV2Error> = serde_json::from_str(&content).ok();
5741 Err(Error::ResponseError(ResponseContent { status, content, entity }))
5742 }
5743}
5744
5745pub async fn get_metric_highlights(configuration: &configuration::Configuration, metric_name: &str) -> Result<models::O11yPeriodO11yMetricHighlightsOut, Error<GetMetricHighlightsError>> {
5747 let p_metric_name = metric_name;
5749
5750 let uri_str = format!("{}/v1/o11y/metrics/highlights", configuration.base_path);
5751 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
5752
5753 req_builder = req_builder.query(&[("metricName", &p_metric_name.to_string())]);
5754 if let Some(ref user_agent) = configuration.user_agent {
5755 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
5756 }
5757 if let Some(ref token) = configuration.bearer_access_token {
5758 req_builder = req_builder.bearer_auth(token.to_owned());
5759 };
5760
5761 let req = req_builder.build()?;
5762 let resp = configuration.client.execute(req).await?;
5763
5764 let status = resp.status();
5765 let content_type = resp
5766 .headers()
5767 .get("content-type")
5768 .and_then(|v| v.to_str().ok())
5769 .unwrap_or("application/octet-stream");
5770 let content_type = super::ContentType::from(content_type);
5771
5772 if !status.is_client_error() && !status.is_server_error() {
5773 let content = resp.text().await?;
5774 match content_type {
5775 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
5776 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yMetricHighlightsOut`"))),
5777 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::O11yPeriodO11yMetricHighlightsOut`")))),
5778 }
5779 } else {
5780 let content = resp.text().await?;
5781 let entity: Option<GetMetricHighlightsError> = serde_json::from_str(&content).ok();
5782 Err(Error::ResponseError(ResponseContent { status, content, entity }))
5783 }
5784}
5785
5786pub async fn get_metric_metadata(configuration: &configuration::Configuration, metric_name: &str) -> Result<models::O11yPeriodO11yMetricMetadataOut, Error<GetMetricMetadataError>> {
5788 let p_metric_name = metric_name;
5790
5791 let uri_str = format!("{}/v1/o11y/metrics/metadata", configuration.base_path);
5792 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
5793
5794 req_builder = req_builder.query(&[("metricName", &p_metric_name.to_string())]);
5795 if let Some(ref user_agent) = configuration.user_agent {
5796 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
5797 }
5798 if let Some(ref token) = configuration.bearer_access_token {
5799 req_builder = req_builder.bearer_auth(token.to_owned());
5800 };
5801
5802 let req = req_builder.build()?;
5803 let resp = configuration.client.execute(req).await?;
5804
5805 let status = resp.status();
5806 let content_type = resp
5807 .headers()
5808 .get("content-type")
5809 .and_then(|v| v.to_str().ok())
5810 .unwrap_or("application/octet-stream");
5811 let content_type = super::ContentType::from(content_type);
5812
5813 if !status.is_client_error() && !status.is_server_error() {
5814 let content = resp.text().await?;
5815 match content_type {
5816 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
5817 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yMetricMetadataOut`"))),
5818 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::O11yPeriodO11yMetricMetadataOut`")))),
5819 }
5820 } else {
5821 let content = resp.text().await?;
5822 let entity: Option<GetMetricMetadataError> = serde_json::from_str(&content).ok();
5823 Err(Error::ResponseError(ResponseContent { status, content, entity }))
5824 }
5825}
5826
5827pub async fn get_metric_reduction_rule_by_id(configuration: &configuration::Configuration, id: &str) -> Result<models::O11yPeriodO11yReductionRuleOut, Error<GetMetricReductionRuleByIdError>> {
5829 let p_id = id;
5831
5832 let uri_str = format!("{}/v1/o11y/metric_reduction_rules/{id}", configuration.base_path, id=crate::apis::urlencode(p_id));
5833 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
5834
5835 if let Some(ref user_agent) = configuration.user_agent {
5836 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
5837 }
5838 if let Some(ref token) = configuration.bearer_access_token {
5839 req_builder = req_builder.bearer_auth(token.to_owned());
5840 };
5841
5842 let req = req_builder.build()?;
5843 let resp = configuration.client.execute(req).await?;
5844
5845 let status = resp.status();
5846 let content_type = resp
5847 .headers()
5848 .get("content-type")
5849 .and_then(|v| v.to_str().ok())
5850 .unwrap_or("application/octet-stream");
5851 let content_type = super::ContentType::from(content_type);
5852
5853 if !status.is_client_error() && !status.is_server_error() {
5854 let content = resp.text().await?;
5855 match content_type {
5856 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
5857 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yReductionRuleOut`"))),
5858 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::O11yPeriodO11yReductionRuleOut`")))),
5859 }
5860 } else {
5861 let content = resp.text().await?;
5862 let entity: Option<GetMetricReductionRuleByIdError> = serde_json::from_str(&content).ok();
5863 Err(Error::ResponseError(ResponseContent { status, content, entity }))
5864 }
5865}
5866
5867pub async fn get_metric_reduction_rule_stats(configuration: &configuration::Configuration, ) -> Result<models::O11yPeriodO11yReductionStatsOut, Error<GetMetricReductionRuleStatsError>> {
5869
5870 let uri_str = format!("{}/v1/o11y/metric_reduction_rules/stats", configuration.base_path);
5871 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
5872
5873 if let Some(ref user_agent) = configuration.user_agent {
5874 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
5875 }
5876 if let Some(ref token) = configuration.bearer_access_token {
5877 req_builder = req_builder.bearer_auth(token.to_owned());
5878 };
5879
5880 let req = req_builder.build()?;
5881 let resp = configuration.client.execute(req).await?;
5882
5883 let status = resp.status();
5884 let content_type = resp
5885 .headers()
5886 .get("content-type")
5887 .and_then(|v| v.to_str().ok())
5888 .unwrap_or("application/octet-stream");
5889 let content_type = super::ContentType::from(content_type);
5890
5891 if !status.is_client_error() && !status.is_server_error() {
5892 let content = resp.text().await?;
5893 match content_type {
5894 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
5895 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yReductionStatsOut`"))),
5896 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::O11yPeriodO11yReductionStatsOut`")))),
5897 }
5898 } else {
5899 let content = resp.text().await?;
5900 let entity: Option<GetMetricReductionRuleStatsError> = serde_json::from_str(&content).ok();
5901 Err(Error::ResponseError(ResponseContent { status, content, entity }))
5902 }
5903}
5904
5905pub async fn get_metric_reduction_rule_timeseries(configuration: &configuration::Configuration, ) -> Result<models::O11yPeriodO11yReductionSeriesOut, Error<GetMetricReductionRuleTimeseriesError>> {
5907
5908 let uri_str = format!("{}/v1/o11y/metric_reduction_rules/timeseries", configuration.base_path);
5909 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
5910
5911 if let Some(ref user_agent) = configuration.user_agent {
5912 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
5913 }
5914 if let Some(ref token) = configuration.bearer_access_token {
5915 req_builder = req_builder.bearer_auth(token.to_owned());
5916 };
5917
5918 let req = req_builder.build()?;
5919 let resp = configuration.client.execute(req).await?;
5920
5921 let status = resp.status();
5922 let content_type = resp
5923 .headers()
5924 .get("content-type")
5925 .and_then(|v| v.to_str().ok())
5926 .unwrap_or("application/octet-stream");
5927 let content_type = super::ContentType::from(content_type);
5928
5929 if !status.is_client_error() && !status.is_server_error() {
5930 let content = resp.text().await?;
5931 match content_type {
5932 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
5933 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yReductionSeriesOut`"))),
5934 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::O11yPeriodO11yReductionSeriesOut`")))),
5935 }
5936 } else {
5937 let content = resp.text().await?;
5938 let entity: Option<GetMetricReductionRuleTimeseriesError> = serde_json::from_str(&content).ok();
5939 Err(Error::ResponseError(ResponseContent { status, content, entity }))
5940 }
5941}
5942
5943pub async fn get_metrics_onboarding_status(configuration: &configuration::Configuration, ) -> Result<models::O11yPeriodO11yMetricOnboardingOut, Error<GetMetricsOnboardingStatusError>> {
5945
5946 let uri_str = format!("{}/v1/o11y/metrics/onboarding", configuration.base_path);
5947 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
5948
5949 if let Some(ref user_agent) = configuration.user_agent {
5950 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
5951 }
5952 if let Some(ref token) = configuration.bearer_access_token {
5953 req_builder = req_builder.bearer_auth(token.to_owned());
5954 };
5955
5956 let req = req_builder.build()?;
5957 let resp = configuration.client.execute(req).await?;
5958
5959 let status = resp.status();
5960 let content_type = resp
5961 .headers()
5962 .get("content-type")
5963 .and_then(|v| v.to_str().ok())
5964 .unwrap_or("application/octet-stream");
5965 let content_type = super::ContentType::from(content_type);
5966
5967 if !status.is_client_error() && !status.is_server_error() {
5968 let content = resp.text().await?;
5969 match content_type {
5970 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
5971 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yMetricOnboardingOut`"))),
5972 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::O11yPeriodO11yMetricOnboardingOut`")))),
5973 }
5974 } else {
5975 let content = resp.text().await?;
5976 let entity: Option<GetMetricsOnboardingStatusError> = serde_json::from_str(&content).ok();
5977 Err(Error::ResponseError(ResponseContent { status, content, entity }))
5978 }
5979}
5980
5981pub async fn get_metrics_stats(configuration: &configuration::Configuration, o11y_period_o11y_metric_stats_in: models::O11yPeriodO11yMetricStatsIn) -> Result<models::O11yPeriodO11yMetricStatsOut, Error<GetMetricsStatsError>> {
5983 let p_o11y_period_o11y_metric_stats_in = o11y_period_o11y_metric_stats_in;
5985
5986 let uri_str = format!("{}/v1/o11y/metrics/stats", configuration.base_path);
5987 let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
5988
5989 if let Some(ref user_agent) = configuration.user_agent {
5990 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
5991 }
5992 if let Some(ref token) = configuration.bearer_access_token {
5993 req_builder = req_builder.bearer_auth(token.to_owned());
5994 };
5995 req_builder = req_builder.json(&p_o11y_period_o11y_metric_stats_in);
5996
5997 let req = req_builder.build()?;
5998 let resp = configuration.client.execute(req).await?;
5999
6000 let status = resp.status();
6001 let content_type = resp
6002 .headers()
6003 .get("content-type")
6004 .and_then(|v| v.to_str().ok())
6005 .unwrap_or("application/octet-stream");
6006 let content_type = super::ContentType::from(content_type);
6007
6008 if !status.is_client_error() && !status.is_server_error() {
6009 let content = resp.text().await?;
6010 match content_type {
6011 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
6012 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yMetricStatsOut`"))),
6013 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::O11yPeriodO11yMetricStatsOut`")))),
6014 }
6015 } else {
6016 let content = resp.text().await?;
6017 let entity: Option<GetMetricsStatsError> = serde_json::from_str(&content).ok();
6018 Err(Error::ResponseError(ResponseContent { status, content, entity }))
6019 }
6020}
6021
6022pub async fn get_metrics_treemap(configuration: &configuration::Configuration, o11y_period_o11y_metric_treemap_in: models::O11yPeriodO11yMetricTreemapIn) -> Result<models::O11yPeriodO11yMetricTreemapOut, Error<GetMetricsTreemapError>> {
6024 let p_o11y_period_o11y_metric_treemap_in = o11y_period_o11y_metric_treemap_in;
6026
6027 let uri_str = format!("{}/v1/o11y/metrics/treemap", configuration.base_path);
6028 let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
6029
6030 if let Some(ref user_agent) = configuration.user_agent {
6031 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
6032 }
6033 if let Some(ref token) = configuration.bearer_access_token {
6034 req_builder = req_builder.bearer_auth(token.to_owned());
6035 };
6036 req_builder = req_builder.json(&p_o11y_period_o11y_metric_treemap_in);
6037
6038 let req = req_builder.build()?;
6039 let resp = configuration.client.execute(req).await?;
6040
6041 let status = resp.status();
6042 let content_type = resp
6043 .headers()
6044 .get("content-type")
6045 .and_then(|v| v.to_str().ok())
6046 .unwrap_or("application/octet-stream");
6047 let content_type = super::ContentType::from(content_type);
6048
6049 if !status.is_client_error() && !status.is_server_error() {
6050 let content = resp.text().await?;
6051 match content_type {
6052 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
6053 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yMetricTreemapOut`"))),
6054 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::O11yPeriodO11yMetricTreemapOut`")))),
6055 }
6056 } else {
6057 let content = resp.text().await?;
6058 let entity: Option<GetMetricsTreemapError> = serde_json::from_str(&content).ok();
6059 Err(Error::ResponseError(ResponseContent { status, content, entity }))
6060 }
6061}
6062
6063pub async fn get_my_organization(configuration: &configuration::Configuration, ) -> Result<models::O11yPeriodO11yOrganizationOut, Error<GetMyOrganizationError>> {
6065
6066 let uri_str = format!("{}/v1/o11y/orgs/me", configuration.base_path);
6067 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
6068
6069 if let Some(ref user_agent) = configuration.user_agent {
6070 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
6071 }
6072 if let Some(ref token) = configuration.bearer_access_token {
6073 req_builder = req_builder.bearer_auth(token.to_owned());
6074 };
6075
6076 let req = req_builder.build()?;
6077 let resp = configuration.client.execute(req).await?;
6078
6079 let status = resp.status();
6080 let content_type = resp
6081 .headers()
6082 .get("content-type")
6083 .and_then(|v| v.to_str().ok())
6084 .unwrap_or("application/octet-stream");
6085 let content_type = super::ContentType::from(content_type);
6086
6087 if !status.is_client_error() && !status.is_server_error() {
6088 let content = resp.text().await?;
6089 match content_type {
6090 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
6091 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yOrganizationOut`"))),
6092 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::O11yPeriodO11yOrganizationOut`")))),
6093 }
6094 } else {
6095 let content = resp.text().await?;
6096 let entity: Option<GetMyOrganizationError> = serde_json::from_str(&content).ok();
6097 Err(Error::ResponseError(ResponseContent { status, content, entity }))
6098 }
6099}
6100
6101pub async fn get_my_service_account(configuration: &configuration::Configuration, ) -> Result<models::O11yPeriodO11yServiceAccountOut, Error<GetMyServiceAccountError>> {
6103
6104 let uri_str = format!("{}/v1/o11y/service_accounts/me", configuration.base_path);
6105 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
6106
6107 if let Some(ref user_agent) = configuration.user_agent {
6108 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
6109 }
6110 if let Some(ref token) = configuration.bearer_access_token {
6111 req_builder = req_builder.bearer_auth(token.to_owned());
6112 };
6113
6114 let req = req_builder.build()?;
6115 let resp = configuration.client.execute(req).await?;
6116
6117 let status = resp.status();
6118 let content_type = resp
6119 .headers()
6120 .get("content-type")
6121 .and_then(|v| v.to_str().ok())
6122 .unwrap_or("application/octet-stream");
6123 let content_type = super::ContentType::from(content_type);
6124
6125 if !status.is_client_error() && !status.is_server_error() {
6126 let content = resp.text().await?;
6127 match content_type {
6128 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
6129 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yServiceAccountOut`"))),
6130 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::O11yPeriodO11yServiceAccountOut`")))),
6131 }
6132 } else {
6133 let content = resp.text().await?;
6134 let entity: Option<GetMyServiceAccountError> = serde_json::from_str(&content).ok();
6135 Err(Error::ResponseError(ResponseContent { status, content, entity }))
6136 }
6137}
6138
6139pub async fn get_my_user(configuration: &configuration::Configuration, ) -> Result<models::O11yPeriodO11yUserWithRolesOut, Error<GetMyUserError>> {
6141
6142 let uri_str = format!("{}/v1/o11y/users/me", configuration.base_path);
6143 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
6144
6145 if let Some(ref user_agent) = configuration.user_agent {
6146 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
6147 }
6148 if let Some(ref token) = configuration.bearer_access_token {
6149 req_builder = req_builder.bearer_auth(token.to_owned());
6150 };
6151
6152 let req = req_builder.build()?;
6153 let resp = configuration.client.execute(req).await?;
6154
6155 let status = resp.status();
6156 let content_type = resp
6157 .headers()
6158 .get("content-type")
6159 .and_then(|v| v.to_str().ok())
6160 .unwrap_or("application/octet-stream");
6161 let content_type = super::ContentType::from(content_type);
6162
6163 if !status.is_client_error() && !status.is_server_error() {
6164 let content = resp.text().await?;
6165 match content_type {
6166 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
6167 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yUserWithRolesOut`"))),
6168 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::O11yPeriodO11yUserWithRolesOut`")))),
6169 }
6170 } else {
6171 let content = resp.text().await?;
6172 let entity: Option<GetMyUserError> = serde_json::from_str(&content).ok();
6173 Err(Error::ResponseError(ResponseContent { status, content, entity }))
6174 }
6175}
6176
6177pub async fn get_my_user_deprecated(configuration: &configuration::Configuration, ) -> Result<models::O11yPeriodO11yDeprecatedUserOut, Error<GetMyUserDeprecatedError>> {
6179
6180 let uri_str = format!("{}/v1/o11y/user/me", configuration.base_path);
6181 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
6182
6183 if let Some(ref user_agent) = configuration.user_agent {
6184 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
6185 }
6186 if let Some(ref token) = configuration.bearer_access_token {
6187 req_builder = req_builder.bearer_auth(token.to_owned());
6188 };
6189
6190 let req = req_builder.build()?;
6191 let resp = configuration.client.execute(req).await?;
6192
6193 let status = resp.status();
6194 let content_type = resp
6195 .headers()
6196 .get("content-type")
6197 .and_then(|v| v.to_str().ok())
6198 .unwrap_or("application/octet-stream");
6199 let content_type = super::ContentType::from(content_type);
6200
6201 if !status.is_client_error() && !status.is_server_error() {
6202 let content = resp.text().await?;
6203 match content_type {
6204 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
6205 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yDeprecatedUserOut`"))),
6206 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::O11yPeriodO11yDeprecatedUserOut`")))),
6207 }
6208 } else {
6209 let content = resp.text().await?;
6210 let entity: Option<GetMyUserDeprecatedError> = serde_json::from_str(&content).ok();
6211 Err(Error::ResponseError(ResponseContent { status, content, entity }))
6212 }
6213}
6214
6215pub async fn get_o11y_alerts_last(configuration: &configuration::Configuration, ) -> Result<(), Error<GetO11yAlertsLastError>> {
6217
6218 let uri_str = format!("{}/v1/o11y/alerts/last", configuration.base_path);
6219 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
6220
6221 if let Some(ref user_agent) = configuration.user_agent {
6222 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
6223 }
6224 if let Some(ref token) = configuration.bearer_access_token {
6225 req_builder = req_builder.bearer_auth(token.to_owned());
6226 };
6227
6228 let req = req_builder.build()?;
6229 let resp = configuration.client.execute(req).await?;
6230
6231 let status = resp.status();
6232
6233 if !status.is_client_error() && !status.is_server_error() {
6234 Ok(())
6235 } else {
6236 let content = resp.text().await?;
6237 let entity: Option<GetO11yAlertsLastError> = serde_json::from_str(&content).ok();
6238 Err(Error::ResponseError(ResponseContent { status, content, entity }))
6239 }
6240}
6241
6242pub async fn get_o11y_autocomplete_aggregate_attributes(configuration: &configuration::Configuration, data_source: Option<&str>, aggregate_operator: Option<&str>, search_text: Option<&str>, limit: Option<i32>) -> Result<models::O11yPeriodO11yAggregateAttributesOut, Error<GetO11yAutocompleteAggregateAttributesError>> {
6244 let p_data_source = data_source;
6246 let p_aggregate_operator = aggregate_operator;
6247 let p_search_text = search_text;
6248 let p_limit = limit;
6249
6250 let uri_str = format!("{}/v1/o11y/autocomplete/aggregate_attributes", configuration.base_path);
6251 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
6252
6253 if let Some(ref param_value) = p_data_source {
6254 req_builder = req_builder.query(&[("dataSource", ¶m_value.to_string())]);
6255 }
6256 if let Some(ref param_value) = p_aggregate_operator {
6257 req_builder = req_builder.query(&[("aggregateOperator", ¶m_value.to_string())]);
6258 }
6259 if let Some(ref param_value) = p_search_text {
6260 req_builder = req_builder.query(&[("searchText", ¶m_value.to_string())]);
6261 }
6262 if let Some(ref param_value) = p_limit {
6263 req_builder = req_builder.query(&[("limit", ¶m_value.to_string())]);
6264 }
6265 if let Some(ref user_agent) = configuration.user_agent {
6266 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
6267 }
6268 if let Some(ref token) = configuration.bearer_access_token {
6269 req_builder = req_builder.bearer_auth(token.to_owned());
6270 };
6271
6272 let req = req_builder.build()?;
6273 let resp = configuration.client.execute(req).await?;
6274
6275 let status = resp.status();
6276 let content_type = resp
6277 .headers()
6278 .get("content-type")
6279 .and_then(|v| v.to_str().ok())
6280 .unwrap_or("application/octet-stream");
6281 let content_type = super::ContentType::from(content_type);
6282
6283 if !status.is_client_error() && !status.is_server_error() {
6284 let content = resp.text().await?;
6285 match content_type {
6286 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
6287 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yAggregateAttributesOut`"))),
6288 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::O11yPeriodO11yAggregateAttributesOut`")))),
6289 }
6290 } else {
6291 let content = resp.text().await?;
6292 let entity: Option<GetO11yAutocompleteAggregateAttributesError> = serde_json::from_str(&content).ok();
6293 Err(Error::ResponseError(ResponseContent { status, content, entity }))
6294 }
6295}
6296
6297pub async fn get_o11y_autocomplete_attribute_keys(configuration: &configuration::Configuration, data_source: Option<&str>, aggregate_operator: Option<&str>, aggregate_attribute: Option<&str>, search_text: Option<&str>, tag_type: Option<&str>, limit: Option<i32>) -> Result<models::O11yPeriodO11yAttributeKeysOut, Error<GetO11yAutocompleteAttributeKeysError>> {
6299 let p_data_source = data_source;
6301 let p_aggregate_operator = aggregate_operator;
6302 let p_aggregate_attribute = aggregate_attribute;
6303 let p_search_text = search_text;
6304 let p_tag_type = tag_type;
6305 let p_limit = limit;
6306
6307 let uri_str = format!("{}/v1/o11y/autocomplete/attribute_keys", configuration.base_path);
6308 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
6309
6310 if let Some(ref param_value) = p_data_source {
6311 req_builder = req_builder.query(&[("dataSource", ¶m_value.to_string())]);
6312 }
6313 if let Some(ref param_value) = p_aggregate_operator {
6314 req_builder = req_builder.query(&[("aggregateOperator", ¶m_value.to_string())]);
6315 }
6316 if let Some(ref param_value) = p_aggregate_attribute {
6317 req_builder = req_builder.query(&[("aggregateAttribute", ¶m_value.to_string())]);
6318 }
6319 if let Some(ref param_value) = p_search_text {
6320 req_builder = req_builder.query(&[("searchText", ¶m_value.to_string())]);
6321 }
6322 if let Some(ref param_value) = p_tag_type {
6323 req_builder = req_builder.query(&[("tagType", ¶m_value.to_string())]);
6324 }
6325 if let Some(ref param_value) = p_limit {
6326 req_builder = req_builder.query(&[("limit", ¶m_value.to_string())]);
6327 }
6328 if let Some(ref user_agent) = configuration.user_agent {
6329 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
6330 }
6331 if let Some(ref token) = configuration.bearer_access_token {
6332 req_builder = req_builder.bearer_auth(token.to_owned());
6333 };
6334
6335 let req = req_builder.build()?;
6336 let resp = configuration.client.execute(req).await?;
6337
6338 let status = resp.status();
6339 let content_type = resp
6340 .headers()
6341 .get("content-type")
6342 .and_then(|v| v.to_str().ok())
6343 .unwrap_or("application/octet-stream");
6344 let content_type = super::ContentType::from(content_type);
6345
6346 if !status.is_client_error() && !status.is_server_error() {
6347 let content = resp.text().await?;
6348 match content_type {
6349 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
6350 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yAttributeKeysOut`"))),
6351 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::O11yPeriodO11yAttributeKeysOut`")))),
6352 }
6353 } else {
6354 let content = resp.text().await?;
6355 let entity: Option<GetO11yAutocompleteAttributeKeysError> = serde_json::from_str(&content).ok();
6356 Err(Error::ResponseError(ResponseContent { status, content, entity }))
6357 }
6358}
6359
6360pub async fn get_o11y_autocomplete_attribute_values(configuration: &configuration::Configuration, data_source: Option<&str>, aggregate_operator: Option<&str>, aggregate_attribute: Option<&str>, attribute_key: Option<&str>, filter_attribute_key_data_type: Option<&str>, search_text: Option<&str>, tag_type: Option<&str>, limit: Option<i32>) -> Result<models::O11yPeriodO11yAttributeValuesOut, Error<GetO11yAutocompleteAttributeValuesError>> {
6362 let p_data_source = data_source;
6364 let p_aggregate_operator = aggregate_operator;
6365 let p_aggregate_attribute = aggregate_attribute;
6366 let p_attribute_key = attribute_key;
6367 let p_filter_attribute_key_data_type = filter_attribute_key_data_type;
6368 let p_search_text = search_text;
6369 let p_tag_type = tag_type;
6370 let p_limit = limit;
6371
6372 let uri_str = format!("{}/v1/o11y/autocomplete/attribute_values", configuration.base_path);
6373 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
6374
6375 if let Some(ref param_value) = p_data_source {
6376 req_builder = req_builder.query(&[("dataSource", ¶m_value.to_string())]);
6377 }
6378 if let Some(ref param_value) = p_aggregate_operator {
6379 req_builder = req_builder.query(&[("aggregateOperator", ¶m_value.to_string())]);
6380 }
6381 if let Some(ref param_value) = p_aggregate_attribute {
6382 req_builder = req_builder.query(&[("aggregateAttribute", ¶m_value.to_string())]);
6383 }
6384 if let Some(ref param_value) = p_attribute_key {
6385 req_builder = req_builder.query(&[("attributeKey", ¶m_value.to_string())]);
6386 }
6387 if let Some(ref param_value) = p_filter_attribute_key_data_type {
6388 req_builder = req_builder.query(&[("filterAttributeKeyDataType", ¶m_value.to_string())]);
6389 }
6390 if let Some(ref param_value) = p_search_text {
6391 req_builder = req_builder.query(&[("searchText", ¶m_value.to_string())]);
6392 }
6393 if let Some(ref param_value) = p_tag_type {
6394 req_builder = req_builder.query(&[("tagType", ¶m_value.to_string())]);
6395 }
6396 if let Some(ref param_value) = p_limit {
6397 req_builder = req_builder.query(&[("limit", ¶m_value.to_string())]);
6398 }
6399 if let Some(ref user_agent) = configuration.user_agent {
6400 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
6401 }
6402 if let Some(ref token) = configuration.bearer_access_token {
6403 req_builder = req_builder.bearer_auth(token.to_owned());
6404 };
6405
6406 let req = req_builder.build()?;
6407 let resp = configuration.client.execute(req).await?;
6408
6409 let status = resp.status();
6410 let content_type = resp
6411 .headers()
6412 .get("content-type")
6413 .and_then(|v| v.to_str().ok())
6414 .unwrap_or("application/octet-stream");
6415 let content_type = super::ContentType::from(content_type);
6416
6417 if !status.is_client_error() && !status.is_server_error() {
6418 let content = resp.text().await?;
6419 match content_type {
6420 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
6421 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yAttributeValuesOut`"))),
6422 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::O11yPeriodO11yAttributeValuesOut`")))),
6423 }
6424 } else {
6425 let content = resp.text().await?;
6426 let entity: Option<GetO11yAutocompleteAttributeValuesError> = serde_json::from_str(&content).ok();
6427 Err(Error::ResponseError(ResponseContent { status, content, entity }))
6428 }
6429}
6430
6431pub async fn get_o11y_availability(configuration: &configuration::Configuration, range: Option<i32>, step_sec: Option<i32>) -> Result<models::O11yPeriodAvailabilityResponse, Error<GetO11yAvailabilityError>> {
6433 let p_range = range;
6435 let p_step_sec = step_sec;
6436
6437 let uri_str = format!("{}/v1/o11y/availability", configuration.base_path);
6438 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
6439
6440 if let Some(ref param_value) = p_range {
6441 req_builder = req_builder.query(&[("range", ¶m_value.to_string())]);
6442 }
6443 if let Some(ref param_value) = p_step_sec {
6444 req_builder = req_builder.query(&[("stepSec", ¶m_value.to_string())]);
6445 }
6446 if let Some(ref user_agent) = configuration.user_agent {
6447 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
6448 }
6449 if let Some(ref token) = configuration.bearer_access_token {
6450 req_builder = req_builder.bearer_auth(token.to_owned());
6451 };
6452
6453 let req = req_builder.build()?;
6454 let resp = configuration.client.execute(req).await?;
6455
6456 let status = resp.status();
6457 let content_type = resp
6458 .headers()
6459 .get("content-type")
6460 .and_then(|v| v.to_str().ok())
6461 .unwrap_or("application/octet-stream");
6462 let content_type = super::ContentType::from(content_type);
6463
6464 if !status.is_client_error() && !status.is_server_error() {
6465 let content = resp.text().await?;
6466 match content_type {
6467 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
6468 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodAvailabilityResponse`"))),
6469 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::O11yPeriodAvailabilityResponse`")))),
6470 }
6471 } else {
6472 let content = resp.text().await?;
6473 let entity: Option<GetO11yAvailabilityError> = serde_json::from_str(&content).ok();
6474 Err(Error::ResponseError(ResponseContent { status, content, entity }))
6475 }
6476}
6477
6478pub async fn get_o11y_clusters_attribute_keys(configuration: &configuration::Configuration, data_source: Option<&str>, aggregate_operator: Option<&str>, aggregate_attribute: Option<&str>, search_text: Option<&str>, tag_type: Option<&str>, limit: Option<i32>) -> Result<models::O11yPeriodO11yInfraAttributeKeysOut, Error<GetO11yClustersAttributeKeysError>> {
6480 let p_data_source = data_source;
6482 let p_aggregate_operator = aggregate_operator;
6483 let p_aggregate_attribute = aggregate_attribute;
6484 let p_search_text = search_text;
6485 let p_tag_type = tag_type;
6486 let p_limit = limit;
6487
6488 let uri_str = format!("{}/v1/o11y/clusters/attribute_keys", configuration.base_path);
6489 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
6490
6491 if let Some(ref param_value) = p_data_source {
6492 req_builder = req_builder.query(&[("dataSource", ¶m_value.to_string())]);
6493 }
6494 if let Some(ref param_value) = p_aggregate_operator {
6495 req_builder = req_builder.query(&[("aggregateOperator", ¶m_value.to_string())]);
6496 }
6497 if let Some(ref param_value) = p_aggregate_attribute {
6498 req_builder = req_builder.query(&[("aggregateAttribute", ¶m_value.to_string())]);
6499 }
6500 if let Some(ref param_value) = p_search_text {
6501 req_builder = req_builder.query(&[("searchText", ¶m_value.to_string())]);
6502 }
6503 if let Some(ref param_value) = p_tag_type {
6504 req_builder = req_builder.query(&[("tagType", ¶m_value.to_string())]);
6505 }
6506 if let Some(ref param_value) = p_limit {
6507 req_builder = req_builder.query(&[("limit", ¶m_value.to_string())]);
6508 }
6509 if let Some(ref user_agent) = configuration.user_agent {
6510 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
6511 }
6512 if let Some(ref token) = configuration.bearer_access_token {
6513 req_builder = req_builder.bearer_auth(token.to_owned());
6514 };
6515
6516 let req = req_builder.build()?;
6517 let resp = configuration.client.execute(req).await?;
6518
6519 let status = resp.status();
6520 let content_type = resp
6521 .headers()
6522 .get("content-type")
6523 .and_then(|v| v.to_str().ok())
6524 .unwrap_or("application/octet-stream");
6525 let content_type = super::ContentType::from(content_type);
6526
6527 if !status.is_client_error() && !status.is_server_error() {
6528 let content = resp.text().await?;
6529 match content_type {
6530 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
6531 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yInfraAttributeKeysOut`"))),
6532 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::O11yPeriodO11yInfraAttributeKeysOut`")))),
6533 }
6534 } else {
6535 let content = resp.text().await?;
6536 let entity: Option<GetO11yClustersAttributeKeysError> = serde_json::from_str(&content).ok();
6537 Err(Error::ResponseError(ResponseContent { status, content, entity }))
6538 }
6539}
6540
6541pub async fn get_o11y_clusters_attribute_values(configuration: &configuration::Configuration, data_source: Option<&str>, aggregate_operator: Option<&str>, aggregate_attribute: Option<&str>, attribute_key: Option<&str>, filter_attribute_key_data_type: Option<&str>, search_text: Option<&str>, tag_type: Option<&str>, limit: Option<i32>) -> Result<models::O11yPeriodO11yInfraAttributeValuesOut, Error<GetO11yClustersAttributeValuesError>> {
6543 let p_data_source = data_source;
6545 let p_aggregate_operator = aggregate_operator;
6546 let p_aggregate_attribute = aggregate_attribute;
6547 let p_attribute_key = attribute_key;
6548 let p_filter_attribute_key_data_type = filter_attribute_key_data_type;
6549 let p_search_text = search_text;
6550 let p_tag_type = tag_type;
6551 let p_limit = limit;
6552
6553 let uri_str = format!("{}/v1/o11y/clusters/attribute_values", configuration.base_path);
6554 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
6555
6556 if let Some(ref param_value) = p_data_source {
6557 req_builder = req_builder.query(&[("dataSource", ¶m_value.to_string())]);
6558 }
6559 if let Some(ref param_value) = p_aggregate_operator {
6560 req_builder = req_builder.query(&[("aggregateOperator", ¶m_value.to_string())]);
6561 }
6562 if let Some(ref param_value) = p_aggregate_attribute {
6563 req_builder = req_builder.query(&[("aggregateAttribute", ¶m_value.to_string())]);
6564 }
6565 if let Some(ref param_value) = p_attribute_key {
6566 req_builder = req_builder.query(&[("attributeKey", ¶m_value.to_string())]);
6567 }
6568 if let Some(ref param_value) = p_filter_attribute_key_data_type {
6569 req_builder = req_builder.query(&[("filterAttributeKeyDataType", ¶m_value.to_string())]);
6570 }
6571 if let Some(ref param_value) = p_search_text {
6572 req_builder = req_builder.query(&[("searchText", ¶m_value.to_string())]);
6573 }
6574 if let Some(ref param_value) = p_tag_type {
6575 req_builder = req_builder.query(&[("tagType", ¶m_value.to_string())]);
6576 }
6577 if let Some(ref param_value) = p_limit {
6578 req_builder = req_builder.query(&[("limit", ¶m_value.to_string())]);
6579 }
6580 if let Some(ref user_agent) = configuration.user_agent {
6581 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
6582 }
6583 if let Some(ref token) = configuration.bearer_access_token {
6584 req_builder = req_builder.bearer_auth(token.to_owned());
6585 };
6586
6587 let req = req_builder.build()?;
6588 let resp = configuration.client.execute(req).await?;
6589
6590 let status = resp.status();
6591 let content_type = resp
6592 .headers()
6593 .get("content-type")
6594 .and_then(|v| v.to_str().ok())
6595 .unwrap_or("application/octet-stream");
6596 let content_type = super::ContentType::from(content_type);
6597
6598 if !status.is_client_error() && !status.is_server_error() {
6599 let content = resp.text().await?;
6600 match content_type {
6601 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
6602 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yInfraAttributeValuesOut`"))),
6603 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::O11yPeriodO11yInfraAttributeValuesOut`")))),
6604 }
6605 } else {
6606 let content = resp.text().await?;
6607 let entity: Option<GetO11yClustersAttributeValuesError> = serde_json::from_str(&content).ok();
6608 Err(Error::ResponseError(ResponseContent { status, content, entity }))
6609 }
6610}
6611
6612pub async fn get_o11y_complete_google(configuration: &configuration::Configuration, ) -> Result<(), Error<GetO11yCompleteGoogleError>> {
6614
6615 let uri_str = format!("{}/v1/o11y/complete/google", configuration.base_path);
6616 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
6617
6618 if let Some(ref user_agent) = configuration.user_agent {
6619 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
6620 }
6621 if let Some(ref token) = configuration.bearer_access_token {
6622 req_builder = req_builder.bearer_auth(token.to_owned());
6623 };
6624
6625 let req = req_builder.build()?;
6626 let resp = configuration.client.execute(req).await?;
6627
6628 let status = resp.status();
6629
6630 if !status.is_client_error() && !status.is_server_error() {
6631 Ok(())
6632 } else {
6633 let content = resp.text().await?;
6634 let entity: Option<GetO11yCompleteGoogleError> = serde_json::from_str(&content).ok();
6635 Err(Error::ResponseError(ResponseContent { status, content, entity }))
6636 }
6637}
6638
6639pub async fn get_o11y_complete_oidc(configuration: &configuration::Configuration, ) -> Result<(), Error<GetO11yCompleteOidcError>> {
6641
6642 let uri_str = format!("{}/v1/o11y/complete/oidc", configuration.base_path);
6643 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
6644
6645 if let Some(ref user_agent) = configuration.user_agent {
6646 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
6647 }
6648 if let Some(ref token) = configuration.bearer_access_token {
6649 req_builder = req_builder.bearer_auth(token.to_owned());
6650 };
6651
6652 let req = req_builder.build()?;
6653 let resp = configuration.client.execute(req).await?;
6654
6655 let status = resp.status();
6656
6657 if !status.is_client_error() && !status.is_server_error() {
6658 Ok(())
6659 } else {
6660 let content = resp.text().await?;
6661 let entity: Option<GetO11yCompleteOidcError> = serde_json::from_str(&content).ok();
6662 Err(Error::ResponseError(ResponseContent { status, content, entity }))
6663 }
6664}
6665
6666pub async fn get_o11y_daemonsets_attribute_keys(configuration: &configuration::Configuration, data_source: Option<&str>, aggregate_operator: Option<&str>, aggregate_attribute: Option<&str>, search_text: Option<&str>, tag_type: Option<&str>, limit: Option<i32>) -> Result<models::O11yPeriodO11yInfraAttributeKeysOut, Error<GetO11yDaemonsetsAttributeKeysError>> {
6668 let p_data_source = data_source;
6670 let p_aggregate_operator = aggregate_operator;
6671 let p_aggregate_attribute = aggregate_attribute;
6672 let p_search_text = search_text;
6673 let p_tag_type = tag_type;
6674 let p_limit = limit;
6675
6676 let uri_str = format!("{}/v1/o11y/daemonsets/attribute_keys", configuration.base_path);
6677 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
6678
6679 if let Some(ref param_value) = p_data_source {
6680 req_builder = req_builder.query(&[("dataSource", ¶m_value.to_string())]);
6681 }
6682 if let Some(ref param_value) = p_aggregate_operator {
6683 req_builder = req_builder.query(&[("aggregateOperator", ¶m_value.to_string())]);
6684 }
6685 if let Some(ref param_value) = p_aggregate_attribute {
6686 req_builder = req_builder.query(&[("aggregateAttribute", ¶m_value.to_string())]);
6687 }
6688 if let Some(ref param_value) = p_search_text {
6689 req_builder = req_builder.query(&[("searchText", ¶m_value.to_string())]);
6690 }
6691 if let Some(ref param_value) = p_tag_type {
6692 req_builder = req_builder.query(&[("tagType", ¶m_value.to_string())]);
6693 }
6694 if let Some(ref param_value) = p_limit {
6695 req_builder = req_builder.query(&[("limit", ¶m_value.to_string())]);
6696 }
6697 if let Some(ref user_agent) = configuration.user_agent {
6698 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
6699 }
6700 if let Some(ref token) = configuration.bearer_access_token {
6701 req_builder = req_builder.bearer_auth(token.to_owned());
6702 };
6703
6704 let req = req_builder.build()?;
6705 let resp = configuration.client.execute(req).await?;
6706
6707 let status = resp.status();
6708 let content_type = resp
6709 .headers()
6710 .get("content-type")
6711 .and_then(|v| v.to_str().ok())
6712 .unwrap_or("application/octet-stream");
6713 let content_type = super::ContentType::from(content_type);
6714
6715 if !status.is_client_error() && !status.is_server_error() {
6716 let content = resp.text().await?;
6717 match content_type {
6718 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
6719 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yInfraAttributeKeysOut`"))),
6720 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::O11yPeriodO11yInfraAttributeKeysOut`")))),
6721 }
6722 } else {
6723 let content = resp.text().await?;
6724 let entity: Option<GetO11yDaemonsetsAttributeKeysError> = serde_json::from_str(&content).ok();
6725 Err(Error::ResponseError(ResponseContent { status, content, entity }))
6726 }
6727}
6728
6729pub async fn get_o11y_daemonsets_attribute_values(configuration: &configuration::Configuration, data_source: Option<&str>, aggregate_operator: Option<&str>, aggregate_attribute: Option<&str>, attribute_key: Option<&str>, filter_attribute_key_data_type: Option<&str>, search_text: Option<&str>, tag_type: Option<&str>, limit: Option<i32>) -> Result<models::O11yPeriodO11yInfraAttributeValuesOut, Error<GetO11yDaemonsetsAttributeValuesError>> {
6731 let p_data_source = data_source;
6733 let p_aggregate_operator = aggregate_operator;
6734 let p_aggregate_attribute = aggregate_attribute;
6735 let p_attribute_key = attribute_key;
6736 let p_filter_attribute_key_data_type = filter_attribute_key_data_type;
6737 let p_search_text = search_text;
6738 let p_tag_type = tag_type;
6739 let p_limit = limit;
6740
6741 let uri_str = format!("{}/v1/o11y/daemonsets/attribute_values", configuration.base_path);
6742 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
6743
6744 if let Some(ref param_value) = p_data_source {
6745 req_builder = req_builder.query(&[("dataSource", ¶m_value.to_string())]);
6746 }
6747 if let Some(ref param_value) = p_aggregate_operator {
6748 req_builder = req_builder.query(&[("aggregateOperator", ¶m_value.to_string())]);
6749 }
6750 if let Some(ref param_value) = p_aggregate_attribute {
6751 req_builder = req_builder.query(&[("aggregateAttribute", ¶m_value.to_string())]);
6752 }
6753 if let Some(ref param_value) = p_attribute_key {
6754 req_builder = req_builder.query(&[("attributeKey", ¶m_value.to_string())]);
6755 }
6756 if let Some(ref param_value) = p_filter_attribute_key_data_type {
6757 req_builder = req_builder.query(&[("filterAttributeKeyDataType", ¶m_value.to_string())]);
6758 }
6759 if let Some(ref param_value) = p_search_text {
6760 req_builder = req_builder.query(&[("searchText", ¶m_value.to_string())]);
6761 }
6762 if let Some(ref param_value) = p_tag_type {
6763 req_builder = req_builder.query(&[("tagType", ¶m_value.to_string())]);
6764 }
6765 if let Some(ref param_value) = p_limit {
6766 req_builder = req_builder.query(&[("limit", ¶m_value.to_string())]);
6767 }
6768 if let Some(ref user_agent) = configuration.user_agent {
6769 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
6770 }
6771 if let Some(ref token) = configuration.bearer_access_token {
6772 req_builder = req_builder.bearer_auth(token.to_owned());
6773 };
6774
6775 let req = req_builder.build()?;
6776 let resp = configuration.client.execute(req).await?;
6777
6778 let status = resp.status();
6779 let content_type = resp
6780 .headers()
6781 .get("content-type")
6782 .and_then(|v| v.to_str().ok())
6783 .unwrap_or("application/octet-stream");
6784 let content_type = super::ContentType::from(content_type);
6785
6786 if !status.is_client_error() && !status.is_server_error() {
6787 let content = resp.text().await?;
6788 match content_type {
6789 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
6790 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yInfraAttributeValuesOut`"))),
6791 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::O11yPeriodO11yInfraAttributeValuesOut`")))),
6792 }
6793 } else {
6794 let content = resp.text().await?;
6795 let entity: Option<GetO11yDaemonsetsAttributeValuesError> = serde_json::from_str(&content).ok();
6796 Err(Error::ResponseError(ResponseContent { status, content, entity }))
6797 }
6798}
6799
6800pub async fn get_o11y_deployments_attribute_keys(configuration: &configuration::Configuration, data_source: Option<&str>, aggregate_operator: Option<&str>, aggregate_attribute: Option<&str>, search_text: Option<&str>, tag_type: Option<&str>, limit: Option<i32>) -> Result<models::O11yPeriodO11yInfraAttributeKeysOut, Error<GetO11yDeploymentsAttributeKeysError>> {
6802 let p_data_source = data_source;
6804 let p_aggregate_operator = aggregate_operator;
6805 let p_aggregate_attribute = aggregate_attribute;
6806 let p_search_text = search_text;
6807 let p_tag_type = tag_type;
6808 let p_limit = limit;
6809
6810 let uri_str = format!("{}/v1/o11y/deployments/attribute_keys", configuration.base_path);
6811 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
6812
6813 if let Some(ref param_value) = p_data_source {
6814 req_builder = req_builder.query(&[("dataSource", ¶m_value.to_string())]);
6815 }
6816 if let Some(ref param_value) = p_aggregate_operator {
6817 req_builder = req_builder.query(&[("aggregateOperator", ¶m_value.to_string())]);
6818 }
6819 if let Some(ref param_value) = p_aggregate_attribute {
6820 req_builder = req_builder.query(&[("aggregateAttribute", ¶m_value.to_string())]);
6821 }
6822 if let Some(ref param_value) = p_search_text {
6823 req_builder = req_builder.query(&[("searchText", ¶m_value.to_string())]);
6824 }
6825 if let Some(ref param_value) = p_tag_type {
6826 req_builder = req_builder.query(&[("tagType", ¶m_value.to_string())]);
6827 }
6828 if let Some(ref param_value) = p_limit {
6829 req_builder = req_builder.query(&[("limit", ¶m_value.to_string())]);
6830 }
6831 if let Some(ref user_agent) = configuration.user_agent {
6832 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
6833 }
6834 if let Some(ref token) = configuration.bearer_access_token {
6835 req_builder = req_builder.bearer_auth(token.to_owned());
6836 };
6837
6838 let req = req_builder.build()?;
6839 let resp = configuration.client.execute(req).await?;
6840
6841 let status = resp.status();
6842 let content_type = resp
6843 .headers()
6844 .get("content-type")
6845 .and_then(|v| v.to_str().ok())
6846 .unwrap_or("application/octet-stream");
6847 let content_type = super::ContentType::from(content_type);
6848
6849 if !status.is_client_error() && !status.is_server_error() {
6850 let content = resp.text().await?;
6851 match content_type {
6852 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
6853 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yInfraAttributeKeysOut`"))),
6854 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::O11yPeriodO11yInfraAttributeKeysOut`")))),
6855 }
6856 } else {
6857 let content = resp.text().await?;
6858 let entity: Option<GetO11yDeploymentsAttributeKeysError> = serde_json::from_str(&content).ok();
6859 Err(Error::ResponseError(ResponseContent { status, content, entity }))
6860 }
6861}
6862
6863pub async fn get_o11y_deployments_attribute_values(configuration: &configuration::Configuration, data_source: Option<&str>, aggregate_operator: Option<&str>, aggregate_attribute: Option<&str>, attribute_key: Option<&str>, filter_attribute_key_data_type: Option<&str>, search_text: Option<&str>, tag_type: Option<&str>, limit: Option<i32>) -> Result<models::O11yPeriodO11yInfraAttributeValuesOut, Error<GetO11yDeploymentsAttributeValuesError>> {
6865 let p_data_source = data_source;
6867 let p_aggregate_operator = aggregate_operator;
6868 let p_aggregate_attribute = aggregate_attribute;
6869 let p_attribute_key = attribute_key;
6870 let p_filter_attribute_key_data_type = filter_attribute_key_data_type;
6871 let p_search_text = search_text;
6872 let p_tag_type = tag_type;
6873 let p_limit = limit;
6874
6875 let uri_str = format!("{}/v1/o11y/deployments/attribute_values", configuration.base_path);
6876 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
6877
6878 if let Some(ref param_value) = p_data_source {
6879 req_builder = req_builder.query(&[("dataSource", ¶m_value.to_string())]);
6880 }
6881 if let Some(ref param_value) = p_aggregate_operator {
6882 req_builder = req_builder.query(&[("aggregateOperator", ¶m_value.to_string())]);
6883 }
6884 if let Some(ref param_value) = p_aggregate_attribute {
6885 req_builder = req_builder.query(&[("aggregateAttribute", ¶m_value.to_string())]);
6886 }
6887 if let Some(ref param_value) = p_attribute_key {
6888 req_builder = req_builder.query(&[("attributeKey", ¶m_value.to_string())]);
6889 }
6890 if let Some(ref param_value) = p_filter_attribute_key_data_type {
6891 req_builder = req_builder.query(&[("filterAttributeKeyDataType", ¶m_value.to_string())]);
6892 }
6893 if let Some(ref param_value) = p_search_text {
6894 req_builder = req_builder.query(&[("searchText", ¶m_value.to_string())]);
6895 }
6896 if let Some(ref param_value) = p_tag_type {
6897 req_builder = req_builder.query(&[("tagType", ¶m_value.to_string())]);
6898 }
6899 if let Some(ref param_value) = p_limit {
6900 req_builder = req_builder.query(&[("limit", ¶m_value.to_string())]);
6901 }
6902 if let Some(ref user_agent) = configuration.user_agent {
6903 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
6904 }
6905 if let Some(ref token) = configuration.bearer_access_token {
6906 req_builder = req_builder.bearer_auth(token.to_owned());
6907 };
6908
6909 let req = req_builder.build()?;
6910 let resp = configuration.client.execute(req).await?;
6911
6912 let status = resp.status();
6913 let content_type = resp
6914 .headers()
6915 .get("content-type")
6916 .and_then(|v| v.to_str().ok())
6917 .unwrap_or("application/octet-stream");
6918 let content_type = super::ContentType::from(content_type);
6919
6920 if !status.is_client_error() && !status.is_server_error() {
6921 let content = resp.text().await?;
6922 match content_type {
6923 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
6924 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yInfraAttributeValuesOut`"))),
6925 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::O11yPeriodO11yInfraAttributeValuesOut`")))),
6926 }
6927 } else {
6928 let content = resp.text().await?;
6929 let entity: Option<GetO11yDeploymentsAttributeValuesError> = serde_json::from_str(&content).ok();
6930 Err(Error::ResponseError(ResponseContent { status, content, entity }))
6931 }
6932}
6933
6934pub async fn get_o11y_disks(configuration: &configuration::Configuration, ) -> Result<Vec<models::O11yPeriodO11yDisk>, Error<GetO11yDisksError>> {
6936
6937 let uri_str = format!("{}/v1/o11y/disks", configuration.base_path);
6938 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
6939
6940 if let Some(ref user_agent) = configuration.user_agent {
6941 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
6942 }
6943 if let Some(ref token) = configuration.bearer_access_token {
6944 req_builder = req_builder.bearer_auth(token.to_owned());
6945 };
6946
6947 let req = req_builder.build()?;
6948 let resp = configuration.client.execute(req).await?;
6949
6950 let status = resp.status();
6951 let content_type = resp
6952 .headers()
6953 .get("content-type")
6954 .and_then(|v| v.to_str().ok())
6955 .unwrap_or("application/octet-stream");
6956 let content_type = super::ContentType::from(content_type);
6957
6958 if !status.is_client_error() && !status.is_server_error() {
6959 let content = resp.text().await?;
6960 match content_type {
6961 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
6962 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::O11yPeriodO11yDisk>`"))),
6963 ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<models::O11yPeriodO11yDisk>`")))),
6964 }
6965 } else {
6966 let content = resp.text().await?;
6967 let entity: Option<GetO11yDisksError> = serde_json::from_str(&content).ok();
6968 Err(Error::ResponseError(ResponseContent { status, content, entity }))
6969 }
6970}
6971
6972pub async fn get_o11y_errorfromerrorid(configuration: &configuration::Configuration, timestamp: &str, group_id: &str, error_id: Option<&str>) -> Result<models::O11yPeriodO11yErrorWithSpan, Error<GetO11yErrorfromerroridError>> {
6974 let p_timestamp = timestamp;
6976 let p_group_id = group_id;
6977 let p_error_id = error_id;
6978
6979 let uri_str = format!("{}/v1/o11y/errorFromErrorID", configuration.base_path);
6980 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
6981
6982 req_builder = req_builder.query(&[("timestamp", &p_timestamp.to_string())]);
6983 req_builder = req_builder.query(&[("groupID", &p_group_id.to_string())]);
6984 if let Some(ref param_value) = p_error_id {
6985 req_builder = req_builder.query(&[("errorID", ¶m_value.to_string())]);
6986 }
6987 if let Some(ref user_agent) = configuration.user_agent {
6988 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
6989 }
6990 if let Some(ref token) = configuration.bearer_access_token {
6991 req_builder = req_builder.bearer_auth(token.to_owned());
6992 };
6993
6994 let req = req_builder.build()?;
6995 let resp = configuration.client.execute(req).await?;
6996
6997 let status = resp.status();
6998 let content_type = resp
6999 .headers()
7000 .get("content-type")
7001 .and_then(|v| v.to_str().ok())
7002 .unwrap_or("application/octet-stream");
7003 let content_type = super::ContentType::from(content_type);
7004
7005 if !status.is_client_error() && !status.is_server_error() {
7006 let content = resp.text().await?;
7007 match content_type {
7008 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
7009 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yErrorWithSpan`"))),
7010 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::O11yPeriodO11yErrorWithSpan`")))),
7011 }
7012 } else {
7013 let content = resp.text().await?;
7014 let entity: Option<GetO11yErrorfromerroridError> = serde_json::from_str(&content).ok();
7015 Err(Error::ResponseError(ResponseContent { status, content, entity }))
7016 }
7017}
7018
7019pub async fn get_o11y_errorfromgroupid(configuration: &configuration::Configuration, timestamp: &str, group_id: &str, error_id: Option<&str>) -> Result<models::O11yPeriodO11yErrorWithSpan, Error<GetO11yErrorfromgroupidError>> {
7021 let p_timestamp = timestamp;
7023 let p_group_id = group_id;
7024 let p_error_id = error_id;
7025
7026 let uri_str = format!("{}/v1/o11y/errorFromGroupID", configuration.base_path);
7027 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
7028
7029 req_builder = req_builder.query(&[("timestamp", &p_timestamp.to_string())]);
7030 req_builder = req_builder.query(&[("groupID", &p_group_id.to_string())]);
7031 if let Some(ref param_value) = p_error_id {
7032 req_builder = req_builder.query(&[("errorID", ¶m_value.to_string())]);
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 let content_type = resp
7046 .headers()
7047 .get("content-type")
7048 .and_then(|v| v.to_str().ok())
7049 .unwrap_or("application/octet-stream");
7050 let content_type = super::ContentType::from(content_type);
7051
7052 if !status.is_client_error() && !status.is_server_error() {
7053 let content = resp.text().await?;
7054 match content_type {
7055 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
7056 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yErrorWithSpan`"))),
7057 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::O11yPeriodO11yErrorWithSpan`")))),
7058 }
7059 } else {
7060 let content = resp.text().await?;
7061 let entity: Option<GetO11yErrorfromgroupidError> = serde_json::from_str(&content).ok();
7062 Err(Error::ResponseError(ResponseContent { status, content, entity }))
7063 }
7064}
7065
7066pub async fn get_o11y_errortracking_issues(configuration: &configuration::Configuration, status: Option<&str>, level: Option<&str>, environment: Option<&str>, service_name: Option<&str>, query: Option<&str>, sort: Option<&str>, offset: Option<i32>, limit: Option<i32>) -> Result<models::O11yPeriodO11yErrorIssuesOut, Error<GetO11yErrortrackingIssuesError>> {
7068 let p_status = status;
7070 let p_level = level;
7071 let p_environment = environment;
7072 let p_service_name = service_name;
7073 let p_query = query;
7074 let p_sort = sort;
7075 let p_offset = offset;
7076 let p_limit = limit;
7077
7078 let uri_str = format!("{}/v1/o11y/errortracking/issues", configuration.base_path);
7079 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
7080
7081 if let Some(ref param_value) = p_status {
7082 req_builder = req_builder.query(&[("status", ¶m_value.to_string())]);
7083 }
7084 if let Some(ref param_value) = p_level {
7085 req_builder = req_builder.query(&[("level", ¶m_value.to_string())]);
7086 }
7087 if let Some(ref param_value) = p_environment {
7088 req_builder = req_builder.query(&[("environment", ¶m_value.to_string())]);
7089 }
7090 if let Some(ref param_value) = p_service_name {
7091 req_builder = req_builder.query(&[("serviceName", ¶m_value.to_string())]);
7092 }
7093 if let Some(ref param_value) = p_query {
7094 req_builder = req_builder.query(&[("query", ¶m_value.to_string())]);
7095 }
7096 if let Some(ref param_value) = p_sort {
7097 req_builder = req_builder.query(&[("sort", ¶m_value.to_string())]);
7098 }
7099 if let Some(ref param_value) = p_offset {
7100 req_builder = req_builder.query(&[("offset", ¶m_value.to_string())]);
7101 }
7102 if let Some(ref param_value) = p_limit {
7103 req_builder = req_builder.query(&[("limit", ¶m_value.to_string())]);
7104 }
7105 if let Some(ref user_agent) = configuration.user_agent {
7106 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
7107 }
7108 if let Some(ref token) = configuration.bearer_access_token {
7109 req_builder = req_builder.bearer_auth(token.to_owned());
7110 };
7111
7112 let req = req_builder.build()?;
7113 let resp = configuration.client.execute(req).await?;
7114
7115 let status = resp.status();
7116 let content_type = resp
7117 .headers()
7118 .get("content-type")
7119 .and_then(|v| v.to_str().ok())
7120 .unwrap_or("application/octet-stream");
7121 let content_type = super::ContentType::from(content_type);
7122
7123 if !status.is_client_error() && !status.is_server_error() {
7124 let content = resp.text().await?;
7125 match content_type {
7126 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
7127 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yErrorIssuesOut`"))),
7128 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::O11yPeriodO11yErrorIssuesOut`")))),
7129 }
7130 } else {
7131 let content = resp.text().await?;
7132 let entity: Option<GetO11yErrortrackingIssuesError> = serde_json::from_str(&content).ok();
7133 Err(Error::ResponseError(ResponseContent { status, content, entity }))
7134 }
7135}
7136
7137pub async fn get_o11y_errortracking_issues_by_id(configuration: &configuration::Configuration, id: &str) -> Result<models::O11yPeriodO11yErrorGettableIssueOut, Error<GetO11yErrortrackingIssuesByIdError>> {
7139 let p_id = id;
7141
7142 let uri_str = format!("{}/v1/o11y/errortracking/issues/{id}", configuration.base_path, id=crate::apis::urlencode(p_id));
7143 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
7144
7145 if let Some(ref user_agent) = configuration.user_agent {
7146 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
7147 }
7148 if let Some(ref token) = configuration.bearer_access_token {
7149 req_builder = req_builder.bearer_auth(token.to_owned());
7150 };
7151
7152 let req = req_builder.build()?;
7153 let resp = configuration.client.execute(req).await?;
7154
7155 let status = resp.status();
7156 let content_type = resp
7157 .headers()
7158 .get("content-type")
7159 .and_then(|v| v.to_str().ok())
7160 .unwrap_or("application/octet-stream");
7161 let content_type = super::ContentType::from(content_type);
7162
7163 if !status.is_client_error() && !status.is_server_error() {
7164 let content = resp.text().await?;
7165 match content_type {
7166 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
7167 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yErrorGettableIssueOut`"))),
7168 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::O11yPeriodO11yErrorGettableIssueOut`")))),
7169 }
7170 } else {
7171 let content = resp.text().await?;
7172 let entity: Option<GetO11yErrortrackingIssuesByIdError> = serde_json::from_str(&content).ok();
7173 Err(Error::ResponseError(ResponseContent { status, content, entity }))
7174 }
7175}
7176
7177pub async fn get_o11y_explorer_views(configuration: &configuration::Configuration, source_page: Option<&str>, name: Option<&str>, category: Option<&str>) -> Result<models::O11yPeriodO11ySavedViewListOut, Error<GetO11yExplorerViewsError>> {
7179 let p_source_page = source_page;
7181 let p_name = name;
7182 let p_category = category;
7183
7184 let uri_str = format!("{}/v1/o11y/explorer/views", configuration.base_path);
7185 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
7186
7187 if let Some(ref param_value) = p_source_page {
7188 req_builder = req_builder.query(&[("sourcePage", ¶m_value.to_string())]);
7189 }
7190 if let Some(ref param_value) = p_name {
7191 req_builder = req_builder.query(&[("name", ¶m_value.to_string())]);
7192 }
7193 if let Some(ref param_value) = p_category {
7194 req_builder = req_builder.query(&[("category", ¶m_value.to_string())]);
7195 }
7196 if let Some(ref user_agent) = configuration.user_agent {
7197 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
7198 }
7199 if let Some(ref token) = configuration.bearer_access_token {
7200 req_builder = req_builder.bearer_auth(token.to_owned());
7201 };
7202
7203 let req = req_builder.build()?;
7204 let resp = configuration.client.execute(req).await?;
7205
7206 let status = resp.status();
7207 let content_type = resp
7208 .headers()
7209 .get("content-type")
7210 .and_then(|v| v.to_str().ok())
7211 .unwrap_or("application/octet-stream");
7212 let content_type = super::ContentType::from(content_type);
7213
7214 if !status.is_client_error() && !status.is_server_error() {
7215 let content = resp.text().await?;
7216 match content_type {
7217 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
7218 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11ySavedViewListOut`"))),
7219 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::O11yPeriodO11ySavedViewListOut`")))),
7220 }
7221 } else {
7222 let content = resp.text().await?;
7223 let entity: Option<GetO11yExplorerViewsError> = serde_json::from_str(&content).ok();
7224 Err(Error::ResponseError(ResponseContent { status, content, entity }))
7225 }
7226}
7227
7228pub async fn get_o11y_explorer_views_by_viewid(configuration: &configuration::Configuration, view_id: &str) -> Result<models::O11yPeriodO11ySavedViewOut, Error<GetO11yExplorerViewsByViewidError>> {
7230 let p_view_id = view_id;
7232
7233 let uri_str = format!("{}/v1/o11y/explorer/views/{viewId}", configuration.base_path, viewId=crate::apis::urlencode(p_view_id));
7234 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
7235
7236 if let Some(ref user_agent) = configuration.user_agent {
7237 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
7238 }
7239 if let Some(ref token) = configuration.bearer_access_token {
7240 req_builder = req_builder.bearer_auth(token.to_owned());
7241 };
7242
7243 let req = req_builder.build()?;
7244 let resp = configuration.client.execute(req).await?;
7245
7246 let status = resp.status();
7247 let content_type = resp
7248 .headers()
7249 .get("content-type")
7250 .and_then(|v| v.to_str().ok())
7251 .unwrap_or("application/octet-stream");
7252 let content_type = super::ContentType::from(content_type);
7253
7254 if !status.is_client_error() && !status.is_server_error() {
7255 let content = resp.text().await?;
7256 match content_type {
7257 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
7258 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11ySavedViewOut`"))),
7259 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::O11yPeriodO11ySavedViewOut`")))),
7260 }
7261 } else {
7262 let content = resp.text().await?;
7263 let entity: Option<GetO11yExplorerViewsByViewidError> = serde_json::from_str(&content).ok();
7264 Err(Error::ResponseError(ResponseContent { status, content, entity }))
7265 }
7266}
7267
7268pub async fn get_o11y_features(configuration: &configuration::Configuration, ) -> Result<models::O11yPeriodO11yFeaturesOut, Error<GetO11yFeaturesError>> {
7270
7271 let uri_str = format!("{}/v1/o11y/features", configuration.base_path);
7272 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
7273
7274 if let Some(ref user_agent) = configuration.user_agent {
7275 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
7276 }
7277 if let Some(ref token) = configuration.bearer_access_token {
7278 req_builder = req_builder.bearer_auth(token.to_owned());
7279 };
7280
7281 let req = req_builder.build()?;
7282 let resp = configuration.client.execute(req).await?;
7283
7284 let status = resp.status();
7285 let content_type = resp
7286 .headers()
7287 .get("content-type")
7288 .and_then(|v| v.to_str().ok())
7289 .unwrap_or("application/octet-stream");
7290 let content_type = super::ContentType::from(content_type);
7291
7292 if !status.is_client_error() && !status.is_server_error() {
7293 let content = resp.text().await?;
7294 match content_type {
7295 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
7296 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yFeaturesOut`"))),
7297 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::O11yPeriodO11yFeaturesOut`")))),
7298 }
7299 } else {
7300 let content = resp.text().await?;
7301 let entity: Option<GetO11yFeaturesError> = serde_json::from_str(&content).ok();
7302 Err(Error::ResponseError(ResponseContent { status, content, entity }))
7303 }
7304}
7305
7306pub async fn get_o11y_fields_keys(configuration: &configuration::Configuration, signal: Option<&str>, source: Option<&str>, limit: Option<i32>, start_unix_milli: Option<i32>, end_unix_milli: Option<i32>, field_context: Option<&str>, field_data_type: Option<&str>, metric_name: Option<&str>, metric_namespace: Option<&str>, search_text: Option<&str>) -> Result<models::O11yPeriodO11yFieldKeysOut, Error<GetO11yFieldsKeysError>> {
7308 let p_signal = signal;
7310 let p_source = source;
7311 let p_limit = limit;
7312 let p_start_unix_milli = start_unix_milli;
7313 let p_end_unix_milli = end_unix_milli;
7314 let p_field_context = field_context;
7315 let p_field_data_type = field_data_type;
7316 let p_metric_name = metric_name;
7317 let p_metric_namespace = metric_namespace;
7318 let p_search_text = search_text;
7319
7320 let uri_str = format!("{}/v1/o11y/fields/keys", configuration.base_path);
7321 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
7322
7323 if let Some(ref param_value) = p_signal {
7324 req_builder = req_builder.query(&[("signal", ¶m_value.to_string())]);
7325 }
7326 if let Some(ref param_value) = p_source {
7327 req_builder = req_builder.query(&[("source", ¶m_value.to_string())]);
7328 }
7329 if let Some(ref param_value) = p_limit {
7330 req_builder = req_builder.query(&[("limit", ¶m_value.to_string())]);
7331 }
7332 if let Some(ref param_value) = p_start_unix_milli {
7333 req_builder = req_builder.query(&[("startUnixMilli", ¶m_value.to_string())]);
7334 }
7335 if let Some(ref param_value) = p_end_unix_milli {
7336 req_builder = req_builder.query(&[("endUnixMilli", ¶m_value.to_string())]);
7337 }
7338 if let Some(ref param_value) = p_field_context {
7339 req_builder = req_builder.query(&[("fieldContext", ¶m_value.to_string())]);
7340 }
7341 if let Some(ref param_value) = p_field_data_type {
7342 req_builder = req_builder.query(&[("fieldDataType", ¶m_value.to_string())]);
7343 }
7344 if let Some(ref param_value) = p_metric_name {
7345 req_builder = req_builder.query(&[("metricName", ¶m_value.to_string())]);
7346 }
7347 if let Some(ref param_value) = p_metric_namespace {
7348 req_builder = req_builder.query(&[("metricNamespace", ¶m_value.to_string())]);
7349 }
7350 if let Some(ref param_value) = p_search_text {
7351 req_builder = req_builder.query(&[("searchText", ¶m_value.to_string())]);
7352 }
7353 if let Some(ref user_agent) = configuration.user_agent {
7354 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
7355 }
7356 if let Some(ref token) = configuration.bearer_access_token {
7357 req_builder = req_builder.bearer_auth(token.to_owned());
7358 };
7359
7360 let req = req_builder.build()?;
7361 let resp = configuration.client.execute(req).await?;
7362
7363 let status = resp.status();
7364 let content_type = resp
7365 .headers()
7366 .get("content-type")
7367 .and_then(|v| v.to_str().ok())
7368 .unwrap_or("application/octet-stream");
7369 let content_type = super::ContentType::from(content_type);
7370
7371 if !status.is_client_error() && !status.is_server_error() {
7372 let content = resp.text().await?;
7373 match content_type {
7374 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
7375 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yFieldKeysOut`"))),
7376 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::O11yPeriodO11yFieldKeysOut`")))),
7377 }
7378 } else {
7379 let content = resp.text().await?;
7380 let entity: Option<GetO11yFieldsKeysError> = serde_json::from_str(&content).ok();
7381 Err(Error::ResponseError(ResponseContent { status, content, entity }))
7382 }
7383}
7384
7385pub async fn get_o11y_fields_values(configuration: &configuration::Configuration, signal: Option<&str>, source: Option<&str>, limit: Option<i32>, start_unix_milli: Option<i32>, end_unix_milli: Option<i32>, field_context: Option<&str>, field_data_type: Option<&str>, metric_name: Option<&str>, metric_namespace: Option<&str>, search_text: Option<&str>, name: Option<&str>, existing_query: Option<&str>) -> Result<models::O11yPeriodO11yFieldValuesOut, Error<GetO11yFieldsValuesError>> {
7387 let p_signal = signal;
7389 let p_source = source;
7390 let p_limit = limit;
7391 let p_start_unix_milli = start_unix_milli;
7392 let p_end_unix_milli = end_unix_milli;
7393 let p_field_context = field_context;
7394 let p_field_data_type = field_data_type;
7395 let p_metric_name = metric_name;
7396 let p_metric_namespace = metric_namespace;
7397 let p_search_text = search_text;
7398 let p_name = name;
7399 let p_existing_query = existing_query;
7400
7401 let uri_str = format!("{}/v1/o11y/fields/values", configuration.base_path);
7402 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
7403
7404 if let Some(ref param_value) = p_signal {
7405 req_builder = req_builder.query(&[("signal", ¶m_value.to_string())]);
7406 }
7407 if let Some(ref param_value) = p_source {
7408 req_builder = req_builder.query(&[("source", ¶m_value.to_string())]);
7409 }
7410 if let Some(ref param_value) = p_limit {
7411 req_builder = req_builder.query(&[("limit", ¶m_value.to_string())]);
7412 }
7413 if let Some(ref param_value) = p_start_unix_milli {
7414 req_builder = req_builder.query(&[("startUnixMilli", ¶m_value.to_string())]);
7415 }
7416 if let Some(ref param_value) = p_end_unix_milli {
7417 req_builder = req_builder.query(&[("endUnixMilli", ¶m_value.to_string())]);
7418 }
7419 if let Some(ref param_value) = p_field_context {
7420 req_builder = req_builder.query(&[("fieldContext", ¶m_value.to_string())]);
7421 }
7422 if let Some(ref param_value) = p_field_data_type {
7423 req_builder = req_builder.query(&[("fieldDataType", ¶m_value.to_string())]);
7424 }
7425 if let Some(ref param_value) = p_metric_name {
7426 req_builder = req_builder.query(&[("metricName", ¶m_value.to_string())]);
7427 }
7428 if let Some(ref param_value) = p_metric_namespace {
7429 req_builder = req_builder.query(&[("metricNamespace", ¶m_value.to_string())]);
7430 }
7431 if let Some(ref param_value) = p_search_text {
7432 req_builder = req_builder.query(&[("searchText", ¶m_value.to_string())]);
7433 }
7434 if let Some(ref param_value) = p_name {
7435 req_builder = req_builder.query(&[("name", ¶m_value.to_string())]);
7436 }
7437 if let Some(ref param_value) = p_existing_query {
7438 req_builder = req_builder.query(&[("existingQuery", ¶m_value.to_string())]);
7439 }
7440 if let Some(ref user_agent) = configuration.user_agent {
7441 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
7442 }
7443 if let Some(ref token) = configuration.bearer_access_token {
7444 req_builder = req_builder.bearer_auth(token.to_owned());
7445 };
7446
7447 let req = req_builder.build()?;
7448 let resp = configuration.client.execute(req).await?;
7449
7450 let status = resp.status();
7451 let content_type = resp
7452 .headers()
7453 .get("content-type")
7454 .and_then(|v| v.to_str().ok())
7455 .unwrap_or("application/octet-stream");
7456 let content_type = super::ContentType::from(content_type);
7457
7458 if !status.is_client_error() && !status.is_server_error() {
7459 let content = resp.text().await?;
7460 match content_type {
7461 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
7462 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yFieldValuesOut`"))),
7463 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::O11yPeriodO11yFieldValuesOut`")))),
7464 }
7465 } else {
7466 let content = resp.text().await?;
7467 let entity: Option<GetO11yFieldsValuesError> = serde_json::from_str(&content).ok();
7468 Err(Error::ResponseError(ResponseContent { status, content, entity }))
7469 }
7470}
7471
7472pub async fn get_o11y_filter_suggestions(configuration: &configuration::Configuration, data_source: &str, search_text: Option<&str>, existing_filter: Option<&str>, attributes_limit: Option<i32>, examples_limit: Option<i32>) -> Result<models::O11yPeriodO11yFilterSuggestionsOut, Error<GetO11yFilterSuggestionsError>> {
7474 let p_data_source = data_source;
7476 let p_search_text = search_text;
7477 let p_existing_filter = existing_filter;
7478 let p_attributes_limit = attributes_limit;
7479 let p_examples_limit = examples_limit;
7480
7481 let uri_str = format!("{}/v1/o11y/filter_suggestions", configuration.base_path);
7482 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
7483
7484 req_builder = req_builder.query(&[("dataSource", &p_data_source.to_string())]);
7485 if let Some(ref param_value) = p_search_text {
7486 req_builder = req_builder.query(&[("searchText", ¶m_value.to_string())]);
7487 }
7488 if let Some(ref param_value) = p_existing_filter {
7489 req_builder = req_builder.query(&[("existingFilter", ¶m_value.to_string())]);
7490 }
7491 if let Some(ref param_value) = p_attributes_limit {
7492 req_builder = req_builder.query(&[("attributesLimit", ¶m_value.to_string())]);
7493 }
7494 if let Some(ref param_value) = p_examples_limit {
7495 req_builder = req_builder.query(&[("examplesLimit", ¶m_value.to_string())]);
7496 }
7497 if let Some(ref user_agent) = configuration.user_agent {
7498 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
7499 }
7500 if let Some(ref token) = configuration.bearer_access_token {
7501 req_builder = req_builder.bearer_auth(token.to_owned());
7502 };
7503
7504 let req = req_builder.build()?;
7505 let resp = configuration.client.execute(req).await?;
7506
7507 let status = resp.status();
7508 let content_type = resp
7509 .headers()
7510 .get("content-type")
7511 .and_then(|v| v.to_str().ok())
7512 .unwrap_or("application/octet-stream");
7513 let content_type = super::ContentType::from(content_type);
7514
7515 if !status.is_client_error() && !status.is_server_error() {
7516 let content = resp.text().await?;
7517 match content_type {
7518 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
7519 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yFilterSuggestionsOut`"))),
7520 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::O11yPeriodO11yFilterSuggestionsOut`")))),
7521 }
7522 } else {
7523 let content = resp.text().await?;
7524 let entity: Option<GetO11yFilterSuggestionsError> = serde_json::from_str(&content).ok();
7525 Err(Error::ResponseError(ResponseContent { status, content, entity }))
7526 }
7527}
7528
7529pub async fn get_o11y_global_config(configuration: &configuration::Configuration, ) -> Result<models::O11yPeriodO11yGlobalConfigOut, Error<GetO11yGlobalConfigError>> {
7531
7532 let uri_str = format!("{}/v1/o11y/global/config", configuration.base_path);
7533 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
7534
7535 if let Some(ref user_agent) = configuration.user_agent {
7536 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
7537 }
7538 if let Some(ref token) = configuration.bearer_access_token {
7539 req_builder = req_builder.bearer_auth(token.to_owned());
7540 };
7541
7542 let req = req_builder.build()?;
7543 let resp = configuration.client.execute(req).await?;
7544
7545 let status = resp.status();
7546 let content_type = resp
7547 .headers()
7548 .get("content-type")
7549 .and_then(|v| v.to_str().ok())
7550 .unwrap_or("application/octet-stream");
7551 let content_type = super::ContentType::from(content_type);
7552
7553 if !status.is_client_error() && !status.is_server_error() {
7554 let content = resp.text().await?;
7555 match content_type {
7556 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
7557 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yGlobalConfigOut`"))),
7558 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::O11yPeriodO11yGlobalConfigOut`")))),
7559 }
7560 } else {
7561 let content = resp.text().await?;
7562 let entity: Option<GetO11yGlobalConfigError> = serde_json::from_str(&content).ok();
7563 Err(Error::ResponseError(ResponseContent { status, content, entity }))
7564 }
7565}
7566
7567pub async fn get_o11y_health(configuration: &configuration::Configuration, live: Option<bool>) -> Result<models::O11yPeriodO11yHealthOut, Error<GetO11yHealthError>> {
7569 let p_live = live;
7571
7572 let uri_str = format!("{}/v1/o11y/health", configuration.base_path);
7573 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
7574
7575 if let Some(ref param_value) = p_live {
7576 req_builder = req_builder.query(&[("live", ¶m_value.to_string())]);
7577 }
7578 if let Some(ref user_agent) = configuration.user_agent {
7579 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
7580 }
7581 if let Some(ref token) = configuration.bearer_access_token {
7582 req_builder = req_builder.bearer_auth(token.to_owned());
7583 };
7584
7585 let req = req_builder.build()?;
7586 let resp = configuration.client.execute(req).await?;
7587
7588 let status = resp.status();
7589 let content_type = resp
7590 .headers()
7591 .get("content-type")
7592 .and_then(|v| v.to_str().ok())
7593 .unwrap_or("application/octet-stream");
7594 let content_type = super::ContentType::from(content_type);
7595
7596 if !status.is_client_error() && !status.is_server_error() {
7597 let content = resp.text().await?;
7598 match content_type {
7599 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
7600 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yHealthOut`"))),
7601 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::O11yPeriodO11yHealthOut`")))),
7602 }
7603 } else {
7604 let content = resp.text().await?;
7605 let entity: Option<GetO11yHealthError> = serde_json::from_str(&content).ok();
7606 Err(Error::ResponseError(ResponseContent { status, content, entity }))
7607 }
7608}
7609
7610pub async fn get_o11y_healthz(configuration: &configuration::Configuration, ) -> Result<(), Error<GetO11yHealthzError>> {
7612
7613 let uri_str = format!("{}/v1/o11y/healthz", configuration.base_path);
7614 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
7615
7616 if let Some(ref user_agent) = configuration.user_agent {
7617 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
7618 }
7619 if let Some(ref token) = configuration.bearer_access_token {
7620 req_builder = req_builder.bearer_auth(token.to_owned());
7621 };
7622
7623 let req = req_builder.build()?;
7624 let resp = configuration.client.execute(req).await?;
7625
7626 let status = resp.status();
7627
7628 if !status.is_client_error() && !status.is_server_error() {
7629 Ok(())
7630 } else {
7631 let content = resp.text().await?;
7632 let entity: Option<GetO11yHealthzError> = serde_json::from_str(&content).ok();
7633 Err(Error::ResponseError(ResponseContent { status, content, entity }))
7634 }
7635}
7636
7637pub async fn get_o11y_hosts_attribute_keys(configuration: &configuration::Configuration, data_source: Option<&str>, aggregate_operator: Option<&str>, aggregate_attribute: Option<&str>, search_text: Option<&str>, tag_type: Option<&str>, limit: Option<i32>) -> Result<models::O11yPeriodO11yInfraAttributeKeysOut, Error<GetO11yHostsAttributeKeysError>> {
7639 let p_data_source = data_source;
7641 let p_aggregate_operator = aggregate_operator;
7642 let p_aggregate_attribute = aggregate_attribute;
7643 let p_search_text = search_text;
7644 let p_tag_type = tag_type;
7645 let p_limit = limit;
7646
7647 let uri_str = format!("{}/v1/o11y/hosts/attribute_keys", configuration.base_path);
7648 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
7649
7650 if let Some(ref param_value) = p_data_source {
7651 req_builder = req_builder.query(&[("dataSource", ¶m_value.to_string())]);
7652 }
7653 if let Some(ref param_value) = p_aggregate_operator {
7654 req_builder = req_builder.query(&[("aggregateOperator", ¶m_value.to_string())]);
7655 }
7656 if let Some(ref param_value) = p_aggregate_attribute {
7657 req_builder = req_builder.query(&[("aggregateAttribute", ¶m_value.to_string())]);
7658 }
7659 if let Some(ref param_value) = p_search_text {
7660 req_builder = req_builder.query(&[("searchText", ¶m_value.to_string())]);
7661 }
7662 if let Some(ref param_value) = p_tag_type {
7663 req_builder = req_builder.query(&[("tagType", ¶m_value.to_string())]);
7664 }
7665 if let Some(ref param_value) = p_limit {
7666 req_builder = req_builder.query(&[("limit", ¶m_value.to_string())]);
7667 }
7668 if let Some(ref user_agent) = configuration.user_agent {
7669 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
7670 }
7671 if let Some(ref token) = configuration.bearer_access_token {
7672 req_builder = req_builder.bearer_auth(token.to_owned());
7673 };
7674
7675 let req = req_builder.build()?;
7676 let resp = configuration.client.execute(req).await?;
7677
7678 let status = resp.status();
7679 let content_type = resp
7680 .headers()
7681 .get("content-type")
7682 .and_then(|v| v.to_str().ok())
7683 .unwrap_or("application/octet-stream");
7684 let content_type = super::ContentType::from(content_type);
7685
7686 if !status.is_client_error() && !status.is_server_error() {
7687 let content = resp.text().await?;
7688 match content_type {
7689 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
7690 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yInfraAttributeKeysOut`"))),
7691 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::O11yPeriodO11yInfraAttributeKeysOut`")))),
7692 }
7693 } else {
7694 let content = resp.text().await?;
7695 let entity: Option<GetO11yHostsAttributeKeysError> = serde_json::from_str(&content).ok();
7696 Err(Error::ResponseError(ResponseContent { status, content, entity }))
7697 }
7698}
7699
7700pub async fn get_o11y_hosts_attribute_values(configuration: &configuration::Configuration, data_source: Option<&str>, aggregate_operator: Option<&str>, aggregate_attribute: Option<&str>, attribute_key: Option<&str>, filter_attribute_key_data_type: Option<&str>, search_text: Option<&str>, tag_type: Option<&str>, limit: Option<i32>) -> Result<models::O11yPeriodO11yInfraAttributeValuesOut, Error<GetO11yHostsAttributeValuesError>> {
7702 let p_data_source = data_source;
7704 let p_aggregate_operator = aggregate_operator;
7705 let p_aggregate_attribute = aggregate_attribute;
7706 let p_attribute_key = attribute_key;
7707 let p_filter_attribute_key_data_type = filter_attribute_key_data_type;
7708 let p_search_text = search_text;
7709 let p_tag_type = tag_type;
7710 let p_limit = limit;
7711
7712 let uri_str = format!("{}/v1/o11y/hosts/attribute_values", configuration.base_path);
7713 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
7714
7715 if let Some(ref param_value) = p_data_source {
7716 req_builder = req_builder.query(&[("dataSource", ¶m_value.to_string())]);
7717 }
7718 if let Some(ref param_value) = p_aggregate_operator {
7719 req_builder = req_builder.query(&[("aggregateOperator", ¶m_value.to_string())]);
7720 }
7721 if let Some(ref param_value) = p_aggregate_attribute {
7722 req_builder = req_builder.query(&[("aggregateAttribute", ¶m_value.to_string())]);
7723 }
7724 if let Some(ref param_value) = p_attribute_key {
7725 req_builder = req_builder.query(&[("attributeKey", ¶m_value.to_string())]);
7726 }
7727 if let Some(ref param_value) = p_filter_attribute_key_data_type {
7728 req_builder = req_builder.query(&[("filterAttributeKeyDataType", ¶m_value.to_string())]);
7729 }
7730 if let Some(ref param_value) = p_search_text {
7731 req_builder = req_builder.query(&[("searchText", ¶m_value.to_string())]);
7732 }
7733 if let Some(ref param_value) = p_tag_type {
7734 req_builder = req_builder.query(&[("tagType", ¶m_value.to_string())]);
7735 }
7736 if let Some(ref param_value) = p_limit {
7737 req_builder = req_builder.query(&[("limit", ¶m_value.to_string())]);
7738 }
7739 if let Some(ref user_agent) = configuration.user_agent {
7740 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
7741 }
7742 if let Some(ref token) = configuration.bearer_access_token {
7743 req_builder = req_builder.bearer_auth(token.to_owned());
7744 };
7745
7746 let req = req_builder.build()?;
7747 let resp = configuration.client.execute(req).await?;
7748
7749 let status = resp.status();
7750 let content_type = resp
7751 .headers()
7752 .get("content-type")
7753 .and_then(|v| v.to_str().ok())
7754 .unwrap_or("application/octet-stream");
7755 let content_type = super::ContentType::from(content_type);
7756
7757 if !status.is_client_error() && !status.is_server_error() {
7758 let content = resp.text().await?;
7759 match content_type {
7760 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
7761 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yInfraAttributeValuesOut`"))),
7762 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::O11yPeriodO11yInfraAttributeValuesOut`")))),
7763 }
7764 } else {
7765 let content = resp.text().await?;
7766 let entity: Option<GetO11yHostsAttributeValuesError> = serde_json::from_str(&content).ok();
7767 Err(Error::ResponseError(ResponseContent { status, content, entity }))
7768 }
7769}
7770
7771pub async fn get_o11y_infra_monitoring_checks(configuration: &configuration::Configuration, r#type: &str) -> Result<models::O11yPeriodO11yInfraChecksOut, Error<GetO11yInfraMonitoringChecksError>> {
7773 let p_type = r#type;
7775
7776 let uri_str = format!("{}/v1/o11y/infra_monitoring/checks", configuration.base_path);
7777 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
7778
7779 req_builder = req_builder.query(&[("type", &p_type.to_string())]);
7780 if let Some(ref user_agent) = configuration.user_agent {
7781 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
7782 }
7783 if let Some(ref token) = configuration.bearer_access_token {
7784 req_builder = req_builder.bearer_auth(token.to_owned());
7785 };
7786
7787 let req = req_builder.build()?;
7788 let resp = configuration.client.execute(req).await?;
7789
7790 let status = resp.status();
7791 let content_type = resp
7792 .headers()
7793 .get("content-type")
7794 .and_then(|v| v.to_str().ok())
7795 .unwrap_or("application/octet-stream");
7796 let content_type = super::ContentType::from(content_type);
7797
7798 if !status.is_client_error() && !status.is_server_error() {
7799 let content = resp.text().await?;
7800 match content_type {
7801 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
7802 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yInfraChecksOut`"))),
7803 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::O11yPeriodO11yInfraChecksOut`")))),
7804 }
7805 } else {
7806 let content = resp.text().await?;
7807 let entity: Option<GetO11yInfraMonitoringChecksError> = serde_json::from_str(&content).ok();
7808 Err(Error::ResponseError(ResponseContent { status, content, entity }))
7809 }
7810}
7811
7812pub async fn get_o11y_infra_onboarding_k8s_status(configuration: &configuration::Configuration, ) -> Result<models::O11yPeriodO11yOnboardingOut, Error<GetO11yInfraOnboardingK8sStatusError>> {
7814
7815 let uri_str = format!("{}/v1/o11y/infra_onboarding/k8s/status", configuration.base_path);
7816 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
7817
7818 if let Some(ref user_agent) = configuration.user_agent {
7819 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
7820 }
7821 if let Some(ref token) = configuration.bearer_access_token {
7822 req_builder = req_builder.bearer_auth(token.to_owned());
7823 };
7824
7825 let req = req_builder.build()?;
7826 let resp = configuration.client.execute(req).await?;
7827
7828 let status = resp.status();
7829 let content_type = resp
7830 .headers()
7831 .get("content-type")
7832 .and_then(|v| v.to_str().ok())
7833 .unwrap_or("application/octet-stream");
7834 let content_type = super::ContentType::from(content_type);
7835
7836 if !status.is_client_error() && !status.is_server_error() {
7837 let content = resp.text().await?;
7838 match content_type {
7839 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
7840 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yOnboardingOut`"))),
7841 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::O11yPeriodO11yOnboardingOut`")))),
7842 }
7843 } else {
7844 let content = resp.text().await?;
7845 let entity: Option<GetO11yInfraOnboardingK8sStatusError> = serde_json::from_str(&content).ok();
7846 Err(Error::ResponseError(ResponseContent { status, content, entity }))
7847 }
7848}
7849
7850pub async fn get_o11y_jobs_attribute_keys(configuration: &configuration::Configuration, data_source: Option<&str>, aggregate_operator: Option<&str>, aggregate_attribute: Option<&str>, search_text: Option<&str>, tag_type: Option<&str>, limit: Option<i32>) -> Result<models::O11yPeriodO11yInfraAttributeKeysOut, Error<GetO11yJobsAttributeKeysError>> {
7852 let p_data_source = data_source;
7854 let p_aggregate_operator = aggregate_operator;
7855 let p_aggregate_attribute = aggregate_attribute;
7856 let p_search_text = search_text;
7857 let p_tag_type = tag_type;
7858 let p_limit = limit;
7859
7860 let uri_str = format!("{}/v1/o11y/jobs/attribute_keys", configuration.base_path);
7861 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
7862
7863 if let Some(ref param_value) = p_data_source {
7864 req_builder = req_builder.query(&[("dataSource", ¶m_value.to_string())]);
7865 }
7866 if let Some(ref param_value) = p_aggregate_operator {
7867 req_builder = req_builder.query(&[("aggregateOperator", ¶m_value.to_string())]);
7868 }
7869 if let Some(ref param_value) = p_aggregate_attribute {
7870 req_builder = req_builder.query(&[("aggregateAttribute", ¶m_value.to_string())]);
7871 }
7872 if let Some(ref param_value) = p_search_text {
7873 req_builder = req_builder.query(&[("searchText", ¶m_value.to_string())]);
7874 }
7875 if let Some(ref param_value) = p_tag_type {
7876 req_builder = req_builder.query(&[("tagType", ¶m_value.to_string())]);
7877 }
7878 if let Some(ref param_value) = p_limit {
7879 req_builder = req_builder.query(&[("limit", ¶m_value.to_string())]);
7880 }
7881 if let Some(ref user_agent) = configuration.user_agent {
7882 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
7883 }
7884 if let Some(ref token) = configuration.bearer_access_token {
7885 req_builder = req_builder.bearer_auth(token.to_owned());
7886 };
7887
7888 let req = req_builder.build()?;
7889 let resp = configuration.client.execute(req).await?;
7890
7891 let status = resp.status();
7892 let content_type = resp
7893 .headers()
7894 .get("content-type")
7895 .and_then(|v| v.to_str().ok())
7896 .unwrap_or("application/octet-stream");
7897 let content_type = super::ContentType::from(content_type);
7898
7899 if !status.is_client_error() && !status.is_server_error() {
7900 let content = resp.text().await?;
7901 match content_type {
7902 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
7903 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yInfraAttributeKeysOut`"))),
7904 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::O11yPeriodO11yInfraAttributeKeysOut`")))),
7905 }
7906 } else {
7907 let content = resp.text().await?;
7908 let entity: Option<GetO11yJobsAttributeKeysError> = serde_json::from_str(&content).ok();
7909 Err(Error::ResponseError(ResponseContent { status, content, entity }))
7910 }
7911}
7912
7913pub async fn get_o11y_jobs_attribute_values(configuration: &configuration::Configuration, data_source: Option<&str>, aggregate_operator: Option<&str>, aggregate_attribute: Option<&str>, attribute_key: Option<&str>, filter_attribute_key_data_type: Option<&str>, search_text: Option<&str>, tag_type: Option<&str>, limit: Option<i32>) -> Result<models::O11yPeriodO11yInfraAttributeValuesOut, Error<GetO11yJobsAttributeValuesError>> {
7915 let p_data_source = data_source;
7917 let p_aggregate_operator = aggregate_operator;
7918 let p_aggregate_attribute = aggregate_attribute;
7919 let p_attribute_key = attribute_key;
7920 let p_filter_attribute_key_data_type = filter_attribute_key_data_type;
7921 let p_search_text = search_text;
7922 let p_tag_type = tag_type;
7923 let p_limit = limit;
7924
7925 let uri_str = format!("{}/v1/o11y/jobs/attribute_values", configuration.base_path);
7926 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
7927
7928 if let Some(ref param_value) = p_data_source {
7929 req_builder = req_builder.query(&[("dataSource", ¶m_value.to_string())]);
7930 }
7931 if let Some(ref param_value) = p_aggregate_operator {
7932 req_builder = req_builder.query(&[("aggregateOperator", ¶m_value.to_string())]);
7933 }
7934 if let Some(ref param_value) = p_aggregate_attribute {
7935 req_builder = req_builder.query(&[("aggregateAttribute", ¶m_value.to_string())]);
7936 }
7937 if let Some(ref param_value) = p_attribute_key {
7938 req_builder = req_builder.query(&[("attributeKey", ¶m_value.to_string())]);
7939 }
7940 if let Some(ref param_value) = p_filter_attribute_key_data_type {
7941 req_builder = req_builder.query(&[("filterAttributeKeyDataType", ¶m_value.to_string())]);
7942 }
7943 if let Some(ref param_value) = p_search_text {
7944 req_builder = req_builder.query(&[("searchText", ¶m_value.to_string())]);
7945 }
7946 if let Some(ref param_value) = p_tag_type {
7947 req_builder = req_builder.query(&[("tagType", ¶m_value.to_string())]);
7948 }
7949 if let Some(ref param_value) = p_limit {
7950 req_builder = req_builder.query(&[("limit", ¶m_value.to_string())]);
7951 }
7952 if let Some(ref user_agent) = configuration.user_agent {
7953 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
7954 }
7955 if let Some(ref token) = configuration.bearer_access_token {
7956 req_builder = req_builder.bearer_auth(token.to_owned());
7957 };
7958
7959 let req = req_builder.build()?;
7960 let resp = configuration.client.execute(req).await?;
7961
7962 let status = resp.status();
7963 let content_type = resp
7964 .headers()
7965 .get("content-type")
7966 .and_then(|v| v.to_str().ok())
7967 .unwrap_or("application/octet-stream");
7968 let content_type = super::ContentType::from(content_type);
7969
7970 if !status.is_client_error() && !status.is_server_error() {
7971 let content = resp.text().await?;
7972 match content_type {
7973 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
7974 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yInfraAttributeValuesOut`"))),
7975 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::O11yPeriodO11yInfraAttributeValuesOut`")))),
7976 }
7977 } else {
7978 let content = resp.text().await?;
7979 let entity: Option<GetO11yJobsAttributeValuesError> = serde_json::from_str(&content).ok();
7980 Err(Error::ResponseError(ResponseContent { status, content, entity }))
7981 }
7982}
7983
7984pub async fn get_o11y_licenses(configuration: &configuration::Configuration, ) -> Result<models::O11yPeriodO11yLicensesOut, Error<GetO11yLicensesError>> {
7986
7987 let uri_str = format!("{}/v1/o11y/licenses", configuration.base_path);
7988 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
7989
7990 if let Some(ref user_agent) = configuration.user_agent {
7991 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
7992 }
7993 if let Some(ref token) = configuration.bearer_access_token {
7994 req_builder = req_builder.bearer_auth(token.to_owned());
7995 };
7996
7997 let req = req_builder.build()?;
7998 let resp = configuration.client.execute(req).await?;
7999
8000 let status = resp.status();
8001 let content_type = resp
8002 .headers()
8003 .get("content-type")
8004 .and_then(|v| v.to_str().ok())
8005 .unwrap_or("application/octet-stream");
8006 let content_type = super::ContentType::from(content_type);
8007
8008 if !status.is_client_error() && !status.is_server_error() {
8009 let content = resp.text().await?;
8010 match content_type {
8011 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
8012 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yLicensesOut`"))),
8013 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::O11yPeriodO11yLicensesOut`")))),
8014 }
8015 } else {
8016 let content = resp.text().await?;
8017 let entity: Option<GetO11yLicensesError> = serde_json::from_str(&content).ok();
8018 Err(Error::ResponseError(ResponseContent { status, content, entity }))
8019 }
8020}
8021
8022pub async fn get_o11y_licenses_active(configuration: &configuration::Configuration, ) -> Result<models::O11yPeriodO11yLicenseActiveOut, Error<GetO11yLicensesActiveError>> {
8024
8025 let uri_str = format!("{}/v1/o11y/licenses/active", configuration.base_path);
8026 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
8027
8028 if let Some(ref user_agent) = configuration.user_agent {
8029 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
8030 }
8031 if let Some(ref token) = configuration.bearer_access_token {
8032 req_builder = req_builder.bearer_auth(token.to_owned());
8033 };
8034
8035 let req = req_builder.build()?;
8036 let resp = configuration.client.execute(req).await?;
8037
8038 let status = resp.status();
8039 let content_type = resp
8040 .headers()
8041 .get("content-type")
8042 .and_then(|v| v.to_str().ok())
8043 .unwrap_or("application/octet-stream");
8044 let content_type = super::ContentType::from(content_type);
8045
8046 if !status.is_client_error() && !status.is_server_error() {
8047 let content = resp.text().await?;
8048 match content_type {
8049 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
8050 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yLicenseActiveOut`"))),
8051 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::O11yPeriodO11yLicenseActiveOut`")))),
8052 }
8053 } else {
8054 let content = resp.text().await?;
8055 let entity: Option<GetO11yLicensesActiveError> = serde_json::from_str(&content).ok();
8056 Err(Error::ResponseError(ResponseContent { status, content, entity }))
8057 }
8058}
8059
8060pub async fn get_o11y_livez(configuration: &configuration::Configuration, ) -> Result<(), Error<GetO11yLivezError>> {
8062
8063 let uri_str = format!("{}/v1/o11y/livez", configuration.base_path);
8064 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
8065
8066 if let Some(ref user_agent) = configuration.user_agent {
8067 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
8068 }
8069 if let Some(ref token) = configuration.bearer_access_token {
8070 req_builder = req_builder.bearer_auth(token.to_owned());
8071 };
8072
8073 let req = req_builder.build()?;
8074 let resp = configuration.client.execute(req).await?;
8075
8076 let status = resp.status();
8077
8078 if !status.is_client_error() && !status.is_server_error() {
8079 Ok(())
8080 } else {
8081 let content = resp.text().await?;
8082 let entity: Option<GetO11yLivezError> = serde_json::from_str(&content).ok();
8083 Err(Error::ResponseError(ResponseContent { status, content, entity }))
8084 }
8085}
8086
8087pub async fn get_o11y_login(configuration: &configuration::Configuration, ) -> Result<(), Error<GetO11yLoginError>> {
8089
8090 let uri_str = format!("{}/v1/o11y/login", configuration.base_path);
8091 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
8092
8093 if let Some(ref user_agent) = configuration.user_agent {
8094 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
8095 }
8096 if let Some(ref token) = configuration.bearer_access_token {
8097 req_builder = req_builder.bearer_auth(token.to_owned());
8098 };
8099
8100 let req = req_builder.build()?;
8101 let resp = configuration.client.execute(req).await?;
8102
8103 let status = resp.status();
8104
8105 if !status.is_client_error() && !status.is_server_error() {
8106 Ok(())
8107 } else {
8108 let content = resp.text().await?;
8109 let entity: Option<GetO11yLoginError> = serde_json::from_str(&content).ok();
8110 Err(Error::ResponseError(ResponseContent { status, content, entity }))
8111 }
8112}
8113
8114pub async fn get_o11y_logs(configuration: &configuration::Configuration, limit: Option<i32>, timestamp_start: Option<i32>, timestamp_end: Option<i32>) -> Result<models::O11yPeriodO11yLogRecordsOut, Error<GetO11yLogsError>> {
8116 let p_limit = limit;
8118 let p_timestamp_start = timestamp_start;
8119 let p_timestamp_end = timestamp_end;
8120
8121 let uri_str = format!("{}/v1/o11y/logs", configuration.base_path);
8122 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
8123
8124 if let Some(ref param_value) = p_limit {
8125 req_builder = req_builder.query(&[("limit", ¶m_value.to_string())]);
8126 }
8127 if let Some(ref param_value) = p_timestamp_start {
8128 req_builder = req_builder.query(&[("timestampStart", ¶m_value.to_string())]);
8129 }
8130 if let Some(ref param_value) = p_timestamp_end {
8131 req_builder = req_builder.query(&[("timestampEnd", ¶m_value.to_string())]);
8132 }
8133 if let Some(ref user_agent) = configuration.user_agent {
8134 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
8135 }
8136 if let Some(ref token) = configuration.bearer_access_token {
8137 req_builder = req_builder.bearer_auth(token.to_owned());
8138 };
8139
8140 let req = req_builder.build()?;
8141 let resp = configuration.client.execute(req).await?;
8142
8143 let status = resp.status();
8144 let content_type = resp
8145 .headers()
8146 .get("content-type")
8147 .and_then(|v| v.to_str().ok())
8148 .unwrap_or("application/octet-stream");
8149 let content_type = super::ContentType::from(content_type);
8150
8151 if !status.is_client_error() && !status.is_server_error() {
8152 let content = resp.text().await?;
8153 match content_type {
8154 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
8155 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yLogRecordsOut`"))),
8156 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::O11yPeriodO11yLogRecordsOut`")))),
8157 }
8158 } else {
8159 let content = resp.text().await?;
8160 let entity: Option<GetO11yLogsError> = serde_json::from_str(&content).ok();
8161 Err(Error::ResponseError(ResponseContent { status, content, entity }))
8162 }
8163}
8164
8165pub async fn get_o11y_logs_aggregate(configuration: &configuration::Configuration, ) -> Result<models::O11yPeriodO11yLogAggregateOut, Error<GetO11yLogsAggregateError>> {
8167
8168 let uri_str = format!("{}/v1/o11y/logs/aggregate", configuration.base_path);
8169 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
8170
8171 if let Some(ref user_agent) = configuration.user_agent {
8172 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
8173 }
8174 if let Some(ref token) = configuration.bearer_access_token {
8175 req_builder = req_builder.bearer_auth(token.to_owned());
8176 };
8177
8178 let req = req_builder.build()?;
8179 let resp = configuration.client.execute(req).await?;
8180
8181 let status = resp.status();
8182 let content_type = resp
8183 .headers()
8184 .get("content-type")
8185 .and_then(|v| v.to_str().ok())
8186 .unwrap_or("application/octet-stream");
8187 let content_type = super::ContentType::from(content_type);
8188
8189 if !status.is_client_error() && !status.is_server_error() {
8190 let content = resp.text().await?;
8191 match content_type {
8192 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
8193 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yLogAggregateOut`"))),
8194 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::O11yPeriodO11yLogAggregateOut`")))),
8195 }
8196 } else {
8197 let content = resp.text().await?;
8198 let entity: Option<GetO11yLogsAggregateError> = serde_json::from_str(&content).ok();
8199 Err(Error::ResponseError(ResponseContent { status, content, entity }))
8200 }
8201}
8202
8203pub async fn get_o11y_logs_fields(configuration: &configuration::Configuration, ) -> Result<models::O11yPeriodO11yFieldCatalogOut, Error<GetO11yLogsFieldsError>> {
8205
8206 let uri_str = format!("{}/v1/o11y/logs/fields", configuration.base_path);
8207 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
8208
8209 if let Some(ref user_agent) = configuration.user_agent {
8210 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
8211 }
8212 if let Some(ref token) = configuration.bearer_access_token {
8213 req_builder = req_builder.bearer_auth(token.to_owned());
8214 };
8215
8216 let req = req_builder.build()?;
8217 let resp = configuration.client.execute(req).await?;
8218
8219 let status = resp.status();
8220 let content_type = resp
8221 .headers()
8222 .get("content-type")
8223 .and_then(|v| v.to_str().ok())
8224 .unwrap_or("application/octet-stream");
8225 let content_type = super::ContentType::from(content_type);
8226
8227 if !status.is_client_error() && !status.is_server_error() {
8228 let content = resp.text().await?;
8229 match content_type {
8230 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
8231 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yFieldCatalogOut`"))),
8232 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::O11yPeriodO11yFieldCatalogOut`")))),
8233 }
8234 } else {
8235 let content = resp.text().await?;
8236 let entity: Option<GetO11yLogsFieldsError> = serde_json::from_str(&content).ok();
8237 Err(Error::ResponseError(ResponseContent { status, content, entity }))
8238 }
8239}
8240
8241pub async fn get_o11y_logs_livetail(configuration: &configuration::Configuration, ) -> Result<(), Error<GetO11yLogsLivetailError>> {
8243
8244 let uri_str = format!("{}/v1/o11y/logs/livetail", configuration.base_path);
8245 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
8246
8247 if let Some(ref user_agent) = configuration.user_agent {
8248 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
8249 }
8250 if let Some(ref token) = configuration.bearer_access_token {
8251 req_builder = req_builder.bearer_auth(token.to_owned());
8252 };
8253
8254 let req = req_builder.build()?;
8255 let resp = configuration.client.execute(req).await?;
8256
8257 let status = resp.status();
8258
8259 if !status.is_client_error() && !status.is_server_error() {
8260 Ok(())
8261 } else {
8262 let content = resp.text().await?;
8263 let entity: Option<GetO11yLogsLivetailError> = serde_json::from_str(&content).ok();
8264 Err(Error::ResponseError(ResponseContent { status, content, entity }))
8265 }
8266}
8267
8268pub async fn get_o11y_logs_pipelines_by_version(configuration: &configuration::Configuration, version: &str) -> Result<models::O11yPeriodO11yLogPipelinesOut, Error<GetO11yLogsPipelinesByVersionError>> {
8270 let p_version = version;
8272
8273 let uri_str = format!("{}/v1/o11y/logs/pipelines/{version}", configuration.base_path, version=crate::apis::urlencode(p_version));
8274 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
8275
8276 if let Some(ref user_agent) = configuration.user_agent {
8277 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
8278 }
8279 if let Some(ref token) = configuration.bearer_access_token {
8280 req_builder = req_builder.bearer_auth(token.to_owned());
8281 };
8282
8283 let req = req_builder.build()?;
8284 let resp = configuration.client.execute(req).await?;
8285
8286 let status = resp.status();
8287 let content_type = resp
8288 .headers()
8289 .get("content-type")
8290 .and_then(|v| v.to_str().ok())
8291 .unwrap_or("application/octet-stream");
8292 let content_type = super::ContentType::from(content_type);
8293
8294 if !status.is_client_error() && !status.is_server_error() {
8295 let content = resp.text().await?;
8296 match content_type {
8297 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
8298 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yLogPipelinesOut`"))),
8299 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::O11yPeriodO11yLogPipelinesOut`")))),
8300 }
8301 } else {
8302 let content = resp.text().await?;
8303 let entity: Option<GetO11yLogsPipelinesByVersionError> = serde_json::from_str(&content).ok();
8304 Err(Error::ResponseError(ResponseContent { status, content, entity }))
8305 }
8306}
8307
8308pub async fn get_o11y_logs_promote_paths(configuration: &configuration::Configuration, ) -> Result<models::O11yPeriodO11yLogPromotedOut, Error<GetO11yLogsPromotePathsError>> {
8310
8311 let uri_str = format!("{}/v1/o11y/logs/promote_paths", configuration.base_path);
8312 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
8313
8314 if let Some(ref user_agent) = configuration.user_agent {
8315 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
8316 }
8317 if let Some(ref token) = configuration.bearer_access_token {
8318 req_builder = req_builder.bearer_auth(token.to_owned());
8319 };
8320
8321 let req = req_builder.build()?;
8322 let resp = configuration.client.execute(req).await?;
8323
8324 let status = resp.status();
8325 let content_type = resp
8326 .headers()
8327 .get("content-type")
8328 .and_then(|v| v.to_str().ok())
8329 .unwrap_or("application/octet-stream");
8330 let content_type = super::ContentType::from(content_type);
8331
8332 if !status.is_client_error() && !status.is_server_error() {
8333 let content = resp.text().await?;
8334 match content_type {
8335 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
8336 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yLogPromotedOut`"))),
8337 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::O11yPeriodO11yLogPromotedOut`")))),
8338 }
8339 } else {
8340 let content = resp.text().await?;
8341 let entity: Option<GetO11yLogsPromotePathsError> = serde_json::from_str(&content).ok();
8342 Err(Error::ResponseError(ResponseContent { status, content, entity }))
8343 }
8344}
8345
8346pub async fn get_o11y_metric_metric_metadata(configuration: &configuration::Configuration, metric_name: Option<&str>, service_name: Option<&str>) -> Result<models::O11yPeriodO11yMetricMetadataOut, Error<GetO11yMetricMetricMetadataError>> {
8348 let p_metric_name = metric_name;
8350 let p_service_name = service_name;
8351
8352 let uri_str = format!("{}/v1/o11y/metric/metric_metadata", configuration.base_path);
8353 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
8354
8355 if let Some(ref param_value) = p_metric_name {
8356 req_builder = req_builder.query(&[("metricName", ¶m_value.to_string())]);
8357 }
8358 if let Some(ref param_value) = p_service_name {
8359 req_builder = req_builder.query(&[("serviceName", ¶m_value.to_string())]);
8360 }
8361 if let Some(ref user_agent) = configuration.user_agent {
8362 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
8363 }
8364 if let Some(ref token) = configuration.bearer_access_token {
8365 req_builder = req_builder.bearer_auth(token.to_owned());
8366 };
8367
8368 let req = req_builder.build()?;
8369 let resp = configuration.client.execute(req).await?;
8370
8371 let status = resp.status();
8372 let content_type = resp
8373 .headers()
8374 .get("content-type")
8375 .and_then(|v| v.to_str().ok())
8376 .unwrap_or("application/octet-stream");
8377 let content_type = super::ContentType::from(content_type);
8378
8379 if !status.is_client_error() && !status.is_server_error() {
8380 let content = resp.text().await?;
8381 match content_type {
8382 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
8383 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yMetricMetadataOut`"))),
8384 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::O11yPeriodO11yMetricMetadataOut`")))),
8385 }
8386 } else {
8387 let content = resp.text().await?;
8388 let entity: Option<GetO11yMetricMetricMetadataError> = serde_json::from_str(&content).ok();
8389 Err(Error::ResponseError(ResponseContent { status, content, entity }))
8390 }
8391}
8392
8393pub async fn get_o11y_namespaces_attribute_keys(configuration: &configuration::Configuration, data_source: Option<&str>, aggregate_operator: Option<&str>, aggregate_attribute: Option<&str>, search_text: Option<&str>, tag_type: Option<&str>, limit: Option<i32>) -> Result<models::O11yPeriodO11yInfraAttributeKeysOut, Error<GetO11yNamespacesAttributeKeysError>> {
8395 let p_data_source = data_source;
8397 let p_aggregate_operator = aggregate_operator;
8398 let p_aggregate_attribute = aggregate_attribute;
8399 let p_search_text = search_text;
8400 let p_tag_type = tag_type;
8401 let p_limit = limit;
8402
8403 let uri_str = format!("{}/v1/o11y/namespaces/attribute_keys", configuration.base_path);
8404 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
8405
8406 if let Some(ref param_value) = p_data_source {
8407 req_builder = req_builder.query(&[("dataSource", ¶m_value.to_string())]);
8408 }
8409 if let Some(ref param_value) = p_aggregate_operator {
8410 req_builder = req_builder.query(&[("aggregateOperator", ¶m_value.to_string())]);
8411 }
8412 if let Some(ref param_value) = p_aggregate_attribute {
8413 req_builder = req_builder.query(&[("aggregateAttribute", ¶m_value.to_string())]);
8414 }
8415 if let Some(ref param_value) = p_search_text {
8416 req_builder = req_builder.query(&[("searchText", ¶m_value.to_string())]);
8417 }
8418 if let Some(ref param_value) = p_tag_type {
8419 req_builder = req_builder.query(&[("tagType", ¶m_value.to_string())]);
8420 }
8421 if let Some(ref param_value) = p_limit {
8422 req_builder = req_builder.query(&[("limit", ¶m_value.to_string())]);
8423 }
8424 if let Some(ref user_agent) = configuration.user_agent {
8425 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
8426 }
8427 if let Some(ref token) = configuration.bearer_access_token {
8428 req_builder = req_builder.bearer_auth(token.to_owned());
8429 };
8430
8431 let req = req_builder.build()?;
8432 let resp = configuration.client.execute(req).await?;
8433
8434 let status = resp.status();
8435 let content_type = resp
8436 .headers()
8437 .get("content-type")
8438 .and_then(|v| v.to_str().ok())
8439 .unwrap_or("application/octet-stream");
8440 let content_type = super::ContentType::from(content_type);
8441
8442 if !status.is_client_error() && !status.is_server_error() {
8443 let content = resp.text().await?;
8444 match content_type {
8445 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
8446 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yInfraAttributeKeysOut`"))),
8447 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::O11yPeriodO11yInfraAttributeKeysOut`")))),
8448 }
8449 } else {
8450 let content = resp.text().await?;
8451 let entity: Option<GetO11yNamespacesAttributeKeysError> = serde_json::from_str(&content).ok();
8452 Err(Error::ResponseError(ResponseContent { status, content, entity }))
8453 }
8454}
8455
8456pub async fn get_o11y_namespaces_attribute_values(configuration: &configuration::Configuration, data_source: Option<&str>, aggregate_operator: Option<&str>, aggregate_attribute: Option<&str>, attribute_key: Option<&str>, filter_attribute_key_data_type: Option<&str>, search_text: Option<&str>, tag_type: Option<&str>, limit: Option<i32>) -> Result<models::O11yPeriodO11yInfraAttributeValuesOut, Error<GetO11yNamespacesAttributeValuesError>> {
8458 let p_data_source = data_source;
8460 let p_aggregate_operator = aggregate_operator;
8461 let p_aggregate_attribute = aggregate_attribute;
8462 let p_attribute_key = attribute_key;
8463 let p_filter_attribute_key_data_type = filter_attribute_key_data_type;
8464 let p_search_text = search_text;
8465 let p_tag_type = tag_type;
8466 let p_limit = limit;
8467
8468 let uri_str = format!("{}/v1/o11y/namespaces/attribute_values", configuration.base_path);
8469 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
8470
8471 if let Some(ref param_value) = p_data_source {
8472 req_builder = req_builder.query(&[("dataSource", ¶m_value.to_string())]);
8473 }
8474 if let Some(ref param_value) = p_aggregate_operator {
8475 req_builder = req_builder.query(&[("aggregateOperator", ¶m_value.to_string())]);
8476 }
8477 if let Some(ref param_value) = p_aggregate_attribute {
8478 req_builder = req_builder.query(&[("aggregateAttribute", ¶m_value.to_string())]);
8479 }
8480 if let Some(ref param_value) = p_attribute_key {
8481 req_builder = req_builder.query(&[("attributeKey", ¶m_value.to_string())]);
8482 }
8483 if let Some(ref param_value) = p_filter_attribute_key_data_type {
8484 req_builder = req_builder.query(&[("filterAttributeKeyDataType", ¶m_value.to_string())]);
8485 }
8486 if let Some(ref param_value) = p_search_text {
8487 req_builder = req_builder.query(&[("searchText", ¶m_value.to_string())]);
8488 }
8489 if let Some(ref param_value) = p_tag_type {
8490 req_builder = req_builder.query(&[("tagType", ¶m_value.to_string())]);
8491 }
8492 if let Some(ref param_value) = p_limit {
8493 req_builder = req_builder.query(&[("limit", ¶m_value.to_string())]);
8494 }
8495 if let Some(ref user_agent) = configuration.user_agent {
8496 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
8497 }
8498 if let Some(ref token) = configuration.bearer_access_token {
8499 req_builder = req_builder.bearer_auth(token.to_owned());
8500 };
8501
8502 let req = req_builder.build()?;
8503 let resp = configuration.client.execute(req).await?;
8504
8505 let status = resp.status();
8506 let content_type = resp
8507 .headers()
8508 .get("content-type")
8509 .and_then(|v| v.to_str().ok())
8510 .unwrap_or("application/octet-stream");
8511 let content_type = super::ContentType::from(content_type);
8512
8513 if !status.is_client_error() && !status.is_server_error() {
8514 let content = resp.text().await?;
8515 match content_type {
8516 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
8517 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yInfraAttributeValuesOut`"))),
8518 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::O11yPeriodO11yInfraAttributeValuesOut`")))),
8519 }
8520 } else {
8521 let content = resp.text().await?;
8522 let entity: Option<GetO11yNamespacesAttributeValuesError> = serde_json::from_str(&content).ok();
8523 Err(Error::ResponseError(ResponseContent { status, content, entity }))
8524 }
8525}
8526
8527pub async fn get_o11y_nextpreverrorids(configuration: &configuration::Configuration, timestamp: &str, group_id: &str, error_id: Option<&str>) -> Result<models::O11yPeriodO11yNextPrevErrorIds, Error<GetO11yNextpreverroridsError>> {
8529 let p_timestamp = timestamp;
8531 let p_group_id = group_id;
8532 let p_error_id = error_id;
8533
8534 let uri_str = format!("{}/v1/o11y/nextPrevErrorIDs", configuration.base_path);
8535 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
8536
8537 req_builder = req_builder.query(&[("timestamp", &p_timestamp.to_string())]);
8538 req_builder = req_builder.query(&[("groupID", &p_group_id.to_string())]);
8539 if let Some(ref param_value) = p_error_id {
8540 req_builder = req_builder.query(&[("errorID", ¶m_value.to_string())]);
8541 }
8542 if let Some(ref user_agent) = configuration.user_agent {
8543 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
8544 }
8545 if let Some(ref token) = configuration.bearer_access_token {
8546 req_builder = req_builder.bearer_auth(token.to_owned());
8547 };
8548
8549 let req = req_builder.build()?;
8550 let resp = configuration.client.execute(req).await?;
8551
8552 let status = resp.status();
8553 let content_type = resp
8554 .headers()
8555 .get("content-type")
8556 .and_then(|v| v.to_str().ok())
8557 .unwrap_or("application/octet-stream");
8558 let content_type = super::ContentType::from(content_type);
8559
8560 if !status.is_client_error() && !status.is_server_error() {
8561 let content = resp.text().await?;
8562 match content_type {
8563 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
8564 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yNextPrevErrorIds`"))),
8565 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::O11yPeriodO11yNextPrevErrorIds`")))),
8566 }
8567 } else {
8568 let content = resp.text().await?;
8569 let entity: Option<GetO11yNextpreverroridsError> = serde_json::from_str(&content).ok();
8570 Err(Error::ResponseError(ResponseContent { status, content, entity }))
8571 }
8572}
8573
8574pub async fn get_o11y_nodes_attribute_keys(configuration: &configuration::Configuration, data_source: Option<&str>, aggregate_operator: Option<&str>, aggregate_attribute: Option<&str>, search_text: Option<&str>, tag_type: Option<&str>, limit: Option<i32>) -> Result<models::O11yPeriodO11yInfraAttributeKeysOut, Error<GetO11yNodesAttributeKeysError>> {
8576 let p_data_source = data_source;
8578 let p_aggregate_operator = aggregate_operator;
8579 let p_aggregate_attribute = aggregate_attribute;
8580 let p_search_text = search_text;
8581 let p_tag_type = tag_type;
8582 let p_limit = limit;
8583
8584 let uri_str = format!("{}/v1/o11y/nodes/attribute_keys", configuration.base_path);
8585 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
8586
8587 if let Some(ref param_value) = p_data_source {
8588 req_builder = req_builder.query(&[("dataSource", ¶m_value.to_string())]);
8589 }
8590 if let Some(ref param_value) = p_aggregate_operator {
8591 req_builder = req_builder.query(&[("aggregateOperator", ¶m_value.to_string())]);
8592 }
8593 if let Some(ref param_value) = p_aggregate_attribute {
8594 req_builder = req_builder.query(&[("aggregateAttribute", ¶m_value.to_string())]);
8595 }
8596 if let Some(ref param_value) = p_search_text {
8597 req_builder = req_builder.query(&[("searchText", ¶m_value.to_string())]);
8598 }
8599 if let Some(ref param_value) = p_tag_type {
8600 req_builder = req_builder.query(&[("tagType", ¶m_value.to_string())]);
8601 }
8602 if let Some(ref param_value) = p_limit {
8603 req_builder = req_builder.query(&[("limit", ¶m_value.to_string())]);
8604 }
8605 if let Some(ref user_agent) = configuration.user_agent {
8606 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
8607 }
8608 if let Some(ref token) = configuration.bearer_access_token {
8609 req_builder = req_builder.bearer_auth(token.to_owned());
8610 };
8611
8612 let req = req_builder.build()?;
8613 let resp = configuration.client.execute(req).await?;
8614
8615 let status = resp.status();
8616 let content_type = resp
8617 .headers()
8618 .get("content-type")
8619 .and_then(|v| v.to_str().ok())
8620 .unwrap_or("application/octet-stream");
8621 let content_type = super::ContentType::from(content_type);
8622
8623 if !status.is_client_error() && !status.is_server_error() {
8624 let content = resp.text().await?;
8625 match content_type {
8626 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
8627 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yInfraAttributeKeysOut`"))),
8628 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::O11yPeriodO11yInfraAttributeKeysOut`")))),
8629 }
8630 } else {
8631 let content = resp.text().await?;
8632 let entity: Option<GetO11yNodesAttributeKeysError> = serde_json::from_str(&content).ok();
8633 Err(Error::ResponseError(ResponseContent { status, content, entity }))
8634 }
8635}
8636
8637pub async fn get_o11y_nodes_attribute_values(configuration: &configuration::Configuration, data_source: Option<&str>, aggregate_operator: Option<&str>, aggregate_attribute: Option<&str>, attribute_key: Option<&str>, filter_attribute_key_data_type: Option<&str>, search_text: Option<&str>, tag_type: Option<&str>, limit: Option<i32>) -> Result<models::O11yPeriodO11yInfraAttributeValuesOut, Error<GetO11yNodesAttributeValuesError>> {
8639 let p_data_source = data_source;
8641 let p_aggregate_operator = aggregate_operator;
8642 let p_aggregate_attribute = aggregate_attribute;
8643 let p_attribute_key = attribute_key;
8644 let p_filter_attribute_key_data_type = filter_attribute_key_data_type;
8645 let p_search_text = search_text;
8646 let p_tag_type = tag_type;
8647 let p_limit = limit;
8648
8649 let uri_str = format!("{}/v1/o11y/nodes/attribute_values", configuration.base_path);
8650 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
8651
8652 if let Some(ref param_value) = p_data_source {
8653 req_builder = req_builder.query(&[("dataSource", ¶m_value.to_string())]);
8654 }
8655 if let Some(ref param_value) = p_aggregate_operator {
8656 req_builder = req_builder.query(&[("aggregateOperator", ¶m_value.to_string())]);
8657 }
8658 if let Some(ref param_value) = p_aggregate_attribute {
8659 req_builder = req_builder.query(&[("aggregateAttribute", ¶m_value.to_string())]);
8660 }
8661 if let Some(ref param_value) = p_attribute_key {
8662 req_builder = req_builder.query(&[("attributeKey", ¶m_value.to_string())]);
8663 }
8664 if let Some(ref param_value) = p_filter_attribute_key_data_type {
8665 req_builder = req_builder.query(&[("filterAttributeKeyDataType", ¶m_value.to_string())]);
8666 }
8667 if let Some(ref param_value) = p_search_text {
8668 req_builder = req_builder.query(&[("searchText", ¶m_value.to_string())]);
8669 }
8670 if let Some(ref param_value) = p_tag_type {
8671 req_builder = req_builder.query(&[("tagType", ¶m_value.to_string())]);
8672 }
8673 if let Some(ref param_value) = p_limit {
8674 req_builder = req_builder.query(&[("limit", ¶m_value.to_string())]);
8675 }
8676 if let Some(ref user_agent) = configuration.user_agent {
8677 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
8678 }
8679 if let Some(ref token) = configuration.bearer_access_token {
8680 req_builder = req_builder.bearer_auth(token.to_owned());
8681 };
8682
8683 let req = req_builder.build()?;
8684 let resp = configuration.client.execute(req).await?;
8685
8686 let status = resp.status();
8687 let content_type = resp
8688 .headers()
8689 .get("content-type")
8690 .and_then(|v| v.to_str().ok())
8691 .unwrap_or("application/octet-stream");
8692 let content_type = super::ContentType::from(content_type);
8693
8694 if !status.is_client_error() && !status.is_server_error() {
8695 let content = resp.text().await?;
8696 match content_type {
8697 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
8698 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yInfraAttributeValuesOut`"))),
8699 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::O11yPeriodO11yInfraAttributeValuesOut`")))),
8700 }
8701 } else {
8702 let content = resp.text().await?;
8703 let entity: Option<GetO11yNodesAttributeValuesError> = serde_json::from_str(&content).ok();
8704 Err(Error::ResponseError(ResponseContent { status, content, entity }))
8705 }
8706}
8707
8708pub async fn get_o11y_pods_attribute_keys(configuration: &configuration::Configuration, data_source: Option<&str>, aggregate_operator: Option<&str>, aggregate_attribute: Option<&str>, search_text: Option<&str>, tag_type: Option<&str>, limit: Option<i32>) -> Result<models::O11yPeriodO11yInfraAttributeKeysOut, Error<GetO11yPodsAttributeKeysError>> {
8710 let p_data_source = data_source;
8712 let p_aggregate_operator = aggregate_operator;
8713 let p_aggregate_attribute = aggregate_attribute;
8714 let p_search_text = search_text;
8715 let p_tag_type = tag_type;
8716 let p_limit = limit;
8717
8718 let uri_str = format!("{}/v1/o11y/pods/attribute_keys", configuration.base_path);
8719 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
8720
8721 if let Some(ref param_value) = p_data_source {
8722 req_builder = req_builder.query(&[("dataSource", ¶m_value.to_string())]);
8723 }
8724 if let Some(ref param_value) = p_aggregate_operator {
8725 req_builder = req_builder.query(&[("aggregateOperator", ¶m_value.to_string())]);
8726 }
8727 if let Some(ref param_value) = p_aggregate_attribute {
8728 req_builder = req_builder.query(&[("aggregateAttribute", ¶m_value.to_string())]);
8729 }
8730 if let Some(ref param_value) = p_search_text {
8731 req_builder = req_builder.query(&[("searchText", ¶m_value.to_string())]);
8732 }
8733 if let Some(ref param_value) = p_tag_type {
8734 req_builder = req_builder.query(&[("tagType", ¶m_value.to_string())]);
8735 }
8736 if let Some(ref param_value) = p_limit {
8737 req_builder = req_builder.query(&[("limit", ¶m_value.to_string())]);
8738 }
8739 if let Some(ref user_agent) = configuration.user_agent {
8740 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
8741 }
8742 if let Some(ref token) = configuration.bearer_access_token {
8743 req_builder = req_builder.bearer_auth(token.to_owned());
8744 };
8745
8746 let req = req_builder.build()?;
8747 let resp = configuration.client.execute(req).await?;
8748
8749 let status = resp.status();
8750 let content_type = resp
8751 .headers()
8752 .get("content-type")
8753 .and_then(|v| v.to_str().ok())
8754 .unwrap_or("application/octet-stream");
8755 let content_type = super::ContentType::from(content_type);
8756
8757 if !status.is_client_error() && !status.is_server_error() {
8758 let content = resp.text().await?;
8759 match content_type {
8760 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
8761 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yInfraAttributeKeysOut`"))),
8762 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::O11yPeriodO11yInfraAttributeKeysOut`")))),
8763 }
8764 } else {
8765 let content = resp.text().await?;
8766 let entity: Option<GetO11yPodsAttributeKeysError> = serde_json::from_str(&content).ok();
8767 Err(Error::ResponseError(ResponseContent { status, content, entity }))
8768 }
8769}
8770
8771pub async fn get_o11y_pods_attribute_values(configuration: &configuration::Configuration, data_source: Option<&str>, aggregate_operator: Option<&str>, aggregate_attribute: Option<&str>, attribute_key: Option<&str>, filter_attribute_key_data_type: Option<&str>, search_text: Option<&str>, tag_type: Option<&str>, limit: Option<i32>) -> Result<models::O11yPeriodO11yInfraAttributeValuesOut, Error<GetO11yPodsAttributeValuesError>> {
8773 let p_data_source = data_source;
8775 let p_aggregate_operator = aggregate_operator;
8776 let p_aggregate_attribute = aggregate_attribute;
8777 let p_attribute_key = attribute_key;
8778 let p_filter_attribute_key_data_type = filter_attribute_key_data_type;
8779 let p_search_text = search_text;
8780 let p_tag_type = tag_type;
8781 let p_limit = limit;
8782
8783 let uri_str = format!("{}/v1/o11y/pods/attribute_values", configuration.base_path);
8784 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
8785
8786 if let Some(ref param_value) = p_data_source {
8787 req_builder = req_builder.query(&[("dataSource", ¶m_value.to_string())]);
8788 }
8789 if let Some(ref param_value) = p_aggregate_operator {
8790 req_builder = req_builder.query(&[("aggregateOperator", ¶m_value.to_string())]);
8791 }
8792 if let Some(ref param_value) = p_aggregate_attribute {
8793 req_builder = req_builder.query(&[("aggregateAttribute", ¶m_value.to_string())]);
8794 }
8795 if let Some(ref param_value) = p_attribute_key {
8796 req_builder = req_builder.query(&[("attributeKey", ¶m_value.to_string())]);
8797 }
8798 if let Some(ref param_value) = p_filter_attribute_key_data_type {
8799 req_builder = req_builder.query(&[("filterAttributeKeyDataType", ¶m_value.to_string())]);
8800 }
8801 if let Some(ref param_value) = p_search_text {
8802 req_builder = req_builder.query(&[("searchText", ¶m_value.to_string())]);
8803 }
8804 if let Some(ref param_value) = p_tag_type {
8805 req_builder = req_builder.query(&[("tagType", ¶m_value.to_string())]);
8806 }
8807 if let Some(ref param_value) = p_limit {
8808 req_builder = req_builder.query(&[("limit", ¶m_value.to_string())]);
8809 }
8810 if let Some(ref user_agent) = configuration.user_agent {
8811 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
8812 }
8813 if let Some(ref token) = configuration.bearer_access_token {
8814 req_builder = req_builder.bearer_auth(token.to_owned());
8815 };
8816
8817 let req = req_builder.build()?;
8818 let resp = configuration.client.execute(req).await?;
8819
8820 let status = resp.status();
8821 let content_type = resp
8822 .headers()
8823 .get("content-type")
8824 .and_then(|v| v.to_str().ok())
8825 .unwrap_or("application/octet-stream");
8826 let content_type = super::ContentType::from(content_type);
8827
8828 if !status.is_client_error() && !status.is_server_error() {
8829 let content = resp.text().await?;
8830 match content_type {
8831 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
8832 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yInfraAttributeValuesOut`"))),
8833 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::O11yPeriodO11yInfraAttributeValuesOut`")))),
8834 }
8835 } else {
8836 let content = resp.text().await?;
8837 let entity: Option<GetO11yPodsAttributeValuesError> = serde_json::from_str(&content).ok();
8838 Err(Error::ResponseError(ResponseContent { status, content, entity }))
8839 }
8840}
8841
8842pub async fn get_o11y_processes_attribute_keys(configuration: &configuration::Configuration, data_source: Option<&str>, aggregate_operator: Option<&str>, aggregate_attribute: Option<&str>, search_text: Option<&str>, tag_type: Option<&str>, limit: Option<i32>) -> Result<models::O11yPeriodO11yInfraAttributeKeysOut, Error<GetO11yProcessesAttributeKeysError>> {
8844 let p_data_source = data_source;
8846 let p_aggregate_operator = aggregate_operator;
8847 let p_aggregate_attribute = aggregate_attribute;
8848 let p_search_text = search_text;
8849 let p_tag_type = tag_type;
8850 let p_limit = limit;
8851
8852 let uri_str = format!("{}/v1/o11y/processes/attribute_keys", configuration.base_path);
8853 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
8854
8855 if let Some(ref param_value) = p_data_source {
8856 req_builder = req_builder.query(&[("dataSource", ¶m_value.to_string())]);
8857 }
8858 if let Some(ref param_value) = p_aggregate_operator {
8859 req_builder = req_builder.query(&[("aggregateOperator", ¶m_value.to_string())]);
8860 }
8861 if let Some(ref param_value) = p_aggregate_attribute {
8862 req_builder = req_builder.query(&[("aggregateAttribute", ¶m_value.to_string())]);
8863 }
8864 if let Some(ref param_value) = p_search_text {
8865 req_builder = req_builder.query(&[("searchText", ¶m_value.to_string())]);
8866 }
8867 if let Some(ref param_value) = p_tag_type {
8868 req_builder = req_builder.query(&[("tagType", ¶m_value.to_string())]);
8869 }
8870 if let Some(ref param_value) = p_limit {
8871 req_builder = req_builder.query(&[("limit", ¶m_value.to_string())]);
8872 }
8873 if let Some(ref user_agent) = configuration.user_agent {
8874 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
8875 }
8876 if let Some(ref token) = configuration.bearer_access_token {
8877 req_builder = req_builder.bearer_auth(token.to_owned());
8878 };
8879
8880 let req = req_builder.build()?;
8881 let resp = configuration.client.execute(req).await?;
8882
8883 let status = resp.status();
8884 let content_type = resp
8885 .headers()
8886 .get("content-type")
8887 .and_then(|v| v.to_str().ok())
8888 .unwrap_or("application/octet-stream");
8889 let content_type = super::ContentType::from(content_type);
8890
8891 if !status.is_client_error() && !status.is_server_error() {
8892 let content = resp.text().await?;
8893 match content_type {
8894 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
8895 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yInfraAttributeKeysOut`"))),
8896 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::O11yPeriodO11yInfraAttributeKeysOut`")))),
8897 }
8898 } else {
8899 let content = resp.text().await?;
8900 let entity: Option<GetO11yProcessesAttributeKeysError> = serde_json::from_str(&content).ok();
8901 Err(Error::ResponseError(ResponseContent { status, content, entity }))
8902 }
8903}
8904
8905pub async fn get_o11y_processes_attribute_values(configuration: &configuration::Configuration, data_source: Option<&str>, aggregate_operator: Option<&str>, aggregate_attribute: Option<&str>, attribute_key: Option<&str>, filter_attribute_key_data_type: Option<&str>, search_text: Option<&str>, tag_type: Option<&str>, limit: Option<i32>) -> Result<models::O11yPeriodO11yInfraAttributeValuesOut, Error<GetO11yProcessesAttributeValuesError>> {
8907 let p_data_source = data_source;
8909 let p_aggregate_operator = aggregate_operator;
8910 let p_aggregate_attribute = aggregate_attribute;
8911 let p_attribute_key = attribute_key;
8912 let p_filter_attribute_key_data_type = filter_attribute_key_data_type;
8913 let p_search_text = search_text;
8914 let p_tag_type = tag_type;
8915 let p_limit = limit;
8916
8917 let uri_str = format!("{}/v1/o11y/processes/attribute_values", configuration.base_path);
8918 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
8919
8920 if let Some(ref param_value) = p_data_source {
8921 req_builder = req_builder.query(&[("dataSource", ¶m_value.to_string())]);
8922 }
8923 if let Some(ref param_value) = p_aggregate_operator {
8924 req_builder = req_builder.query(&[("aggregateOperator", ¶m_value.to_string())]);
8925 }
8926 if let Some(ref param_value) = p_aggregate_attribute {
8927 req_builder = req_builder.query(&[("aggregateAttribute", ¶m_value.to_string())]);
8928 }
8929 if let Some(ref param_value) = p_attribute_key {
8930 req_builder = req_builder.query(&[("attributeKey", ¶m_value.to_string())]);
8931 }
8932 if let Some(ref param_value) = p_filter_attribute_key_data_type {
8933 req_builder = req_builder.query(&[("filterAttributeKeyDataType", ¶m_value.to_string())]);
8934 }
8935 if let Some(ref param_value) = p_search_text {
8936 req_builder = req_builder.query(&[("searchText", ¶m_value.to_string())]);
8937 }
8938 if let Some(ref param_value) = p_tag_type {
8939 req_builder = req_builder.query(&[("tagType", ¶m_value.to_string())]);
8940 }
8941 if let Some(ref param_value) = p_limit {
8942 req_builder = req_builder.query(&[("limit", ¶m_value.to_string())]);
8943 }
8944 if let Some(ref user_agent) = configuration.user_agent {
8945 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
8946 }
8947 if let Some(ref token) = configuration.bearer_access_token {
8948 req_builder = req_builder.bearer_auth(token.to_owned());
8949 };
8950
8951 let req = req_builder.build()?;
8952 let resp = configuration.client.execute(req).await?;
8953
8954 let status = resp.status();
8955 let content_type = resp
8956 .headers()
8957 .get("content-type")
8958 .and_then(|v| v.to_str().ok())
8959 .unwrap_or("application/octet-stream");
8960 let content_type = super::ContentType::from(content_type);
8961
8962 if !status.is_client_error() && !status.is_server_error() {
8963 let content = resp.text().await?;
8964 match content_type {
8965 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
8966 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yInfraAttributeValuesOut`"))),
8967 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::O11yPeriodO11yInfraAttributeValuesOut`")))),
8968 }
8969 } else {
8970 let content = resp.text().await?;
8971 let entity: Option<GetO11yProcessesAttributeValuesError> = serde_json::from_str(&content).ok();
8972 Err(Error::ResponseError(ResponseContent { status, content, entity }))
8973 }
8974}
8975
8976pub async fn get_o11y_product_metrics(configuration: &configuration::Configuration, product: Option<&str>, range: Option<i32>, step_sec: Option<i32>) -> Result<models::O11yPeriodMetricsResponse, Error<GetO11yProductMetricsError>> {
8978 let p_product = product;
8980 let p_range = range;
8981 let p_step_sec = step_sec;
8982
8983 let uri_str = format!("{}/v1/o11y/product/metrics", configuration.base_path);
8984 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
8985
8986 if let Some(ref param_value) = p_product {
8987 req_builder = req_builder.query(&[("product", ¶m_value.to_string())]);
8988 }
8989 if let Some(ref param_value) = p_range {
8990 req_builder = req_builder.query(&[("range", ¶m_value.to_string())]);
8991 }
8992 if let Some(ref param_value) = p_step_sec {
8993 req_builder = req_builder.query(&[("stepSec", ¶m_value.to_string())]);
8994 }
8995 if let Some(ref user_agent) = configuration.user_agent {
8996 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
8997 }
8998 if let Some(ref token) = configuration.bearer_access_token {
8999 req_builder = req_builder.bearer_auth(token.to_owned());
9000 };
9001
9002 let req = req_builder.build()?;
9003 let resp = configuration.client.execute(req).await?;
9004
9005 let status = resp.status();
9006 let content_type = resp
9007 .headers()
9008 .get("content-type")
9009 .and_then(|v| v.to_str().ok())
9010 .unwrap_or("application/octet-stream");
9011 let content_type = super::ContentType::from(content_type);
9012
9013 if !status.is_client_error() && !status.is_server_error() {
9014 let content = resp.text().await?;
9015 match content_type {
9016 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
9017 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodMetricsResponse`"))),
9018 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::O11yPeriodMetricsResponse`")))),
9019 }
9020 } else {
9021 let content = resp.text().await?;
9022 let entity: Option<GetO11yProductMetricsError> = serde_json::from_str(&content).ok();
9023 Err(Error::ResponseError(ResponseContent { status, content, entity }))
9024 }
9025}
9026
9027pub async fn get_o11y_pvcs_attribute_keys(configuration: &configuration::Configuration, data_source: Option<&str>, aggregate_operator: Option<&str>, aggregate_attribute: Option<&str>, search_text: Option<&str>, tag_type: Option<&str>, limit: Option<i32>) -> Result<models::O11yPeriodO11yInfraAttributeKeysOut, Error<GetO11yPvcsAttributeKeysError>> {
9029 let p_data_source = data_source;
9031 let p_aggregate_operator = aggregate_operator;
9032 let p_aggregate_attribute = aggregate_attribute;
9033 let p_search_text = search_text;
9034 let p_tag_type = tag_type;
9035 let p_limit = limit;
9036
9037 let uri_str = format!("{}/v1/o11y/pvcs/attribute_keys", configuration.base_path);
9038 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
9039
9040 if let Some(ref param_value) = p_data_source {
9041 req_builder = req_builder.query(&[("dataSource", ¶m_value.to_string())]);
9042 }
9043 if let Some(ref param_value) = p_aggregate_operator {
9044 req_builder = req_builder.query(&[("aggregateOperator", ¶m_value.to_string())]);
9045 }
9046 if let Some(ref param_value) = p_aggregate_attribute {
9047 req_builder = req_builder.query(&[("aggregateAttribute", ¶m_value.to_string())]);
9048 }
9049 if let Some(ref param_value) = p_search_text {
9050 req_builder = req_builder.query(&[("searchText", ¶m_value.to_string())]);
9051 }
9052 if let Some(ref param_value) = p_tag_type {
9053 req_builder = req_builder.query(&[("tagType", ¶m_value.to_string())]);
9054 }
9055 if let Some(ref param_value) = p_limit {
9056 req_builder = req_builder.query(&[("limit", ¶m_value.to_string())]);
9057 }
9058 if let Some(ref user_agent) = configuration.user_agent {
9059 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
9060 }
9061 if let Some(ref token) = configuration.bearer_access_token {
9062 req_builder = req_builder.bearer_auth(token.to_owned());
9063 };
9064
9065 let req = req_builder.build()?;
9066 let resp = configuration.client.execute(req).await?;
9067
9068 let status = resp.status();
9069 let content_type = resp
9070 .headers()
9071 .get("content-type")
9072 .and_then(|v| v.to_str().ok())
9073 .unwrap_or("application/octet-stream");
9074 let content_type = super::ContentType::from(content_type);
9075
9076 if !status.is_client_error() && !status.is_server_error() {
9077 let content = resp.text().await?;
9078 match content_type {
9079 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
9080 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yInfraAttributeKeysOut`"))),
9081 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::O11yPeriodO11yInfraAttributeKeysOut`")))),
9082 }
9083 } else {
9084 let content = resp.text().await?;
9085 let entity: Option<GetO11yPvcsAttributeKeysError> = serde_json::from_str(&content).ok();
9086 Err(Error::ResponseError(ResponseContent { status, content, entity }))
9087 }
9088}
9089
9090pub async fn get_o11y_pvcs_attribute_values(configuration: &configuration::Configuration, data_source: Option<&str>, aggregate_operator: Option<&str>, aggregate_attribute: Option<&str>, attribute_key: Option<&str>, filter_attribute_key_data_type: Option<&str>, search_text: Option<&str>, tag_type: Option<&str>, limit: Option<i32>) -> Result<models::O11yPeriodO11yInfraAttributeValuesOut, Error<GetO11yPvcsAttributeValuesError>> {
9092 let p_data_source = data_source;
9094 let p_aggregate_operator = aggregate_operator;
9095 let p_aggregate_attribute = aggregate_attribute;
9096 let p_attribute_key = attribute_key;
9097 let p_filter_attribute_key_data_type = filter_attribute_key_data_type;
9098 let p_search_text = search_text;
9099 let p_tag_type = tag_type;
9100 let p_limit = limit;
9101
9102 let uri_str = format!("{}/v1/o11y/pvcs/attribute_values", configuration.base_path);
9103 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
9104
9105 if let Some(ref param_value) = p_data_source {
9106 req_builder = req_builder.query(&[("dataSource", ¶m_value.to_string())]);
9107 }
9108 if let Some(ref param_value) = p_aggregate_operator {
9109 req_builder = req_builder.query(&[("aggregateOperator", ¶m_value.to_string())]);
9110 }
9111 if let Some(ref param_value) = p_aggregate_attribute {
9112 req_builder = req_builder.query(&[("aggregateAttribute", ¶m_value.to_string())]);
9113 }
9114 if let Some(ref param_value) = p_attribute_key {
9115 req_builder = req_builder.query(&[("attributeKey", ¶m_value.to_string())]);
9116 }
9117 if let Some(ref param_value) = p_filter_attribute_key_data_type {
9118 req_builder = req_builder.query(&[("filterAttributeKeyDataType", ¶m_value.to_string())]);
9119 }
9120 if let Some(ref param_value) = p_search_text {
9121 req_builder = req_builder.query(&[("searchText", ¶m_value.to_string())]);
9122 }
9123 if let Some(ref param_value) = p_tag_type {
9124 req_builder = req_builder.query(&[("tagType", ¶m_value.to_string())]);
9125 }
9126 if let Some(ref param_value) = p_limit {
9127 req_builder = req_builder.query(&[("limit", ¶m_value.to_string())]);
9128 }
9129 if let Some(ref user_agent) = configuration.user_agent {
9130 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
9131 }
9132 if let Some(ref token) = configuration.bearer_access_token {
9133 req_builder = req_builder.bearer_auth(token.to_owned());
9134 };
9135
9136 let req = req_builder.build()?;
9137 let resp = configuration.client.execute(req).await?;
9138
9139 let status = resp.status();
9140 let content_type = resp
9141 .headers()
9142 .get("content-type")
9143 .and_then(|v| v.to_str().ok())
9144 .unwrap_or("application/octet-stream");
9145 let content_type = super::ContentType::from(content_type);
9146
9147 if !status.is_client_error() && !status.is_server_error() {
9148 let content = resp.text().await?;
9149 match content_type {
9150 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
9151 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yInfraAttributeValuesOut`"))),
9152 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::O11yPeriodO11yInfraAttributeValuesOut`")))),
9153 }
9154 } else {
9155 let content = resp.text().await?;
9156 let entity: Option<GetO11yPvcsAttributeValuesError> = serde_json::from_str(&content).ok();
9157 Err(Error::ResponseError(ResponseContent { status, content, entity }))
9158 }
9159}
9160
9161pub async fn get_o11y_query(configuration: &configuration::Configuration, query: &str, time: Option<&str>, stats: Option<&str>, timeout: Option<&str>) -> Result<models::O11yPeriodO11yPromQueryOut, Error<GetO11yQueryError>> {
9163 let p_query = query;
9165 let p_time = time;
9166 let p_stats = stats;
9167 let p_timeout = timeout;
9168
9169 let uri_str = format!("{}/v1/o11y/query", configuration.base_path);
9170 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
9171
9172 req_builder = req_builder.query(&[("query", &p_query.to_string())]);
9173 if let Some(ref param_value) = p_time {
9174 req_builder = req_builder.query(&[("time", ¶m_value.to_string())]);
9175 }
9176 if let Some(ref param_value) = p_stats {
9177 req_builder = req_builder.query(&[("stats", ¶m_value.to_string())]);
9178 }
9179 if let Some(ref param_value) = p_timeout {
9180 req_builder = req_builder.query(&[("timeout", ¶m_value.to_string())]);
9181 }
9182 if let Some(ref user_agent) = configuration.user_agent {
9183 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
9184 }
9185 if let Some(ref token) = configuration.bearer_access_token {
9186 req_builder = req_builder.bearer_auth(token.to_owned());
9187 };
9188
9189 let req = req_builder.build()?;
9190 let resp = configuration.client.execute(req).await?;
9191
9192 let status = resp.status();
9193 let content_type = resp
9194 .headers()
9195 .get("content-type")
9196 .and_then(|v| v.to_str().ok())
9197 .unwrap_or("application/octet-stream");
9198 let content_type = super::ContentType::from(content_type);
9199
9200 if !status.is_client_error() && !status.is_server_error() {
9201 let content = resp.text().await?;
9202 match content_type {
9203 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
9204 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yPromQueryOut`"))),
9205 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::O11yPeriodO11yPromQueryOut`")))),
9206 }
9207 } else {
9208 let content = resp.text().await?;
9209 let entity: Option<GetO11yQueryError> = serde_json::from_str(&content).ok();
9210 Err(Error::ResponseError(ResponseContent { status, content, entity }))
9211 }
9212}
9213
9214pub async fn get_o11y_query_progress(configuration: &configuration::Configuration, ) -> Result<(), Error<GetO11yQueryProgressError>> {
9216
9217 let uri_str = format!("{}/v1/o11y/query_progress", configuration.base_path);
9218 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
9219
9220 if let Some(ref user_agent) = configuration.user_agent {
9221 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
9222 }
9223 if let Some(ref token) = configuration.bearer_access_token {
9224 req_builder = req_builder.bearer_auth(token.to_owned());
9225 };
9226
9227 let req = req_builder.build()?;
9228 let resp = configuration.client.execute(req).await?;
9229
9230 let status = resp.status();
9231
9232 if !status.is_client_error() && !status.is_server_error() {
9233 Ok(())
9234 } else {
9235 let content = resp.text().await?;
9236 let entity: Option<GetO11yQueryProgressError> = serde_json::from_str(&content).ok();
9237 Err(Error::ResponseError(ResponseContent { status, content, entity }))
9238 }
9239}
9240
9241pub async fn get_o11y_query_range(configuration: &configuration::Configuration, start: &str, end: &str, step: &str, query: &str, stats: Option<&str>, timeout: Option<&str>) -> Result<models::O11yPeriodO11yMetricsQueryRangeOut, Error<GetO11yQueryRangeError>> {
9243 let p_start = start;
9245 let p_end = end;
9246 let p_step = step;
9247 let p_query = query;
9248 let p_stats = stats;
9249 let p_timeout = timeout;
9250
9251 let uri_str = format!("{}/v1/o11y/query_range", configuration.base_path);
9252 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
9253
9254 req_builder = req_builder.query(&[("start", &p_start.to_string())]);
9255 req_builder = req_builder.query(&[("end", &p_end.to_string())]);
9256 req_builder = req_builder.query(&[("step", &p_step.to_string())]);
9257 req_builder = req_builder.query(&[("query", &p_query.to_string())]);
9258 if let Some(ref param_value) = p_stats {
9259 req_builder = req_builder.query(&[("stats", ¶m_value.to_string())]);
9260 }
9261 if let Some(ref param_value) = p_timeout {
9262 req_builder = req_builder.query(&[("timeout", ¶m_value.to_string())]);
9263 }
9264 if let Some(ref user_agent) = configuration.user_agent {
9265 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
9266 }
9267 if let Some(ref token) = configuration.bearer_access_token {
9268 req_builder = req_builder.bearer_auth(token.to_owned());
9269 };
9270
9271 let req = req_builder.build()?;
9272 let resp = configuration.client.execute(req).await?;
9273
9274 let status = resp.status();
9275 let content_type = resp
9276 .headers()
9277 .get("content-type")
9278 .and_then(|v| v.to_str().ok())
9279 .unwrap_or("application/octet-stream");
9280 let content_type = super::ContentType::from(content_type);
9281
9282 if !status.is_client_error() && !status.is_server_error() {
9283 let content = resp.text().await?;
9284 match content_type {
9285 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
9286 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yMetricsQueryRangeOut`"))),
9287 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::O11yPeriodO11yMetricsQueryRangeOut`")))),
9288 }
9289 } else {
9290 let content = resp.text().await?;
9291 let entity: Option<GetO11yQueryRangeError> = serde_json::from_str(&content).ok();
9292 Err(Error::ResponseError(ResponseContent { status, content, entity }))
9293 }
9294}
9295
9296pub async fn get_o11y_readyz(configuration: &configuration::Configuration, ) -> Result<(), Error<GetO11yReadyzError>> {
9298
9299 let uri_str = format!("{}/v1/o11y/readyz", configuration.base_path);
9300 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
9301
9302 if let Some(ref user_agent) = configuration.user_agent {
9303 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
9304 }
9305 if let Some(ref token) = configuration.bearer_access_token {
9306 req_builder = req_builder.bearer_auth(token.to_owned());
9307 };
9308
9309 let req = req_builder.build()?;
9310 let resp = configuration.client.execute(req).await?;
9311
9312 let status = resp.status();
9313
9314 if !status.is_client_error() && !status.is_server_error() {
9315 Ok(())
9316 } else {
9317 let content = resp.text().await?;
9318 let entity: Option<GetO11yReadyzError> = serde_json::from_str(&content).ok();
9319 Err(Error::ResponseError(ResponseContent { status, content, entity }))
9320 }
9321}
9322
9323pub async fn get_o11y_reviews(configuration: &configuration::Configuration, page: Option<i32>, limit: Option<i32>) -> Result<models::O11yPeriodAnnQueueList, Error<GetO11yReviewsError>> {
9325 let p_page = page;
9327 let p_limit = limit;
9328
9329 let uri_str = format!("{}/v1/o11y/reviews", configuration.base_path);
9330 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
9331
9332 if let Some(ref param_value) = p_page {
9333 req_builder = req_builder.query(&[("page", ¶m_value.to_string())]);
9334 }
9335 if let Some(ref param_value) = p_limit {
9336 req_builder = req_builder.query(&[("limit", ¶m_value.to_string())]);
9337 }
9338 if let Some(ref user_agent) = configuration.user_agent {
9339 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
9340 }
9341 if let Some(ref token) = configuration.bearer_access_token {
9342 req_builder = req_builder.bearer_auth(token.to_owned());
9343 };
9344
9345 let req = req_builder.build()?;
9346 let resp = configuration.client.execute(req).await?;
9347
9348 let status = resp.status();
9349 let content_type = resp
9350 .headers()
9351 .get("content-type")
9352 .and_then(|v| v.to_str().ok())
9353 .unwrap_or("application/octet-stream");
9354 let content_type = super::ContentType::from(content_type);
9355
9356 if !status.is_client_error() && !status.is_server_error() {
9357 let content = resp.text().await?;
9358 match content_type {
9359 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
9360 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodAnnQueueList`"))),
9361 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::O11yPeriodAnnQueueList`")))),
9362 }
9363 } else {
9364 let content = resp.text().await?;
9365 let entity: Option<GetO11yReviewsError> = serde_json::from_str(&content).ok();
9366 Err(Error::ResponseError(ResponseContent { status, content, entity }))
9367 }
9368}
9369
9370pub async fn get_o11y_reviews_by_id(configuration: &configuration::Configuration, id: &str) -> Result<models::O11yPeriodAnnQueueDetailView, Error<GetO11yReviewsByIdError>> {
9372 let p_id = id;
9374
9375 let uri_str = format!("{}/v1/o11y/reviews/{id}", configuration.base_path, id=crate::apis::urlencode(p_id));
9376 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
9377
9378 if let Some(ref user_agent) = configuration.user_agent {
9379 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
9380 }
9381 if let Some(ref token) = configuration.bearer_access_token {
9382 req_builder = req_builder.bearer_auth(token.to_owned());
9383 };
9384
9385 let req = req_builder.build()?;
9386 let resp = configuration.client.execute(req).await?;
9387
9388 let status = resp.status();
9389 let content_type = resp
9390 .headers()
9391 .get("content-type")
9392 .and_then(|v| v.to_str().ok())
9393 .unwrap_or("application/octet-stream");
9394 let content_type = super::ContentType::from(content_type);
9395
9396 if !status.is_client_error() && !status.is_server_error() {
9397 let content = resp.text().await?;
9398 match content_type {
9399 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
9400 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodAnnQueueDetailView`"))),
9401 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::O11yPeriodAnnQueueDetailView`")))),
9402 }
9403 } else {
9404 let content = resp.text().await?;
9405 let entity: Option<GetO11yReviewsByIdError> = serde_json::from_str(&content).ok();
9406 Err(Error::ResponseError(ResponseContent { status, content, entity }))
9407 }
9408}
9409
9410pub async fn get_o11y_reviews_by_id_items(configuration: &configuration::Configuration, id: &str, status: Option<&str>, page: Option<i32>, limit: Option<i32>) -> Result<models::O11yPeriodAnnItemList, Error<GetO11yReviewsByIdItemsError>> {
9412 let p_id = id;
9414 let p_status = status;
9415 let p_page = page;
9416 let p_limit = limit;
9417
9418 let uri_str = format!("{}/v1/o11y/reviews/{id}/items", configuration.base_path, id=crate::apis::urlencode(p_id));
9419 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
9420
9421 if let Some(ref param_value) = p_status {
9422 req_builder = req_builder.query(&[("status", ¶m_value.to_string())]);
9423 }
9424 if let Some(ref param_value) = p_page {
9425 req_builder = req_builder.query(&[("page", ¶m_value.to_string())]);
9426 }
9427 if let Some(ref param_value) = p_limit {
9428 req_builder = req_builder.query(&[("limit", ¶m_value.to_string())]);
9429 }
9430 if let Some(ref user_agent) = configuration.user_agent {
9431 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
9432 }
9433 if let Some(ref token) = configuration.bearer_access_token {
9434 req_builder = req_builder.bearer_auth(token.to_owned());
9435 };
9436
9437 let req = req_builder.build()?;
9438 let resp = configuration.client.execute(req).await?;
9439
9440 let status = resp.status();
9441 let content_type = resp
9442 .headers()
9443 .get("content-type")
9444 .and_then(|v| v.to_str().ok())
9445 .unwrap_or("application/octet-stream");
9446 let content_type = super::ContentType::from(content_type);
9447
9448 if !status.is_client_error() && !status.is_server_error() {
9449 let content = resp.text().await?;
9450 match content_type {
9451 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
9452 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodAnnItemList`"))),
9453 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::O11yPeriodAnnItemList`")))),
9454 }
9455 } else {
9456 let content = resp.text().await?;
9457 let entity: Option<GetO11yReviewsByIdItemsError> = serde_json::from_str(&content).ok();
9458 Err(Error::ResponseError(ResponseContent { status, content, entity }))
9459 }
9460}
9461
9462pub async fn get_o11y_sentinel_events_by_id(configuration: &configuration::Configuration, id: &str, project: &str) -> Result<models::O11yPeriodO11ySentryEventOut, Error<GetO11ySentinelEventsByIdError>> {
9464 let p_id = id;
9466 let p_project = project;
9467
9468 let uri_str = format!("{}/v1/o11y/sentinel/events/{id}", configuration.base_path, id=crate::apis::urlencode(p_id));
9469 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
9470
9471 req_builder = req_builder.query(&[("project", &p_project.to_string())]);
9472 if let Some(ref user_agent) = configuration.user_agent {
9473 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
9474 }
9475 if let Some(ref token) = configuration.bearer_access_token {
9476 req_builder = req_builder.bearer_auth(token.to_owned());
9477 };
9478
9479 let req = req_builder.build()?;
9480 let resp = configuration.client.execute(req).await?;
9481
9482 let status = resp.status();
9483 let content_type = resp
9484 .headers()
9485 .get("content-type")
9486 .and_then(|v| v.to_str().ok())
9487 .unwrap_or("application/octet-stream");
9488 let content_type = super::ContentType::from(content_type);
9489
9490 if !status.is_client_error() && !status.is_server_error() {
9491 let content = resp.text().await?;
9492 match content_type {
9493 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
9494 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11ySentryEventOut`"))),
9495 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::O11yPeriodO11ySentryEventOut`")))),
9496 }
9497 } else {
9498 let content = resp.text().await?;
9499 let entity: Option<GetO11ySentinelEventsByIdError> = serde_json::from_str(&content).ok();
9500 Err(Error::ResponseError(ResponseContent { status, content, entity }))
9501 }
9502}
9503
9504pub async fn get_o11y_sentinel_issues(configuration: &configuration::Configuration, status: Option<&str>, level: Option<&str>, environment: Option<&str>, service_name: Option<&str>, query: Option<&str>, sort: Option<&str>, offset: Option<i32>, limit: Option<i32>, project: Option<&str>, period: Option<&str>) -> Result<models::O11yPeriodO11yErrorIssuesOut, Error<GetO11ySentinelIssuesError>> {
9506 let p_status = status;
9508 let p_level = level;
9509 let p_environment = environment;
9510 let p_service_name = service_name;
9511 let p_query = query;
9512 let p_sort = sort;
9513 let p_offset = offset;
9514 let p_limit = limit;
9515 let p_project = project;
9516 let p_period = period;
9517
9518 let uri_str = format!("{}/v1/o11y/sentinel/issues", configuration.base_path);
9519 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
9520
9521 if let Some(ref param_value) = p_status {
9522 req_builder = req_builder.query(&[("status", ¶m_value.to_string())]);
9523 }
9524 if let Some(ref param_value) = p_level {
9525 req_builder = req_builder.query(&[("level", ¶m_value.to_string())]);
9526 }
9527 if let Some(ref param_value) = p_environment {
9528 req_builder = req_builder.query(&[("environment", ¶m_value.to_string())]);
9529 }
9530 if let Some(ref param_value) = p_service_name {
9531 req_builder = req_builder.query(&[("serviceName", ¶m_value.to_string())]);
9532 }
9533 if let Some(ref param_value) = p_query {
9534 req_builder = req_builder.query(&[("query", ¶m_value.to_string())]);
9535 }
9536 if let Some(ref param_value) = p_sort {
9537 req_builder = req_builder.query(&[("sort", ¶m_value.to_string())]);
9538 }
9539 if let Some(ref param_value) = p_offset {
9540 req_builder = req_builder.query(&[("offset", ¶m_value.to_string())]);
9541 }
9542 if let Some(ref param_value) = p_limit {
9543 req_builder = req_builder.query(&[("limit", ¶m_value.to_string())]);
9544 }
9545 if let Some(ref param_value) = p_project {
9546 req_builder = req_builder.query(&[("project", ¶m_value.to_string())]);
9547 }
9548 if let Some(ref param_value) = p_period {
9549 req_builder = req_builder.query(&[("period", ¶m_value.to_string())]);
9550 }
9551 if let Some(ref user_agent) = configuration.user_agent {
9552 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
9553 }
9554 if let Some(ref token) = configuration.bearer_access_token {
9555 req_builder = req_builder.bearer_auth(token.to_owned());
9556 };
9557
9558 let req = req_builder.build()?;
9559 let resp = configuration.client.execute(req).await?;
9560
9561 let status = resp.status();
9562 let content_type = resp
9563 .headers()
9564 .get("content-type")
9565 .and_then(|v| v.to_str().ok())
9566 .unwrap_or("application/octet-stream");
9567 let content_type = super::ContentType::from(content_type);
9568
9569 if !status.is_client_error() && !status.is_server_error() {
9570 let content = resp.text().await?;
9571 match content_type {
9572 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
9573 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yErrorIssuesOut`"))),
9574 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::O11yPeriodO11yErrorIssuesOut`")))),
9575 }
9576 } else {
9577 let content = resp.text().await?;
9578 let entity: Option<GetO11ySentinelIssuesError> = serde_json::from_str(&content).ok();
9579 Err(Error::ResponseError(ResponseContent { status, content, entity }))
9580 }
9581}
9582
9583pub async fn get_o11y_sentinel_issues_by_id(configuration: &configuration::Configuration, id: &str) -> Result<models::O11yPeriodO11yErrorGettableIssueOut, Error<GetO11ySentinelIssuesByIdError>> {
9585 let p_id = id;
9587
9588 let uri_str = format!("{}/v1/o11y/sentinel/issues/{id}", configuration.base_path, id=crate::apis::urlencode(p_id));
9589 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
9590
9591 if let Some(ref user_agent) = configuration.user_agent {
9592 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
9593 }
9594 if let Some(ref token) = configuration.bearer_access_token {
9595 req_builder = req_builder.bearer_auth(token.to_owned());
9596 };
9597
9598 let req = req_builder.build()?;
9599 let resp = configuration.client.execute(req).await?;
9600
9601 let status = resp.status();
9602 let content_type = resp
9603 .headers()
9604 .get("content-type")
9605 .and_then(|v| v.to_str().ok())
9606 .unwrap_or("application/octet-stream");
9607 let content_type = super::ContentType::from(content_type);
9608
9609 if !status.is_client_error() && !status.is_server_error() {
9610 let content = resp.text().await?;
9611 match content_type {
9612 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
9613 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yErrorGettableIssueOut`"))),
9614 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::O11yPeriodO11yErrorGettableIssueOut`")))),
9615 }
9616 } else {
9617 let content = resp.text().await?;
9618 let entity: Option<GetO11ySentinelIssuesByIdError> = serde_json::from_str(&content).ok();
9619 Err(Error::ResponseError(ResponseContent { status, content, entity }))
9620 }
9621}
9622
9623pub async fn get_o11y_sentinel_issues_by_id_events(configuration: &configuration::Configuration, id: &str, project: &str, limit: Option<i32>) -> Result<models::O11yPeriodO11ySentryIssueEventsOut, Error<GetO11ySentinelIssuesByIdEventsError>> {
9625 let p_id = id;
9627 let p_project = project;
9628 let p_limit = limit;
9629
9630 let uri_str = format!("{}/v1/o11y/sentinel/issues/{id}/events", configuration.base_path, id=crate::apis::urlencode(p_id));
9631 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
9632
9633 req_builder = req_builder.query(&[("project", &p_project.to_string())]);
9634 if let Some(ref param_value) = p_limit {
9635 req_builder = req_builder.query(&[("limit", ¶m_value.to_string())]);
9636 }
9637 if let Some(ref user_agent) = configuration.user_agent {
9638 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
9639 }
9640 if let Some(ref token) = configuration.bearer_access_token {
9641 req_builder = req_builder.bearer_auth(token.to_owned());
9642 };
9643
9644 let req = req_builder.build()?;
9645 let resp = configuration.client.execute(req).await?;
9646
9647 let status = resp.status();
9648 let content_type = resp
9649 .headers()
9650 .get("content-type")
9651 .and_then(|v| v.to_str().ok())
9652 .unwrap_or("application/octet-stream");
9653 let content_type = super::ContentType::from(content_type);
9654
9655 if !status.is_client_error() && !status.is_server_error() {
9656 let content = resp.text().await?;
9657 match content_type {
9658 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
9659 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11ySentryIssueEventsOut`"))),
9660 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::O11yPeriodO11ySentryIssueEventsOut`")))),
9661 }
9662 } else {
9663 let content = resp.text().await?;
9664 let entity: Option<GetO11ySentinelIssuesByIdEventsError> = serde_json::from_str(&content).ok();
9665 Err(Error::ResponseError(ResponseContent { status, content, entity }))
9666 }
9667}
9668
9669pub async fn get_o11y_sentinel_logs(configuration: &configuration::Configuration, project: &str, query: Option<&str>, period: Option<&str>, limit: Option<i32>) -> Result<models::O11yPeriodO11yLogsOut, Error<GetO11ySentinelLogsError>> {
9671 let p_project = project;
9673 let p_query = query;
9674 let p_period = period;
9675 let p_limit = limit;
9676
9677 let uri_str = format!("{}/v1/o11y/sentinel/logs", configuration.base_path);
9678 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
9679
9680 req_builder = req_builder.query(&[("project", &p_project.to_string())]);
9681 if let Some(ref param_value) = p_query {
9682 req_builder = req_builder.query(&[("query", ¶m_value.to_string())]);
9683 }
9684 if let Some(ref param_value) = p_period {
9685 req_builder = req_builder.query(&[("period", ¶m_value.to_string())]);
9686 }
9687 if let Some(ref param_value) = p_limit {
9688 req_builder = req_builder.query(&[("limit", ¶m_value.to_string())]);
9689 }
9690 if let Some(ref user_agent) = configuration.user_agent {
9691 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
9692 }
9693 if let Some(ref token) = configuration.bearer_access_token {
9694 req_builder = req_builder.bearer_auth(token.to_owned());
9695 };
9696
9697 let req = req_builder.build()?;
9698 let resp = configuration.client.execute(req).await?;
9699
9700 let status = resp.status();
9701 let content_type = resp
9702 .headers()
9703 .get("content-type")
9704 .and_then(|v| v.to_str().ok())
9705 .unwrap_or("application/octet-stream");
9706 let content_type = super::ContentType::from(content_type);
9707
9708 if !status.is_client_error() && !status.is_server_error() {
9709 let content = resp.text().await?;
9710 match content_type {
9711 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
9712 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yLogsOut`"))),
9713 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::O11yPeriodO11yLogsOut`")))),
9714 }
9715 } else {
9716 let content = resp.text().await?;
9717 let entity: Option<GetO11ySentinelLogsError> = serde_json::from_str(&content).ok();
9718 Err(Error::ResponseError(ResponseContent { status, content, entity }))
9719 }
9720}
9721
9722pub async fn get_o11y_sentinel_projects(configuration: &configuration::Configuration, ) -> Result<models::O11yPeriodO11ySentryProjectsOut, Error<GetO11ySentinelProjectsError>> {
9724
9725 let uri_str = format!("{}/v1/o11y/sentinel/projects", configuration.base_path);
9726 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
9727
9728 if let Some(ref user_agent) = configuration.user_agent {
9729 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
9730 }
9731 if let Some(ref token) = configuration.bearer_access_token {
9732 req_builder = req_builder.bearer_auth(token.to_owned());
9733 };
9734
9735 let req = req_builder.build()?;
9736 let resp = configuration.client.execute(req).await?;
9737
9738 let status = resp.status();
9739 let content_type = resp
9740 .headers()
9741 .get("content-type")
9742 .and_then(|v| v.to_str().ok())
9743 .unwrap_or("application/octet-stream");
9744 let content_type = super::ContentType::from(content_type);
9745
9746 if !status.is_client_error() && !status.is_server_error() {
9747 let content = resp.text().await?;
9748 match content_type {
9749 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
9750 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11ySentryProjectsOut`"))),
9751 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::O11yPeriodO11ySentryProjectsOut`")))),
9752 }
9753 } else {
9754 let content = resp.text().await?;
9755 let entity: Option<GetO11ySentinelProjectsError> = serde_json::from_str(&content).ok();
9756 Err(Error::ResponseError(ResponseContent { status, content, entity }))
9757 }
9758}
9759
9760pub async fn get_o11y_sentinel_projects_by_id(configuration: &configuration::Configuration, id: &str) -> Result<models::O11yPeriodO11ySentryProjectOut, Error<GetO11ySentinelProjectsByIdError>> {
9762 let p_id = id;
9764
9765 let uri_str = format!("{}/v1/o11y/sentinel/projects/{id}", configuration.base_path, id=crate::apis::urlencode(p_id));
9766 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
9767
9768 if let Some(ref user_agent) = configuration.user_agent {
9769 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
9770 }
9771 if let Some(ref token) = configuration.bearer_access_token {
9772 req_builder = req_builder.bearer_auth(token.to_owned());
9773 };
9774
9775 let req = req_builder.build()?;
9776 let resp = configuration.client.execute(req).await?;
9777
9778 let status = resp.status();
9779 let content_type = resp
9780 .headers()
9781 .get("content-type")
9782 .and_then(|v| v.to_str().ok())
9783 .unwrap_or("application/octet-stream");
9784 let content_type = super::ContentType::from(content_type);
9785
9786 if !status.is_client_error() && !status.is_server_error() {
9787 let content = resp.text().await?;
9788 match content_type {
9789 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
9790 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11ySentryProjectOut`"))),
9791 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::O11yPeriodO11ySentryProjectOut`")))),
9792 }
9793 } else {
9794 let content = resp.text().await?;
9795 let entity: Option<GetO11ySentinelProjectsByIdError> = serde_json::from_str(&content).ok();
9796 Err(Error::ResponseError(ResponseContent { status, content, entity }))
9797 }
9798}
9799
9800pub async fn get_o11y_sentinel_stats(configuration: &configuration::Configuration, project: &str, field: Option<&str>, period: Option<&str>) -> Result<models::O11yPeriodO11yStatsOut, Error<GetO11ySentinelStatsError>> {
9802 let p_project = project;
9804 let p_field = field;
9805 let p_period = period;
9806
9807 let uri_str = format!("{}/v1/o11y/sentinel/stats", configuration.base_path);
9808 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
9809
9810 req_builder = req_builder.query(&[("project", &p_project.to_string())]);
9811 if let Some(ref param_value) = p_field {
9812 req_builder = req_builder.query(&[("field", ¶m_value.to_string())]);
9813 }
9814 if let Some(ref param_value) = p_period {
9815 req_builder = req_builder.query(&[("period", ¶m_value.to_string())]);
9816 }
9817 if let Some(ref user_agent) = configuration.user_agent {
9818 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
9819 }
9820 if let Some(ref token) = configuration.bearer_access_token {
9821 req_builder = req_builder.bearer_auth(token.to_owned());
9822 };
9823
9824 let req = req_builder.build()?;
9825 let resp = configuration.client.execute(req).await?;
9826
9827 let status = resp.status();
9828 let content_type = resp
9829 .headers()
9830 .get("content-type")
9831 .and_then(|v| v.to_str().ok())
9832 .unwrap_or("application/octet-stream");
9833 let content_type = super::ContentType::from(content_type);
9834
9835 if !status.is_client_error() && !status.is_server_error() {
9836 let content = resp.text().await?;
9837 match content_type {
9838 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
9839 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yStatsOut`"))),
9840 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::O11yPeriodO11yStatsOut`")))),
9841 }
9842 } else {
9843 let content = resp.text().await?;
9844 let entity: Option<GetO11ySentinelStatsError> = serde_json::from_str(&content).ok();
9845 Err(Error::ResponseError(ResponseContent { status, content, entity }))
9846 }
9847}
9848
9849pub async fn get_o11y_sentinel_traces(configuration: &configuration::Configuration, project: &str, period: Option<&str>, limit: Option<i32>) -> Result<models::O11yPeriodO11yTracesOut, Error<GetO11ySentinelTracesError>> {
9851 let p_project = project;
9853 let p_period = period;
9854 let p_limit = limit;
9855
9856 let uri_str = format!("{}/v1/o11y/sentinel/traces", configuration.base_path);
9857 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
9858
9859 req_builder = req_builder.query(&[("project", &p_project.to_string())]);
9860 if let Some(ref param_value) = p_period {
9861 req_builder = req_builder.query(&[("period", ¶m_value.to_string())]);
9862 }
9863 if let Some(ref param_value) = p_limit {
9864 req_builder = req_builder.query(&[("limit", ¶m_value.to_string())]);
9865 }
9866 if let Some(ref user_agent) = configuration.user_agent {
9867 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
9868 }
9869 if let Some(ref token) = configuration.bearer_access_token {
9870 req_builder = req_builder.bearer_auth(token.to_owned());
9871 };
9872
9873 let req = req_builder.build()?;
9874 let resp = configuration.client.execute(req).await?;
9875
9876 let status = resp.status();
9877 let content_type = resp
9878 .headers()
9879 .get("content-type")
9880 .and_then(|v| v.to_str().ok())
9881 .unwrap_or("application/octet-stream");
9882 let content_type = super::ContentType::from(content_type);
9883
9884 if !status.is_client_error() && !status.is_server_error() {
9885 let content = resp.text().await?;
9886 match content_type {
9887 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
9888 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yTracesOut`"))),
9889 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::O11yPeriodO11yTracesOut`")))),
9890 }
9891 } else {
9892 let content = resp.text().await?;
9893 let entity: Option<GetO11ySentinelTracesError> = serde_json::from_str(&content).ok();
9894 Err(Error::ResponseError(ResponseContent { status, content, entity }))
9895 }
9896}
9897
9898pub async fn get_o11y_sentinel_traces_by_id(configuration: &configuration::Configuration, id: &str, project: &str) -> Result<models::O11yPeriodO11yTraceOut, Error<GetO11ySentinelTracesByIdError>> {
9900 let p_id = id;
9902 let p_project = project;
9903
9904 let uri_str = format!("{}/v1/o11y/sentinel/traces/{id}", configuration.base_path, id=crate::apis::urlencode(p_id));
9905 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
9906
9907 req_builder = req_builder.query(&[("project", &p_project.to_string())]);
9908 if let Some(ref user_agent) = configuration.user_agent {
9909 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
9910 }
9911 if let Some(ref token) = configuration.bearer_access_token {
9912 req_builder = req_builder.bearer_auth(token.to_owned());
9913 };
9914
9915 let req = req_builder.build()?;
9916 let resp = configuration.client.execute(req).await?;
9917
9918 let status = resp.status();
9919 let content_type = resp
9920 .headers()
9921 .get("content-type")
9922 .and_then(|v| v.to_str().ok())
9923 .unwrap_or("application/octet-stream");
9924 let content_type = super::ContentType::from(content_type);
9925
9926 if !status.is_client_error() && !status.is_server_error() {
9927 let content = resp.text().await?;
9928 match content_type {
9929 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
9930 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yTraceOut`"))),
9931 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::O11yPeriodO11yTraceOut`")))),
9932 }
9933 } else {
9934 let content = resp.text().await?;
9935 let entity: Option<GetO11ySentinelTracesByIdError> = serde_json::from_str(&content).ok();
9936 Err(Error::ResponseError(ResponseContent { status, content, entity }))
9937 }
9938}
9939
9940pub async fn get_o11y_services_list(configuration: &configuration::Configuration, ) -> Result<Vec<String>, Error<GetO11yServicesListError>> {
9942
9943 let uri_str = format!("{}/v1/o11y/services/list", configuration.base_path);
9944 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
9945
9946 if let Some(ref user_agent) = configuration.user_agent {
9947 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
9948 }
9949 if let Some(ref token) = configuration.bearer_access_token {
9950 req_builder = req_builder.bearer_auth(token.to_owned());
9951 };
9952
9953 let req = req_builder.build()?;
9954 let resp = configuration.client.execute(req).await?;
9955
9956 let status = resp.status();
9957 let content_type = resp
9958 .headers()
9959 .get("content-type")
9960 .and_then(|v| v.to_str().ok())
9961 .unwrap_or("application/octet-stream");
9962 let content_type = super::ContentType::from(content_type);
9963
9964 if !status.is_client_error() && !status.is_server_error() {
9965 let content = resp.text().await?;
9966 match content_type {
9967 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
9968 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<String>`"))),
9969 ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<String>`")))),
9970 }
9971 } else {
9972 let content = resp.text().await?;
9973 let entity: Option<GetO11yServicesListError> = serde_json::from_str(&content).ok();
9974 Err(Error::ResponseError(ResponseContent { status, content, entity }))
9975 }
9976}
9977
9978pub async fn get_o11y_sessions(configuration: &configuration::Configuration, ) -> Result<(), Error<GetO11ySessionsError>> {
9980
9981 let uri_str = format!("{}/v1/o11y/sessions", configuration.base_path);
9982 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
9983
9984 if let Some(ref user_agent) = configuration.user_agent {
9985 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
9986 }
9987 if let Some(ref token) = configuration.bearer_access_token {
9988 req_builder = req_builder.bearer_auth(token.to_owned());
9989 };
9990
9991 let req = req_builder.build()?;
9992 let resp = configuration.client.execute(req).await?;
9993
9994 let status = resp.status();
9995
9996 if !status.is_client_error() && !status.is_server_error() {
9997 Ok(())
9998 } else {
9999 let content = resp.text().await?;
10000 let entity: Option<GetO11ySessionsError> = serde_json::from_str(&content).ok();
10001 Err(Error::ResponseError(ResponseContent { status, content, entity }))
10002 }
10003}
10004
10005pub async fn get_o11y_settings_apdex(configuration: &configuration::Configuration, services: Option<&str>) -> Result<models::O11yPeriodO11yApdexOut, Error<GetO11ySettingsApdexError>> {
10007 let p_services = services;
10009
10010 let uri_str = format!("{}/v1/o11y/settings/apdex", configuration.base_path);
10011 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
10012
10013 if let Some(ref param_value) = p_services {
10014 req_builder = req_builder.query(&[("services", ¶m_value.to_string())]);
10015 }
10016 if let Some(ref user_agent) = configuration.user_agent {
10017 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
10018 }
10019 if let Some(ref token) = configuration.bearer_access_token {
10020 req_builder = req_builder.bearer_auth(token.to_owned());
10021 };
10022
10023 let req = req_builder.build()?;
10024 let resp = configuration.client.execute(req).await?;
10025
10026 let status = resp.status();
10027 let content_type = resp
10028 .headers()
10029 .get("content-type")
10030 .and_then(|v| v.to_str().ok())
10031 .unwrap_or("application/octet-stream");
10032 let content_type = super::ContentType::from(content_type);
10033
10034 if !status.is_client_error() && !status.is_server_error() {
10035 let content = resp.text().await?;
10036 match content_type {
10037 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
10038 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yApdexOut`"))),
10039 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::O11yPeriodO11yApdexOut`")))),
10040 }
10041 } else {
10042 let content = resp.text().await?;
10043 let entity: Option<GetO11ySettingsApdexError> = serde_json::from_str(&content).ok();
10044 Err(Error::ResponseError(ResponseContent { status, content, entity }))
10045 }
10046}
10047
10048pub async fn get_o11y_settings_ttl(configuration: &configuration::Configuration, ) -> Result<models::O11yPeriodO11yRetentionOut, Error<GetO11ySettingsTtlError>> {
10050
10051 let uri_str = format!("{}/v1/o11y/settings/ttl", configuration.base_path);
10052 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
10053
10054 if let Some(ref user_agent) = configuration.user_agent {
10055 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
10056 }
10057 if let Some(ref token) = configuration.bearer_access_token {
10058 req_builder = req_builder.bearer_auth(token.to_owned());
10059 };
10060
10061 let req = req_builder.build()?;
10062 let resp = configuration.client.execute(req).await?;
10063
10064 let status = resp.status();
10065 let content_type = resp
10066 .headers()
10067 .get("content-type")
10068 .and_then(|v| v.to_str().ok())
10069 .unwrap_or("application/octet-stream");
10070 let content_type = super::ContentType::from(content_type);
10071
10072 if !status.is_client_error() && !status.is_server_error() {
10073 let content = resp.text().await?;
10074 match content_type {
10075 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
10076 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yRetentionOut`"))),
10077 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::O11yPeriodO11yRetentionOut`")))),
10078 }
10079 } else {
10080 let content = resp.text().await?;
10081 let entity: Option<GetO11ySettingsTtlError> = serde_json::from_str(&content).ok();
10082 Err(Error::ResponseError(ResponseContent { status, content, entity }))
10083 }
10084}
10085
10086pub async fn get_o11y_statefulsets_attribute_keys(configuration: &configuration::Configuration, data_source: Option<&str>, aggregate_operator: Option<&str>, aggregate_attribute: Option<&str>, search_text: Option<&str>, tag_type: Option<&str>, limit: Option<i32>) -> Result<models::O11yPeriodO11yInfraAttributeKeysOut, Error<GetO11yStatefulsetsAttributeKeysError>> {
10088 let p_data_source = data_source;
10090 let p_aggregate_operator = aggregate_operator;
10091 let p_aggregate_attribute = aggregate_attribute;
10092 let p_search_text = search_text;
10093 let p_tag_type = tag_type;
10094 let p_limit = limit;
10095
10096 let uri_str = format!("{}/v1/o11y/statefulsets/attribute_keys", configuration.base_path);
10097 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
10098
10099 if let Some(ref param_value) = p_data_source {
10100 req_builder = req_builder.query(&[("dataSource", ¶m_value.to_string())]);
10101 }
10102 if let Some(ref param_value) = p_aggregate_operator {
10103 req_builder = req_builder.query(&[("aggregateOperator", ¶m_value.to_string())]);
10104 }
10105 if let Some(ref param_value) = p_aggregate_attribute {
10106 req_builder = req_builder.query(&[("aggregateAttribute", ¶m_value.to_string())]);
10107 }
10108 if let Some(ref param_value) = p_search_text {
10109 req_builder = req_builder.query(&[("searchText", ¶m_value.to_string())]);
10110 }
10111 if let Some(ref param_value) = p_tag_type {
10112 req_builder = req_builder.query(&[("tagType", ¶m_value.to_string())]);
10113 }
10114 if let Some(ref param_value) = p_limit {
10115 req_builder = req_builder.query(&[("limit", ¶m_value.to_string())]);
10116 }
10117 if let Some(ref user_agent) = configuration.user_agent {
10118 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
10119 }
10120 if let Some(ref token) = configuration.bearer_access_token {
10121 req_builder = req_builder.bearer_auth(token.to_owned());
10122 };
10123
10124 let req = req_builder.build()?;
10125 let resp = configuration.client.execute(req).await?;
10126
10127 let status = resp.status();
10128 let content_type = resp
10129 .headers()
10130 .get("content-type")
10131 .and_then(|v| v.to_str().ok())
10132 .unwrap_or("application/octet-stream");
10133 let content_type = super::ContentType::from(content_type);
10134
10135 if !status.is_client_error() && !status.is_server_error() {
10136 let content = resp.text().await?;
10137 match content_type {
10138 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
10139 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yInfraAttributeKeysOut`"))),
10140 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::O11yPeriodO11yInfraAttributeKeysOut`")))),
10141 }
10142 } else {
10143 let content = resp.text().await?;
10144 let entity: Option<GetO11yStatefulsetsAttributeKeysError> = serde_json::from_str(&content).ok();
10145 Err(Error::ResponseError(ResponseContent { status, content, entity }))
10146 }
10147}
10148
10149pub async fn get_o11y_statefulsets_attribute_values(configuration: &configuration::Configuration, data_source: Option<&str>, aggregate_operator: Option<&str>, aggregate_attribute: Option<&str>, attribute_key: Option<&str>, filter_attribute_key_data_type: Option<&str>, search_text: Option<&str>, tag_type: Option<&str>, limit: Option<i32>) -> Result<models::O11yPeriodO11yInfraAttributeValuesOut, Error<GetO11yStatefulsetsAttributeValuesError>> {
10151 let p_data_source = data_source;
10153 let p_aggregate_operator = aggregate_operator;
10154 let p_aggregate_attribute = aggregate_attribute;
10155 let p_attribute_key = attribute_key;
10156 let p_filter_attribute_key_data_type = filter_attribute_key_data_type;
10157 let p_search_text = search_text;
10158 let p_tag_type = tag_type;
10159 let p_limit = limit;
10160
10161 let uri_str = format!("{}/v1/o11y/statefulsets/attribute_values", configuration.base_path);
10162 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
10163
10164 if let Some(ref param_value) = p_data_source {
10165 req_builder = req_builder.query(&[("dataSource", ¶m_value.to_string())]);
10166 }
10167 if let Some(ref param_value) = p_aggregate_operator {
10168 req_builder = req_builder.query(&[("aggregateOperator", ¶m_value.to_string())]);
10169 }
10170 if let Some(ref param_value) = p_aggregate_attribute {
10171 req_builder = req_builder.query(&[("aggregateAttribute", ¶m_value.to_string())]);
10172 }
10173 if let Some(ref param_value) = p_attribute_key {
10174 req_builder = req_builder.query(&[("attributeKey", ¶m_value.to_string())]);
10175 }
10176 if let Some(ref param_value) = p_filter_attribute_key_data_type {
10177 req_builder = req_builder.query(&[("filterAttributeKeyDataType", ¶m_value.to_string())]);
10178 }
10179 if let Some(ref param_value) = p_search_text {
10180 req_builder = req_builder.query(&[("searchText", ¶m_value.to_string())]);
10181 }
10182 if let Some(ref param_value) = p_tag_type {
10183 req_builder = req_builder.query(&[("tagType", ¶m_value.to_string())]);
10184 }
10185 if let Some(ref param_value) = p_limit {
10186 req_builder = req_builder.query(&[("limit", ¶m_value.to_string())]);
10187 }
10188 if let Some(ref user_agent) = configuration.user_agent {
10189 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
10190 }
10191 if let Some(ref token) = configuration.bearer_access_token {
10192 req_builder = req_builder.bearer_auth(token.to_owned());
10193 };
10194
10195 let req = req_builder.build()?;
10196 let resp = configuration.client.execute(req).await?;
10197
10198 let status = resp.status();
10199 let content_type = resp
10200 .headers()
10201 .get("content-type")
10202 .and_then(|v| v.to_str().ok())
10203 .unwrap_or("application/octet-stream");
10204 let content_type = super::ContentType::from(content_type);
10205
10206 if !status.is_client_error() && !status.is_server_error() {
10207 let content = resp.text().await?;
10208 match content_type {
10209 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
10210 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yInfraAttributeValuesOut`"))),
10211 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::O11yPeriodO11yInfraAttributeValuesOut`")))),
10212 }
10213 } else {
10214 let content = resp.text().await?;
10215 let entity: Option<GetO11yStatefulsetsAttributeValuesError> = serde_json::from_str(&content).ok();
10216 Err(Error::ResponseError(ResponseContent { status, content, entity }))
10217 }
10218}
10219
10220pub async fn get_o11y_stats(configuration: &configuration::Configuration, ) -> Result<models::O11yPeriodO11yOrgStatsOut, Error<GetO11yStatsError>> {
10222
10223 let uri_str = format!("{}/v1/o11y/stats", configuration.base_path);
10224 let mut req_builder = configuration.client.request(reqwest::Method::GET, &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 let content_type = resp
10238 .headers()
10239 .get("content-type")
10240 .and_then(|v| v.to_str().ok())
10241 .unwrap_or("application/octet-stream");
10242 let content_type = super::ContentType::from(content_type);
10243
10244 if !status.is_client_error() && !status.is_server_error() {
10245 let content = resp.text().await?;
10246 match content_type {
10247 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
10248 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yOrgStatsOut`"))),
10249 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::O11yPeriodO11yOrgStatsOut`")))),
10250 }
10251 } else {
10252 let content = resp.text().await?;
10253 let entity: Option<GetO11yStatsError> = serde_json::from_str(&content).ok();
10254 Err(Error::ResponseError(ResponseContent { status, content, entity }))
10255 }
10256}
10257
10258pub async fn get_o11y_status(configuration: &configuration::Configuration, product: Option<&str>) -> Result<models::O11yPeriodStatusResult, Error<GetO11yStatusError>> {
10260 let p_product = product;
10262
10263 let uri_str = format!("{}/v1/o11y/status", configuration.base_path);
10264 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
10265
10266 if let Some(ref param_value) = p_product {
10267 req_builder = req_builder.query(&[("product", ¶m_value.to_string())]);
10268 }
10269 if let Some(ref user_agent) = configuration.user_agent {
10270 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
10271 }
10272 if let Some(ref token) = configuration.bearer_access_token {
10273 req_builder = req_builder.bearer_auth(token.to_owned());
10274 };
10275
10276 let req = req_builder.build()?;
10277 let resp = configuration.client.execute(req).await?;
10278
10279 let status = resp.status();
10280 let content_type = resp
10281 .headers()
10282 .get("content-type")
10283 .and_then(|v| v.to_str().ok())
10284 .unwrap_or("application/octet-stream");
10285 let content_type = super::ContentType::from(content_type);
10286
10287 if !status.is_client_error() && !status.is_server_error() {
10288 let content = resp.text().await?;
10289 match content_type {
10290 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
10291 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodStatusResult`"))),
10292 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::O11yPeriodStatusResult`")))),
10293 }
10294 } else {
10295 let content = resp.text().await?;
10296 let entity: Option<GetO11yStatusError> = serde_json::from_str(&content).ok();
10297 Err(Error::ResponseError(ResponseContent { status, content, entity }))
10298 }
10299}
10300
10301pub async fn get_o11y_summary(configuration: &configuration::Configuration, ) -> Result<models::O11yPeriodStatusSummary, Error<GetO11ySummaryError>> {
10303
10304 let uri_str = format!("{}/v1/o11y/summary", configuration.base_path);
10305 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
10306
10307 if let Some(ref user_agent) = configuration.user_agent {
10308 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
10309 }
10310 if let Some(ref token) = configuration.bearer_access_token {
10311 req_builder = req_builder.bearer_auth(token.to_owned());
10312 };
10313
10314 let req = req_builder.build()?;
10315 let resp = configuration.client.execute(req).await?;
10316
10317 let status = resp.status();
10318 let content_type = resp
10319 .headers()
10320 .get("content-type")
10321 .and_then(|v| v.to_str().ok())
10322 .unwrap_or("application/octet-stream");
10323 let content_type = super::ContentType::from(content_type);
10324
10325 if !status.is_client_error() && !status.is_server_error() {
10326 let content = resp.text().await?;
10327 match content_type {
10328 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
10329 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodStatusSummary`"))),
10330 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::O11yPeriodStatusSummary`")))),
10331 }
10332 } else {
10333 let content = resp.text().await?;
10334 let entity: Option<GetO11ySummaryError> = serde_json::from_str(&content).ok();
10335 Err(Error::ResponseError(ResponseContent { status, content, entity }))
10336 }
10337}
10338
10339pub async fn get_o11y_traces(configuration: &configuration::Configuration, range: Option<i32>, limit: Option<i32>, min_duration_ms: Option<i32>) -> Result<models::O11yPeriodTracesOut, Error<GetO11yTracesError>> {
10341 let p_range = range;
10343 let p_limit = limit;
10344 let p_min_duration_ms = min_duration_ms;
10345
10346 let uri_str = format!("{}/v1/o11y/traces", configuration.base_path);
10347 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
10348
10349 if let Some(ref param_value) = p_range {
10350 req_builder = req_builder.query(&[("range", ¶m_value.to_string())]);
10351 }
10352 if let Some(ref param_value) = p_limit {
10353 req_builder = req_builder.query(&[("limit", ¶m_value.to_string())]);
10354 }
10355 if let Some(ref param_value) = p_min_duration_ms {
10356 req_builder = req_builder.query(&[("minDurationMs", ¶m_value.to_string())]);
10357 }
10358 if let Some(ref user_agent) = configuration.user_agent {
10359 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
10360 }
10361 if let Some(ref token) = configuration.bearer_access_token {
10362 req_builder = req_builder.bearer_auth(token.to_owned());
10363 };
10364
10365 let req = req_builder.build()?;
10366 let resp = configuration.client.execute(req).await?;
10367
10368 let status = resp.status();
10369 let content_type = resp
10370 .headers()
10371 .get("content-type")
10372 .and_then(|v| v.to_str().ok())
10373 .unwrap_or("application/octet-stream");
10374 let content_type = super::ContentType::from(content_type);
10375
10376 if !status.is_client_error() && !status.is_server_error() {
10377 let content = resp.text().await?;
10378 match content_type {
10379 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
10380 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodTracesOut`"))),
10381 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::O11yPeriodTracesOut`")))),
10382 }
10383 } else {
10384 let content = resp.text().await?;
10385 let entity: Option<GetO11yTracesError> = serde_json::from_str(&content).ok();
10386 Err(Error::ResponseError(ResponseContent { status, content, entity }))
10387 }
10388}
10389
10390pub async fn get_o11y_usage(configuration: &configuration::Configuration, start: &str, end: &str, step: Option<i32>, service: Option<&str>) -> Result<Vec<models::O11yPeriodO11yUsageItem>, Error<GetO11yUsageError>> {
10392 let p_start = start;
10394 let p_end = end;
10395 let p_step = step;
10396 let p_service = service;
10397
10398 let uri_str = format!("{}/v1/o11y/usage", configuration.base_path);
10399 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
10400
10401 req_builder = req_builder.query(&[("start", &p_start.to_string())]);
10402 req_builder = req_builder.query(&[("end", &p_end.to_string())]);
10403 if let Some(ref param_value) = p_step {
10404 req_builder = req_builder.query(&[("step", ¶m_value.to_string())]);
10405 }
10406 if let Some(ref param_value) = p_service {
10407 req_builder = req_builder.query(&[("service", ¶m_value.to_string())]);
10408 }
10409 if let Some(ref user_agent) = configuration.user_agent {
10410 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
10411 }
10412 if let Some(ref token) = configuration.bearer_access_token {
10413 req_builder = req_builder.bearer_auth(token.to_owned());
10414 };
10415
10416 let req = req_builder.build()?;
10417 let resp = configuration.client.execute(req).await?;
10418
10419 let status = resp.status();
10420 let content_type = resp
10421 .headers()
10422 .get("content-type")
10423 .and_then(|v| v.to_str().ok())
10424 .unwrap_or("application/octet-stream");
10425 let content_type = super::ContentType::from(content_type);
10426
10427 if !status.is_client_error() && !status.is_server_error() {
10428 let content = resp.text().await?;
10429 match content_type {
10430 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
10431 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::O11yPeriodO11yUsageItem>`"))),
10432 ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<models::O11yPeriodO11yUsageItem>`")))),
10433 }
10434 } else {
10435 let content = resp.text().await?;
10436 let entity: Option<GetO11yUsageError> = serde_json::from_str(&content).ok();
10437 Err(Error::ResponseError(ResponseContent { status, content, entity }))
10438 }
10439}
10440
10441pub async fn get_o11y_version(configuration: &configuration::Configuration, ) -> Result<models::O11yPeriodO11yVersionOut, Error<GetO11yVersionError>> {
10443
10444 let uri_str = format!("{}/v1/o11y/version", configuration.base_path);
10445 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
10446
10447 if let Some(ref user_agent) = configuration.user_agent {
10448 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
10449 }
10450 if let Some(ref token) = configuration.bearer_access_token {
10451 req_builder = req_builder.bearer_auth(token.to_owned());
10452 };
10453
10454 let req = req_builder.build()?;
10455 let resp = configuration.client.execute(req).await?;
10456
10457 let status = resp.status();
10458 let content_type = resp
10459 .headers()
10460 .get("content-type")
10461 .and_then(|v| v.to_str().ok())
10462 .unwrap_or("application/octet-stream");
10463 let content_type = super::ContentType::from(content_type);
10464
10465 if !status.is_client_error() && !status.is_server_error() {
10466 let content = resp.text().await?;
10467 match content_type {
10468 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
10469 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yVersionOut`"))),
10470 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::O11yPeriodO11yVersionOut`")))),
10471 }
10472 } else {
10473 let content = resp.text().await?;
10474 let entity: Option<GetO11yVersionError> = serde_json::from_str(&content).ok();
10475 Err(Error::ResponseError(ResponseContent { status, content, entity }))
10476 }
10477}
10478
10479pub async fn get_org_preference(configuration: &configuration::Configuration, name: &str) -> Result<models::O11yPeriodO11yPreferenceOut, Error<GetOrgPreferenceError>> {
10481 let p_name = name;
10483
10484 let uri_str = format!("{}/v1/o11y/org/preferences/{name}", configuration.base_path, name=crate::apis::urlencode(p_name));
10485 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
10486
10487 if let Some(ref user_agent) = configuration.user_agent {
10488 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
10489 }
10490 if let Some(ref token) = configuration.bearer_access_token {
10491 req_builder = req_builder.bearer_auth(token.to_owned());
10492 };
10493
10494 let req = req_builder.build()?;
10495 let resp = configuration.client.execute(req).await?;
10496
10497 let status = resp.status();
10498 let content_type = resp
10499 .headers()
10500 .get("content-type")
10501 .and_then(|v| v.to_str().ok())
10502 .unwrap_or("application/octet-stream");
10503 let content_type = super::ContentType::from(content_type);
10504
10505 if !status.is_client_error() && !status.is_server_error() {
10506 let content = resp.text().await?;
10507 match content_type {
10508 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
10509 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yPreferenceOut`"))),
10510 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::O11yPeriodO11yPreferenceOut`")))),
10511 }
10512 } else {
10513 let content = resp.text().await?;
10514 let entity: Option<GetOrgPreferenceError> = serde_json::from_str(&content).ok();
10515 Err(Error::ResponseError(ResponseContent { status, content, entity }))
10516 }
10517}
10518
10519pub async fn get_overall_state_transitions(configuration: &configuration::Configuration, id: &str, o11y_period_o11y_rule_history_query_in: models::O11yPeriodO11yRuleHistoryQueryIn) -> Result<models::O11yPeriodO11yOverallStateTransitionsOut, Error<GetOverallStateTransitionsError>> {
10521 let p_id = id;
10523 let p_o11y_period_o11y_rule_history_query_in = o11y_period_o11y_rule_history_query_in;
10524
10525 let uri_str = format!("{}/v1/o11y/rules/{id}/history/overall_status", configuration.base_path, id=crate::apis::urlencode(p_id));
10526 let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
10527
10528 if let Some(ref user_agent) = configuration.user_agent {
10529 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
10530 }
10531 if let Some(ref token) = configuration.bearer_access_token {
10532 req_builder = req_builder.bearer_auth(token.to_owned());
10533 };
10534 req_builder = req_builder.json(&p_o11y_period_o11y_rule_history_query_in);
10535
10536 let req = req_builder.build()?;
10537 let resp = configuration.client.execute(req).await?;
10538
10539 let status = resp.status();
10540 let content_type = resp
10541 .headers()
10542 .get("content-type")
10543 .and_then(|v| v.to_str().ok())
10544 .unwrap_or("application/octet-stream");
10545 let content_type = super::ContentType::from(content_type);
10546
10547 if !status.is_client_error() && !status.is_server_error() {
10548 let content = resp.text().await?;
10549 match content_type {
10550 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
10551 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yOverallStateTransitionsOut`"))),
10552 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::O11yPeriodO11yOverallStateTransitionsOut`")))),
10553 }
10554 } else {
10555 let content = resp.text().await?;
10556 let entity: Option<GetOverallStateTransitionsError> = serde_json::from_str(&content).ok();
10557 Err(Error::ResponseError(ResponseContent { status, content, entity }))
10558 }
10559}
10560
10561pub async fn get_public_dashboard(configuration: &configuration::Configuration, id: &str) -> Result<models::O11yPeriodO11yPublicDashboardOut, Error<GetPublicDashboardError>> {
10563 let p_id = id;
10565
10566 let uri_str = format!("{}/v1/o11y/dashboards/{id}/public", configuration.base_path, id=crate::apis::urlencode(p_id));
10567 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
10568
10569 if let Some(ref user_agent) = configuration.user_agent {
10570 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
10571 }
10572 if let Some(ref token) = configuration.bearer_access_token {
10573 req_builder = req_builder.bearer_auth(token.to_owned());
10574 };
10575
10576 let req = req_builder.build()?;
10577 let resp = configuration.client.execute(req).await?;
10578
10579 let status = resp.status();
10580 let content_type = resp
10581 .headers()
10582 .get("content-type")
10583 .and_then(|v| v.to_str().ok())
10584 .unwrap_or("application/octet-stream");
10585 let content_type = super::ContentType::from(content_type);
10586
10587 if !status.is_client_error() && !status.is_server_error() {
10588 let content = resp.text().await?;
10589 match content_type {
10590 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
10591 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yPublicDashboardOut`"))),
10592 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::O11yPeriodO11yPublicDashboardOut`")))),
10593 }
10594 } else {
10595 let content = resp.text().await?;
10596 let entity: Option<GetPublicDashboardError> = serde_json::from_str(&content).ok();
10597 Err(Error::ResponseError(ResponseContent { status, content, entity }))
10598 }
10599}
10600
10601pub async fn get_public_dashboard_data(configuration: &configuration::Configuration, id: &str) -> Result<models::O11yPeriodO11yPublicDashboardDataOut, Error<GetPublicDashboardDataError>> {
10603 let p_id = id;
10605
10606 let uri_str = format!("{}/v1/o11y/public/dashboards/{id}", configuration.base_path, id=crate::apis::urlencode(p_id));
10607 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
10608
10609 if let Some(ref user_agent) = configuration.user_agent {
10610 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
10611 }
10612 if let Some(ref token) = configuration.bearer_access_token {
10613 req_builder = req_builder.bearer_auth(token.to_owned());
10614 };
10615
10616 let req = req_builder.build()?;
10617 let resp = configuration.client.execute(req).await?;
10618
10619 let status = resp.status();
10620 let content_type = resp
10621 .headers()
10622 .get("content-type")
10623 .and_then(|v| v.to_str().ok())
10624 .unwrap_or("application/octet-stream");
10625 let content_type = super::ContentType::from(content_type);
10626
10627 if !status.is_client_error() && !status.is_server_error() {
10628 let content = resp.text().await?;
10629 match content_type {
10630 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
10631 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yPublicDashboardDataOut`"))),
10632 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::O11yPeriodO11yPublicDashboardDataOut`")))),
10633 }
10634 } else {
10635 let content = resp.text().await?;
10636 let entity: Option<GetPublicDashboardDataError> = serde_json::from_str(&content).ok();
10637 Err(Error::ResponseError(ResponseContent { status, content, entity }))
10638 }
10639}
10640
10641pub async fn get_public_dashboard_widget_query_range(configuration: &configuration::Configuration, id: &str, idx: &str, start_time: Option<&str>, end_time: Option<&str>) -> Result<models::O11yPeriodO11yWidgetQueryRangeOut, Error<GetPublicDashboardWidgetQueryRangeError>> {
10643 let p_id = id;
10645 let p_idx = idx;
10646 let p_start_time = start_time;
10647 let p_end_time = end_time;
10648
10649 let uri_str = format!("{}/v1/o11y/public/dashboards/{id}/widgets/{idx}/query_range", configuration.base_path, id=crate::apis::urlencode(p_id), idx=crate::apis::urlencode(p_idx));
10650 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
10651
10652 if let Some(ref param_value) = p_start_time {
10653 req_builder = req_builder.query(&[("startTime", ¶m_value.to_string())]);
10654 }
10655 if let Some(ref param_value) = p_end_time {
10656 req_builder = req_builder.query(&[("endTime", ¶m_value.to_string())]);
10657 }
10658 if let Some(ref user_agent) = configuration.user_agent {
10659 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
10660 }
10661 if let Some(ref token) = configuration.bearer_access_token {
10662 req_builder = req_builder.bearer_auth(token.to_owned());
10663 };
10664
10665 let req = req_builder.build()?;
10666 let resp = configuration.client.execute(req).await?;
10667
10668 let status = resp.status();
10669 let content_type = resp
10670 .headers()
10671 .get("content-type")
10672 .and_then(|v| v.to_str().ok())
10673 .unwrap_or("application/octet-stream");
10674 let content_type = super::ContentType::from(content_type);
10675
10676 if !status.is_client_error() && !status.is_server_error() {
10677 let content = resp.text().await?;
10678 match content_type {
10679 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
10680 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yWidgetQueryRangeOut`"))),
10681 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::O11yPeriodO11yWidgetQueryRangeOut`")))),
10682 }
10683 } else {
10684 let content = resp.text().await?;
10685 let entity: Option<GetPublicDashboardWidgetQueryRangeError> = serde_json::from_str(&content).ok();
10686 Err(Error::ResponseError(ResponseContent { status, content, entity }))
10687 }
10688}
10689
10690pub async fn get_quick_filters(configuration: &configuration::Configuration, ) -> Result<models::O11yPeriodO11yQuickFiltersOut, Error<GetQuickFiltersError>> {
10692
10693 let uri_str = format!("{}/v1/o11y/orgs/me/filters", configuration.base_path);
10694 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
10695
10696 if let Some(ref user_agent) = configuration.user_agent {
10697 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
10698 }
10699 if let Some(ref token) = configuration.bearer_access_token {
10700 req_builder = req_builder.bearer_auth(token.to_owned());
10701 };
10702
10703 let req = req_builder.build()?;
10704 let resp = configuration.client.execute(req).await?;
10705
10706 let status = resp.status();
10707 let content_type = resp
10708 .headers()
10709 .get("content-type")
10710 .and_then(|v| v.to_str().ok())
10711 .unwrap_or("application/octet-stream");
10712 let content_type = super::ContentType::from(content_type);
10713
10714 if !status.is_client_error() && !status.is_server_error() {
10715 let content = resp.text().await?;
10716 match content_type {
10717 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
10718 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yQuickFiltersOut`"))),
10719 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::O11yPeriodO11yQuickFiltersOut`")))),
10720 }
10721 } else {
10722 let content = resp.text().await?;
10723 let entity: Option<GetQuickFiltersError> = serde_json::from_str(&content).ok();
10724 Err(Error::ResponseError(ResponseContent { status, content, entity }))
10725 }
10726}
10727
10728pub async fn get_reset_password_token(configuration: &configuration::Configuration, id: &str) -> Result<models::O11yPeriodO11yResetTokenOut, Error<GetResetPasswordTokenError>> {
10730 let p_id = id;
10732
10733 let uri_str = format!("{}/v1/o11y/users/{id}/reset_password_tokens", configuration.base_path, id=crate::apis::urlencode(p_id));
10734 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
10735
10736 if let Some(ref user_agent) = configuration.user_agent {
10737 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
10738 }
10739 if let Some(ref token) = configuration.bearer_access_token {
10740 req_builder = req_builder.bearer_auth(token.to_owned());
10741 };
10742
10743 let req = req_builder.build()?;
10744 let resp = configuration.client.execute(req).await?;
10745
10746 let status = resp.status();
10747 let content_type = resp
10748 .headers()
10749 .get("content-type")
10750 .and_then(|v| v.to_str().ok())
10751 .unwrap_or("application/octet-stream");
10752 let content_type = super::ContentType::from(content_type);
10753
10754 if !status.is_client_error() && !status.is_server_error() {
10755 let content = resp.text().await?;
10756 match content_type {
10757 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
10758 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yResetTokenOut`"))),
10759 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::O11yPeriodO11yResetTokenOut`")))),
10760 }
10761 } else {
10762 let content = resp.text().await?;
10763 let entity: Option<GetResetPasswordTokenError> = serde_json::from_str(&content).ok();
10764 Err(Error::ResponseError(ResponseContent { status, content, entity }))
10765 }
10766}
10767
10768pub async fn get_reset_password_token_deprecated(configuration: &configuration::Configuration, id: &str) -> Result<models::O11yPeriodO11yResetTokenOut, Error<GetResetPasswordTokenDeprecatedError>> {
10770 let p_id = id;
10772
10773 let uri_str = format!("{}/v1/o11y/getResetPasswordToken/{id}", configuration.base_path, id=crate::apis::urlencode(p_id));
10774 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
10775
10776 if let Some(ref user_agent) = configuration.user_agent {
10777 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
10778 }
10779 if let Some(ref token) = configuration.bearer_access_token {
10780 req_builder = req_builder.bearer_auth(token.to_owned());
10781 };
10782
10783 let req = req_builder.build()?;
10784 let resp = configuration.client.execute(req).await?;
10785
10786 let status = resp.status();
10787 let content_type = resp
10788 .headers()
10789 .get("content-type")
10790 .and_then(|v| v.to_str().ok())
10791 .unwrap_or("application/octet-stream");
10792 let content_type = super::ContentType::from(content_type);
10793
10794 if !status.is_client_error() && !status.is_server_error() {
10795 let content = resp.text().await?;
10796 match content_type {
10797 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
10798 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yResetTokenOut`"))),
10799 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::O11yPeriodO11yResetTokenOut`")))),
10800 }
10801 } else {
10802 let content = resp.text().await?;
10803 let entity: Option<GetResetPasswordTokenDeprecatedError> = serde_json::from_str(&content).ok();
10804 Err(Error::ResponseError(ResponseContent { status, content, entity }))
10805 }
10806}
10807
10808pub async fn get_role(configuration: &configuration::Configuration, id: &str) -> Result<models::O11yPeriodO11yRoleOut, Error<GetRoleError>> {
10810 let p_id = id;
10812
10813 let uri_str = format!("{}/v1/o11y/roles/{id}", configuration.base_path, id=crate::apis::urlencode(p_id));
10814 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
10815
10816 if let Some(ref user_agent) = configuration.user_agent {
10817 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
10818 }
10819 if let Some(ref token) = configuration.bearer_access_token {
10820 req_builder = req_builder.bearer_auth(token.to_owned());
10821 };
10822
10823 let req = req_builder.build()?;
10824 let resp = configuration.client.execute(req).await?;
10825
10826 let status = resp.status();
10827 let content_type = resp
10828 .headers()
10829 .get("content-type")
10830 .and_then(|v| v.to_str().ok())
10831 .unwrap_or("application/octet-stream");
10832 let content_type = super::ContentType::from(content_type);
10833
10834 if !status.is_client_error() && !status.is_server_error() {
10835 let content = resp.text().await?;
10836 match content_type {
10837 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
10838 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yRoleOut`"))),
10839 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::O11yPeriodO11yRoleOut`")))),
10840 }
10841 } else {
10842 let content = resp.text().await?;
10843 let entity: Option<GetRoleError> = serde_json::from_str(&content).ok();
10844 Err(Error::ResponseError(ResponseContent { status, content, entity }))
10845 }
10846}
10847
10848pub async fn get_roles_by_user_id(configuration: &configuration::Configuration, id: &str) -> Result<models::O11yPeriodO11yRolesOut, Error<GetRolesByUserIdError>> {
10850 let p_id = id;
10852
10853 let uri_str = format!("{}/v1/o11y/users/{id}/roles", configuration.base_path, id=crate::apis::urlencode(p_id));
10854 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
10855
10856 if let Some(ref user_agent) = configuration.user_agent {
10857 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
10858 }
10859 if let Some(ref token) = configuration.bearer_access_token {
10860 req_builder = req_builder.bearer_auth(token.to_owned());
10861 };
10862
10863 let req = req_builder.build()?;
10864 let resp = configuration.client.execute(req).await?;
10865
10866 let status = resp.status();
10867 let content_type = resp
10868 .headers()
10869 .get("content-type")
10870 .and_then(|v| v.to_str().ok())
10871 .unwrap_or("application/octet-stream");
10872 let content_type = super::ContentType::from(content_type);
10873
10874 if !status.is_client_error() && !status.is_server_error() {
10875 let content = resp.text().await?;
10876 match content_type {
10877 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
10878 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yRolesOut`"))),
10879 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::O11yPeriodO11yRolesOut`")))),
10880 }
10881 } else {
10882 let content = resp.text().await?;
10883 let entity: Option<GetRolesByUserIdError> = serde_json::from_str(&content).ok();
10884 Err(Error::ResponseError(ResponseContent { status, content, entity }))
10885 }
10886}
10887
10888pub async fn get_route_policy_by_id(configuration: &configuration::Configuration, id: &str) -> Result<models::O11yPeriodO11yRoutePolicyOut, Error<GetRoutePolicyByIdError>> {
10890 let p_id = id;
10892
10893 let uri_str = format!("{}/v1/o11y/route_policies/{id}", configuration.base_path, id=crate::apis::urlencode(p_id));
10894 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
10895
10896 if let Some(ref user_agent) = configuration.user_agent {
10897 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
10898 }
10899 if let Some(ref token) = configuration.bearer_access_token {
10900 req_builder = req_builder.bearer_auth(token.to_owned());
10901 };
10902
10903 let req = req_builder.build()?;
10904 let resp = configuration.client.execute(req).await?;
10905
10906 let status = resp.status();
10907 let content_type = resp
10908 .headers()
10909 .get("content-type")
10910 .and_then(|v| v.to_str().ok())
10911 .unwrap_or("application/octet-stream");
10912 let content_type = super::ContentType::from(content_type);
10913
10914 if !status.is_client_error() && !status.is_server_error() {
10915 let content = resp.text().await?;
10916 match content_type {
10917 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
10918 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yRoutePolicyOut`"))),
10919 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::O11yPeriodO11yRoutePolicyOut`")))),
10920 }
10921 } else {
10922 let content = resp.text().await?;
10923 let entity: Option<GetRoutePolicyByIdError> = serde_json::from_str(&content).ok();
10924 Err(Error::ResponseError(ResponseContent { status, content, entity }))
10925 }
10926}
10927
10928pub async fn get_rule_by_id(configuration: &configuration::Configuration, id: &str) -> Result<models::O11yPeriodO11yRuleOut, Error<GetRuleByIdError>> {
10930 let p_id = id;
10932
10933 let uri_str = format!("{}/v1/o11y/rules/{id}", configuration.base_path, id=crate::apis::urlencode(p_id));
10934 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
10935
10936 if let Some(ref user_agent) = configuration.user_agent {
10937 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
10938 }
10939 if let Some(ref token) = configuration.bearer_access_token {
10940 req_builder = req_builder.bearer_auth(token.to_owned());
10941 };
10942
10943 let req = req_builder.build()?;
10944 let resp = configuration.client.execute(req).await?;
10945
10946 let status = resp.status();
10947 let content_type = resp
10948 .headers()
10949 .get("content-type")
10950 .and_then(|v| v.to_str().ok())
10951 .unwrap_or("application/octet-stream");
10952 let content_type = super::ContentType::from(content_type);
10953
10954 if !status.is_client_error() && !status.is_server_error() {
10955 let content = resp.text().await?;
10956 match content_type {
10957 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
10958 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yRuleOut`"))),
10959 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::O11yPeriodO11yRuleOut`")))),
10960 }
10961 } else {
10962 let content = resp.text().await?;
10963 let entity: Option<GetRuleByIdError> = serde_json::from_str(&content).ok();
10964 Err(Error::ResponseError(ResponseContent { status, content, entity }))
10965 }
10966}
10967
10968pub async fn get_rule_history_filter_keys(configuration: &configuration::Configuration, id: &str, start_unix_milli: Option<i32>, end_unix_milli: Option<i32>, search_text: Option<&str>, limit: Option<i32>) -> Result<models::O11yPeriodO11yRuleHistoryFilterKeysOut, Error<GetRuleHistoryFilterKeysError>> {
10970 let p_id = id;
10972 let p_start_unix_milli = start_unix_milli;
10973 let p_end_unix_milli = end_unix_milli;
10974 let p_search_text = search_text;
10975 let p_limit = limit;
10976
10977 let uri_str = format!("{}/v1/o11y/rules/{id}/history/filter_keys", configuration.base_path, id=crate::apis::urlencode(p_id));
10978 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
10979
10980 if let Some(ref param_value) = p_start_unix_milli {
10981 req_builder = req_builder.query(&[("startUnixMilli", ¶m_value.to_string())]);
10982 }
10983 if let Some(ref param_value) = p_end_unix_milli {
10984 req_builder = req_builder.query(&[("endUnixMilli", ¶m_value.to_string())]);
10985 }
10986 if let Some(ref param_value) = p_search_text {
10987 req_builder = req_builder.query(&[("searchText", ¶m_value.to_string())]);
10988 }
10989 if let Some(ref param_value) = p_limit {
10990 req_builder = req_builder.query(&[("limit", ¶m_value.to_string())]);
10991 }
10992 if let Some(ref user_agent) = configuration.user_agent {
10993 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
10994 }
10995 if let Some(ref token) = configuration.bearer_access_token {
10996 req_builder = req_builder.bearer_auth(token.to_owned());
10997 };
10998
10999 let req = req_builder.build()?;
11000 let resp = configuration.client.execute(req).await?;
11001
11002 let status = resp.status();
11003 let content_type = resp
11004 .headers()
11005 .get("content-type")
11006 .and_then(|v| v.to_str().ok())
11007 .unwrap_or("application/octet-stream");
11008 let content_type = super::ContentType::from(content_type);
11009
11010 if !status.is_client_error() && !status.is_server_error() {
11011 let content = resp.text().await?;
11012 match content_type {
11013 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
11014 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yRuleHistoryFilterKeysOut`"))),
11015 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::O11yPeriodO11yRuleHistoryFilterKeysOut`")))),
11016 }
11017 } else {
11018 let content = resp.text().await?;
11019 let entity: Option<GetRuleHistoryFilterKeysError> = serde_json::from_str(&content).ok();
11020 Err(Error::ResponseError(ResponseContent { status, content, entity }))
11021 }
11022}
11023
11024pub async fn get_rule_history_filter_values(configuration: &configuration::Configuration, id: &str, name: &str, start_unix_milli: Option<i32>, end_unix_milli: Option<i32>, search_text: Option<&str>, limit: Option<i32>, existing_query: Option<&str>) -> Result<models::O11yPeriodO11yRuleHistoryFilterValuesOut, Error<GetRuleHistoryFilterValuesError>> {
11026 let p_id = id;
11028 let p_name = name;
11029 let p_start_unix_milli = start_unix_milli;
11030 let p_end_unix_milli = end_unix_milli;
11031 let p_search_text = search_text;
11032 let p_limit = limit;
11033 let p_existing_query = existing_query;
11034
11035 let uri_str = format!("{}/v1/o11y/rules/{id}/history/filter_values", configuration.base_path, id=crate::apis::urlencode(p_id));
11036 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
11037
11038 if let Some(ref param_value) = p_start_unix_milli {
11039 req_builder = req_builder.query(&[("startUnixMilli", ¶m_value.to_string())]);
11040 }
11041 if let Some(ref param_value) = p_end_unix_milli {
11042 req_builder = req_builder.query(&[("endUnixMilli", ¶m_value.to_string())]);
11043 }
11044 if let Some(ref param_value) = p_search_text {
11045 req_builder = req_builder.query(&[("searchText", ¶m_value.to_string())]);
11046 }
11047 if let Some(ref param_value) = p_limit {
11048 req_builder = req_builder.query(&[("limit", ¶m_value.to_string())]);
11049 }
11050 req_builder = req_builder.query(&[("name", &p_name.to_string())]);
11051 if let Some(ref param_value) = p_existing_query {
11052 req_builder = req_builder.query(&[("existingQuery", ¶m_value.to_string())]);
11053 }
11054 if let Some(ref user_agent) = configuration.user_agent {
11055 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
11056 }
11057 if let Some(ref token) = configuration.bearer_access_token {
11058 req_builder = req_builder.bearer_auth(token.to_owned());
11059 };
11060
11061 let req = req_builder.build()?;
11062 let resp = configuration.client.execute(req).await?;
11063
11064 let status = resp.status();
11065 let content_type = resp
11066 .headers()
11067 .get("content-type")
11068 .and_then(|v| v.to_str().ok())
11069 .unwrap_or("application/octet-stream");
11070 let content_type = super::ContentType::from(content_type);
11071
11072 if !status.is_client_error() && !status.is_server_error() {
11073 let content = resp.text().await?;
11074 match content_type {
11075 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
11076 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yRuleHistoryFilterValuesOut`"))),
11077 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::O11yPeriodO11yRuleHistoryFilterValuesOut`")))),
11078 }
11079 } else {
11080 let content = resp.text().await?;
11081 let entity: Option<GetRuleHistoryFilterValuesError> = serde_json::from_str(&content).ok();
11082 Err(Error::ResponseError(ResponseContent { status, content, entity }))
11083 }
11084}
11085
11086pub async fn get_rule_history_overall_status(configuration: &configuration::Configuration, id: &str, start: Option<i32>, end: Option<i32>) -> Result<models::O11yPeriodO11yRuleHistoryOverallStatusOut, Error<GetRuleHistoryOverallStatusError>> {
11088 let p_id = id;
11090 let p_start = start;
11091 let p_end = end;
11092
11093 let uri_str = format!("{}/v1/o11y/rules/{id}/history/overall_status", configuration.base_path, id=crate::apis::urlencode(p_id));
11094 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
11095
11096 if let Some(ref param_value) = p_start {
11097 req_builder = req_builder.query(&[("start", ¶m_value.to_string())]);
11098 }
11099 if let Some(ref param_value) = p_end {
11100 req_builder = req_builder.query(&[("end", ¶m_value.to_string())]);
11101 }
11102 if let Some(ref user_agent) = configuration.user_agent {
11103 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
11104 }
11105 if let Some(ref token) = configuration.bearer_access_token {
11106 req_builder = req_builder.bearer_auth(token.to_owned());
11107 };
11108
11109 let req = req_builder.build()?;
11110 let resp = configuration.client.execute(req).await?;
11111
11112 let status = resp.status();
11113 let content_type = resp
11114 .headers()
11115 .get("content-type")
11116 .and_then(|v| v.to_str().ok())
11117 .unwrap_or("application/octet-stream");
11118 let content_type = super::ContentType::from(content_type);
11119
11120 if !status.is_client_error() && !status.is_server_error() {
11121 let content = resp.text().await?;
11122 match content_type {
11123 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
11124 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yRuleHistoryOverallStatusOut`"))),
11125 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::O11yPeriodO11yRuleHistoryOverallStatusOut`")))),
11126 }
11127 } else {
11128 let content = resp.text().await?;
11129 let entity: Option<GetRuleHistoryOverallStatusError> = serde_json::from_str(&content).ok();
11130 Err(Error::ResponseError(ResponseContent { status, content, entity }))
11131 }
11132}
11133
11134pub async fn get_rule_history_stats(configuration: &configuration::Configuration, id: &str, start: Option<i32>, end: Option<i32>) -> Result<models::O11yPeriodO11yRuleHistoryStatsOut, Error<GetRuleHistoryStatsError>> {
11136 let p_id = id;
11138 let p_start = start;
11139 let p_end = end;
11140
11141 let uri_str = format!("{}/v1/o11y/rules/{id}/history/stats", configuration.base_path, id=crate::apis::urlencode(p_id));
11142 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
11143
11144 if let Some(ref param_value) = p_start {
11145 req_builder = req_builder.query(&[("start", ¶m_value.to_string())]);
11146 }
11147 if let Some(ref param_value) = p_end {
11148 req_builder = req_builder.query(&[("end", ¶m_value.to_string())]);
11149 }
11150 if let Some(ref user_agent) = configuration.user_agent {
11151 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
11152 }
11153 if let Some(ref token) = configuration.bearer_access_token {
11154 req_builder = req_builder.bearer_auth(token.to_owned());
11155 };
11156
11157 let req = req_builder.build()?;
11158 let resp = configuration.client.execute(req).await?;
11159
11160 let status = resp.status();
11161 let content_type = resp
11162 .headers()
11163 .get("content-type")
11164 .and_then(|v| v.to_str().ok())
11165 .unwrap_or("application/octet-stream");
11166 let content_type = super::ContentType::from(content_type);
11167
11168 if !status.is_client_error() && !status.is_server_error() {
11169 let content = resp.text().await?;
11170 match content_type {
11171 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
11172 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yRuleHistoryStatsOut`"))),
11173 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::O11yPeriodO11yRuleHistoryStatsOut`")))),
11174 }
11175 } else {
11176 let content = resp.text().await?;
11177 let entity: Option<GetRuleHistoryStatsError> = serde_json::from_str(&content).ok();
11178 Err(Error::ResponseError(ResponseContent { status, content, entity }))
11179 }
11180}
11181
11182pub async fn get_rule_history_timeline(configuration: &configuration::Configuration, id: &str, start: Option<i32>, end: Option<i32>, state: Option<&str>, filter_expression: Option<&str>, limit: Option<i32>, order: Option<&str>, cursor: Option<&str>) -> Result<models::O11yPeriodO11yRuleHistoryTimelineOut, Error<GetRuleHistoryTimelineError>> {
11184 let p_id = id;
11186 let p_start = start;
11187 let p_end = end;
11188 let p_state = state;
11189 let p_filter_expression = filter_expression;
11190 let p_limit = limit;
11191 let p_order = order;
11192 let p_cursor = cursor;
11193
11194 let uri_str = format!("{}/v1/o11y/rules/{id}/history/timeline", configuration.base_path, id=crate::apis::urlencode(p_id));
11195 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
11196
11197 if let Some(ref param_value) = p_start {
11198 req_builder = req_builder.query(&[("start", ¶m_value.to_string())]);
11199 }
11200 if let Some(ref param_value) = p_end {
11201 req_builder = req_builder.query(&[("end", ¶m_value.to_string())]);
11202 }
11203 if let Some(ref param_value) = p_state {
11204 req_builder = req_builder.query(&[("state", ¶m_value.to_string())]);
11205 }
11206 if let Some(ref param_value) = p_filter_expression {
11207 req_builder = req_builder.query(&[("filterExpression", ¶m_value.to_string())]);
11208 }
11209 if let Some(ref param_value) = p_limit {
11210 req_builder = req_builder.query(&[("limit", ¶m_value.to_string())]);
11211 }
11212 if let Some(ref param_value) = p_order {
11213 req_builder = req_builder.query(&[("order", ¶m_value.to_string())]);
11214 }
11215 if let Some(ref param_value) = p_cursor {
11216 req_builder = req_builder.query(&[("cursor", ¶m_value.to_string())]);
11217 }
11218 if let Some(ref user_agent) = configuration.user_agent {
11219 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
11220 }
11221 if let Some(ref token) = configuration.bearer_access_token {
11222 req_builder = req_builder.bearer_auth(token.to_owned());
11223 };
11224
11225 let req = req_builder.build()?;
11226 let resp = configuration.client.execute(req).await?;
11227
11228 let status = resp.status();
11229 let content_type = resp
11230 .headers()
11231 .get("content-type")
11232 .and_then(|v| v.to_str().ok())
11233 .unwrap_or("application/octet-stream");
11234 let content_type = super::ContentType::from(content_type);
11235
11236 if !status.is_client_error() && !status.is_server_error() {
11237 let content = resp.text().await?;
11238 match content_type {
11239 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
11240 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yRuleHistoryTimelineOut`"))),
11241 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::O11yPeriodO11yRuleHistoryTimelineOut`")))),
11242 }
11243 } else {
11244 let content = resp.text().await?;
11245 let entity: Option<GetRuleHistoryTimelineError> = serde_json::from_str(&content).ok();
11246 Err(Error::ResponseError(ResponseContent { status, content, entity }))
11247 }
11248}
11249
11250pub async fn get_rule_history_top_contributors(configuration: &configuration::Configuration, id: &str, start: Option<i32>, end: Option<i32>) -> Result<models::O11yPeriodO11yRuleHistoryContributorsOut, Error<GetRuleHistoryTopContributorsError>> {
11252 let p_id = id;
11254 let p_start = start;
11255 let p_end = end;
11256
11257 let uri_str = format!("{}/v1/o11y/rules/{id}/history/top_contributors", configuration.base_path, id=crate::apis::urlencode(p_id));
11258 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
11259
11260 if let Some(ref param_value) = p_start {
11261 req_builder = req_builder.query(&[("start", ¶m_value.to_string())]);
11262 }
11263 if let Some(ref param_value) = p_end {
11264 req_builder = req_builder.query(&[("end", ¶m_value.to_string())]);
11265 }
11266 if let Some(ref user_agent) = configuration.user_agent {
11267 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
11268 }
11269 if let Some(ref token) = configuration.bearer_access_token {
11270 req_builder = req_builder.bearer_auth(token.to_owned());
11271 };
11272
11273 let req = req_builder.build()?;
11274 let resp = configuration.client.execute(req).await?;
11275
11276 let status = resp.status();
11277 let content_type = resp
11278 .headers()
11279 .get("content-type")
11280 .and_then(|v| v.to_str().ok())
11281 .unwrap_or("application/octet-stream");
11282 let content_type = super::ContentType::from(content_type);
11283
11284 if !status.is_client_error() && !status.is_server_error() {
11285 let content = resp.text().await?;
11286 match content_type {
11287 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
11288 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yRuleHistoryContributorsOut`"))),
11289 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::O11yPeriodO11yRuleHistoryContributorsOut`")))),
11290 }
11291 } else {
11292 let content = resp.text().await?;
11293 let entity: Option<GetRuleHistoryTopContributorsError> = serde_json::from_str(&content).ok();
11294 Err(Error::ResponseError(ResponseContent { status, content, entity }))
11295 }
11296}
11297
11298pub async fn get_rule_state_history(configuration: &configuration::Configuration, id: &str, o11y_period_o11y_rule_history_query_in: models::O11yPeriodO11yRuleHistoryQueryIn) -> Result<models::O11yPeriodO11yRuleStateTimelineOut, Error<GetRuleStateHistoryError>> {
11300 let p_id = id;
11302 let p_o11y_period_o11y_rule_history_query_in = o11y_period_o11y_rule_history_query_in;
11303
11304 let uri_str = format!("{}/v1/o11y/rules/{id}/history/timeline", configuration.base_path, id=crate::apis::urlencode(p_id));
11305 let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
11306
11307 if let Some(ref user_agent) = configuration.user_agent {
11308 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
11309 }
11310 if let Some(ref token) = configuration.bearer_access_token {
11311 req_builder = req_builder.bearer_auth(token.to_owned());
11312 };
11313 req_builder = req_builder.json(&p_o11y_period_o11y_rule_history_query_in);
11314
11315 let req = req_builder.build()?;
11316 let resp = configuration.client.execute(req).await?;
11317
11318 let status = resp.status();
11319 let content_type = resp
11320 .headers()
11321 .get("content-type")
11322 .and_then(|v| v.to_str().ok())
11323 .unwrap_or("application/octet-stream");
11324 let content_type = super::ContentType::from(content_type);
11325
11326 if !status.is_client_error() && !status.is_server_error() {
11327 let content = resp.text().await?;
11328 match content_type {
11329 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
11330 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yRuleStateTimelineOut`"))),
11331 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::O11yPeriodO11yRuleStateTimelineOut`")))),
11332 }
11333 } else {
11334 let content = resp.text().await?;
11335 let entity: Option<GetRuleStateHistoryError> = serde_json::from_str(&content).ok();
11336 Err(Error::ResponseError(ResponseContent { status, content, entity }))
11337 }
11338}
11339
11340pub async fn get_rule_state_history_top_contributors(configuration: &configuration::Configuration, id: &str, o11y_period_o11y_rule_history_query_in: models::O11yPeriodO11yRuleHistoryQueryIn) -> Result<models::O11yPeriodO11yRuleStateContributorsOut, Error<GetRuleStateHistoryTopContributorsError>> {
11342 let p_id = id;
11344 let p_o11y_period_o11y_rule_history_query_in = o11y_period_o11y_rule_history_query_in;
11345
11346 let uri_str = format!("{}/v1/o11y/rules/{id}/history/top_contributors", configuration.base_path, id=crate::apis::urlencode(p_id));
11347 let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
11348
11349 if let Some(ref user_agent) = configuration.user_agent {
11350 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
11351 }
11352 if let Some(ref token) = configuration.bearer_access_token {
11353 req_builder = req_builder.bearer_auth(token.to_owned());
11354 };
11355 req_builder = req_builder.json(&p_o11y_period_o11y_rule_history_query_in);
11356
11357 let req = req_builder.build()?;
11358 let resp = configuration.client.execute(req).await?;
11359
11360 let status = resp.status();
11361 let content_type = resp
11362 .headers()
11363 .get("content-type")
11364 .and_then(|v| v.to_str().ok())
11365 .unwrap_or("application/octet-stream");
11366 let content_type = super::ContentType::from(content_type);
11367
11368 if !status.is_client_error() && !status.is_server_error() {
11369 let content = resp.text().await?;
11370 match content_type {
11371 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
11372 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yRuleStateContributorsOut`"))),
11373 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::O11yPeriodO11yRuleStateContributorsOut`")))),
11374 }
11375 } else {
11376 let content = resp.text().await?;
11377 let entity: Option<GetRuleStateHistoryTopContributorsError> = serde_json::from_str(&content).ok();
11378 Err(Error::ResponseError(ResponseContent { status, content, entity }))
11379 }
11380}
11381
11382pub async fn get_rule_stats(configuration: &configuration::Configuration, id: &str, o11y_period_o11y_rule_history_query_in: models::O11yPeriodO11yRuleHistoryQueryIn) -> Result<models::O11yPeriodO11yRuleStatsOut, Error<GetRuleStatsError>> {
11384 let p_id = id;
11386 let p_o11y_period_o11y_rule_history_query_in = o11y_period_o11y_rule_history_query_in;
11387
11388 let uri_str = format!("{}/v1/o11y/rules/{id}/history/stats", configuration.base_path, id=crate::apis::urlencode(p_id));
11389 let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
11390
11391 if let Some(ref user_agent) = configuration.user_agent {
11392 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
11393 }
11394 if let Some(ref token) = configuration.bearer_access_token {
11395 req_builder = req_builder.bearer_auth(token.to_owned());
11396 };
11397 req_builder = req_builder.json(&p_o11y_period_o11y_rule_history_query_in);
11398
11399 let req = req_builder.build()?;
11400 let resp = configuration.client.execute(req).await?;
11401
11402 let status = resp.status();
11403 let content_type = resp
11404 .headers()
11405 .get("content-type")
11406 .and_then(|v| v.to_str().ok())
11407 .unwrap_or("application/octet-stream");
11408 let content_type = super::ContentType::from(content_type);
11409
11410 if !status.is_client_error() && !status.is_server_error() {
11411 let content = resp.text().await?;
11412 match content_type {
11413 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
11414 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yRuleStatsOut`"))),
11415 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::O11yPeriodO11yRuleStatsOut`")))),
11416 }
11417 } else {
11418 let content = resp.text().await?;
11419 let entity: Option<GetRuleStatsError> = serde_json::from_str(&content).ok();
11420 Err(Error::ResponseError(ResponseContent { status, content, entity }))
11421 }
11422}
11423
11424pub async fn get_service(configuration: &configuration::Configuration, cloud_provider: &str, service_id: &str, cloud_integration_id: Option<&str>) -> Result<models::O11yPeriodO11yServiceOut, Error<GetServiceError>> {
11426 let p_cloud_provider = cloud_provider;
11428 let p_service_id = service_id;
11429 let p_cloud_integration_id = cloud_integration_id;
11430
11431 let uri_str = format!("{}/v1/o11y/cloud_integrations/{cloud_provider}/services/{service_id}", configuration.base_path, cloud_provider=crate::apis::urlencode(p_cloud_provider), service_id=crate::apis::urlencode(p_service_id));
11432 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
11433
11434 if let Some(ref param_value) = p_cloud_integration_id {
11435 req_builder = req_builder.query(&[("cloud_integration_id", ¶m_value.to_string())]);
11436 }
11437 if let Some(ref user_agent) = configuration.user_agent {
11438 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
11439 }
11440 if let Some(ref token) = configuration.bearer_access_token {
11441 req_builder = req_builder.bearer_auth(token.to_owned());
11442 };
11443
11444 let req = req_builder.build()?;
11445 let resp = configuration.client.execute(req).await?;
11446
11447 let status = resp.status();
11448 let content_type = resp
11449 .headers()
11450 .get("content-type")
11451 .and_then(|v| v.to_str().ok())
11452 .unwrap_or("application/octet-stream");
11453 let content_type = super::ContentType::from(content_type);
11454
11455 if !status.is_client_error() && !status.is_server_error() {
11456 let content = resp.text().await?;
11457 match content_type {
11458 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
11459 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yServiceOut`"))),
11460 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::O11yPeriodO11yServiceOut`")))),
11461 }
11462 } else {
11463 let content = resp.text().await?;
11464 let entity: Option<GetServiceError> = serde_json::from_str(&content).ok();
11465 Err(Error::ResponseError(ResponseContent { status, content, entity }))
11466 }
11467}
11468
11469pub async fn get_service_account(configuration: &configuration::Configuration, id: &str) -> Result<models::O11yPeriodO11yServiceAccountOut, Error<GetServiceAccountError>> {
11471 let p_id = id;
11473
11474 let uri_str = format!("{}/v1/o11y/service_accounts/{id}", configuration.base_path, id=crate::apis::urlencode(p_id));
11475 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
11476
11477 if let Some(ref user_agent) = configuration.user_agent {
11478 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
11479 }
11480 if let Some(ref token) = configuration.bearer_access_token {
11481 req_builder = req_builder.bearer_auth(token.to_owned());
11482 };
11483
11484 let req = req_builder.build()?;
11485 let resp = configuration.client.execute(req).await?;
11486
11487 let status = resp.status();
11488 let content_type = resp
11489 .headers()
11490 .get("content-type")
11491 .and_then(|v| v.to_str().ok())
11492 .unwrap_or("application/octet-stream");
11493 let content_type = super::ContentType::from(content_type);
11494
11495 if !status.is_client_error() && !status.is_server_error() {
11496 let content = resp.text().await?;
11497 match content_type {
11498 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
11499 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yServiceAccountOut`"))),
11500 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::O11yPeriodO11yServiceAccountOut`")))),
11501 }
11502 } else {
11503 let content = resp.text().await?;
11504 let entity: Option<GetServiceAccountError> = serde_json::from_str(&content).ok();
11505 Err(Error::ResponseError(ResponseContent { status, content, entity }))
11506 }
11507}
11508
11509pub async fn get_service_account_roles(configuration: &configuration::Configuration, id: &str) -> Result<models::O11yPeriodO11yServiceAccountRolesOut, Error<GetServiceAccountRolesError>> {
11511 let p_id = id;
11513
11514 let uri_str = format!("{}/v1/o11y/service_accounts/{id}/roles", configuration.base_path, id=crate::apis::urlencode(p_id));
11515 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
11516
11517 if let Some(ref user_agent) = configuration.user_agent {
11518 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
11519 }
11520 if let Some(ref token) = configuration.bearer_access_token {
11521 req_builder = req_builder.bearer_auth(token.to_owned());
11522 };
11523
11524 let req = req_builder.build()?;
11525 let resp = configuration.client.execute(req).await?;
11526
11527 let status = resp.status();
11528 let content_type = resp
11529 .headers()
11530 .get("content-type")
11531 .and_then(|v| v.to_str().ok())
11532 .unwrap_or("application/octet-stream");
11533 let content_type = super::ContentType::from(content_type);
11534
11535 if !status.is_client_error() && !status.is_server_error() {
11536 let content = resp.text().await?;
11537 match content_type {
11538 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
11539 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yServiceAccountRolesOut`"))),
11540 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::O11yPeriodO11yServiceAccountRolesOut`")))),
11541 }
11542 } else {
11543 let content = resp.text().await?;
11544 let entity: Option<GetServiceAccountRolesError> = serde_json::from_str(&content).ok();
11545 Err(Error::ResponseError(ResponseContent { status, content, entity }))
11546 }
11547}
11548
11549pub async fn get_session_context(configuration: &configuration::Configuration, email: Option<&str>, r#ref: Option<&str>) -> Result<models::O11yPeriodO11ySessionContextOut, Error<GetSessionContextError>> {
11551 let p_email = email;
11553 let p_ref = r#ref;
11554
11555 let uri_str = format!("{}/v1/o11y/sessions/context", configuration.base_path);
11556 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
11557
11558 if let Some(ref param_value) = p_email {
11559 req_builder = req_builder.query(&[("email", ¶m_value.to_string())]);
11560 }
11561 if let Some(ref param_value) = p_ref {
11562 req_builder = req_builder.query(&[("ref", ¶m_value.to_string())]);
11563 }
11564 if let Some(ref user_agent) = configuration.user_agent {
11565 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
11566 }
11567 if let Some(ref token) = configuration.bearer_access_token {
11568 req_builder = req_builder.bearer_auth(token.to_owned());
11569 };
11570
11571 let req = req_builder.build()?;
11572 let resp = configuration.client.execute(req).await?;
11573
11574 let status = resp.status();
11575 let content_type = resp
11576 .headers()
11577 .get("content-type")
11578 .and_then(|v| v.to_str().ok())
11579 .unwrap_or("application/octet-stream");
11580 let content_type = super::ContentType::from(content_type);
11581
11582 if !status.is_client_error() && !status.is_server_error() {
11583 let content = resp.text().await?;
11584 match content_type {
11585 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
11586 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11ySessionContextOut`"))),
11587 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::O11yPeriodO11ySessionContextOut`")))),
11588 }
11589 } else {
11590 let content = resp.text().await?;
11591 let entity: Option<GetSessionContextError> = serde_json::from_str(&content).ok();
11592 Err(Error::ResponseError(ResponseContent { status, content, entity }))
11593 }
11594}
11595
11596pub async fn get_signal_filters(configuration: &configuration::Configuration, signal: &str) -> Result<models::O11yPeriodO11ySignalFiltersOut, Error<GetSignalFiltersError>> {
11598 let p_signal = signal;
11600
11601 let uri_str = format!("{}/v1/o11y/orgs/me/filters/{signal}", configuration.base_path, signal=crate::apis::urlencode(p_signal));
11602 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
11603
11604 if let Some(ref user_agent) = configuration.user_agent {
11605 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
11606 }
11607 if let Some(ref token) = configuration.bearer_access_token {
11608 req_builder = req_builder.bearer_auth(token.to_owned());
11609 };
11610
11611 let req = req_builder.build()?;
11612 let resp = configuration.client.execute(req).await?;
11613
11614 let status = resp.status();
11615 let content_type = resp
11616 .headers()
11617 .get("content-type")
11618 .and_then(|v| v.to_str().ok())
11619 .unwrap_or("application/octet-stream");
11620 let content_type = super::ContentType::from(content_type);
11621
11622 if !status.is_client_error() && !status.is_server_error() {
11623 let content = resp.text().await?;
11624 match content_type {
11625 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
11626 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11ySignalFiltersOut`"))),
11627 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::O11yPeriodO11ySignalFiltersOut`")))),
11628 }
11629 } else {
11630 let content = resp.text().await?;
11631 let entity: Option<GetSignalFiltersError> = serde_json::from_str(&content).ok();
11632 Err(Error::ResponseError(ResponseContent { status, content, entity }))
11633 }
11634}
11635
11636pub async fn get_trace_aggregations(configuration: &configuration::Configuration, trace_id: &str, o11y_period_o11y_trace_aggregations_in: models::O11yPeriodO11yTraceAggregationsIn) -> Result<models::O11yPeriodO11yTraceAggregationsOut, Error<GetTraceAggregationsError>> {
11638 let p_trace_id = trace_id;
11640 let p_o11y_period_o11y_trace_aggregations_in = o11y_period_o11y_trace_aggregations_in;
11641
11642 let uri_str = format!("{}/v1/o11y/traces/{traceId}/aggregations", configuration.base_path, traceId=crate::apis::urlencode(p_trace_id));
11643 let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
11644
11645 if let Some(ref user_agent) = configuration.user_agent {
11646 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
11647 }
11648 if let Some(ref token) = configuration.bearer_access_token {
11649 req_builder = req_builder.bearer_auth(token.to_owned());
11650 };
11651 req_builder = req_builder.json(&p_o11y_period_o11y_trace_aggregations_in);
11652
11653 let req = req_builder.build()?;
11654 let resp = configuration.client.execute(req).await?;
11655
11656 let status = resp.status();
11657 let content_type = resp
11658 .headers()
11659 .get("content-type")
11660 .and_then(|v| v.to_str().ok())
11661 .unwrap_or("application/octet-stream");
11662 let content_type = super::ContentType::from(content_type);
11663
11664 if !status.is_client_error() && !status.is_server_error() {
11665 let content = resp.text().await?;
11666 match content_type {
11667 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
11668 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yTraceAggregationsOut`"))),
11669 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::O11yPeriodO11yTraceAggregationsOut`")))),
11670 }
11671 } else {
11672 let content = resp.text().await?;
11673 let entity: Option<GetTraceAggregationsError> = serde_json::from_str(&content).ok();
11674 Err(Error::ResponseError(ResponseContent { status, content, entity }))
11675 }
11676}
11677
11678pub async fn get_trace_fields(configuration: &configuration::Configuration, ) -> Result<models::O11yPeriodO11yFieldCatalogOut, Error<GetTraceFieldsError>> {
11680
11681 let uri_str = format!("{}/v1/o11y/traces/fields", configuration.base_path);
11682 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
11683
11684 if let Some(ref user_agent) = configuration.user_agent {
11685 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
11686 }
11687 if let Some(ref token) = configuration.bearer_access_token {
11688 req_builder = req_builder.bearer_auth(token.to_owned());
11689 };
11690
11691 let req = req_builder.build()?;
11692 let resp = configuration.client.execute(req).await?;
11693
11694 let status = resp.status();
11695 let content_type = resp
11696 .headers()
11697 .get("content-type")
11698 .and_then(|v| v.to_str().ok())
11699 .unwrap_or("application/octet-stream");
11700 let content_type = super::ContentType::from(content_type);
11701
11702 if !status.is_client_error() && !status.is_server_error() {
11703 let content = resp.text().await?;
11704 match content_type {
11705 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
11706 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yFieldCatalogOut`"))),
11707 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::O11yPeriodO11yFieldCatalogOut`")))),
11708 }
11709 } else {
11710 let content = resp.text().await?;
11711 let entity: Option<GetTraceFieldsError> = serde_json::from_str(&content).ok();
11712 Err(Error::ResponseError(ResponseContent { status, content, entity }))
11713 }
11714}
11715
11716pub async fn get_trace_funnel(configuration: &configuration::Configuration, funnel_id: &str) -> Result<models::O11yPeriodO11yFunnelOut, Error<GetTraceFunnelError>> {
11718 let p_funnel_id = funnel_id;
11720
11721 let uri_str = format!("{}/v1/o11y/trace-funnels/{funnel_id}", configuration.base_path, funnel_id=crate::apis::urlencode(p_funnel_id));
11722 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
11723
11724 if let Some(ref user_agent) = configuration.user_agent {
11725 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
11726 }
11727 if let Some(ref token) = configuration.bearer_access_token {
11728 req_builder = req_builder.bearer_auth(token.to_owned());
11729 };
11730
11731 let req = req_builder.build()?;
11732 let resp = configuration.client.execute(req).await?;
11733
11734 let status = resp.status();
11735 let content_type = resp
11736 .headers()
11737 .get("content-type")
11738 .and_then(|v| v.to_str().ok())
11739 .unwrap_or("application/octet-stream");
11740 let content_type = super::ContentType::from(content_type);
11741
11742 if !status.is_client_error() && !status.is_server_error() {
11743 let content = resp.text().await?;
11744 match content_type {
11745 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
11746 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yFunnelOut`"))),
11747 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::O11yPeriodO11yFunnelOut`")))),
11748 }
11749 } else {
11750 let content = resp.text().await?;
11751 let entity: Option<GetTraceFunnelError> = serde_json::from_str(&content).ok();
11752 Err(Error::ResponseError(ResponseContent { status, content, entity }))
11753 }
11754}
11755
11756pub async fn get_trace_funnel_error_traces(configuration: &configuration::Configuration, funnel_id: &str, o11y_period_o11y_funnel_step_window_in: models::O11yPeriodO11yFunnelStepWindowIn) -> Result<models::O11yPeriodO11yFunnelRowsOut, Error<GetTraceFunnelErrorTracesError>> {
11758 let p_funnel_id = funnel_id;
11760 let p_o11y_period_o11y_funnel_step_window_in = o11y_period_o11y_funnel_step_window_in;
11761
11762 let uri_str = format!("{}/v1/o11y/trace-funnels/{funnel_id}/analytics/error-traces", configuration.base_path, funnel_id=crate::apis::urlencode(p_funnel_id));
11763 let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
11764
11765 if let Some(ref user_agent) = configuration.user_agent {
11766 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
11767 }
11768 if let Some(ref token) = configuration.bearer_access_token {
11769 req_builder = req_builder.bearer_auth(token.to_owned());
11770 };
11771 req_builder = req_builder.json(&p_o11y_period_o11y_funnel_step_window_in);
11772
11773 let req = req_builder.build()?;
11774 let resp = configuration.client.execute(req).await?;
11775
11776 let status = resp.status();
11777 let content_type = resp
11778 .headers()
11779 .get("content-type")
11780 .and_then(|v| v.to_str().ok())
11781 .unwrap_or("application/octet-stream");
11782 let content_type = super::ContentType::from(content_type);
11783
11784 if !status.is_client_error() && !status.is_server_error() {
11785 let content = resp.text().await?;
11786 match content_type {
11787 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
11788 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yFunnelRowsOut`"))),
11789 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::O11yPeriodO11yFunnelRowsOut`")))),
11790 }
11791 } else {
11792 let content = resp.text().await?;
11793 let entity: Option<GetTraceFunnelErrorTracesError> = serde_json::from_str(&content).ok();
11794 Err(Error::ResponseError(ResponseContent { status, content, entity }))
11795 }
11796}
11797
11798pub async fn get_trace_funnel_overview(configuration: &configuration::Configuration, funnel_id: &str, o11y_period_o11y_funnel_step_window_in: models::O11yPeriodO11yFunnelStepWindowIn) -> Result<models::O11yPeriodO11yFunnelRowsOut, Error<GetTraceFunnelOverviewError>> {
11800 let p_funnel_id = funnel_id;
11802 let p_o11y_period_o11y_funnel_step_window_in = o11y_period_o11y_funnel_step_window_in;
11803
11804 let uri_str = format!("{}/v1/o11y/trace-funnels/{funnel_id}/analytics/overview", configuration.base_path, funnel_id=crate::apis::urlencode(p_funnel_id));
11805 let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
11806
11807 if let Some(ref user_agent) = configuration.user_agent {
11808 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
11809 }
11810 if let Some(ref token) = configuration.bearer_access_token {
11811 req_builder = req_builder.bearer_auth(token.to_owned());
11812 };
11813 req_builder = req_builder.json(&p_o11y_period_o11y_funnel_step_window_in);
11814
11815 let req = req_builder.build()?;
11816 let resp = configuration.client.execute(req).await?;
11817
11818 let status = resp.status();
11819 let content_type = resp
11820 .headers()
11821 .get("content-type")
11822 .and_then(|v| v.to_str().ok())
11823 .unwrap_or("application/octet-stream");
11824 let content_type = super::ContentType::from(content_type);
11825
11826 if !status.is_client_error() && !status.is_server_error() {
11827 let content = resp.text().await?;
11828 match content_type {
11829 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
11830 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yFunnelRowsOut`"))),
11831 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::O11yPeriodO11yFunnelRowsOut`")))),
11832 }
11833 } else {
11834 let content = resp.text().await?;
11835 let entity: Option<GetTraceFunnelOverviewError> = serde_json::from_str(&content).ok();
11836 Err(Error::ResponseError(ResponseContent { status, content, entity }))
11837 }
11838}
11839
11840pub async fn get_trace_funnel_slow_traces(configuration: &configuration::Configuration, funnel_id: &str, o11y_period_o11y_funnel_step_window_in: models::O11yPeriodO11yFunnelStepWindowIn) -> Result<models::O11yPeriodO11yFunnelRowsOut, Error<GetTraceFunnelSlowTracesError>> {
11842 let p_funnel_id = funnel_id;
11844 let p_o11y_period_o11y_funnel_step_window_in = o11y_period_o11y_funnel_step_window_in;
11845
11846 let uri_str = format!("{}/v1/o11y/trace-funnels/{funnel_id}/analytics/slow-traces", configuration.base_path, funnel_id=crate::apis::urlencode(p_funnel_id));
11847 let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
11848
11849 if let Some(ref user_agent) = configuration.user_agent {
11850 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
11851 }
11852 if let Some(ref token) = configuration.bearer_access_token {
11853 req_builder = req_builder.bearer_auth(token.to_owned());
11854 };
11855 req_builder = req_builder.json(&p_o11y_period_o11y_funnel_step_window_in);
11856
11857 let req = req_builder.build()?;
11858 let resp = configuration.client.execute(req).await?;
11859
11860 let status = resp.status();
11861 let content_type = resp
11862 .headers()
11863 .get("content-type")
11864 .and_then(|v| v.to_str().ok())
11865 .unwrap_or("application/octet-stream");
11866 let content_type = super::ContentType::from(content_type);
11867
11868 if !status.is_client_error() && !status.is_server_error() {
11869 let content = resp.text().await?;
11870 match content_type {
11871 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
11872 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yFunnelRowsOut`"))),
11873 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::O11yPeriodO11yFunnelRowsOut`")))),
11874 }
11875 } else {
11876 let content = resp.text().await?;
11877 let entity: Option<GetTraceFunnelSlowTracesError> = serde_json::from_str(&content).ok();
11878 Err(Error::ResponseError(ResponseContent { status, content, entity }))
11879 }
11880}
11881
11882pub async fn get_trace_funnel_step_metrics(configuration: &configuration::Configuration, funnel_id: &str, o11y_period_o11y_funnel_window_in: models::O11yPeriodO11yFunnelWindowIn) -> Result<models::O11yPeriodO11yFunnelRowsOut, Error<GetTraceFunnelStepMetricsError>> {
11884 let p_funnel_id = funnel_id;
11886 let p_o11y_period_o11y_funnel_window_in = o11y_period_o11y_funnel_window_in;
11887
11888 let uri_str = format!("{}/v1/o11y/trace-funnels/{funnel_id}/analytics/steps", configuration.base_path, funnel_id=crate::apis::urlencode(p_funnel_id));
11889 let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
11890
11891 if let Some(ref user_agent) = configuration.user_agent {
11892 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
11893 }
11894 if let Some(ref token) = configuration.bearer_access_token {
11895 req_builder = req_builder.bearer_auth(token.to_owned());
11896 };
11897 req_builder = req_builder.json(&p_o11y_period_o11y_funnel_window_in);
11898
11899 let req = req_builder.build()?;
11900 let resp = configuration.client.execute(req).await?;
11901
11902 let status = resp.status();
11903 let content_type = resp
11904 .headers()
11905 .get("content-type")
11906 .and_then(|v| v.to_str().ok())
11907 .unwrap_or("application/octet-stream");
11908 let content_type = super::ContentType::from(content_type);
11909
11910 if !status.is_client_error() && !status.is_server_error() {
11911 let content = resp.text().await?;
11912 match content_type {
11913 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
11914 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yFunnelRowsOut`"))),
11915 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::O11yPeriodO11yFunnelRowsOut`")))),
11916 }
11917 } else {
11918 let content = resp.text().await?;
11919 let entity: Option<GetTraceFunnelStepMetricsError> = serde_json::from_str(&content).ok();
11920 Err(Error::ResponseError(ResponseContent { status, content, entity }))
11921 }
11922}
11923
11924pub async fn get_trace_funnel_step_overview(configuration: &configuration::Configuration, funnel_id: &str, o11y_period_o11y_funnel_step_window_in: models::O11yPeriodO11yFunnelStepWindowIn) -> Result<models::O11yPeriodO11yFunnelRowsOut, Error<GetTraceFunnelStepOverviewError>> {
11926 let p_funnel_id = funnel_id;
11928 let p_o11y_period_o11y_funnel_step_window_in = o11y_period_o11y_funnel_step_window_in;
11929
11930 let uri_str = format!("{}/v1/o11y/trace-funnels/{funnel_id}/analytics/steps/overview", configuration.base_path, funnel_id=crate::apis::urlencode(p_funnel_id));
11931 let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
11932
11933 if let Some(ref user_agent) = configuration.user_agent {
11934 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
11935 }
11936 if let Some(ref token) = configuration.bearer_access_token {
11937 req_builder = req_builder.bearer_auth(token.to_owned());
11938 };
11939 req_builder = req_builder.json(&p_o11y_period_o11y_funnel_step_window_in);
11940
11941 let req = req_builder.build()?;
11942 let resp = configuration.client.execute(req).await?;
11943
11944 let status = resp.status();
11945 let content_type = resp
11946 .headers()
11947 .get("content-type")
11948 .and_then(|v| v.to_str().ok())
11949 .unwrap_or("application/octet-stream");
11950 let content_type = super::ContentType::from(content_type);
11951
11952 if !status.is_client_error() && !status.is_server_error() {
11953 let content = resp.text().await?;
11954 match content_type {
11955 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
11956 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yFunnelRowsOut`"))),
11957 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::O11yPeriodO11yFunnelRowsOut`")))),
11958 }
11959 } else {
11960 let content = resp.text().await?;
11961 let entity: Option<GetTraceFunnelStepOverviewError> = serde_json::from_str(&content).ok();
11962 Err(Error::ResponseError(ResponseContent { status, content, entity }))
11963 }
11964}
11965
11966pub async fn get_user(configuration: &configuration::Configuration, id: &str) -> Result<models::O11yPeriodO11yUserWithRolesOut, Error<GetUserError>> {
11968 let p_id = id;
11970
11971 let uri_str = format!("{}/v1/o11y/users/{id}", configuration.base_path, id=crate::apis::urlencode(p_id));
11972 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
11973
11974 if let Some(ref user_agent) = configuration.user_agent {
11975 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
11976 }
11977 if let Some(ref token) = configuration.bearer_access_token {
11978 req_builder = req_builder.bearer_auth(token.to_owned());
11979 };
11980
11981 let req = req_builder.build()?;
11982 let resp = configuration.client.execute(req).await?;
11983
11984 let status = resp.status();
11985 let content_type = resp
11986 .headers()
11987 .get("content-type")
11988 .and_then(|v| v.to_str().ok())
11989 .unwrap_or("application/octet-stream");
11990 let content_type = super::ContentType::from(content_type);
11991
11992 if !status.is_client_error() && !status.is_server_error() {
11993 let content = resp.text().await?;
11994 match content_type {
11995 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
11996 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yUserWithRolesOut`"))),
11997 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::O11yPeriodO11yUserWithRolesOut`")))),
11998 }
11999 } else {
12000 let content = resp.text().await?;
12001 let entity: Option<GetUserError> = serde_json::from_str(&content).ok();
12002 Err(Error::ResponseError(ResponseContent { status, content, entity }))
12003 }
12004}
12005
12006pub async fn get_user_deprecated(configuration: &configuration::Configuration, id: &str) -> Result<models::O11yPeriodO11yDeprecatedUserOut, Error<GetUserDeprecatedError>> {
12008 let p_id = id;
12010
12011 let uri_str = format!("{}/v1/o11y/user/{id}", configuration.base_path, id=crate::apis::urlencode(p_id));
12012 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
12013
12014 if let Some(ref user_agent) = configuration.user_agent {
12015 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
12016 }
12017 if let Some(ref token) = configuration.bearer_access_token {
12018 req_builder = req_builder.bearer_auth(token.to_owned());
12019 };
12020
12021 let req = req_builder.build()?;
12022 let resp = configuration.client.execute(req).await?;
12023
12024 let status = resp.status();
12025 let content_type = resp
12026 .headers()
12027 .get("content-type")
12028 .and_then(|v| v.to_str().ok())
12029 .unwrap_or("application/octet-stream");
12030 let content_type = super::ContentType::from(content_type);
12031
12032 if !status.is_client_error() && !status.is_server_error() {
12033 let content = resp.text().await?;
12034 match content_type {
12035 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
12036 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yDeprecatedUserOut`"))),
12037 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::O11yPeriodO11yDeprecatedUserOut`")))),
12038 }
12039 } else {
12040 let content = resp.text().await?;
12041 let entity: Option<GetUserDeprecatedError> = serde_json::from_str(&content).ok();
12042 Err(Error::ResponseError(ResponseContent { status, content, entity }))
12043 }
12044}
12045
12046pub async fn get_user_preference(configuration: &configuration::Configuration, name: &str) -> Result<models::O11yPeriodO11yPreferenceOut, Error<GetUserPreferenceError>> {
12048 let p_name = name;
12050
12051 let uri_str = format!("{}/v1/o11y/user/preferences/{name}", configuration.base_path, name=crate::apis::urlencode(p_name));
12052 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
12053
12054 if let Some(ref user_agent) = configuration.user_agent {
12055 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
12056 }
12057 if let Some(ref token) = configuration.bearer_access_token {
12058 req_builder = req_builder.bearer_auth(token.to_owned());
12059 };
12060
12061 let req = req_builder.build()?;
12062 let resp = configuration.client.execute(req).await?;
12063
12064 let status = resp.status();
12065 let content_type = resp
12066 .headers()
12067 .get("content-type")
12068 .and_then(|v| v.to_str().ok())
12069 .unwrap_or("application/octet-stream");
12070 let content_type = super::ContentType::from(content_type);
12071
12072 if !status.is_client_error() && !status.is_server_error() {
12073 let content = resp.text().await?;
12074 match content_type {
12075 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
12076 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yPreferenceOut`"))),
12077 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::O11yPeriodO11yPreferenceOut`")))),
12078 }
12079 } else {
12080 let content = resp.text().await?;
12081 let entity: Option<GetUserPreferenceError> = serde_json::from_str(&content).ok();
12082 Err(Error::ResponseError(ResponseContent { status, content, entity }))
12083 }
12084}
12085
12086pub async fn get_users_by_role_id(configuration: &configuration::Configuration, id: &str) -> Result<models::O11yPeriodO11yUsersOut, Error<GetUsersByRoleIdError>> {
12088 let p_id = id;
12090
12091 let uri_str = format!("{}/v1/o11y/roles/{id}/users", configuration.base_path, id=crate::apis::urlencode(p_id));
12092 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
12093
12094 if let Some(ref user_agent) = configuration.user_agent {
12095 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
12096 }
12097 if let Some(ref token) = configuration.bearer_access_token {
12098 req_builder = req_builder.bearer_auth(token.to_owned());
12099 };
12100
12101 let req = req_builder.build()?;
12102 let resp = configuration.client.execute(req).await?;
12103
12104 let status = resp.status();
12105 let content_type = resp
12106 .headers()
12107 .get("content-type")
12108 .and_then(|v| v.to_str().ok())
12109 .unwrap_or("application/octet-stream");
12110 let content_type = super::ContentType::from(content_type);
12111
12112 if !status.is_client_error() && !status.is_server_error() {
12113 let content = resp.text().await?;
12114 match content_type {
12115 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
12116 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yUsersOut`"))),
12117 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::O11yPeriodO11yUsersOut`")))),
12118 }
12119 } else {
12120 let content = resp.text().await?;
12121 let entity: Option<GetUsersByRoleIdError> = serde_json::from_str(&content).ok();
12122 Err(Error::ResponseError(ResponseContent { status, content, entity }))
12123 }
12124}
12125
12126pub async fn get_waterfall_v4(configuration: &configuration::Configuration, trace_id: &str, o11y_period_o11y_trace_waterfall_in: models::O11yPeriodO11yTraceWaterfallIn) -> Result<models::O11yPeriodO11yTraceWaterfallOut, Error<GetWaterfallV4Error>> {
12128 let p_trace_id = trace_id;
12130 let p_o11y_period_o11y_trace_waterfall_in = o11y_period_o11y_trace_waterfall_in;
12131
12132 let uri_str = format!("{}/v1/o11y/traces/{traceId}/waterfall", configuration.base_path, traceId=crate::apis::urlencode(p_trace_id));
12133 let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
12134
12135 if let Some(ref user_agent) = configuration.user_agent {
12136 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
12137 }
12138 if let Some(ref token) = configuration.bearer_access_token {
12139 req_builder = req_builder.bearer_auth(token.to_owned());
12140 };
12141 req_builder = req_builder.json(&p_o11y_period_o11y_trace_waterfall_in);
12142
12143 let req = req_builder.build()?;
12144 let resp = configuration.client.execute(req).await?;
12145
12146 let status = resp.status();
12147 let content_type = resp
12148 .headers()
12149 .get("content-type")
12150 .and_then(|v| v.to_str().ok())
12151 .unwrap_or("application/octet-stream");
12152 let content_type = super::ContentType::from(content_type);
12153
12154 if !status.is_client_error() && !status.is_server_error() {
12155 let content = resp.text().await?;
12156 match content_type {
12157 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
12158 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yTraceWaterfallOut`"))),
12159 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::O11yPeriodO11yTraceWaterfallOut`")))),
12160 }
12161 } else {
12162 let content = resp.text().await?;
12163 let entity: Option<GetWaterfallV4Error> = serde_json::from_str(&content).ok();
12164 Err(Error::ResponseError(ResponseContent { status, content, entity }))
12165 }
12166}
12167
12168pub async fn inspect_metrics(configuration: &configuration::Configuration, o11y_period_o11y_metric_inspect_in: models::O11yPeriodO11yMetricInspectIn) -> Result<models::O11yPeriodO11yMetricInspectOut, Error<InspectMetricsError>> {
12170 let p_o11y_period_o11y_metric_inspect_in = o11y_period_o11y_metric_inspect_in;
12172
12173 let uri_str = format!("{}/v1/o11y/metrics/inspect", configuration.base_path);
12174 let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
12175
12176 if let Some(ref user_agent) = configuration.user_agent {
12177 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
12178 }
12179 if let Some(ref token) = configuration.bearer_access_token {
12180 req_builder = req_builder.bearer_auth(token.to_owned());
12181 };
12182 req_builder = req_builder.json(&p_o11y_period_o11y_metric_inspect_in);
12183
12184 let req = req_builder.build()?;
12185 let resp = configuration.client.execute(req).await?;
12186
12187 let status = resp.status();
12188 let content_type = resp
12189 .headers()
12190 .get("content-type")
12191 .and_then(|v| v.to_str().ok())
12192 .unwrap_or("application/octet-stream");
12193 let content_type = super::ContentType::from(content_type);
12194
12195 if !status.is_client_error() && !status.is_server_error() {
12196 let content = resp.text().await?;
12197 match content_type {
12198 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
12199 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yMetricInspectOut`"))),
12200 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::O11yPeriodO11yMetricInspectOut`")))),
12201 }
12202 } else {
12203 let content = resp.text().await?;
12204 let entity: Option<InspectMetricsError> = serde_json::from_str(&content).ok();
12205 Err(Error::ResponseError(ResponseContent { status, content, entity }))
12206 }
12207}
12208
12209pub async fn install_integration(configuration: &configuration::Configuration, o11y_period_install_integration_request: models::O11yPeriodInstallIntegrationRequest) -> Result<models::O11yPeriodO11yInstallOut, Error<InstallIntegrationError>> {
12211 let p_o11y_period_install_integration_request = o11y_period_install_integration_request;
12213
12214 let uri_str = format!("{}/v1/o11y/integrations/install", configuration.base_path);
12215 let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
12216
12217 if let Some(ref user_agent) = configuration.user_agent {
12218 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
12219 }
12220 if let Some(ref token) = configuration.bearer_access_token {
12221 req_builder = req_builder.bearer_auth(token.to_owned());
12222 };
12223 req_builder = req_builder.json(&p_o11y_period_install_integration_request);
12224
12225 let req = req_builder.build()?;
12226 let resp = configuration.client.execute(req).await?;
12227
12228 let status = resp.status();
12229 let content_type = resp
12230 .headers()
12231 .get("content-type")
12232 .and_then(|v| v.to_str().ok())
12233 .unwrap_or("application/octet-stream");
12234 let content_type = super::ContentType::from(content_type);
12235
12236 if !status.is_client_error() && !status.is_server_error() {
12237 let content = resp.text().await?;
12238 match content_type {
12239 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
12240 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yInstallOut`"))),
12241 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::O11yPeriodO11yInstallOut`")))),
12242 }
12243 } else {
12244 let content = resp.text().await?;
12245 let entity: Option<InstallIntegrationError> = serde_json::from_str(&content).ok();
12246 Err(Error::ResponseError(ResponseContent { status, content, entity }))
12247 }
12248}
12249
12250pub async fn list_account_services_metadata(configuration: &configuration::Configuration, cloud_provider: &str, id: &str) -> Result<models::O11yPeriodO11yServicesMetadataOut, Error<ListAccountServicesMetadataError>> {
12252 let p_cloud_provider = cloud_provider;
12254 let p_id = id;
12255
12256 let uri_str = format!("{}/v1/o11y/cloud_integrations/{cloud_provider}/accounts/{id}/services", configuration.base_path, cloud_provider=crate::apis::urlencode(p_cloud_provider), id=crate::apis::urlencode(p_id));
12257 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
12258
12259 if let Some(ref user_agent) = configuration.user_agent {
12260 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
12261 }
12262 if let Some(ref token) = configuration.bearer_access_token {
12263 req_builder = req_builder.bearer_auth(token.to_owned());
12264 };
12265
12266 let req = req_builder.build()?;
12267 let resp = configuration.client.execute(req).await?;
12268
12269 let status = resp.status();
12270 let content_type = resp
12271 .headers()
12272 .get("content-type")
12273 .and_then(|v| v.to_str().ok())
12274 .unwrap_or("application/octet-stream");
12275 let content_type = super::ContentType::from(content_type);
12276
12277 if !status.is_client_error() && !status.is_server_error() {
12278 let content = resp.text().await?;
12279 match content_type {
12280 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
12281 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yServicesMetadataOut`"))),
12282 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::O11yPeriodO11yServicesMetadataOut`")))),
12283 }
12284 } else {
12285 let content = resp.text().await?;
12286 let entity: Option<ListAccountServicesMetadataError> = serde_json::from_str(&content).ok();
12287 Err(Error::ResponseError(ResponseContent { status, content, entity }))
12288 }
12289}
12290
12291pub async fn list_accounts(configuration: &configuration::Configuration, cloud_provider: &str) -> Result<models::O11yPeriodO11yAccountsOut, Error<ListAccountsError>> {
12293 let p_cloud_provider = cloud_provider;
12295
12296 let uri_str = format!("{}/v1/o11y/cloud_integrations/{cloud_provider}/accounts", configuration.base_path, cloud_provider=crate::apis::urlencode(p_cloud_provider));
12297 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
12298
12299 if let Some(ref user_agent) = configuration.user_agent {
12300 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
12301 }
12302 if let Some(ref token) = configuration.bearer_access_token {
12303 req_builder = req_builder.bearer_auth(token.to_owned());
12304 };
12305
12306 let req = req_builder.build()?;
12307 let resp = configuration.client.execute(req).await?;
12308
12309 let status = resp.status();
12310 let content_type = resp
12311 .headers()
12312 .get("content-type")
12313 .and_then(|v| v.to_str().ok())
12314 .unwrap_or("application/octet-stream");
12315 let content_type = super::ContentType::from(content_type);
12316
12317 if !status.is_client_error() && !status.is_server_error() {
12318 let content = resp.text().await?;
12319 match content_type {
12320 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
12321 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yAccountsOut`"))),
12322 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::O11yPeriodO11yAccountsOut`")))),
12323 }
12324 } else {
12325 let content = resp.text().await?;
12326 let entity: Option<ListAccountsError> = serde_json::from_str(&content).ok();
12327 Err(Error::ResponseError(ResponseContent { status, content, entity }))
12328 }
12329}
12330
12331pub async fn list_auth_domains(configuration: &configuration::Configuration, ) -> Result<models::O11yPeriodO11yAuthDomainsOut, Error<ListAuthDomainsError>> {
12333
12334 let uri_str = format!("{}/v1/o11y/domains", configuration.base_path);
12335 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
12336
12337 if let Some(ref user_agent) = configuration.user_agent {
12338 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
12339 }
12340 if let Some(ref token) = configuration.bearer_access_token {
12341 req_builder = req_builder.bearer_auth(token.to_owned());
12342 };
12343
12344 let req = req_builder.build()?;
12345 let resp = configuration.client.execute(req).await?;
12346
12347 let status = resp.status();
12348 let content_type = resp
12349 .headers()
12350 .get("content-type")
12351 .and_then(|v| v.to_str().ok())
12352 .unwrap_or("application/octet-stream");
12353 let content_type = super::ContentType::from(content_type);
12354
12355 if !status.is_client_error() && !status.is_server_error() {
12356 let content = resp.text().await?;
12357 match content_type {
12358 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
12359 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yAuthDomainsOut`"))),
12360 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::O11yPeriodO11yAuthDomainsOut`")))),
12361 }
12362 } else {
12363 let content = resp.text().await?;
12364 let entity: Option<ListAuthDomainsError> = serde_json::from_str(&content).ok();
12365 Err(Error::ResponseError(ResponseContent { status, content, entity }))
12366 }
12367}
12368
12369pub async fn list_channels(configuration: &configuration::Configuration, ) -> Result<models::O11yPeriodO11yChannelsOut, Error<ListChannelsError>> {
12371
12372 let uri_str = format!("{}/v1/o11y/channels", configuration.base_path);
12373 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
12374
12375 if let Some(ref user_agent) = configuration.user_agent {
12376 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
12377 }
12378 if let Some(ref token) = configuration.bearer_access_token {
12379 req_builder = req_builder.bearer_auth(token.to_owned());
12380 };
12381
12382 let req = req_builder.build()?;
12383 let resp = configuration.client.execute(req).await?;
12384
12385 let status = resp.status();
12386 let content_type = resp
12387 .headers()
12388 .get("content-type")
12389 .and_then(|v| v.to_str().ok())
12390 .unwrap_or("application/octet-stream");
12391 let content_type = super::ContentType::from(content_type);
12392
12393 if !status.is_client_error() && !status.is_server_error() {
12394 let content = resp.text().await?;
12395 match content_type {
12396 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
12397 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yChannelsOut`"))),
12398 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::O11yPeriodO11yChannelsOut`")))),
12399 }
12400 } else {
12401 let content = resp.text().await?;
12402 let entity: Option<ListChannelsError> = serde_json::from_str(&content).ok();
12403 Err(Error::ResponseError(ResponseContent { status, content, entity }))
12404 }
12405}
12406
12407pub async fn list_dashboard_views(configuration: &configuration::Configuration, ) -> Result<models::O11yPeriodO11yDashboardViewListOut, Error<ListDashboardViewsError>> {
12409
12410 let uri_str = format!("{}/v1/o11y/dashboard_views", configuration.base_path);
12411 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
12412
12413 if let Some(ref user_agent) = configuration.user_agent {
12414 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
12415 }
12416 if let Some(ref token) = configuration.bearer_access_token {
12417 req_builder = req_builder.bearer_auth(token.to_owned());
12418 };
12419
12420 let req = req_builder.build()?;
12421 let resp = configuration.client.execute(req).await?;
12422
12423 let status = resp.status();
12424 let content_type = resp
12425 .headers()
12426 .get("content-type")
12427 .and_then(|v| v.to_str().ok())
12428 .unwrap_or("application/octet-stream");
12429 let content_type = super::ContentType::from(content_type);
12430
12431 if !status.is_client_error() && !status.is_server_error() {
12432 let content = resp.text().await?;
12433 match content_type {
12434 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
12435 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yDashboardViewListOut`"))),
12436 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::O11yPeriodO11yDashboardViewListOut`")))),
12437 }
12438 } else {
12439 let content = resp.text().await?;
12440 let entity: Option<ListDashboardViewsError> = serde_json::from_str(&content).ok();
12441 Err(Error::ResponseError(ResponseContent { status, content, entity }))
12442 }
12443}
12444
12445pub async fn list_dashboards_for_user_v2(configuration: &configuration::Configuration, query: Option<&str>, sort: Option<&str>, order: Option<&str>, limit: Option<i32>, offset: Option<i32>) -> Result<models::O11yPeriodO11yDashboardListForUserOut, Error<ListDashboardsForUserV2Error>> {
12447 let p_query = query;
12449 let p_sort = sort;
12450 let p_order = order;
12451 let p_limit = limit;
12452 let p_offset = offset;
12453
12454 let uri_str = format!("{}/v1/o11y/users/me/dashboards", configuration.base_path);
12455 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
12456
12457 if let Some(ref param_value) = p_query {
12458 req_builder = req_builder.query(&[("query", ¶m_value.to_string())]);
12459 }
12460 if let Some(ref param_value) = p_sort {
12461 req_builder = req_builder.query(&[("sort", ¶m_value.to_string())]);
12462 }
12463 if let Some(ref param_value) = p_order {
12464 req_builder = req_builder.query(&[("order", ¶m_value.to_string())]);
12465 }
12466 if let Some(ref param_value) = p_limit {
12467 req_builder = req_builder.query(&[("limit", ¶m_value.to_string())]);
12468 }
12469 if let Some(ref param_value) = p_offset {
12470 req_builder = req_builder.query(&[("offset", ¶m_value.to_string())]);
12471 }
12472 if let Some(ref user_agent) = configuration.user_agent {
12473 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
12474 }
12475 if let Some(ref token) = configuration.bearer_access_token {
12476 req_builder = req_builder.bearer_auth(token.to_owned());
12477 };
12478
12479 let req = req_builder.build()?;
12480 let resp = configuration.client.execute(req).await?;
12481
12482 let status = resp.status();
12483 let content_type = resp
12484 .headers()
12485 .get("content-type")
12486 .and_then(|v| v.to_str().ok())
12487 .unwrap_or("application/octet-stream");
12488 let content_type = super::ContentType::from(content_type);
12489
12490 if !status.is_client_error() && !status.is_server_error() {
12491 let content = resp.text().await?;
12492 match content_type {
12493 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
12494 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yDashboardListForUserOut`"))),
12495 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::O11yPeriodO11yDashboardListForUserOut`")))),
12496 }
12497 } else {
12498 let content = resp.text().await?;
12499 let entity: Option<ListDashboardsForUserV2Error> = serde_json::from_str(&content).ok();
12500 Err(Error::ResponseError(ResponseContent { status, content, entity }))
12501 }
12502}
12503
12504pub async fn list_dashboards_v2(configuration: &configuration::Configuration, query: Option<&str>, sort: Option<&str>, order: Option<&str>, limit: Option<i32>, offset: Option<i32>) -> Result<models::O11yPeriodO11yDashboardListOut, Error<ListDashboardsV2Error>> {
12506 let p_query = query;
12508 let p_sort = sort;
12509 let p_order = order;
12510 let p_limit = limit;
12511 let p_offset = offset;
12512
12513 let uri_str = format!("{}/v1/o11y/dashboards", configuration.base_path);
12514 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
12515
12516 if let Some(ref param_value) = p_query {
12517 req_builder = req_builder.query(&[("query", ¶m_value.to_string())]);
12518 }
12519 if let Some(ref param_value) = p_sort {
12520 req_builder = req_builder.query(&[("sort", ¶m_value.to_string())]);
12521 }
12522 if let Some(ref param_value) = p_order {
12523 req_builder = req_builder.query(&[("order", ¶m_value.to_string())]);
12524 }
12525 if let Some(ref param_value) = p_limit {
12526 req_builder = req_builder.query(&[("limit", ¶m_value.to_string())]);
12527 }
12528 if let Some(ref param_value) = p_offset {
12529 req_builder = req_builder.query(&[("offset", ¶m_value.to_string())]);
12530 }
12531 if let Some(ref user_agent) = configuration.user_agent {
12532 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
12533 }
12534 if let Some(ref token) = configuration.bearer_access_token {
12535 req_builder = req_builder.bearer_auth(token.to_owned());
12536 };
12537
12538 let req = req_builder.build()?;
12539 let resp = configuration.client.execute(req).await?;
12540
12541 let status = resp.status();
12542 let content_type = resp
12543 .headers()
12544 .get("content-type")
12545 .and_then(|v| v.to_str().ok())
12546 .unwrap_or("application/octet-stream");
12547 let content_type = super::ContentType::from(content_type);
12548
12549 if !status.is_client_error() && !status.is_server_error() {
12550 let content = resp.text().await?;
12551 match content_type {
12552 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
12553 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yDashboardListOut`"))),
12554 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::O11yPeriodO11yDashboardListOut`")))),
12555 }
12556 } else {
12557 let content = resp.text().await?;
12558 let entity: Option<ListDashboardsV2Error> = serde_json::from_str(&content).ok();
12559 Err(Error::ResponseError(ResponseContent { status, content, entity }))
12560 }
12561}
12562
12563pub async fn list_downtime_schedules(configuration: &configuration::Configuration, active: Option<&str>, recurring: Option<&str>) -> Result<models::O11yPeriodO11yDowntimeSchedulesOut, Error<ListDowntimeSchedulesError>> {
12565 let p_active = active;
12567 let p_recurring = recurring;
12568
12569 let uri_str = format!("{}/v1/o11y/downtime_schedules", configuration.base_path);
12570 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
12571
12572 if let Some(ref param_value) = p_active {
12573 req_builder = req_builder.query(&[("active", ¶m_value.to_string())]);
12574 }
12575 if let Some(ref param_value) = p_recurring {
12576 req_builder = req_builder.query(&[("recurring", ¶m_value.to_string())]);
12577 }
12578 if let Some(ref user_agent) = configuration.user_agent {
12579 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
12580 }
12581 if let Some(ref token) = configuration.bearer_access_token {
12582 req_builder = req_builder.bearer_auth(token.to_owned());
12583 };
12584
12585 let req = req_builder.build()?;
12586 let resp = configuration.client.execute(req).await?;
12587
12588 let status = resp.status();
12589 let content_type = resp
12590 .headers()
12591 .get("content-type")
12592 .and_then(|v| v.to_str().ok())
12593 .unwrap_or("application/octet-stream");
12594 let content_type = super::ContentType::from(content_type);
12595
12596 if !status.is_client_error() && !status.is_server_error() {
12597 let content = resp.text().await?;
12598 match content_type {
12599 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
12600 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yDowntimeSchedulesOut`"))),
12601 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::O11yPeriodO11yDowntimeSchedulesOut`")))),
12602 }
12603 } else {
12604 let content = resp.text().await?;
12605 let entity: Option<ListDowntimeSchedulesError> = serde_json::from_str(&content).ok();
12606 Err(Error::ResponseError(ResponseContent { status, content, entity }))
12607 }
12608}
12609
12610pub async fn list_integrations(configuration: &configuration::Configuration, is_installed: Option<&str>) -> Result<models::O11yPeriodO11yIntegrationsListOut, Error<ListIntegrationsError>> {
12612 let p_is_installed = is_installed;
12614
12615 let uri_str = format!("{}/v1/o11y/integrations", configuration.base_path);
12616 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
12617
12618 if let Some(ref param_value) = p_is_installed {
12619 req_builder = req_builder.query(&[("is_installed", ¶m_value.to_string())]);
12620 }
12621 if let Some(ref user_agent) = configuration.user_agent {
12622 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
12623 }
12624 if let Some(ref token) = configuration.bearer_access_token {
12625 req_builder = req_builder.bearer_auth(token.to_owned());
12626 };
12627
12628 let req = req_builder.build()?;
12629 let resp = configuration.client.execute(req).await?;
12630
12631 let status = resp.status();
12632 let content_type = resp
12633 .headers()
12634 .get("content-type")
12635 .and_then(|v| v.to_str().ok())
12636 .unwrap_or("application/octet-stream");
12637 let content_type = super::ContentType::from(content_type);
12638
12639 if !status.is_client_error() && !status.is_server_error() {
12640 let content = resp.text().await?;
12641 match content_type {
12642 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
12643 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yIntegrationsListOut`"))),
12644 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::O11yPeriodO11yIntegrationsListOut`")))),
12645 }
12646 } else {
12647 let content = resp.text().await?;
12648 let entity: Option<ListIntegrationsError> = serde_json::from_str(&content).ok();
12649 Err(Error::ResponseError(ResponseContent { status, content, entity }))
12650 }
12651}
12652
12653pub async fn list_llm_annotations(configuration: &configuration::Configuration, trace_id: Option<&str>, queue: Option<&str>, status: Option<&str>, offset: Option<i32>, limit: Option<i32>) -> Result<models::O11yPeriodO11yLlmAnnotationsOut, Error<ListLlmAnnotationsError>> {
12655 let p_trace_id = trace_id;
12657 let p_queue = queue;
12658 let p_status = status;
12659 let p_offset = offset;
12660 let p_limit = limit;
12661
12662 let uri_str = format!("{}/v1/o11y/llm/annotation", configuration.base_path);
12663 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
12664
12665 if let Some(ref param_value) = p_trace_id {
12666 req_builder = req_builder.query(&[("traceId", ¶m_value.to_string())]);
12667 }
12668 if let Some(ref param_value) = p_queue {
12669 req_builder = req_builder.query(&[("queue", ¶m_value.to_string())]);
12670 }
12671 if let Some(ref param_value) = p_status {
12672 req_builder = req_builder.query(&[("status", ¶m_value.to_string())]);
12673 }
12674 if let Some(ref param_value) = p_offset {
12675 req_builder = req_builder.query(&[("offset", ¶m_value.to_string())]);
12676 }
12677 if let Some(ref param_value) = p_limit {
12678 req_builder = req_builder.query(&[("limit", ¶m_value.to_string())]);
12679 }
12680 if let Some(ref user_agent) = configuration.user_agent {
12681 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
12682 }
12683 if let Some(ref token) = configuration.bearer_access_token {
12684 req_builder = req_builder.bearer_auth(token.to_owned());
12685 };
12686
12687 let req = req_builder.build()?;
12688 let resp = configuration.client.execute(req).await?;
12689
12690 let status = resp.status();
12691 let content_type = resp
12692 .headers()
12693 .get("content-type")
12694 .and_then(|v| v.to_str().ok())
12695 .unwrap_or("application/octet-stream");
12696 let content_type = super::ContentType::from(content_type);
12697
12698 if !status.is_client_error() && !status.is_server_error() {
12699 let content = resp.text().await?;
12700 match content_type {
12701 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
12702 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yLlmAnnotationsOut`"))),
12703 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::O11yPeriodO11yLlmAnnotationsOut`")))),
12704 }
12705 } else {
12706 let content = resp.text().await?;
12707 let entity: Option<ListLlmAnnotationsError> = serde_json::from_str(&content).ok();
12708 Err(Error::ResponseError(ResponseContent { status, content, entity }))
12709 }
12710}
12711
12712pub async fn list_llm_observations(configuration: &configuration::Configuration, start: Option<i32>, end: Option<i32>, trace_id: Option<&str>, session_id: Option<&str>, user_id: Option<&str>, name: Option<&str>, model: Option<&str>, offset: Option<i32>, limit: Option<i32>) -> Result<models::O11yPeriodO11yLlmObservationsOut, Error<ListLlmObservationsError>> {
12714 let p_start = start;
12716 let p_end = end;
12717 let p_trace_id = trace_id;
12718 let p_session_id = session_id;
12719 let p_user_id = user_id;
12720 let p_name = name;
12721 let p_model = model;
12722 let p_offset = offset;
12723 let p_limit = limit;
12724
12725 let uri_str = format!("{}/v1/o11y/llm/observations", configuration.base_path);
12726 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
12727
12728 if let Some(ref param_value) = p_start {
12729 req_builder = req_builder.query(&[("start", ¶m_value.to_string())]);
12730 }
12731 if let Some(ref param_value) = p_end {
12732 req_builder = req_builder.query(&[("end", ¶m_value.to_string())]);
12733 }
12734 if let Some(ref param_value) = p_trace_id {
12735 req_builder = req_builder.query(&[("traceId", ¶m_value.to_string())]);
12736 }
12737 if let Some(ref param_value) = p_session_id {
12738 req_builder = req_builder.query(&[("sessionId", ¶m_value.to_string())]);
12739 }
12740 if let Some(ref param_value) = p_user_id {
12741 req_builder = req_builder.query(&[("userId", ¶m_value.to_string())]);
12742 }
12743 if let Some(ref param_value) = p_name {
12744 req_builder = req_builder.query(&[("name", ¶m_value.to_string())]);
12745 }
12746 if let Some(ref param_value) = p_model {
12747 req_builder = req_builder.query(&[("model", ¶m_value.to_string())]);
12748 }
12749 if let Some(ref param_value) = p_offset {
12750 req_builder = req_builder.query(&[("offset", ¶m_value.to_string())]);
12751 }
12752 if let Some(ref param_value) = p_limit {
12753 req_builder = req_builder.query(&[("limit", ¶m_value.to_string())]);
12754 }
12755 if let Some(ref user_agent) = configuration.user_agent {
12756 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
12757 }
12758 if let Some(ref token) = configuration.bearer_access_token {
12759 req_builder = req_builder.bearer_auth(token.to_owned());
12760 };
12761
12762 let req = req_builder.build()?;
12763 let resp = configuration.client.execute(req).await?;
12764
12765 let status = resp.status();
12766 let content_type = resp
12767 .headers()
12768 .get("content-type")
12769 .and_then(|v| v.to_str().ok())
12770 .unwrap_or("application/octet-stream");
12771 let content_type = super::ContentType::from(content_type);
12772
12773 if !status.is_client_error() && !status.is_server_error() {
12774 let content = resp.text().await?;
12775 match content_type {
12776 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
12777 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yLlmObservationsOut`"))),
12778 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::O11yPeriodO11yLlmObservationsOut`")))),
12779 }
12780 } else {
12781 let content = resp.text().await?;
12782 let entity: Option<ListLlmObservationsError> = serde_json::from_str(&content).ok();
12783 Err(Error::ResponseError(ResponseContent { status, content, entity }))
12784 }
12785}
12786
12787pub async fn list_llm_pricing_rules(configuration: &configuration::Configuration, q: Option<&str>, is_override: Option<&str>, offset: Option<i32>, limit: Option<i32>) -> Result<models::O11yPeriodO11yLlmPricingRulesOut, Error<ListLlmPricingRulesError>> {
12789 let p_q = q;
12791 let p_is_override = is_override;
12792 let p_offset = offset;
12793 let p_limit = limit;
12794
12795 let uri_str = format!("{}/v1/o11y/llm_pricing_rules", configuration.base_path);
12796 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
12797
12798 if let Some(ref param_value) = p_q {
12799 req_builder = req_builder.query(&[("q", ¶m_value.to_string())]);
12800 }
12801 if let Some(ref param_value) = p_is_override {
12802 req_builder = req_builder.query(&[("isOverride", ¶m_value.to_string())]);
12803 }
12804 if let Some(ref param_value) = p_offset {
12805 req_builder = req_builder.query(&[("offset", ¶m_value.to_string())]);
12806 }
12807 if let Some(ref param_value) = p_limit {
12808 req_builder = req_builder.query(&[("limit", ¶m_value.to_string())]);
12809 }
12810 if let Some(ref user_agent) = configuration.user_agent {
12811 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
12812 }
12813 if let Some(ref token) = configuration.bearer_access_token {
12814 req_builder = req_builder.bearer_auth(token.to_owned());
12815 };
12816
12817 let req = req_builder.build()?;
12818 let resp = configuration.client.execute(req).await?;
12819
12820 let status = resp.status();
12821 let content_type = resp
12822 .headers()
12823 .get("content-type")
12824 .and_then(|v| v.to_str().ok())
12825 .unwrap_or("application/octet-stream");
12826 let content_type = super::ContentType::from(content_type);
12827
12828 if !status.is_client_error() && !status.is_server_error() {
12829 let content = resp.text().await?;
12830 match content_type {
12831 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
12832 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yLlmPricingRulesOut`"))),
12833 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::O11yPeriodO11yLlmPricingRulesOut`")))),
12834 }
12835 } else {
12836 let content = resp.text().await?;
12837 let entity: Option<ListLlmPricingRulesError> = serde_json::from_str(&content).ok();
12838 Err(Error::ResponseError(ResponseContent { status, content, entity }))
12839 }
12840}
12841
12842pub async fn list_llm_scores(configuration: &configuration::Configuration, trace_id: Option<&str>, observation_id: Option<&str>, name: Option<&str>, source: Option<&str>, offset: Option<i32>, limit: Option<i32>) -> Result<models::O11yPeriodO11yLlmScoresOut, Error<ListLlmScoresError>> {
12844 let p_trace_id = trace_id;
12846 let p_observation_id = observation_id;
12847 let p_name = name;
12848 let p_source = source;
12849 let p_offset = offset;
12850 let p_limit = limit;
12851
12852 let uri_str = format!("{}/v1/o11y/llm/scores", configuration.base_path);
12853 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
12854
12855 if let Some(ref param_value) = p_trace_id {
12856 req_builder = req_builder.query(&[("traceId", ¶m_value.to_string())]);
12857 }
12858 if let Some(ref param_value) = p_observation_id {
12859 req_builder = req_builder.query(&[("observationId", ¶m_value.to_string())]);
12860 }
12861 if let Some(ref param_value) = p_name {
12862 req_builder = req_builder.query(&[("name", ¶m_value.to_string())]);
12863 }
12864 if let Some(ref param_value) = p_source {
12865 req_builder = req_builder.query(&[("source", ¶m_value.to_string())]);
12866 }
12867 if let Some(ref param_value) = p_offset {
12868 req_builder = req_builder.query(&[("offset", ¶m_value.to_string())]);
12869 }
12870 if let Some(ref param_value) = p_limit {
12871 req_builder = req_builder.query(&[("limit", ¶m_value.to_string())]);
12872 }
12873 if let Some(ref user_agent) = configuration.user_agent {
12874 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
12875 }
12876 if let Some(ref token) = configuration.bearer_access_token {
12877 req_builder = req_builder.bearer_auth(token.to_owned());
12878 };
12879
12880 let req = req_builder.build()?;
12881 let resp = configuration.client.execute(req).await?;
12882
12883 let status = resp.status();
12884 let content_type = resp
12885 .headers()
12886 .get("content-type")
12887 .and_then(|v| v.to_str().ok())
12888 .unwrap_or("application/octet-stream");
12889 let content_type = super::ContentType::from(content_type);
12890
12891 if !status.is_client_error() && !status.is_server_error() {
12892 let content = resp.text().await?;
12893 match content_type {
12894 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
12895 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yLlmScoresOut`"))),
12896 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::O11yPeriodO11yLlmScoresOut`")))),
12897 }
12898 } else {
12899 let content = resp.text().await?;
12900 let entity: Option<ListLlmScoresError> = serde_json::from_str(&content).ok();
12901 Err(Error::ResponseError(ResponseContent { status, content, entity }))
12902 }
12903}
12904
12905pub async fn list_llm_sessions(configuration: &configuration::Configuration, start: Option<i32>, end: Option<i32>, trace_id: Option<&str>, session_id: Option<&str>, user_id: Option<&str>, name: Option<&str>, model: Option<&str>, offset: Option<i32>, limit: Option<i32>) -> Result<models::O11yPeriodO11yLlmSessionsOut, Error<ListLlmSessionsError>> {
12907 let p_start = start;
12909 let p_end = end;
12910 let p_trace_id = trace_id;
12911 let p_session_id = session_id;
12912 let p_user_id = user_id;
12913 let p_name = name;
12914 let p_model = model;
12915 let p_offset = offset;
12916 let p_limit = limit;
12917
12918 let uri_str = format!("{}/v1/o11y/llm/sessions", configuration.base_path);
12919 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
12920
12921 if let Some(ref param_value) = p_start {
12922 req_builder = req_builder.query(&[("start", ¶m_value.to_string())]);
12923 }
12924 if let Some(ref param_value) = p_end {
12925 req_builder = req_builder.query(&[("end", ¶m_value.to_string())]);
12926 }
12927 if let Some(ref param_value) = p_trace_id {
12928 req_builder = req_builder.query(&[("traceId", ¶m_value.to_string())]);
12929 }
12930 if let Some(ref param_value) = p_session_id {
12931 req_builder = req_builder.query(&[("sessionId", ¶m_value.to_string())]);
12932 }
12933 if let Some(ref param_value) = p_user_id {
12934 req_builder = req_builder.query(&[("userId", ¶m_value.to_string())]);
12935 }
12936 if let Some(ref param_value) = p_name {
12937 req_builder = req_builder.query(&[("name", ¶m_value.to_string())]);
12938 }
12939 if let Some(ref param_value) = p_model {
12940 req_builder = req_builder.query(&[("model", ¶m_value.to_string())]);
12941 }
12942 if let Some(ref param_value) = p_offset {
12943 req_builder = req_builder.query(&[("offset", ¶m_value.to_string())]);
12944 }
12945 if let Some(ref param_value) = p_limit {
12946 req_builder = req_builder.query(&[("limit", ¶m_value.to_string())]);
12947 }
12948 if let Some(ref user_agent) = configuration.user_agent {
12949 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
12950 }
12951 if let Some(ref token) = configuration.bearer_access_token {
12952 req_builder = req_builder.bearer_auth(token.to_owned());
12953 };
12954
12955 let req = req_builder.build()?;
12956 let resp = configuration.client.execute(req).await?;
12957
12958 let status = resp.status();
12959 let content_type = resp
12960 .headers()
12961 .get("content-type")
12962 .and_then(|v| v.to_str().ok())
12963 .unwrap_or("application/octet-stream");
12964 let content_type = super::ContentType::from(content_type);
12965
12966 if !status.is_client_error() && !status.is_server_error() {
12967 let content = resp.text().await?;
12968 match content_type {
12969 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
12970 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yLlmSessionsOut`"))),
12971 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::O11yPeriodO11yLlmSessionsOut`")))),
12972 }
12973 } else {
12974 let content = resp.text().await?;
12975 let entity: Option<ListLlmSessionsError> = serde_json::from_str(&content).ok();
12976 Err(Error::ResponseError(ResponseContent { status, content, entity }))
12977 }
12978}
12979
12980pub async fn list_llm_traces(configuration: &configuration::Configuration, start: Option<i32>, end: Option<i32>, trace_id: Option<&str>, session_id: Option<&str>, user_id: Option<&str>, name: Option<&str>, model: Option<&str>, offset: Option<i32>, limit: Option<i32>) -> Result<models::O11yPeriodO11yLlmTracesOut, Error<ListLlmTracesError>> {
12982 let p_start = start;
12984 let p_end = end;
12985 let p_trace_id = trace_id;
12986 let p_session_id = session_id;
12987 let p_user_id = user_id;
12988 let p_name = name;
12989 let p_model = model;
12990 let p_offset = offset;
12991 let p_limit = limit;
12992
12993 let uri_str = format!("{}/v1/o11y/llm/traces", configuration.base_path);
12994 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
12995
12996 if let Some(ref param_value) = p_start {
12997 req_builder = req_builder.query(&[("start", ¶m_value.to_string())]);
12998 }
12999 if let Some(ref param_value) = p_end {
13000 req_builder = req_builder.query(&[("end", ¶m_value.to_string())]);
13001 }
13002 if let Some(ref param_value) = p_trace_id {
13003 req_builder = req_builder.query(&[("traceId", ¶m_value.to_string())]);
13004 }
13005 if let Some(ref param_value) = p_session_id {
13006 req_builder = req_builder.query(&[("sessionId", ¶m_value.to_string())]);
13007 }
13008 if let Some(ref param_value) = p_user_id {
13009 req_builder = req_builder.query(&[("userId", ¶m_value.to_string())]);
13010 }
13011 if let Some(ref param_value) = p_name {
13012 req_builder = req_builder.query(&[("name", ¶m_value.to_string())]);
13013 }
13014 if let Some(ref param_value) = p_model {
13015 req_builder = req_builder.query(&[("model", ¶m_value.to_string())]);
13016 }
13017 if let Some(ref param_value) = p_offset {
13018 req_builder = req_builder.query(&[("offset", ¶m_value.to_string())]);
13019 }
13020 if let Some(ref param_value) = p_limit {
13021 req_builder = req_builder.query(&[("limit", ¶m_value.to_string())]);
13022 }
13023 if let Some(ref user_agent) = configuration.user_agent {
13024 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
13025 }
13026 if let Some(ref token) = configuration.bearer_access_token {
13027 req_builder = req_builder.bearer_auth(token.to_owned());
13028 };
13029
13030 let req = req_builder.build()?;
13031 let resp = configuration.client.execute(req).await?;
13032
13033 let status = resp.status();
13034 let content_type = resp
13035 .headers()
13036 .get("content-type")
13037 .and_then(|v| v.to_str().ok())
13038 .unwrap_or("application/octet-stream");
13039 let content_type = super::ContentType::from(content_type);
13040
13041 if !status.is_client_error() && !status.is_server_error() {
13042 let content = resp.text().await?;
13043 match content_type {
13044 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
13045 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yLlmTracesOut`"))),
13046 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::O11yPeriodO11yLlmTracesOut`")))),
13047 }
13048 } else {
13049 let content = resp.text().await?;
13050 let entity: Option<ListLlmTracesError> = serde_json::from_str(&content).ok();
13051 Err(Error::ResponseError(ResponseContent { status, content, entity }))
13052 }
13053}
13054
13055pub async fn list_llm_users(configuration: &configuration::Configuration, start: Option<i32>, end: Option<i32>, trace_id: Option<&str>, session_id: Option<&str>, user_id: Option<&str>, name: Option<&str>, model: Option<&str>, offset: Option<i32>, limit: Option<i32>) -> Result<models::O11yPeriodO11yLlmUsersOut, Error<ListLlmUsersError>> {
13057 let p_start = start;
13059 let p_end = end;
13060 let p_trace_id = trace_id;
13061 let p_session_id = session_id;
13062 let p_user_id = user_id;
13063 let p_name = name;
13064 let p_model = model;
13065 let p_offset = offset;
13066 let p_limit = limit;
13067
13068 let uri_str = format!("{}/v1/o11y/llm/users", configuration.base_path);
13069 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
13070
13071 if let Some(ref param_value) = p_start {
13072 req_builder = req_builder.query(&[("start", ¶m_value.to_string())]);
13073 }
13074 if let Some(ref param_value) = p_end {
13075 req_builder = req_builder.query(&[("end", ¶m_value.to_string())]);
13076 }
13077 if let Some(ref param_value) = p_trace_id {
13078 req_builder = req_builder.query(&[("traceId", ¶m_value.to_string())]);
13079 }
13080 if let Some(ref param_value) = p_session_id {
13081 req_builder = req_builder.query(&[("sessionId", ¶m_value.to_string())]);
13082 }
13083 if let Some(ref param_value) = p_user_id {
13084 req_builder = req_builder.query(&[("userId", ¶m_value.to_string())]);
13085 }
13086 if let Some(ref param_value) = p_name {
13087 req_builder = req_builder.query(&[("name", ¶m_value.to_string())]);
13088 }
13089 if let Some(ref param_value) = p_model {
13090 req_builder = req_builder.query(&[("model", ¶m_value.to_string())]);
13091 }
13092 if let Some(ref param_value) = p_offset {
13093 req_builder = req_builder.query(&[("offset", ¶m_value.to_string())]);
13094 }
13095 if let Some(ref param_value) = p_limit {
13096 req_builder = req_builder.query(&[("limit", ¶m_value.to_string())]);
13097 }
13098 if let Some(ref user_agent) = configuration.user_agent {
13099 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
13100 }
13101 if let Some(ref token) = configuration.bearer_access_token {
13102 req_builder = req_builder.bearer_auth(token.to_owned());
13103 };
13104
13105 let req = req_builder.build()?;
13106 let resp = configuration.client.execute(req).await?;
13107
13108 let status = resp.status();
13109 let content_type = resp
13110 .headers()
13111 .get("content-type")
13112 .and_then(|v| v.to_str().ok())
13113 .unwrap_or("application/octet-stream");
13114 let content_type = super::ContentType::from(content_type);
13115
13116 if !status.is_client_error() && !status.is_server_error() {
13117 let content = resp.text().await?;
13118 match content_type {
13119 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
13120 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yLlmUsersOut`"))),
13121 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::O11yPeriodO11yLlmUsersOut`")))),
13122 }
13123 } else {
13124 let content = resp.text().await?;
13125 let entity: Option<ListLlmUsersError> = serde_json::from_str(&content).ok();
13126 Err(Error::ResponseError(ResponseContent { status, content, entity }))
13127 }
13128}
13129
13130pub async fn list_metric_reduction_rules(configuration: &configuration::Configuration, order_by: Option<&str>, order: Option<&str>, search: Option<&str>, metric_name: Option<&str>, offset: Option<i32>, limit: Option<i32>) -> Result<models::O11yPeriodO11yReductionRuleListOut, Error<ListMetricReductionRulesError>> {
13132 let p_order_by = order_by;
13134 let p_order = order;
13135 let p_search = search;
13136 let p_metric_name = metric_name;
13137 let p_offset = offset;
13138 let p_limit = limit;
13139
13140 let uri_str = format!("{}/v1/o11y/metric_reduction_rules", configuration.base_path);
13141 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
13142
13143 if let Some(ref param_value) = p_order_by {
13144 req_builder = req_builder.query(&[("orderBy", ¶m_value.to_string())]);
13145 }
13146 if let Some(ref param_value) = p_order {
13147 req_builder = req_builder.query(&[("order", ¶m_value.to_string())]);
13148 }
13149 if let Some(ref param_value) = p_search {
13150 req_builder = req_builder.query(&[("search", ¶m_value.to_string())]);
13151 }
13152 if let Some(ref param_value) = p_metric_name {
13153 req_builder = req_builder.query(&[("metricName", ¶m_value.to_string())]);
13154 }
13155 if let Some(ref param_value) = p_offset {
13156 req_builder = req_builder.query(&[("offset", ¶m_value.to_string())]);
13157 }
13158 if let Some(ref param_value) = p_limit {
13159 req_builder = req_builder.query(&[("limit", ¶m_value.to_string())]);
13160 }
13161 if let Some(ref user_agent) = configuration.user_agent {
13162 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
13163 }
13164 if let Some(ref token) = configuration.bearer_access_token {
13165 req_builder = req_builder.bearer_auth(token.to_owned());
13166 };
13167
13168 let req = req_builder.build()?;
13169 let resp = configuration.client.execute(req).await?;
13170
13171 let status = resp.status();
13172 let content_type = resp
13173 .headers()
13174 .get("content-type")
13175 .and_then(|v| v.to_str().ok())
13176 .unwrap_or("application/octet-stream");
13177 let content_type = super::ContentType::from(content_type);
13178
13179 if !status.is_client_error() && !status.is_server_error() {
13180 let content = resp.text().await?;
13181 match content_type {
13182 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
13183 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yReductionRuleListOut`"))),
13184 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::O11yPeriodO11yReductionRuleListOut`")))),
13185 }
13186 } else {
13187 let content = resp.text().await?;
13188 let entity: Option<ListMetricReductionRulesError> = serde_json::from_str(&content).ok();
13189 Err(Error::ResponseError(ResponseContent { status, content, entity }))
13190 }
13191}
13192
13193pub async fn list_metrics(configuration: &configuration::Configuration, start: Option<i32>, end: Option<i32>, limit: Option<i32>, search_text: Option<&str>, source: Option<&str>) -> Result<models::O11yPeriodO11yMetricListOut, Error<ListMetricsError>> {
13195 let p_start = start;
13197 let p_end = end;
13198 let p_limit = limit;
13199 let p_search_text = search_text;
13200 let p_source = source;
13201
13202 let uri_str = format!("{}/v1/o11y/metrics", configuration.base_path);
13203 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
13204
13205 if let Some(ref param_value) = p_start {
13206 req_builder = req_builder.query(&[("start", ¶m_value.to_string())]);
13207 }
13208 if let Some(ref param_value) = p_end {
13209 req_builder = req_builder.query(&[("end", ¶m_value.to_string())]);
13210 }
13211 if let Some(ref param_value) = p_limit {
13212 req_builder = req_builder.query(&[("limit", ¶m_value.to_string())]);
13213 }
13214 if let Some(ref param_value) = p_search_text {
13215 req_builder = req_builder.query(&[("searchText", ¶m_value.to_string())]);
13216 }
13217 if let Some(ref param_value) = p_source {
13218 req_builder = req_builder.query(&[("source", ¶m_value.to_string())]);
13219 }
13220 if let Some(ref user_agent) = configuration.user_agent {
13221 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
13222 }
13223 if let Some(ref token) = configuration.bearer_access_token {
13224 req_builder = req_builder.bearer_auth(token.to_owned());
13225 };
13226
13227 let req = req_builder.build()?;
13228 let resp = configuration.client.execute(req).await?;
13229
13230 let status = resp.status();
13231 let content_type = resp
13232 .headers()
13233 .get("content-type")
13234 .and_then(|v| v.to_str().ok())
13235 .unwrap_or("application/octet-stream");
13236 let content_type = super::ContentType::from(content_type);
13237
13238 if !status.is_client_error() && !status.is_server_error() {
13239 let content = resp.text().await?;
13240 match content_type {
13241 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
13242 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yMetricListOut`"))),
13243 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::O11yPeriodO11yMetricListOut`")))),
13244 }
13245 } else {
13246 let content = resp.text().await?;
13247 let entity: Option<ListMetricsError> = serde_json::from_str(&content).ok();
13248 Err(Error::ResponseError(ResponseContent { status, content, entity }))
13249 }
13250}
13251
13252pub async fn list_org_preferences(configuration: &configuration::Configuration, ) -> Result<models::O11yPeriodO11yPreferencesOut, Error<ListOrgPreferencesError>> {
13254
13255 let uri_str = format!("{}/v1/o11y/org/preferences", configuration.base_path);
13256 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
13257
13258 if let Some(ref user_agent) = configuration.user_agent {
13259 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
13260 }
13261 if let Some(ref token) = configuration.bearer_access_token {
13262 req_builder = req_builder.bearer_auth(token.to_owned());
13263 };
13264
13265 let req = req_builder.build()?;
13266 let resp = configuration.client.execute(req).await?;
13267
13268 let status = resp.status();
13269 let content_type = resp
13270 .headers()
13271 .get("content-type")
13272 .and_then(|v| v.to_str().ok())
13273 .unwrap_or("application/octet-stream");
13274 let content_type = super::ContentType::from(content_type);
13275
13276 if !status.is_client_error() && !status.is_server_error() {
13277 let content = resp.text().await?;
13278 match content_type {
13279 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
13280 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yPreferencesOut`"))),
13281 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::O11yPeriodO11yPreferencesOut`")))),
13282 }
13283 } else {
13284 let content = resp.text().await?;
13285 let entity: Option<ListOrgPreferencesError> = serde_json::from_str(&content).ok();
13286 Err(Error::ResponseError(ResponseContent { status, content, entity }))
13287 }
13288}
13289
13290pub async fn list_roles(configuration: &configuration::Configuration, ) -> Result<models::O11yPeriodO11yRolesOut, Error<ListRolesError>> {
13292
13293 let uri_str = format!("{}/v1/o11y/roles", configuration.base_path);
13294 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
13295
13296 if let Some(ref user_agent) = configuration.user_agent {
13297 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
13298 }
13299 if let Some(ref token) = configuration.bearer_access_token {
13300 req_builder = req_builder.bearer_auth(token.to_owned());
13301 };
13302
13303 let req = req_builder.build()?;
13304 let resp = configuration.client.execute(req).await?;
13305
13306 let status = resp.status();
13307 let content_type = resp
13308 .headers()
13309 .get("content-type")
13310 .and_then(|v| v.to_str().ok())
13311 .unwrap_or("application/octet-stream");
13312 let content_type = super::ContentType::from(content_type);
13313
13314 if !status.is_client_error() && !status.is_server_error() {
13315 let content = resp.text().await?;
13316 match content_type {
13317 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
13318 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yRolesOut`"))),
13319 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::O11yPeriodO11yRolesOut`")))),
13320 }
13321 } else {
13322 let content = resp.text().await?;
13323 let entity: Option<ListRolesError> = serde_json::from_str(&content).ok();
13324 Err(Error::ResponseError(ResponseContent { status, content, entity }))
13325 }
13326}
13327
13328pub async fn list_rules(configuration: &configuration::Configuration, ) -> Result<models::O11yPeriodO11yRulesOut, Error<ListRulesError>> {
13330
13331 let uri_str = format!("{}/v1/o11y/rules", configuration.base_path);
13332 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
13333
13334 if let Some(ref user_agent) = configuration.user_agent {
13335 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
13336 }
13337 if let Some(ref token) = configuration.bearer_access_token {
13338 req_builder = req_builder.bearer_auth(token.to_owned());
13339 };
13340
13341 let req = req_builder.build()?;
13342 let resp = configuration.client.execute(req).await?;
13343
13344 let status = resp.status();
13345 let content_type = resp
13346 .headers()
13347 .get("content-type")
13348 .and_then(|v| v.to_str().ok())
13349 .unwrap_or("application/octet-stream");
13350 let content_type = super::ContentType::from(content_type);
13351
13352 if !status.is_client_error() && !status.is_server_error() {
13353 let content = resp.text().await?;
13354 match content_type {
13355 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
13356 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yRulesOut`"))),
13357 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::O11yPeriodO11yRulesOut`")))),
13358 }
13359 } else {
13360 let content = resp.text().await?;
13361 let entity: Option<ListRulesError> = serde_json::from_str(&content).ok();
13362 Err(Error::ResponseError(ResponseContent { status, content, entity }))
13363 }
13364}
13365
13366pub async fn list_service_account_keys(configuration: &configuration::Configuration, id: &str) -> Result<models::O11yPeriodO11yApiKeysOut, Error<ListServiceAccountKeysError>> {
13368 let p_id = id;
13370
13371 let uri_str = format!("{}/v1/o11y/service_accounts/{id}/keys", configuration.base_path, id=crate::apis::urlencode(p_id));
13372 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
13373
13374 if let Some(ref user_agent) = configuration.user_agent {
13375 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
13376 }
13377 if let Some(ref token) = configuration.bearer_access_token {
13378 req_builder = req_builder.bearer_auth(token.to_owned());
13379 };
13380
13381 let req = req_builder.build()?;
13382 let resp = configuration.client.execute(req).await?;
13383
13384 let status = resp.status();
13385 let content_type = resp
13386 .headers()
13387 .get("content-type")
13388 .and_then(|v| v.to_str().ok())
13389 .unwrap_or("application/octet-stream");
13390 let content_type = super::ContentType::from(content_type);
13391
13392 if !status.is_client_error() && !status.is_server_error() {
13393 let content = resp.text().await?;
13394 match content_type {
13395 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
13396 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yApiKeysOut`"))),
13397 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::O11yPeriodO11yApiKeysOut`")))),
13398 }
13399 } else {
13400 let content = resp.text().await?;
13401 let entity: Option<ListServiceAccountKeysError> = serde_json::from_str(&content).ok();
13402 Err(Error::ResponseError(ResponseContent { status, content, entity }))
13403 }
13404}
13405
13406pub async fn list_service_accounts(configuration: &configuration::Configuration, ) -> Result<models::O11yPeriodO11yServiceAccountsOut, Error<ListServiceAccountsError>> {
13408
13409 let uri_str = format!("{}/v1/o11y/service_accounts", configuration.base_path);
13410 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
13411
13412 if let Some(ref user_agent) = configuration.user_agent {
13413 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
13414 }
13415 if let Some(ref token) = configuration.bearer_access_token {
13416 req_builder = req_builder.bearer_auth(token.to_owned());
13417 };
13418
13419 let req = req_builder.build()?;
13420 let resp = configuration.client.execute(req).await?;
13421
13422 let status = resp.status();
13423 let content_type = resp
13424 .headers()
13425 .get("content-type")
13426 .and_then(|v| v.to_str().ok())
13427 .unwrap_or("application/octet-stream");
13428 let content_type = super::ContentType::from(content_type);
13429
13430 if !status.is_client_error() && !status.is_server_error() {
13431 let content = resp.text().await?;
13432 match content_type {
13433 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
13434 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yServiceAccountsOut`"))),
13435 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::O11yPeriodO11yServiceAccountsOut`")))),
13436 }
13437 } else {
13438 let content = resp.text().await?;
13439 let entity: Option<ListServiceAccountsError> = serde_json::from_str(&content).ok();
13440 Err(Error::ResponseError(ResponseContent { status, content, entity }))
13441 }
13442}
13443
13444pub async fn list_services_metadata(configuration: &configuration::Configuration, cloud_provider: &str, cloud_integration_id: Option<&str>) -> Result<models::O11yPeriodO11yServicesMetadataOut, Error<ListServicesMetadataError>> {
13446 let p_cloud_provider = cloud_provider;
13448 let p_cloud_integration_id = cloud_integration_id;
13449
13450 let uri_str = format!("{}/v1/o11y/cloud_integrations/{cloud_provider}/services", configuration.base_path, cloud_provider=crate::apis::urlencode(p_cloud_provider));
13451 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
13452
13453 if let Some(ref param_value) = p_cloud_integration_id {
13454 req_builder = req_builder.query(&[("cloud_integration_id", ¶m_value.to_string())]);
13455 }
13456 if let Some(ref user_agent) = configuration.user_agent {
13457 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
13458 }
13459 if let Some(ref token) = configuration.bearer_access_token {
13460 req_builder = req_builder.bearer_auth(token.to_owned());
13461 };
13462
13463 let req = req_builder.build()?;
13464 let resp = configuration.client.execute(req).await?;
13465
13466 let status = resp.status();
13467 let content_type = resp
13468 .headers()
13469 .get("content-type")
13470 .and_then(|v| v.to_str().ok())
13471 .unwrap_or("application/octet-stream");
13472 let content_type = super::ContentType::from(content_type);
13473
13474 if !status.is_client_error() && !status.is_server_error() {
13475 let content = resp.text().await?;
13476 match content_type {
13477 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
13478 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yServicesMetadataOut`"))),
13479 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::O11yPeriodO11yServicesMetadataOut`")))),
13480 }
13481 } else {
13482 let content = resp.text().await?;
13483 let entity: Option<ListServicesMetadataError> = serde_json::from_str(&content).ok();
13484 Err(Error::ResponseError(ResponseContent { status, content, entity }))
13485 }
13486}
13487
13488pub async fn list_span_mapper_groups(configuration: &configuration::Configuration, enabled: Option<bool>) -> Result<models::O11yPeriodO11ySpanMapperGroupsOut, Error<ListSpanMapperGroupsError>> {
13490 let p_enabled = enabled;
13492
13493 let uri_str = format!("{}/v1/o11y/span_mapper_groups", configuration.base_path);
13494 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
13495
13496 if let Some(ref param_value) = p_enabled {
13497 req_builder = req_builder.query(&[("enabled", ¶m_value.to_string())]);
13498 }
13499 if let Some(ref user_agent) = configuration.user_agent {
13500 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
13501 }
13502 if let Some(ref token) = configuration.bearer_access_token {
13503 req_builder = req_builder.bearer_auth(token.to_owned());
13504 };
13505
13506 let req = req_builder.build()?;
13507 let resp = configuration.client.execute(req).await?;
13508
13509 let status = resp.status();
13510 let content_type = resp
13511 .headers()
13512 .get("content-type")
13513 .and_then(|v| v.to_str().ok())
13514 .unwrap_or("application/octet-stream");
13515 let content_type = super::ContentType::from(content_type);
13516
13517 if !status.is_client_error() && !status.is_server_error() {
13518 let content = resp.text().await?;
13519 match content_type {
13520 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
13521 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11ySpanMapperGroupsOut`"))),
13522 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::O11yPeriodO11ySpanMapperGroupsOut`")))),
13523 }
13524 } else {
13525 let content = resp.text().await?;
13526 let entity: Option<ListSpanMapperGroupsError> = serde_json::from_str(&content).ok();
13527 Err(Error::ResponseError(ResponseContent { status, content, entity }))
13528 }
13529}
13530
13531pub async fn list_span_mappers(configuration: &configuration::Configuration, group_id: &str) -> Result<models::O11yPeriodO11ySpanMappersOut, Error<ListSpanMappersError>> {
13533 let p_group_id = group_id;
13535
13536 let uri_str = format!("{}/v1/o11y/span_mapper_groups/{groupId}/span_mappers", configuration.base_path, groupId=crate::apis::urlencode(p_group_id));
13537 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
13538
13539 if let Some(ref user_agent) = configuration.user_agent {
13540 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
13541 }
13542 if let Some(ref token) = configuration.bearer_access_token {
13543 req_builder = req_builder.bearer_auth(token.to_owned());
13544 };
13545
13546 let req = req_builder.build()?;
13547 let resp = configuration.client.execute(req).await?;
13548
13549 let status = resp.status();
13550 let content_type = resp
13551 .headers()
13552 .get("content-type")
13553 .and_then(|v| v.to_str().ok())
13554 .unwrap_or("application/octet-stream");
13555 let content_type = super::ContentType::from(content_type);
13556
13557 if !status.is_client_error() && !status.is_server_error() {
13558 let content = resp.text().await?;
13559 match content_type {
13560 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
13561 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11ySpanMappersOut`"))),
13562 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::O11yPeriodO11ySpanMappersOut`")))),
13563 }
13564 } else {
13565 let content = resp.text().await?;
13566 let entity: Option<ListSpanMappersError> = serde_json::from_str(&content).ok();
13567 Err(Error::ResponseError(ResponseContent { status, content, entity }))
13568 }
13569}
13570
13571pub async fn list_trace_funnels(configuration: &configuration::Configuration, ) -> Result<models::O11yPeriodO11yFunnelsOut, Error<ListTraceFunnelsError>> {
13573
13574 let uri_str = format!("{}/v1/o11y/trace-funnels/list", configuration.base_path);
13575 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
13576
13577 if let Some(ref user_agent) = configuration.user_agent {
13578 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
13579 }
13580 if let Some(ref token) = configuration.bearer_access_token {
13581 req_builder = req_builder.bearer_auth(token.to_owned());
13582 };
13583
13584 let req = req_builder.build()?;
13585 let resp = configuration.client.execute(req).await?;
13586
13587 let status = resp.status();
13588 let content_type = resp
13589 .headers()
13590 .get("content-type")
13591 .and_then(|v| v.to_str().ok())
13592 .unwrap_or("application/octet-stream");
13593 let content_type = super::ContentType::from(content_type);
13594
13595 if !status.is_client_error() && !status.is_server_error() {
13596 let content = resp.text().await?;
13597 match content_type {
13598 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
13599 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yFunnelsOut`"))),
13600 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::O11yPeriodO11yFunnelsOut`")))),
13601 }
13602 } else {
13603 let content = resp.text().await?;
13604 let entity: Option<ListTraceFunnelsError> = serde_json::from_str(&content).ok();
13605 Err(Error::ResponseError(ResponseContent { status, content, entity }))
13606 }
13607}
13608
13609pub async fn list_user_preferences(configuration: &configuration::Configuration, ) -> Result<models::O11yPeriodO11yPreferencesOut, Error<ListUserPreferencesError>> {
13611
13612 let uri_str = format!("{}/v1/o11y/user/preferences", configuration.base_path);
13613 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
13614
13615 if let Some(ref user_agent) = configuration.user_agent {
13616 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
13617 }
13618 if let Some(ref token) = configuration.bearer_access_token {
13619 req_builder = req_builder.bearer_auth(token.to_owned());
13620 };
13621
13622 let req = req_builder.build()?;
13623 let resp = configuration.client.execute(req).await?;
13624
13625 let status = resp.status();
13626 let content_type = resp
13627 .headers()
13628 .get("content-type")
13629 .and_then(|v| v.to_str().ok())
13630 .unwrap_or("application/octet-stream");
13631 let content_type = super::ContentType::from(content_type);
13632
13633 if !status.is_client_error() && !status.is_server_error() {
13634 let content = resp.text().await?;
13635 match content_type {
13636 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
13637 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yPreferencesOut`"))),
13638 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::O11yPeriodO11yPreferencesOut`")))),
13639 }
13640 } else {
13641 let content = resp.text().await?;
13642 let entity: Option<ListUserPreferencesError> = serde_json::from_str(&content).ok();
13643 Err(Error::ResponseError(ResponseContent { status, content, entity }))
13644 }
13645}
13646
13647pub async fn list_users(configuration: &configuration::Configuration, ) -> Result<models::O11yPeriodO11yUsersOut, Error<ListUsersError>> {
13649
13650 let uri_str = format!("{}/v1/o11y/users", configuration.base_path);
13651 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
13652
13653 if let Some(ref user_agent) = configuration.user_agent {
13654 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
13655 }
13656 if let Some(ref token) = configuration.bearer_access_token {
13657 req_builder = req_builder.bearer_auth(token.to_owned());
13658 };
13659
13660 let req = req_builder.build()?;
13661 let resp = configuration.client.execute(req).await?;
13662
13663 let status = resp.status();
13664 let content_type = resp
13665 .headers()
13666 .get("content-type")
13667 .and_then(|v| v.to_str().ok())
13668 .unwrap_or("application/octet-stream");
13669 let content_type = super::ContentType::from(content_type);
13670
13671 if !status.is_client_error() && !status.is_server_error() {
13672 let content = resp.text().await?;
13673 match content_type {
13674 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
13675 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yUsersOut`"))),
13676 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::O11yPeriodO11yUsersOut`")))),
13677 }
13678 } else {
13679 let content = resp.text().await?;
13680 let entity: Option<ListUsersError> = serde_json::from_str(&content).ok();
13681 Err(Error::ResponseError(ResponseContent { status, content, entity }))
13682 }
13683}
13684
13685pub async fn list_users_deprecated(configuration: &configuration::Configuration, ) -> Result<models::O11yPeriodO11yDeprecatedUsersOut, Error<ListUsersDeprecatedError>> {
13687
13688 let uri_str = format!("{}/v1/o11y/user", configuration.base_path);
13689 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
13690
13691 if let Some(ref user_agent) = configuration.user_agent {
13692 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
13693 }
13694 if let Some(ref token) = configuration.bearer_access_token {
13695 req_builder = req_builder.bearer_auth(token.to_owned());
13696 };
13697
13698 let req = req_builder.build()?;
13699 let resp = configuration.client.execute(req).await?;
13700
13701 let status = resp.status();
13702 let content_type = resp
13703 .headers()
13704 .get("content-type")
13705 .and_then(|v| v.to_str().ok())
13706 .unwrap_or("application/octet-stream");
13707 let content_type = super::ContentType::from(content_type);
13708
13709 if !status.is_client_error() && !status.is_server_error() {
13710 let content = resp.text().await?;
13711 match content_type {
13712 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
13713 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yDeprecatedUsersOut`"))),
13714 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::O11yPeriodO11yDeprecatedUsersOut`")))),
13715 }
13716 } else {
13717 let content = resp.text().await?;
13718 let entity: Option<ListUsersDeprecatedError> = serde_json::from_str(&content).ok();
13719 Err(Error::ResponseError(ResponseContent { status, content, entity }))
13720 }
13721}
13722
13723pub async fn lock_dashboard_v2(configuration: &configuration::Configuration, id: &str) -> Result<(), Error<LockDashboardV2Error>> {
13725 let p_id = id;
13727
13728 let uri_str = format!("{}/v1/o11y/dashboards/{id}/lock", configuration.base_path, id=crate::apis::urlencode(p_id));
13729 let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str);
13730
13731 if let Some(ref user_agent) = configuration.user_agent {
13732 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
13733 }
13734 if let Some(ref token) = configuration.bearer_access_token {
13735 req_builder = req_builder.bearer_auth(token.to_owned());
13736 };
13737
13738 let req = req_builder.build()?;
13739 let resp = configuration.client.execute(req).await?;
13740
13741 let status = resp.status();
13742
13743 if !status.is_client_error() && !status.is_server_error() {
13744 Ok(())
13745 } else {
13746 let content = resp.text().await?;
13747 let entity: Option<LockDashboardV2Error> = serde_json::from_str(&content).ok();
13748 Err(Error::ResponseError(ResponseContent { status, content, entity }))
13749 }
13750}
13751
13752pub async fn patch_dashboard_v2(configuration: &configuration::Configuration, id: &str, o11y_period_o11y_dashboard_patch_in: models::O11yPeriodO11yDashboardPatchIn) -> Result<models::O11yPeriodO11yDashboardOut, Error<PatchDashboardV2Error>> {
13754 let p_id = id;
13756 let p_o11y_period_o11y_dashboard_patch_in = o11y_period_o11y_dashboard_patch_in;
13757
13758 let uri_str = format!("{}/v1/o11y/dashboards/{id}", configuration.base_path, id=crate::apis::urlencode(p_id));
13759 let mut req_builder = configuration.client.request(reqwest::Method::PATCH, &uri_str);
13760
13761 if let Some(ref user_agent) = configuration.user_agent {
13762 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
13763 }
13764 if let Some(ref token) = configuration.bearer_access_token {
13765 req_builder = req_builder.bearer_auth(token.to_owned());
13766 };
13767 req_builder = req_builder.json(&p_o11y_period_o11y_dashboard_patch_in);
13768
13769 let req = req_builder.build()?;
13770 let resp = configuration.client.execute(req).await?;
13771
13772 let status = resp.status();
13773 let content_type = resp
13774 .headers()
13775 .get("content-type")
13776 .and_then(|v| v.to_str().ok())
13777 .unwrap_or("application/octet-stream");
13778 let content_type = super::ContentType::from(content_type);
13779
13780 if !status.is_client_error() && !status.is_server_error() {
13781 let content = resp.text().await?;
13782 match content_type {
13783 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
13784 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yDashboardOut`"))),
13785 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::O11yPeriodO11yDashboardOut`")))),
13786 }
13787 } else {
13788 let content = resp.text().await?;
13789 let entity: Option<PatchDashboardV2Error> = serde_json::from_str(&content).ok();
13790 Err(Error::ResponseError(ResponseContent { status, content, entity }))
13791 }
13792}
13793
13794pub async fn patch_o11y_reviews_by_id(configuration: &configuration::Configuration, id: &str, o11y_period_update_queue_in: models::O11yPeriodUpdateQueueIn) -> Result<models::O11yPeriodAnnQueueView, Error<PatchO11yReviewsByIdError>> {
13796 let p_id = id;
13798 let p_o11y_period_update_queue_in = o11y_period_update_queue_in;
13799
13800 let uri_str = format!("{}/v1/o11y/reviews/{id}", configuration.base_path, id=crate::apis::urlencode(p_id));
13801 let mut req_builder = configuration.client.request(reqwest::Method::PATCH, &uri_str);
13802
13803 if let Some(ref user_agent) = configuration.user_agent {
13804 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
13805 }
13806 if let Some(ref token) = configuration.bearer_access_token {
13807 req_builder = req_builder.bearer_auth(token.to_owned());
13808 };
13809 req_builder = req_builder.json(&p_o11y_period_update_queue_in);
13810
13811 let req = req_builder.build()?;
13812 let resp = configuration.client.execute(req).await?;
13813
13814 let status = resp.status();
13815 let content_type = resp
13816 .headers()
13817 .get("content-type")
13818 .and_then(|v| v.to_str().ok())
13819 .unwrap_or("application/octet-stream");
13820 let content_type = super::ContentType::from(content_type);
13821
13822 if !status.is_client_error() && !status.is_server_error() {
13823 let content = resp.text().await?;
13824 match content_type {
13825 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
13826 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodAnnQueueView`"))),
13827 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::O11yPeriodAnnQueueView`")))),
13828 }
13829 } else {
13830 let content = resp.text().await?;
13831 let entity: Option<PatchO11yReviewsByIdError> = serde_json::from_str(&content).ok();
13832 Err(Error::ResponseError(ResponseContent { status, content, entity }))
13833 }
13834}
13835
13836pub async fn patch_o11y_reviews_by_id_items_by_itemid(configuration: &configuration::Configuration, id: &str, item_id: &str, o11y_period_update_item_in: models::O11yPeriodUpdateItemIn) -> Result<models::O11yPeriodAnnItemView, Error<PatchO11yReviewsByIdItemsByItemidError>> {
13838 let p_id = id;
13840 let p_item_id = item_id;
13841 let p_o11y_period_update_item_in = o11y_period_update_item_in;
13842
13843 let uri_str = format!("{}/v1/o11y/reviews/{id}/items/{itemId}", configuration.base_path, id=crate::apis::urlencode(p_id), itemId=crate::apis::urlencode(p_item_id));
13844 let mut req_builder = configuration.client.request(reqwest::Method::PATCH, &uri_str);
13845
13846 if let Some(ref user_agent) = configuration.user_agent {
13847 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
13848 }
13849 if let Some(ref token) = configuration.bearer_access_token {
13850 req_builder = req_builder.bearer_auth(token.to_owned());
13851 };
13852 req_builder = req_builder.json(&p_o11y_period_update_item_in);
13853
13854 let req = req_builder.build()?;
13855 let resp = configuration.client.execute(req).await?;
13856
13857 let status = resp.status();
13858 let content_type = resp
13859 .headers()
13860 .get("content-type")
13861 .and_then(|v| v.to_str().ok())
13862 .unwrap_or("application/octet-stream");
13863 let content_type = super::ContentType::from(content_type);
13864
13865 if !status.is_client_error() && !status.is_server_error() {
13866 let content = resp.text().await?;
13867 match content_type {
13868 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
13869 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodAnnItemView`"))),
13870 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::O11yPeriodAnnItemView`")))),
13871 }
13872 } else {
13873 let content = resp.text().await?;
13874 let entity: Option<PatchO11yReviewsByIdItemsByItemidError> = serde_json::from_str(&content).ok();
13875 Err(Error::ResponseError(ResponseContent { status, content, entity }))
13876 }
13877}
13878
13879pub async fn patch_rule_by_id(configuration: &configuration::Configuration, id: &str, body: Option<serde_json::Value>) -> Result<models::O11yPeriodO11yRuleOut, Error<PatchRuleByIdError>> {
13881 let p_id = id;
13883 let p_body = body;
13884
13885 let uri_str = format!("{}/v1/o11y/rules/{id}", configuration.base_path, id=crate::apis::urlencode(p_id));
13886 let mut req_builder = configuration.client.request(reqwest::Method::PATCH, &uri_str);
13887
13888 if let Some(ref user_agent) = configuration.user_agent {
13889 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
13890 }
13891 if let Some(ref token) = configuration.bearer_access_token {
13892 req_builder = req_builder.bearer_auth(token.to_owned());
13893 };
13894 req_builder = req_builder.json(&p_body);
13895
13896 let req = req_builder.build()?;
13897 let resp = configuration.client.execute(req).await?;
13898
13899 let status = resp.status();
13900 let content_type = resp
13901 .headers()
13902 .get("content-type")
13903 .and_then(|v| v.to_str().ok())
13904 .unwrap_or("application/octet-stream");
13905 let content_type = super::ContentType::from(content_type);
13906
13907 if !status.is_client_error() && !status.is_server_error() {
13908 let content = resp.text().await?;
13909 match content_type {
13910 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
13911 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yRuleOut`"))),
13912 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::O11yPeriodO11yRuleOut`")))),
13913 }
13914 } else {
13915 let content = resp.text().await?;
13916 let entity: Option<PatchRuleByIdError> = serde_json::from_str(&content).ok();
13917 Err(Error::ResponseError(ResponseContent { status, content, entity }))
13918 }
13919}
13920
13921pub async fn pin_dashboard_v2(configuration: &configuration::Configuration, id: &str) -> Result<(), Error<PinDashboardV2Error>> {
13923 let p_id = id;
13925
13926 let uri_str = format!("{}/v1/o11y/users/me/dashboards/{id}/pins", configuration.base_path, id=crate::apis::urlencode(p_id));
13927 let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str);
13928
13929 if let Some(ref user_agent) = configuration.user_agent {
13930 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
13931 }
13932 if let Some(ref token) = configuration.bearer_access_token {
13933 req_builder = req_builder.bearer_auth(token.to_owned());
13934 };
13935
13936 let req = req_builder.build()?;
13937 let resp = configuration.client.execute(req).await?;
13938
13939 let status = resp.status();
13940
13941 if !status.is_client_error() && !status.is_server_error() {
13942 Ok(())
13943 } else {
13944 let content = resp.text().await?;
13945 let entity: Option<PinDashboardV2Error> = serde_json::from_str(&content).ok();
13946 Err(Error::ResponseError(ResponseContent { status, content, entity }))
13947 }
13948}
13949
13950pub async fn post_o11y_alerts_by_receiver(configuration: &configuration::Configuration, receiver: &str) -> Result<(), Error<PostO11yAlertsByReceiverError>> {
13952 let p_receiver = receiver;
13954
13955 let uri_str = format!("{}/v1/o11y/alerts/{receiver}", configuration.base_path, receiver=crate::apis::urlencode(p_receiver));
13956 let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
13957
13958 if let Some(ref user_agent) = configuration.user_agent {
13959 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
13960 }
13961 if let Some(ref token) = configuration.bearer_access_token {
13962 req_builder = req_builder.bearer_auth(token.to_owned());
13963 };
13964
13965 let req = req_builder.build()?;
13966 let resp = configuration.client.execute(req).await?;
13967
13968 let status = resp.status();
13969
13970 if !status.is_client_error() && !status.is_server_error() {
13971 Ok(())
13972 } else {
13973 let content = resp.text().await?;
13974 let entity: Option<PostO11yAlertsByReceiverError> = serde_json::from_str(&content).ok();
13975 Err(Error::ResponseError(ResponseContent { status, content, entity }))
13976 }
13977}
13978
13979pub async fn post_o11y_api_by_project_id_envelope(configuration: &configuration::Configuration, project_id: &str) -> Result<(), Error<PostO11yApiByProjectIdEnvelopeError>> {
13981 let p_project_id = project_id;
13983
13984 let uri_str = format!("{}/v1/o11y/api/{project_id}/envelope/", configuration.base_path, project_id=crate::apis::urlencode(p_project_id));
13985 let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
13986
13987 if let Some(ref user_agent) = configuration.user_agent {
13988 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
13989 }
13990 if let Some(ref token) = configuration.bearer_access_token {
13991 req_builder = req_builder.bearer_auth(token.to_owned());
13992 };
13993
13994 let req = req_builder.build()?;
13995 let resp = configuration.client.execute(req).await?;
13996
13997 let status = resp.status();
13998
13999 if !status.is_client_error() && !status.is_server_error() {
14000 Ok(())
14001 } else {
14002 let content = resp.text().await?;
14003 let entity: Option<PostO11yApiByProjectIdEnvelopeError> = serde_json::from_str(&content).ok();
14004 Err(Error::ResponseError(ResponseContent { status, content, entity }))
14005 }
14006}
14007
14008pub async fn post_o11y_api_by_project_id_store(configuration: &configuration::Configuration, project_id: &str) -> Result<(), Error<PostO11yApiByProjectIdStoreError>> {
14010 let p_project_id = project_id;
14012
14013 let uri_str = format!("{}/v1/o11y/api/{project_id}/store/", configuration.base_path, project_id=crate::apis::urlencode(p_project_id));
14014 let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
14015
14016 if let Some(ref user_agent) = configuration.user_agent {
14017 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
14018 }
14019 if let Some(ref token) = configuration.bearer_access_token {
14020 req_builder = req_builder.bearer_auth(token.to_owned());
14021 };
14022
14023 let req = req_builder.build()?;
14024 let resp = configuration.client.execute(req).await?;
14025
14026 let status = resp.status();
14027
14028 if !status.is_client_error() && !status.is_server_error() {
14029 Ok(())
14030 } else {
14031 let content = resp.text().await?;
14032 let entity: Option<PostO11yApiByProjectIdStoreError> = serde_json::from_str(&content).ok();
14033 Err(Error::ResponseError(ResponseContent { status, content, entity }))
14034 }
14035}
14036
14037pub async fn post_o11y_auto_complete_attribute_values(configuration: &configuration::Configuration, o11y_period_filter_attribute_value_request: models::O11yPeriodFilterAttributeValueRequest) -> Result<models::O11yPeriodO11yAttributeValuesOut, Error<PostO11yAutoCompleteAttributeValuesError>> {
14039 let p_o11y_period_filter_attribute_value_request = o11y_period_filter_attribute_value_request;
14041
14042 let uri_str = format!("{}/v1/o11y/auto_complete/attribute_values", configuration.base_path);
14043 let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
14044
14045 if let Some(ref user_agent) = configuration.user_agent {
14046 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
14047 }
14048 if let Some(ref token) = configuration.bearer_access_token {
14049 req_builder = req_builder.bearer_auth(token.to_owned());
14050 };
14051 req_builder = req_builder.json(&p_o11y_period_filter_attribute_value_request);
14052
14053 let req = req_builder.build()?;
14054 let resp = configuration.client.execute(req).await?;
14055
14056 let status = resp.status();
14057 let content_type = resp
14058 .headers()
14059 .get("content-type")
14060 .and_then(|v| v.to_str().ok())
14061 .unwrap_or("application/octet-stream");
14062 let content_type = super::ContentType::from(content_type);
14063
14064 if !status.is_client_error() && !status.is_server_error() {
14065 let content = resp.text().await?;
14066 match content_type {
14067 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
14068 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yAttributeValuesOut`"))),
14069 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::O11yPeriodO11yAttributeValuesOut`")))),
14070 }
14071 } else {
14072 let content = resp.text().await?;
14073 let entity: Option<PostO11yAutoCompleteAttributeValuesError> = serde_json::from_str(&content).ok();
14074 Err(Error::ResponseError(ResponseContent { status, content, entity }))
14075 }
14076}
14077
14078pub async fn post_o11y_clusters_list(configuration: &configuration::Configuration, o11y_period_cluster_list_request: models::O11yPeriodClusterListRequest) -> Result<models::O11yPeriodO11yClusterListOut, Error<PostO11yClustersListError>> {
14080 let p_o11y_period_cluster_list_request = o11y_period_cluster_list_request;
14082
14083 let uri_str = format!("{}/v1/o11y/clusters/list", configuration.base_path);
14084 let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
14085
14086 if let Some(ref user_agent) = configuration.user_agent {
14087 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
14088 }
14089 if let Some(ref token) = configuration.bearer_access_token {
14090 req_builder = req_builder.bearer_auth(token.to_owned());
14091 };
14092 req_builder = req_builder.json(&p_o11y_period_cluster_list_request);
14093
14094 let req = req_builder.build()?;
14095 let resp = configuration.client.execute(req).await?;
14096
14097 let status = resp.status();
14098 let content_type = resp
14099 .headers()
14100 .get("content-type")
14101 .and_then(|v| v.to_str().ok())
14102 .unwrap_or("application/octet-stream");
14103 let content_type = super::ContentType::from(content_type);
14104
14105 if !status.is_client_error() && !status.is_server_error() {
14106 let content = resp.text().await?;
14107 match content_type {
14108 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
14109 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yClusterListOut`"))),
14110 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::O11yPeriodO11yClusterListOut`")))),
14111 }
14112 } else {
14113 let content = resp.text().await?;
14114 let entity: Option<PostO11yClustersListError> = serde_json::from_str(&content).ok();
14115 Err(Error::ResponseError(ResponseContent { status, content, entity }))
14116 }
14117}
14118
14119pub async fn post_o11y_complete_saml(configuration: &configuration::Configuration, ) -> Result<(), Error<PostO11yCompleteSamlError>> {
14121
14122 let uri_str = format!("{}/v1/o11y/complete/saml", configuration.base_path);
14123 let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
14124
14125 if let Some(ref user_agent) = configuration.user_agent {
14126 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
14127 }
14128 if let Some(ref token) = configuration.bearer_access_token {
14129 req_builder = req_builder.bearer_auth(token.to_owned());
14130 };
14131
14132 let req = req_builder.build()?;
14133 let resp = configuration.client.execute(req).await?;
14134
14135 let status = resp.status();
14136
14137 if !status.is_client_error() && !status.is_server_error() {
14138 Ok(())
14139 } else {
14140 let content = resp.text().await?;
14141 let entity: Option<PostO11yCompleteSamlError> = serde_json::from_str(&content).ok();
14142 Err(Error::ResponseError(ResponseContent { status, content, entity }))
14143 }
14144}
14145
14146pub async fn post_o11y_counterrors(configuration: &configuration::Configuration, o11y_period_o11y_errors_count_in: models::O11yPeriodO11yErrorsCountIn) -> Result<i32, Error<PostO11yCounterrorsError>> {
14148 let p_o11y_period_o11y_errors_count_in = o11y_period_o11y_errors_count_in;
14150
14151 let uri_str = format!("{}/v1/o11y/countErrors", configuration.base_path);
14152 let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
14153
14154 if let Some(ref user_agent) = configuration.user_agent {
14155 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
14156 }
14157 if let Some(ref token) = configuration.bearer_access_token {
14158 req_builder = req_builder.bearer_auth(token.to_owned());
14159 };
14160 req_builder = req_builder.json(&p_o11y_period_o11y_errors_count_in);
14161
14162 let req = req_builder.build()?;
14163 let resp = configuration.client.execute(req).await?;
14164
14165 let status = resp.status();
14166 let content_type = resp
14167 .headers()
14168 .get("content-type")
14169 .and_then(|v| v.to_str().ok())
14170 .unwrap_or("application/octet-stream");
14171 let content_type = super::ContentType::from(content_type);
14172
14173 if !status.is_client_error() && !status.is_server_error() {
14174 let content = resp.text().await?;
14175 match content_type {
14176 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
14177 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `i32`"))),
14178 ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `i32`")))),
14179 }
14180 } else {
14181 let content = resp.text().await?;
14182 let entity: Option<PostO11yCounterrorsError> = serde_json::from_str(&content).ok();
14183 Err(Error::ResponseError(ResponseContent { status, content, entity }))
14184 }
14185}
14186
14187pub async fn post_o11y_daemonsets_list(configuration: &configuration::Configuration, o11y_period_daemon_set_list_request: models::O11yPeriodDaemonSetListRequest) -> Result<models::O11yPeriodO11yDaemonSetListOut, Error<PostO11yDaemonsetsListError>> {
14189 let p_o11y_period_daemon_set_list_request = o11y_period_daemon_set_list_request;
14191
14192 let uri_str = format!("{}/v1/o11y/daemonsets/list", configuration.base_path);
14193 let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
14194
14195 if let Some(ref user_agent) = configuration.user_agent {
14196 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
14197 }
14198 if let Some(ref token) = configuration.bearer_access_token {
14199 req_builder = req_builder.bearer_auth(token.to_owned());
14200 };
14201 req_builder = req_builder.json(&p_o11y_period_daemon_set_list_request);
14202
14203 let req = req_builder.build()?;
14204 let resp = configuration.client.execute(req).await?;
14205
14206 let status = resp.status();
14207 let content_type = resp
14208 .headers()
14209 .get("content-type")
14210 .and_then(|v| v.to_str().ok())
14211 .unwrap_or("application/octet-stream");
14212 let content_type = super::ContentType::from(content_type);
14213
14214 if !status.is_client_error() && !status.is_server_error() {
14215 let content = resp.text().await?;
14216 match content_type {
14217 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
14218 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yDaemonSetListOut`"))),
14219 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::O11yPeriodO11yDaemonSetListOut`")))),
14220 }
14221 } else {
14222 let content = resp.text().await?;
14223 let entity: Option<PostO11yDaemonsetsListError> = serde_json::from_str(&content).ok();
14224 Err(Error::ResponseError(ResponseContent { status, content, entity }))
14225 }
14226}
14227
14228pub async fn post_o11y_dependency_graph(configuration: &configuration::Configuration, o11y_period_o11y_dependency_graph_in: models::O11yPeriodO11yDependencyGraphIn) -> Result<Vec<models::O11yPeriodO11yDependency>, Error<PostO11yDependencyGraphError>> {
14230 let p_o11y_period_o11y_dependency_graph_in = o11y_period_o11y_dependency_graph_in;
14232
14233 let uri_str = format!("{}/v1/o11y/dependency_graph", configuration.base_path);
14234 let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
14235
14236 if let Some(ref user_agent) = configuration.user_agent {
14237 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
14238 }
14239 if let Some(ref token) = configuration.bearer_access_token {
14240 req_builder = req_builder.bearer_auth(token.to_owned());
14241 };
14242 req_builder = req_builder.json(&p_o11y_period_o11y_dependency_graph_in);
14243
14244 let req = req_builder.build()?;
14245 let resp = configuration.client.execute(req).await?;
14246
14247 let status = resp.status();
14248 let content_type = resp
14249 .headers()
14250 .get("content-type")
14251 .and_then(|v| v.to_str().ok())
14252 .unwrap_or("application/octet-stream");
14253 let content_type = super::ContentType::from(content_type);
14254
14255 if !status.is_client_error() && !status.is_server_error() {
14256 let content = resp.text().await?;
14257 match content_type {
14258 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
14259 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::O11yPeriodO11yDependency>`"))),
14260 ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<models::O11yPeriodO11yDependency>`")))),
14261 }
14262 } else {
14263 let content = resp.text().await?;
14264 let entity: Option<PostO11yDependencyGraphError> = serde_json::from_str(&content).ok();
14265 Err(Error::ResponseError(ResponseContent { status, content, entity }))
14266 }
14267}
14268
14269pub async fn post_o11y_deployments_list(configuration: &configuration::Configuration, o11y_period_deployment_list_request: models::O11yPeriodDeploymentListRequest) -> Result<models::O11yPeriodO11yDeploymentListOut, Error<PostO11yDeploymentsListError>> {
14271 let p_o11y_period_deployment_list_request = o11y_period_deployment_list_request;
14273
14274 let uri_str = format!("{}/v1/o11y/deployments/list", configuration.base_path);
14275 let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
14276
14277 if let Some(ref user_agent) = configuration.user_agent {
14278 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
14279 }
14280 if let Some(ref token) = configuration.bearer_access_token {
14281 req_builder = req_builder.bearer_auth(token.to_owned());
14282 };
14283 req_builder = req_builder.json(&p_o11y_period_deployment_list_request);
14284
14285 let req = req_builder.build()?;
14286 let resp = configuration.client.execute(req).await?;
14287
14288 let status = resp.status();
14289 let content_type = resp
14290 .headers()
14291 .get("content-type")
14292 .and_then(|v| v.to_str().ok())
14293 .unwrap_or("application/octet-stream");
14294 let content_type = super::ContentType::from(content_type);
14295
14296 if !status.is_client_error() && !status.is_server_error() {
14297 let content = resp.text().await?;
14298 match content_type {
14299 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
14300 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yDeploymentListOut`"))),
14301 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::O11yPeriodO11yDeploymentListOut`")))),
14302 }
14303 } else {
14304 let content = resp.text().await?;
14305 let entity: Option<PostO11yDeploymentsListError> = serde_json::from_str(&content).ok();
14306 Err(Error::ResponseError(ResponseContent { status, content, entity }))
14307 }
14308}
14309
14310pub async fn post_o11y_errortracking_issues_by_id(configuration: &configuration::Configuration, id: &str, o11y_period_o11y_error_update_issue_in: models::O11yPeriodO11yErrorUpdateIssueIn) -> Result<models::O11yPeriodO11yErrorIssueOut, Error<PostO11yErrortrackingIssuesByIdError>> {
14312 let p_id = id;
14314 let p_o11y_period_o11y_error_update_issue_in = o11y_period_o11y_error_update_issue_in;
14315
14316 let uri_str = format!("{}/v1/o11y/errortracking/issues/{id}", configuration.base_path, id=crate::apis::urlencode(p_id));
14317 let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
14318
14319 if let Some(ref user_agent) = configuration.user_agent {
14320 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
14321 }
14322 if let Some(ref token) = configuration.bearer_access_token {
14323 req_builder = req_builder.bearer_auth(token.to_owned());
14324 };
14325 req_builder = req_builder.json(&p_o11y_period_o11y_error_update_issue_in);
14326
14327 let req = req_builder.build()?;
14328 let resp = configuration.client.execute(req).await?;
14329
14330 let status = resp.status();
14331 let content_type = resp
14332 .headers()
14333 .get("content-type")
14334 .and_then(|v| v.to_str().ok())
14335 .unwrap_or("application/octet-stream");
14336 let content_type = super::ContentType::from(content_type);
14337
14338 if !status.is_client_error() && !status.is_server_error() {
14339 let content = resp.text().await?;
14340 match content_type {
14341 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
14342 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yErrorIssueOut`"))),
14343 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::O11yPeriodO11yErrorIssueOut`")))),
14344 }
14345 } else {
14346 let content = resp.text().await?;
14347 let entity: Option<PostO11yErrortrackingIssuesByIdError> = serde_json::from_str(&content).ok();
14348 Err(Error::ResponseError(ResponseContent { status, content, entity }))
14349 }
14350}
14351
14352pub async fn post_o11y_event(configuration: &configuration::Configuration, o11y_period_o11y_event_in: models::O11yPeriodO11yEventIn) -> Result<models::O11yPeriodO11yMessage, Error<PostO11yEventError>> {
14354 let p_o11y_period_o11y_event_in = o11y_period_o11y_event_in;
14356
14357 let uri_str = format!("{}/v1/o11y/event", configuration.base_path);
14358 let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
14359
14360 if let Some(ref user_agent) = configuration.user_agent {
14361 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
14362 }
14363 if let Some(ref token) = configuration.bearer_access_token {
14364 req_builder = req_builder.bearer_auth(token.to_owned());
14365 };
14366 req_builder = req_builder.json(&p_o11y_period_o11y_event_in);
14367
14368 let req = req_builder.build()?;
14369 let resp = configuration.client.execute(req).await?;
14370
14371 let status = resp.status();
14372 let content_type = resp
14373 .headers()
14374 .get("content-type")
14375 .and_then(|v| v.to_str().ok())
14376 .unwrap_or("application/octet-stream");
14377 let content_type = super::ContentType::from(content_type);
14378
14379 if !status.is_client_error() && !status.is_server_error() {
14380 let content = resp.text().await?;
14381 match content_type {
14382 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
14383 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yMessage`"))),
14384 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::O11yPeriodO11yMessage`")))),
14385 }
14386 } else {
14387 let content = resp.text().await?;
14388 let entity: Option<PostO11yEventError> = serde_json::from_str(&content).ok();
14389 Err(Error::ResponseError(ResponseContent { status, content, entity }))
14390 }
14391}
14392
14393pub async fn post_o11y_explorer_views(configuration: &configuration::Configuration, o11y_period_saved_view: models::O11yPeriodSavedView) -> Result<models::O11yPeriodO11ySavedViewCreateOut, Error<PostO11yExplorerViewsError>> {
14395 let p_o11y_period_saved_view = o11y_period_saved_view;
14397
14398 let uri_str = format!("{}/v1/o11y/explorer/views", configuration.base_path);
14399 let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
14400
14401 if let Some(ref user_agent) = configuration.user_agent {
14402 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
14403 }
14404 if let Some(ref token) = configuration.bearer_access_token {
14405 req_builder = req_builder.bearer_auth(token.to_owned());
14406 };
14407 req_builder = req_builder.json(&p_o11y_period_saved_view);
14408
14409 let req = req_builder.build()?;
14410 let resp = configuration.client.execute(req).await?;
14411
14412 let status = resp.status();
14413 let content_type = resp
14414 .headers()
14415 .get("content-type")
14416 .and_then(|v| v.to_str().ok())
14417 .unwrap_or("application/octet-stream");
14418 let content_type = super::ContentType::from(content_type);
14419
14420 if !status.is_client_error() && !status.is_server_error() {
14421 let content = resp.text().await?;
14422 match content_type {
14423 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
14424 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11ySavedViewCreateOut`"))),
14425 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::O11yPeriodO11ySavedViewCreateOut`")))),
14426 }
14427 } else {
14428 let content = resp.text().await?;
14429 let entity: Option<PostO11yExplorerViewsError> = serde_json::from_str(&content).ok();
14430 Err(Error::ResponseError(ResponseContent { status, content, entity }))
14431 }
14432}
14433
14434pub async fn post_o11y_export_raw_data(configuration: &configuration::Configuration, ) -> Result<(), Error<PostO11yExportRawDataError>> {
14436
14437 let uri_str = format!("{}/v1/o11y/export_raw_data", configuration.base_path);
14438 let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
14439
14440 if let Some(ref user_agent) = configuration.user_agent {
14441 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
14442 }
14443 if let Some(ref token) = configuration.bearer_access_token {
14444 req_builder = req_builder.bearer_auth(token.to_owned());
14445 };
14446
14447 let req = req_builder.build()?;
14448 let resp = configuration.client.execute(req).await?;
14449
14450 let status = resp.status();
14451
14452 if !status.is_client_error() && !status.is_server_error() {
14453 Ok(())
14454 } else {
14455 let content = resp.text().await?;
14456 let entity: Option<PostO11yExportRawDataError> = serde_json::from_str(&content).ok();
14457 Err(Error::ResponseError(ResponseContent { status, content, entity }))
14458 }
14459}
14460
14461pub async fn post_o11y_hosts_list(configuration: &configuration::Configuration, o11y_period_host_list_request: models::O11yPeriodHostListRequest) -> Result<models::O11yPeriodO11yHostListOut, Error<PostO11yHostsListError>> {
14463 let p_o11y_period_host_list_request = o11y_period_host_list_request;
14465
14466 let uri_str = format!("{}/v1/o11y/hosts/list", configuration.base_path);
14467 let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
14468
14469 if let Some(ref user_agent) = configuration.user_agent {
14470 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
14471 }
14472 if let Some(ref token) = configuration.bearer_access_token {
14473 req_builder = req_builder.bearer_auth(token.to_owned());
14474 };
14475 req_builder = req_builder.json(&p_o11y_period_host_list_request);
14476
14477 let req = req_builder.build()?;
14478 let resp = configuration.client.execute(req).await?;
14479
14480 let status = resp.status();
14481 let content_type = resp
14482 .headers()
14483 .get("content-type")
14484 .and_then(|v| v.to_str().ok())
14485 .unwrap_or("application/octet-stream");
14486 let content_type = super::ContentType::from(content_type);
14487
14488 if !status.is_client_error() && !status.is_server_error() {
14489 let content = resp.text().await?;
14490 match content_type {
14491 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
14492 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yHostListOut`"))),
14493 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::O11yPeriodO11yHostListOut`")))),
14494 }
14495 } else {
14496 let content = resp.text().await?;
14497 let entity: Option<PostO11yHostsListError> = serde_json::from_str(&content).ok();
14498 Err(Error::ResponseError(ResponseContent { status, content, entity }))
14499 }
14500}
14501
14502pub async fn post_o11y_infra_monitoring_clusters(configuration: &configuration::Configuration, o11y_period_postable_clusters: models::O11yPeriodPostableClusters) -> Result<models::O11yPeriodO11yInfraClustersOut, Error<PostO11yInfraMonitoringClustersError>> {
14504 let p_o11y_period_postable_clusters = o11y_period_postable_clusters;
14506
14507 let uri_str = format!("{}/v1/o11y/infra_monitoring/clusters", configuration.base_path);
14508 let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
14509
14510 if let Some(ref user_agent) = configuration.user_agent {
14511 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
14512 }
14513 if let Some(ref token) = configuration.bearer_access_token {
14514 req_builder = req_builder.bearer_auth(token.to_owned());
14515 };
14516 req_builder = req_builder.json(&p_o11y_period_postable_clusters);
14517
14518 let req = req_builder.build()?;
14519 let resp = configuration.client.execute(req).await?;
14520
14521 let status = resp.status();
14522 let content_type = resp
14523 .headers()
14524 .get("content-type")
14525 .and_then(|v| v.to_str().ok())
14526 .unwrap_or("application/octet-stream");
14527 let content_type = super::ContentType::from(content_type);
14528
14529 if !status.is_client_error() && !status.is_server_error() {
14530 let content = resp.text().await?;
14531 match content_type {
14532 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
14533 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yInfraClustersOut`"))),
14534 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::O11yPeriodO11yInfraClustersOut`")))),
14535 }
14536 } else {
14537 let content = resp.text().await?;
14538 let entity: Option<PostO11yInfraMonitoringClustersError> = serde_json::from_str(&content).ok();
14539 Err(Error::ResponseError(ResponseContent { status, content, entity }))
14540 }
14541}
14542
14543pub async fn post_o11y_infra_monitoring_daemonsets(configuration: &configuration::Configuration, o11y_period_postable_daemon_sets: models::O11yPeriodPostableDaemonSets) -> Result<models::O11yPeriodO11yInfraDaemonSetsOut, Error<PostO11yInfraMonitoringDaemonsetsError>> {
14545 let p_o11y_period_postable_daemon_sets = o11y_period_postable_daemon_sets;
14547
14548 let uri_str = format!("{}/v1/o11y/infra_monitoring/daemonsets", configuration.base_path);
14549 let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
14550
14551 if let Some(ref user_agent) = configuration.user_agent {
14552 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
14553 }
14554 if let Some(ref token) = configuration.bearer_access_token {
14555 req_builder = req_builder.bearer_auth(token.to_owned());
14556 };
14557 req_builder = req_builder.json(&p_o11y_period_postable_daemon_sets);
14558
14559 let req = req_builder.build()?;
14560 let resp = configuration.client.execute(req).await?;
14561
14562 let status = resp.status();
14563 let content_type = resp
14564 .headers()
14565 .get("content-type")
14566 .and_then(|v| v.to_str().ok())
14567 .unwrap_or("application/octet-stream");
14568 let content_type = super::ContentType::from(content_type);
14569
14570 if !status.is_client_error() && !status.is_server_error() {
14571 let content = resp.text().await?;
14572 match content_type {
14573 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
14574 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yInfraDaemonSetsOut`"))),
14575 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::O11yPeriodO11yInfraDaemonSetsOut`")))),
14576 }
14577 } else {
14578 let content = resp.text().await?;
14579 let entity: Option<PostO11yInfraMonitoringDaemonsetsError> = serde_json::from_str(&content).ok();
14580 Err(Error::ResponseError(ResponseContent { status, content, entity }))
14581 }
14582}
14583
14584pub async fn post_o11y_infra_monitoring_deployments(configuration: &configuration::Configuration, o11y_period_postable_deployments: models::O11yPeriodPostableDeployments) -> Result<models::O11yPeriodO11yInfraDeploymentsOut, Error<PostO11yInfraMonitoringDeploymentsError>> {
14586 let p_o11y_period_postable_deployments = o11y_period_postable_deployments;
14588
14589 let uri_str = format!("{}/v1/o11y/infra_monitoring/deployments", configuration.base_path);
14590 let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
14591
14592 if let Some(ref user_agent) = configuration.user_agent {
14593 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
14594 }
14595 if let Some(ref token) = configuration.bearer_access_token {
14596 req_builder = req_builder.bearer_auth(token.to_owned());
14597 };
14598 req_builder = req_builder.json(&p_o11y_period_postable_deployments);
14599
14600 let req = req_builder.build()?;
14601 let resp = configuration.client.execute(req).await?;
14602
14603 let status = resp.status();
14604 let content_type = resp
14605 .headers()
14606 .get("content-type")
14607 .and_then(|v| v.to_str().ok())
14608 .unwrap_or("application/octet-stream");
14609 let content_type = super::ContentType::from(content_type);
14610
14611 if !status.is_client_error() && !status.is_server_error() {
14612 let content = resp.text().await?;
14613 match content_type {
14614 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
14615 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yInfraDeploymentsOut`"))),
14616 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::O11yPeriodO11yInfraDeploymentsOut`")))),
14617 }
14618 } else {
14619 let content = resp.text().await?;
14620 let entity: Option<PostO11yInfraMonitoringDeploymentsError> = serde_json::from_str(&content).ok();
14621 Err(Error::ResponseError(ResponseContent { status, content, entity }))
14622 }
14623}
14624
14625pub async fn post_o11y_infra_monitoring_hosts(configuration: &configuration::Configuration, o11y_period_postable_hosts: models::O11yPeriodPostableHosts) -> Result<models::O11yPeriodO11yInfraHostsOut, Error<PostO11yInfraMonitoringHostsError>> {
14627 let p_o11y_period_postable_hosts = o11y_period_postable_hosts;
14629
14630 let uri_str = format!("{}/v1/o11y/infra_monitoring/hosts", configuration.base_path);
14631 let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
14632
14633 if let Some(ref user_agent) = configuration.user_agent {
14634 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
14635 }
14636 if let Some(ref token) = configuration.bearer_access_token {
14637 req_builder = req_builder.bearer_auth(token.to_owned());
14638 };
14639 req_builder = req_builder.json(&p_o11y_period_postable_hosts);
14640
14641 let req = req_builder.build()?;
14642 let resp = configuration.client.execute(req).await?;
14643
14644 let status = resp.status();
14645 let content_type = resp
14646 .headers()
14647 .get("content-type")
14648 .and_then(|v| v.to_str().ok())
14649 .unwrap_or("application/octet-stream");
14650 let content_type = super::ContentType::from(content_type);
14651
14652 if !status.is_client_error() && !status.is_server_error() {
14653 let content = resp.text().await?;
14654 match content_type {
14655 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
14656 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yInfraHostsOut`"))),
14657 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::O11yPeriodO11yInfraHostsOut`")))),
14658 }
14659 } else {
14660 let content = resp.text().await?;
14661 let entity: Option<PostO11yInfraMonitoringHostsError> = serde_json::from_str(&content).ok();
14662 Err(Error::ResponseError(ResponseContent { status, content, entity }))
14663 }
14664}
14665
14666pub async fn post_o11y_infra_monitoring_jobs(configuration: &configuration::Configuration, o11y_period_postable_jobs: models::O11yPeriodPostableJobs) -> Result<models::O11yPeriodO11yInfraJobsOut, Error<PostO11yInfraMonitoringJobsError>> {
14668 let p_o11y_period_postable_jobs = o11y_period_postable_jobs;
14670
14671 let uri_str = format!("{}/v1/o11y/infra_monitoring/jobs", configuration.base_path);
14672 let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
14673
14674 if let Some(ref user_agent) = configuration.user_agent {
14675 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
14676 }
14677 if let Some(ref token) = configuration.bearer_access_token {
14678 req_builder = req_builder.bearer_auth(token.to_owned());
14679 };
14680 req_builder = req_builder.json(&p_o11y_period_postable_jobs);
14681
14682 let req = req_builder.build()?;
14683 let resp = configuration.client.execute(req).await?;
14684
14685 let status = resp.status();
14686 let content_type = resp
14687 .headers()
14688 .get("content-type")
14689 .and_then(|v| v.to_str().ok())
14690 .unwrap_or("application/octet-stream");
14691 let content_type = super::ContentType::from(content_type);
14692
14693 if !status.is_client_error() && !status.is_server_error() {
14694 let content = resp.text().await?;
14695 match content_type {
14696 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
14697 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yInfraJobsOut`"))),
14698 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::O11yPeriodO11yInfraJobsOut`")))),
14699 }
14700 } else {
14701 let content = resp.text().await?;
14702 let entity: Option<PostO11yInfraMonitoringJobsError> = serde_json::from_str(&content).ok();
14703 Err(Error::ResponseError(ResponseContent { status, content, entity }))
14704 }
14705}
14706
14707pub async fn post_o11y_infra_monitoring_namespaces(configuration: &configuration::Configuration, o11y_period_postable_namespaces: models::O11yPeriodPostableNamespaces) -> Result<models::O11yPeriodO11yInfraNamespacesOut, Error<PostO11yInfraMonitoringNamespacesError>> {
14709 let p_o11y_period_postable_namespaces = o11y_period_postable_namespaces;
14711
14712 let uri_str = format!("{}/v1/o11y/infra_monitoring/namespaces", configuration.base_path);
14713 let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
14714
14715 if let Some(ref user_agent) = configuration.user_agent {
14716 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
14717 }
14718 if let Some(ref token) = configuration.bearer_access_token {
14719 req_builder = req_builder.bearer_auth(token.to_owned());
14720 };
14721 req_builder = req_builder.json(&p_o11y_period_postable_namespaces);
14722
14723 let req = req_builder.build()?;
14724 let resp = configuration.client.execute(req).await?;
14725
14726 let status = resp.status();
14727 let content_type = resp
14728 .headers()
14729 .get("content-type")
14730 .and_then(|v| v.to_str().ok())
14731 .unwrap_or("application/octet-stream");
14732 let content_type = super::ContentType::from(content_type);
14733
14734 if !status.is_client_error() && !status.is_server_error() {
14735 let content = resp.text().await?;
14736 match content_type {
14737 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
14738 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yInfraNamespacesOut`"))),
14739 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::O11yPeriodO11yInfraNamespacesOut`")))),
14740 }
14741 } else {
14742 let content = resp.text().await?;
14743 let entity: Option<PostO11yInfraMonitoringNamespacesError> = serde_json::from_str(&content).ok();
14744 Err(Error::ResponseError(ResponseContent { status, content, entity }))
14745 }
14746}
14747
14748pub async fn post_o11y_infra_monitoring_nodes(configuration: &configuration::Configuration, o11y_period_postable_nodes: models::O11yPeriodPostableNodes) -> Result<models::O11yPeriodO11yInfraNodesOut, Error<PostO11yInfraMonitoringNodesError>> {
14750 let p_o11y_period_postable_nodes = o11y_period_postable_nodes;
14752
14753 let uri_str = format!("{}/v1/o11y/infra_monitoring/nodes", configuration.base_path);
14754 let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
14755
14756 if let Some(ref user_agent) = configuration.user_agent {
14757 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
14758 }
14759 if let Some(ref token) = configuration.bearer_access_token {
14760 req_builder = req_builder.bearer_auth(token.to_owned());
14761 };
14762 req_builder = req_builder.json(&p_o11y_period_postable_nodes);
14763
14764 let req = req_builder.build()?;
14765 let resp = configuration.client.execute(req).await?;
14766
14767 let status = resp.status();
14768 let content_type = resp
14769 .headers()
14770 .get("content-type")
14771 .and_then(|v| v.to_str().ok())
14772 .unwrap_or("application/octet-stream");
14773 let content_type = super::ContentType::from(content_type);
14774
14775 if !status.is_client_error() && !status.is_server_error() {
14776 let content = resp.text().await?;
14777 match content_type {
14778 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
14779 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yInfraNodesOut`"))),
14780 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::O11yPeriodO11yInfraNodesOut`")))),
14781 }
14782 } else {
14783 let content = resp.text().await?;
14784 let entity: Option<PostO11yInfraMonitoringNodesError> = serde_json::from_str(&content).ok();
14785 Err(Error::ResponseError(ResponseContent { status, content, entity }))
14786 }
14787}
14788
14789pub async fn post_o11y_infra_monitoring_pods(configuration: &configuration::Configuration, o11y_period_postable_pods: models::O11yPeriodPostablePods) -> Result<models::O11yPeriodO11yInfraPodsOut, Error<PostO11yInfraMonitoringPodsError>> {
14791 let p_o11y_period_postable_pods = o11y_period_postable_pods;
14793
14794 let uri_str = format!("{}/v1/o11y/infra_monitoring/pods", configuration.base_path);
14795 let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
14796
14797 if let Some(ref user_agent) = configuration.user_agent {
14798 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
14799 }
14800 if let Some(ref token) = configuration.bearer_access_token {
14801 req_builder = req_builder.bearer_auth(token.to_owned());
14802 };
14803 req_builder = req_builder.json(&p_o11y_period_postable_pods);
14804
14805 let req = req_builder.build()?;
14806 let resp = configuration.client.execute(req).await?;
14807
14808 let status = resp.status();
14809 let content_type = resp
14810 .headers()
14811 .get("content-type")
14812 .and_then(|v| v.to_str().ok())
14813 .unwrap_or("application/octet-stream");
14814 let content_type = super::ContentType::from(content_type);
14815
14816 if !status.is_client_error() && !status.is_server_error() {
14817 let content = resp.text().await?;
14818 match content_type {
14819 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
14820 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yInfraPodsOut`"))),
14821 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::O11yPeriodO11yInfraPodsOut`")))),
14822 }
14823 } else {
14824 let content = resp.text().await?;
14825 let entity: Option<PostO11yInfraMonitoringPodsError> = serde_json::from_str(&content).ok();
14826 Err(Error::ResponseError(ResponseContent { status, content, entity }))
14827 }
14828}
14829
14830pub async fn post_o11y_infra_monitoring_pvcs(configuration: &configuration::Configuration, o11y_period_postable_volumes: models::O11yPeriodPostableVolumes) -> Result<models::O11yPeriodO11yInfraVolumesOut, Error<PostO11yInfraMonitoringPvcsError>> {
14832 let p_o11y_period_postable_volumes = o11y_period_postable_volumes;
14834
14835 let uri_str = format!("{}/v1/o11y/infra_monitoring/pvcs", configuration.base_path);
14836 let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
14837
14838 if let Some(ref user_agent) = configuration.user_agent {
14839 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
14840 }
14841 if let Some(ref token) = configuration.bearer_access_token {
14842 req_builder = req_builder.bearer_auth(token.to_owned());
14843 };
14844 req_builder = req_builder.json(&p_o11y_period_postable_volumes);
14845
14846 let req = req_builder.build()?;
14847 let resp = configuration.client.execute(req).await?;
14848
14849 let status = resp.status();
14850 let content_type = resp
14851 .headers()
14852 .get("content-type")
14853 .and_then(|v| v.to_str().ok())
14854 .unwrap_or("application/octet-stream");
14855 let content_type = super::ContentType::from(content_type);
14856
14857 if !status.is_client_error() && !status.is_server_error() {
14858 let content = resp.text().await?;
14859 match content_type {
14860 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
14861 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yInfraVolumesOut`"))),
14862 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::O11yPeriodO11yInfraVolumesOut`")))),
14863 }
14864 } else {
14865 let content = resp.text().await?;
14866 let entity: Option<PostO11yInfraMonitoringPvcsError> = serde_json::from_str(&content).ok();
14867 Err(Error::ResponseError(ResponseContent { status, content, entity }))
14868 }
14869}
14870
14871pub async fn post_o11y_infra_monitoring_statefulsets(configuration: &configuration::Configuration, o11y_period_postable_stateful_sets: models::O11yPeriodPostableStatefulSets) -> Result<models::O11yPeriodO11yInfraStatefulSetsOut, Error<PostO11yInfraMonitoringStatefulsetsError>> {
14873 let p_o11y_period_postable_stateful_sets = o11y_period_postable_stateful_sets;
14875
14876 let uri_str = format!("{}/v1/o11y/infra_monitoring/statefulsets", configuration.base_path);
14877 let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
14878
14879 if let Some(ref user_agent) = configuration.user_agent {
14880 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
14881 }
14882 if let Some(ref token) = configuration.bearer_access_token {
14883 req_builder = req_builder.bearer_auth(token.to_owned());
14884 };
14885 req_builder = req_builder.json(&p_o11y_period_postable_stateful_sets);
14886
14887 let req = req_builder.build()?;
14888 let resp = configuration.client.execute(req).await?;
14889
14890 let status = resp.status();
14891 let content_type = resp
14892 .headers()
14893 .get("content-type")
14894 .and_then(|v| v.to_str().ok())
14895 .unwrap_or("application/octet-stream");
14896 let content_type = super::ContentType::from(content_type);
14897
14898 if !status.is_client_error() && !status.is_server_error() {
14899 let content = resp.text().await?;
14900 match content_type {
14901 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
14902 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yInfraStatefulSetsOut`"))),
14903 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::O11yPeriodO11yInfraStatefulSetsOut`")))),
14904 }
14905 } else {
14906 let content = resp.text().await?;
14907 let entity: Option<PostO11yInfraMonitoringStatefulsetsError> = serde_json::from_str(&content).ok();
14908 Err(Error::ResponseError(ResponseContent { status, content, entity }))
14909 }
14910}
14911
14912pub async fn post_o11y_jobs_list(configuration: &configuration::Configuration, o11y_period_job_list_request: models::O11yPeriodJobListRequest) -> Result<models::O11yPeriodO11yJobListOut, Error<PostO11yJobsListError>> {
14914 let p_o11y_period_job_list_request = o11y_period_job_list_request;
14916
14917 let uri_str = format!("{}/v1/o11y/jobs/list", configuration.base_path);
14918 let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
14919
14920 if let Some(ref user_agent) = configuration.user_agent {
14921 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
14922 }
14923 if let Some(ref token) = configuration.bearer_access_token {
14924 req_builder = req_builder.bearer_auth(token.to_owned());
14925 };
14926 req_builder = req_builder.json(&p_o11y_period_job_list_request);
14927
14928 let req = req_builder.build()?;
14929 let resp = configuration.client.execute(req).await?;
14930
14931 let status = resp.status();
14932 let content_type = resp
14933 .headers()
14934 .get("content-type")
14935 .and_then(|v| v.to_str().ok())
14936 .unwrap_or("application/octet-stream");
14937 let content_type = super::ContentType::from(content_type);
14938
14939 if !status.is_client_error() && !status.is_server_error() {
14940 let content = resp.text().await?;
14941 match content_type {
14942 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
14943 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yJobListOut`"))),
14944 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::O11yPeriodO11yJobListOut`")))),
14945 }
14946 } else {
14947 let content = resp.text().await?;
14948 let entity: Option<PostO11yJobsListError> = serde_json::from_str(&content).ok();
14949 Err(Error::ResponseError(ResponseContent { status, content, entity }))
14950 }
14951}
14952
14953pub async fn post_o11y_listerrors(configuration: &configuration::Configuration, o11y_period_o11y_errors_list_in: models::O11yPeriodO11yErrorsListIn) -> Result<Vec<models::O11yPeriodO11yListError>, Error<PostO11yListerrorsError>> {
14955 let p_o11y_period_o11y_errors_list_in = o11y_period_o11y_errors_list_in;
14957
14958 let uri_str = format!("{}/v1/o11y/listErrors", configuration.base_path);
14959 let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
14960
14961 if let Some(ref user_agent) = configuration.user_agent {
14962 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
14963 }
14964 if let Some(ref token) = configuration.bearer_access_token {
14965 req_builder = req_builder.bearer_auth(token.to_owned());
14966 };
14967 req_builder = req_builder.json(&p_o11y_period_o11y_errors_list_in);
14968
14969 let req = req_builder.build()?;
14970 let resp = configuration.client.execute(req).await?;
14971
14972 let status = resp.status();
14973 let content_type = resp
14974 .headers()
14975 .get("content-type")
14976 .and_then(|v| v.to_str().ok())
14977 .unwrap_or("application/octet-stream");
14978 let content_type = super::ContentType::from(content_type);
14979
14980 if !status.is_client_error() && !status.is_server_error() {
14981 let content = resp.text().await?;
14982 match content_type {
14983 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
14984 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::O11yPeriodO11yListError>`"))),
14985 ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<models::O11yPeriodO11yListError>`")))),
14986 }
14987 } else {
14988 let content = resp.text().await?;
14989 let entity: Option<PostO11yListerrorsError> = serde_json::from_str(&content).ok();
14990 Err(Error::ResponseError(ResponseContent { status, content, entity }))
14991 }
14992}
14993
14994pub async fn post_o11y_logs_fields(configuration: &configuration::Configuration, o11y_period_o11y_field_setting: models::O11yPeriodO11yFieldSetting) -> Result<models::O11yPeriodO11yFieldSetting, Error<PostO11yLogsFieldsError>> {
14996 let p_o11y_period_o11y_field_setting = o11y_period_o11y_field_setting;
14998
14999 let uri_str = format!("{}/v1/o11y/logs/fields", configuration.base_path);
15000 let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
15001
15002 if let Some(ref user_agent) = configuration.user_agent {
15003 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
15004 }
15005 if let Some(ref token) = configuration.bearer_access_token {
15006 req_builder = req_builder.bearer_auth(token.to_owned());
15007 };
15008 req_builder = req_builder.json(&p_o11y_period_o11y_field_setting);
15009
15010 let req = req_builder.build()?;
15011 let resp = configuration.client.execute(req).await?;
15012
15013 let status = resp.status();
15014 let content_type = resp
15015 .headers()
15016 .get("content-type")
15017 .and_then(|v| v.to_str().ok())
15018 .unwrap_or("application/octet-stream");
15019 let content_type = super::ContentType::from(content_type);
15020
15021 if !status.is_client_error() && !status.is_server_error() {
15022 let content = resp.text().await?;
15023 match content_type {
15024 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
15025 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yFieldSetting`"))),
15026 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::O11yPeriodO11yFieldSetting`")))),
15027 }
15028 } else {
15029 let content = resp.text().await?;
15030 let entity: Option<PostO11yLogsFieldsError> = serde_json::from_str(&content).ok();
15031 Err(Error::ResponseError(ResponseContent { status, content, entity }))
15032 }
15033}
15034
15035pub async fn post_o11y_logs_pipelines(configuration: &configuration::Configuration, o11y_period_o11y_log_pipeline_create_in: models::O11yPeriodO11yLogPipelineCreateIn) -> Result<models::O11yPeriodO11yLogPipelinesOut, Error<PostO11yLogsPipelinesError>> {
15037 let p_o11y_period_o11y_log_pipeline_create_in = o11y_period_o11y_log_pipeline_create_in;
15039
15040 let uri_str = format!("{}/v1/o11y/logs/pipelines", configuration.base_path);
15041 let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
15042
15043 if let Some(ref user_agent) = configuration.user_agent {
15044 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
15045 }
15046 if let Some(ref token) = configuration.bearer_access_token {
15047 req_builder = req_builder.bearer_auth(token.to_owned());
15048 };
15049 req_builder = req_builder.json(&p_o11y_period_o11y_log_pipeline_create_in);
15050
15051 let req = req_builder.build()?;
15052 let resp = configuration.client.execute(req).await?;
15053
15054 let status = resp.status();
15055 let content_type = resp
15056 .headers()
15057 .get("content-type")
15058 .and_then(|v| v.to_str().ok())
15059 .unwrap_or("application/octet-stream");
15060 let content_type = super::ContentType::from(content_type);
15061
15062 if !status.is_client_error() && !status.is_server_error() {
15063 let content = resp.text().await?;
15064 match content_type {
15065 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
15066 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yLogPipelinesOut`"))),
15067 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::O11yPeriodO11yLogPipelinesOut`")))),
15068 }
15069 } else {
15070 let content = resp.text().await?;
15071 let entity: Option<PostO11yLogsPipelinesError> = serde_json::from_str(&content).ok();
15072 Err(Error::ResponseError(ResponseContent { status, content, entity }))
15073 }
15074}
15075
15076pub async fn post_o11y_logs_pipelines_preview(configuration: &configuration::Configuration, o11y_period_o11y_log_pipeline_preview_in: models::O11yPeriodO11yLogPipelinePreviewIn) -> Result<models::O11yPeriodO11yLogPipelinePreviewOut, Error<PostO11yLogsPipelinesPreviewError>> {
15078 let p_o11y_period_o11y_log_pipeline_preview_in = o11y_period_o11y_log_pipeline_preview_in;
15080
15081 let uri_str = format!("{}/v1/o11y/logs/pipelines/preview", configuration.base_path);
15082 let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
15083
15084 if let Some(ref user_agent) = configuration.user_agent {
15085 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
15086 }
15087 if let Some(ref token) = configuration.bearer_access_token {
15088 req_builder = req_builder.bearer_auth(token.to_owned());
15089 };
15090 req_builder = req_builder.json(&p_o11y_period_o11y_log_pipeline_preview_in);
15091
15092 let req = req_builder.build()?;
15093 let resp = configuration.client.execute(req).await?;
15094
15095 let status = resp.status();
15096 let content_type = resp
15097 .headers()
15098 .get("content-type")
15099 .and_then(|v| v.to_str().ok())
15100 .unwrap_or("application/octet-stream");
15101 let content_type = super::ContentType::from(content_type);
15102
15103 if !status.is_client_error() && !status.is_server_error() {
15104 let content = resp.text().await?;
15105 match content_type {
15106 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
15107 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yLogPipelinePreviewOut`"))),
15108 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::O11yPeriodO11yLogPipelinePreviewOut`")))),
15109 }
15110 } else {
15111 let content = resp.text().await?;
15112 let entity: Option<PostO11yLogsPipelinesPreviewError> = serde_json::from_str(&content).ok();
15113 Err(Error::ResponseError(ResponseContent { status, content, entity }))
15114 }
15115}
15116
15117pub async fn post_o11y_logs_promote_paths(configuration: &configuration::Configuration, o11y_period_o11y_log_promote_path: Vec<models::O11yPeriodO11yLogPromotePath>) -> Result<models::O11yPeriodO11yLogPromoteOut, Error<PostO11yLogsPromotePathsError>> {
15119 let p_o11y_period_o11y_log_promote_path = o11y_period_o11y_log_promote_path;
15121
15122 let uri_str = format!("{}/v1/o11y/logs/promote_paths", configuration.base_path);
15123 let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
15124
15125 if let Some(ref user_agent) = configuration.user_agent {
15126 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
15127 }
15128 if let Some(ref token) = configuration.bearer_access_token {
15129 req_builder = req_builder.bearer_auth(token.to_owned());
15130 };
15131 req_builder = req_builder.json(&p_o11y_period_o11y_log_promote_path);
15132
15133 let req = req_builder.build()?;
15134 let resp = configuration.client.execute(req).await?;
15135
15136 let status = resp.status();
15137 let content_type = resp
15138 .headers()
15139 .get("content-type")
15140 .and_then(|v| v.to_str().ok())
15141 .unwrap_or("application/octet-stream");
15142 let content_type = super::ContentType::from(content_type);
15143
15144 if !status.is_client_error() && !status.is_server_error() {
15145 let content = resp.text().await?;
15146 match content_type {
15147 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
15148 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yLogPromoteOut`"))),
15149 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::O11yPeriodO11yLogPromoteOut`")))),
15150 }
15151 } else {
15152 let content = resp.text().await?;
15153 let entity: Option<PostO11yLogsPromotePathsError> = serde_json::from_str(&content).ok();
15154 Err(Error::ResponseError(ResponseContent { status, content, entity }))
15155 }
15156}
15157
15158pub async fn post_o11y_messaging_queues_kafka_consumer_lag_consumer_details(configuration: &configuration::Configuration, o11y_period_o11y_queue_in: models::O11yPeriodO11yQueueIn) -> Result<models::O11yPeriodO11yQueryRangeOut, Error<PostO11yMessagingQueuesKafkaConsumerLagConsumerDetailsError>> {
15160 let p_o11y_period_o11y_queue_in = o11y_period_o11y_queue_in;
15162
15163 let uri_str = format!("{}/v1/o11y/messaging-queues/kafka/consumer-lag/consumer-details", configuration.base_path);
15164 let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
15165
15166 if let Some(ref user_agent) = configuration.user_agent {
15167 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
15168 }
15169 if let Some(ref token) = configuration.bearer_access_token {
15170 req_builder = req_builder.bearer_auth(token.to_owned());
15171 };
15172 req_builder = req_builder.json(&p_o11y_period_o11y_queue_in);
15173
15174 let req = req_builder.build()?;
15175 let resp = configuration.client.execute(req).await?;
15176
15177 let status = resp.status();
15178 let content_type = resp
15179 .headers()
15180 .get("content-type")
15181 .and_then(|v| v.to_str().ok())
15182 .unwrap_or("application/octet-stream");
15183 let content_type = super::ContentType::from(content_type);
15184
15185 if !status.is_client_error() && !status.is_server_error() {
15186 let content = resp.text().await?;
15187 match content_type {
15188 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
15189 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yQueryRangeOut`"))),
15190 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::O11yPeriodO11yQueryRangeOut`")))),
15191 }
15192 } else {
15193 let content = resp.text().await?;
15194 let entity: Option<PostO11yMessagingQueuesKafkaConsumerLagConsumerDetailsError> = serde_json::from_str(&content).ok();
15195 Err(Error::ResponseError(ResponseContent { status, content, entity }))
15196 }
15197}
15198
15199pub async fn post_o11y_messaging_queues_kafka_consumer_lag_network_latency(configuration: &configuration::Configuration, o11y_period_o11y_queue_in: models::O11yPeriodO11yQueueIn) -> Result<models::O11yPeriodO11yQueryRangeOut, Error<PostO11yMessagingQueuesKafkaConsumerLagNetworkLatencyError>> {
15201 let p_o11y_period_o11y_queue_in = o11y_period_o11y_queue_in;
15203
15204 let uri_str = format!("{}/v1/o11y/messaging-queues/kafka/consumer-lag/network-latency", configuration.base_path);
15205 let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
15206
15207 if let Some(ref user_agent) = configuration.user_agent {
15208 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
15209 }
15210 if let Some(ref token) = configuration.bearer_access_token {
15211 req_builder = req_builder.bearer_auth(token.to_owned());
15212 };
15213 req_builder = req_builder.json(&p_o11y_period_o11y_queue_in);
15214
15215 let req = req_builder.build()?;
15216 let resp = configuration.client.execute(req).await?;
15217
15218 let status = resp.status();
15219 let content_type = resp
15220 .headers()
15221 .get("content-type")
15222 .and_then(|v| v.to_str().ok())
15223 .unwrap_or("application/octet-stream");
15224 let content_type = super::ContentType::from(content_type);
15225
15226 if !status.is_client_error() && !status.is_server_error() {
15227 let content = resp.text().await?;
15228 match content_type {
15229 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
15230 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yQueryRangeOut`"))),
15231 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::O11yPeriodO11yQueryRangeOut`")))),
15232 }
15233 } else {
15234 let content = resp.text().await?;
15235 let entity: Option<PostO11yMessagingQueuesKafkaConsumerLagNetworkLatencyError> = serde_json::from_str(&content).ok();
15236 Err(Error::ResponseError(ResponseContent { status, content, entity }))
15237 }
15238}
15239
15240pub async fn post_o11y_messaging_queues_kafka_consumer_lag_producer_details(configuration: &configuration::Configuration, o11y_period_o11y_queue_in: models::O11yPeriodO11yQueueIn) -> Result<models::O11yPeriodO11yQueryRangeOut, Error<PostO11yMessagingQueuesKafkaConsumerLagProducerDetailsError>> {
15242 let p_o11y_period_o11y_queue_in = o11y_period_o11y_queue_in;
15244
15245 let uri_str = format!("{}/v1/o11y/messaging-queues/kafka/consumer-lag/producer-details", configuration.base_path);
15246 let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
15247
15248 if let Some(ref user_agent) = configuration.user_agent {
15249 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
15250 }
15251 if let Some(ref token) = configuration.bearer_access_token {
15252 req_builder = req_builder.bearer_auth(token.to_owned());
15253 };
15254 req_builder = req_builder.json(&p_o11y_period_o11y_queue_in);
15255
15256 let req = req_builder.build()?;
15257 let resp = configuration.client.execute(req).await?;
15258
15259 let status = resp.status();
15260 let content_type = resp
15261 .headers()
15262 .get("content-type")
15263 .and_then(|v| v.to_str().ok())
15264 .unwrap_or("application/octet-stream");
15265 let content_type = super::ContentType::from(content_type);
15266
15267 if !status.is_client_error() && !status.is_server_error() {
15268 let content = resp.text().await?;
15269 match content_type {
15270 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
15271 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yQueryRangeOut`"))),
15272 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::O11yPeriodO11yQueryRangeOut`")))),
15273 }
15274 } else {
15275 let content = resp.text().await?;
15276 let entity: Option<PostO11yMessagingQueuesKafkaConsumerLagProducerDetailsError> = serde_json::from_str(&content).ok();
15277 Err(Error::ResponseError(ResponseContent { status, content, entity }))
15278 }
15279}
15280
15281pub async fn post_o11y_messaging_queues_kafka_onboarding_consumers(configuration: &configuration::Configuration, o11y_period_o11y_queue_in: models::O11yPeriodO11yQueueIn) -> Result<models::O11yPeriodO11yQueueChecksOut, Error<PostO11yMessagingQueuesKafkaOnboardingConsumersError>> {
15283 let p_o11y_period_o11y_queue_in = o11y_period_o11y_queue_in;
15285
15286 let uri_str = format!("{}/v1/o11y/messaging-queues/kafka/onboarding/consumers", configuration.base_path);
15287 let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
15288
15289 if let Some(ref user_agent) = configuration.user_agent {
15290 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
15291 }
15292 if let Some(ref token) = configuration.bearer_access_token {
15293 req_builder = req_builder.bearer_auth(token.to_owned());
15294 };
15295 req_builder = req_builder.json(&p_o11y_period_o11y_queue_in);
15296
15297 let req = req_builder.build()?;
15298 let resp = configuration.client.execute(req).await?;
15299
15300 let status = resp.status();
15301 let content_type = resp
15302 .headers()
15303 .get("content-type")
15304 .and_then(|v| v.to_str().ok())
15305 .unwrap_or("application/octet-stream");
15306 let content_type = super::ContentType::from(content_type);
15307
15308 if !status.is_client_error() && !status.is_server_error() {
15309 let content = resp.text().await?;
15310 match content_type {
15311 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
15312 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yQueueChecksOut`"))),
15313 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::O11yPeriodO11yQueueChecksOut`")))),
15314 }
15315 } else {
15316 let content = resp.text().await?;
15317 let entity: Option<PostO11yMessagingQueuesKafkaOnboardingConsumersError> = serde_json::from_str(&content).ok();
15318 Err(Error::ResponseError(ResponseContent { status, content, entity }))
15319 }
15320}
15321
15322pub async fn post_o11y_messaging_queues_kafka_onboarding_kafka(configuration: &configuration::Configuration, o11y_period_o11y_queue_in: models::O11yPeriodO11yQueueIn) -> Result<models::O11yPeriodO11yQueueChecksOut, Error<PostO11yMessagingQueuesKafkaOnboardingKafkaError>> {
15324 let p_o11y_period_o11y_queue_in = o11y_period_o11y_queue_in;
15326
15327 let uri_str = format!("{}/v1/o11y/messaging-queues/kafka/onboarding/kafka", configuration.base_path);
15328 let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
15329
15330 if let Some(ref user_agent) = configuration.user_agent {
15331 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
15332 }
15333 if let Some(ref token) = configuration.bearer_access_token {
15334 req_builder = req_builder.bearer_auth(token.to_owned());
15335 };
15336 req_builder = req_builder.json(&p_o11y_period_o11y_queue_in);
15337
15338 let req = req_builder.build()?;
15339 let resp = configuration.client.execute(req).await?;
15340
15341 let status = resp.status();
15342 let content_type = resp
15343 .headers()
15344 .get("content-type")
15345 .and_then(|v| v.to_str().ok())
15346 .unwrap_or("application/octet-stream");
15347 let content_type = super::ContentType::from(content_type);
15348
15349 if !status.is_client_error() && !status.is_server_error() {
15350 let content = resp.text().await?;
15351 match content_type {
15352 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
15353 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yQueueChecksOut`"))),
15354 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::O11yPeriodO11yQueueChecksOut`")))),
15355 }
15356 } else {
15357 let content = resp.text().await?;
15358 let entity: Option<PostO11yMessagingQueuesKafkaOnboardingKafkaError> = serde_json::from_str(&content).ok();
15359 Err(Error::ResponseError(ResponseContent { status, content, entity }))
15360 }
15361}
15362
15363pub async fn post_o11y_messaging_queues_kafka_onboarding_producers(configuration: &configuration::Configuration, o11y_period_o11y_queue_in: models::O11yPeriodO11yQueueIn) -> Result<models::O11yPeriodO11yQueueChecksOut, Error<PostO11yMessagingQueuesKafkaOnboardingProducersError>> {
15365 let p_o11y_period_o11y_queue_in = o11y_period_o11y_queue_in;
15367
15368 let uri_str = format!("{}/v1/o11y/messaging-queues/kafka/onboarding/producers", configuration.base_path);
15369 let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
15370
15371 if let Some(ref user_agent) = configuration.user_agent {
15372 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
15373 }
15374 if let Some(ref token) = configuration.bearer_access_token {
15375 req_builder = req_builder.bearer_auth(token.to_owned());
15376 };
15377 req_builder = req_builder.json(&p_o11y_period_o11y_queue_in);
15378
15379 let req = req_builder.build()?;
15380 let resp = configuration.client.execute(req).await?;
15381
15382 let status = resp.status();
15383 let content_type = resp
15384 .headers()
15385 .get("content-type")
15386 .and_then(|v| v.to_str().ok())
15387 .unwrap_or("application/octet-stream");
15388 let content_type = super::ContentType::from(content_type);
15389
15390 if !status.is_client_error() && !status.is_server_error() {
15391 let content = resp.text().await?;
15392 match content_type {
15393 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
15394 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yQueueChecksOut`"))),
15395 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::O11yPeriodO11yQueueChecksOut`")))),
15396 }
15397 } else {
15398 let content = resp.text().await?;
15399 let entity: Option<PostO11yMessagingQueuesKafkaOnboardingProducersError> = serde_json::from_str(&content).ok();
15400 Err(Error::ResponseError(ResponseContent { status, content, entity }))
15401 }
15402}
15403
15404pub async fn post_o11y_messaging_queues_kafka_partition_latency_consumer(configuration: &configuration::Configuration, o11y_period_o11y_queue_in: models::O11yPeriodO11yQueueIn) -> Result<models::O11yPeriodO11yQueryRangeOut, Error<PostO11yMessagingQueuesKafkaPartitionLatencyConsumerError>> {
15406 let p_o11y_period_o11y_queue_in = o11y_period_o11y_queue_in;
15408
15409 let uri_str = format!("{}/v1/o11y/messaging-queues/kafka/partition-latency/consumer", configuration.base_path);
15410 let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
15411
15412 if let Some(ref user_agent) = configuration.user_agent {
15413 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
15414 }
15415 if let Some(ref token) = configuration.bearer_access_token {
15416 req_builder = req_builder.bearer_auth(token.to_owned());
15417 };
15418 req_builder = req_builder.json(&p_o11y_period_o11y_queue_in);
15419
15420 let req = req_builder.build()?;
15421 let resp = configuration.client.execute(req).await?;
15422
15423 let status = resp.status();
15424 let content_type = resp
15425 .headers()
15426 .get("content-type")
15427 .and_then(|v| v.to_str().ok())
15428 .unwrap_or("application/octet-stream");
15429 let content_type = super::ContentType::from(content_type);
15430
15431 if !status.is_client_error() && !status.is_server_error() {
15432 let content = resp.text().await?;
15433 match content_type {
15434 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
15435 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yQueryRangeOut`"))),
15436 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::O11yPeriodO11yQueryRangeOut`")))),
15437 }
15438 } else {
15439 let content = resp.text().await?;
15440 let entity: Option<PostO11yMessagingQueuesKafkaPartitionLatencyConsumerError> = serde_json::from_str(&content).ok();
15441 Err(Error::ResponseError(ResponseContent { status, content, entity }))
15442 }
15443}
15444
15445pub async fn post_o11y_messaging_queues_kafka_partition_latency_overview(configuration: &configuration::Configuration, o11y_period_o11y_queue_in: models::O11yPeriodO11yQueueIn) -> Result<models::O11yPeriodO11yQueryRangeOut, Error<PostO11yMessagingQueuesKafkaPartitionLatencyOverviewError>> {
15447 let p_o11y_period_o11y_queue_in = o11y_period_o11y_queue_in;
15449
15450 let uri_str = format!("{}/v1/o11y/messaging-queues/kafka/partition-latency/overview", configuration.base_path);
15451 let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
15452
15453 if let Some(ref user_agent) = configuration.user_agent {
15454 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
15455 }
15456 if let Some(ref token) = configuration.bearer_access_token {
15457 req_builder = req_builder.bearer_auth(token.to_owned());
15458 };
15459 req_builder = req_builder.json(&p_o11y_period_o11y_queue_in);
15460
15461 let req = req_builder.build()?;
15462 let resp = configuration.client.execute(req).await?;
15463
15464 let status = resp.status();
15465 let content_type = resp
15466 .headers()
15467 .get("content-type")
15468 .and_then(|v| v.to_str().ok())
15469 .unwrap_or("application/octet-stream");
15470 let content_type = super::ContentType::from(content_type);
15471
15472 if !status.is_client_error() && !status.is_server_error() {
15473 let content = resp.text().await?;
15474 match content_type {
15475 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
15476 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yQueryRangeOut`"))),
15477 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::O11yPeriodO11yQueryRangeOut`")))),
15478 }
15479 } else {
15480 let content = resp.text().await?;
15481 let entity: Option<PostO11yMessagingQueuesKafkaPartitionLatencyOverviewError> = serde_json::from_str(&content).ok();
15482 Err(Error::ResponseError(ResponseContent { status, content, entity }))
15483 }
15484}
15485
15486pub async fn post_o11y_messaging_queues_kafka_span_evaluation(configuration: &configuration::Configuration, o11y_period_o11y_queue_in: models::O11yPeriodO11yQueueIn) -> Result<models::O11yPeriodO11yQueryRangeOut, Error<PostO11yMessagingQueuesKafkaSpanEvaluationError>> {
15488 let p_o11y_period_o11y_queue_in = o11y_period_o11y_queue_in;
15490
15491 let uri_str = format!("{}/v1/o11y/messaging-queues/kafka/span/evaluation", configuration.base_path);
15492 let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
15493
15494 if let Some(ref user_agent) = configuration.user_agent {
15495 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
15496 }
15497 if let Some(ref token) = configuration.bearer_access_token {
15498 req_builder = req_builder.bearer_auth(token.to_owned());
15499 };
15500 req_builder = req_builder.json(&p_o11y_period_o11y_queue_in);
15501
15502 let req = req_builder.build()?;
15503 let resp = configuration.client.execute(req).await?;
15504
15505 let status = resp.status();
15506 let content_type = resp
15507 .headers()
15508 .get("content-type")
15509 .and_then(|v| v.to_str().ok())
15510 .unwrap_or("application/octet-stream");
15511 let content_type = super::ContentType::from(content_type);
15512
15513 if !status.is_client_error() && !status.is_server_error() {
15514 let content = resp.text().await?;
15515 match content_type {
15516 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
15517 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yQueryRangeOut`"))),
15518 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::O11yPeriodO11yQueryRangeOut`")))),
15519 }
15520 } else {
15521 let content = resp.text().await?;
15522 let entity: Option<PostO11yMessagingQueuesKafkaSpanEvaluationError> = serde_json::from_str(&content).ok();
15523 Err(Error::ResponseError(ResponseContent { status, content, entity }))
15524 }
15525}
15526
15527pub async fn post_o11y_messaging_queues_kafka_topic_throughput_consumer(configuration: &configuration::Configuration, o11y_period_o11y_queue_in: models::O11yPeriodO11yQueueIn) -> Result<models::O11yPeriodO11yQueryRangeOut, Error<PostO11yMessagingQueuesKafkaTopicThroughputConsumerError>> {
15529 let p_o11y_period_o11y_queue_in = o11y_period_o11y_queue_in;
15531
15532 let uri_str = format!("{}/v1/o11y/messaging-queues/kafka/topic-throughput/consumer", configuration.base_path);
15533 let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
15534
15535 if let Some(ref user_agent) = configuration.user_agent {
15536 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
15537 }
15538 if let Some(ref token) = configuration.bearer_access_token {
15539 req_builder = req_builder.bearer_auth(token.to_owned());
15540 };
15541 req_builder = req_builder.json(&p_o11y_period_o11y_queue_in);
15542
15543 let req = req_builder.build()?;
15544 let resp = configuration.client.execute(req).await?;
15545
15546 let status = resp.status();
15547 let content_type = resp
15548 .headers()
15549 .get("content-type")
15550 .and_then(|v| v.to_str().ok())
15551 .unwrap_or("application/octet-stream");
15552 let content_type = super::ContentType::from(content_type);
15553
15554 if !status.is_client_error() && !status.is_server_error() {
15555 let content = resp.text().await?;
15556 match content_type {
15557 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
15558 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yQueryRangeOut`"))),
15559 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::O11yPeriodO11yQueryRangeOut`")))),
15560 }
15561 } else {
15562 let content = resp.text().await?;
15563 let entity: Option<PostO11yMessagingQueuesKafkaTopicThroughputConsumerError> = serde_json::from_str(&content).ok();
15564 Err(Error::ResponseError(ResponseContent { status, content, entity }))
15565 }
15566}
15567
15568pub async fn post_o11y_messaging_queues_kafka_topic_throughput_consumer_details(configuration: &configuration::Configuration, o11y_period_o11y_queue_in: models::O11yPeriodO11yQueueIn) -> Result<models::O11yPeriodO11yQueryRangeOut, Error<PostO11yMessagingQueuesKafkaTopicThroughputConsumerDetailsError>> {
15570 let p_o11y_period_o11y_queue_in = o11y_period_o11y_queue_in;
15572
15573 let uri_str = format!("{}/v1/o11y/messaging-queues/kafka/topic-throughput/consumer-details", configuration.base_path);
15574 let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
15575
15576 if let Some(ref user_agent) = configuration.user_agent {
15577 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
15578 }
15579 if let Some(ref token) = configuration.bearer_access_token {
15580 req_builder = req_builder.bearer_auth(token.to_owned());
15581 };
15582 req_builder = req_builder.json(&p_o11y_period_o11y_queue_in);
15583
15584 let req = req_builder.build()?;
15585 let resp = configuration.client.execute(req).await?;
15586
15587 let status = resp.status();
15588 let content_type = resp
15589 .headers()
15590 .get("content-type")
15591 .and_then(|v| v.to_str().ok())
15592 .unwrap_or("application/octet-stream");
15593 let content_type = super::ContentType::from(content_type);
15594
15595 if !status.is_client_error() && !status.is_server_error() {
15596 let content = resp.text().await?;
15597 match content_type {
15598 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
15599 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yQueryRangeOut`"))),
15600 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::O11yPeriodO11yQueryRangeOut`")))),
15601 }
15602 } else {
15603 let content = resp.text().await?;
15604 let entity: Option<PostO11yMessagingQueuesKafkaTopicThroughputConsumerDetailsError> = serde_json::from_str(&content).ok();
15605 Err(Error::ResponseError(ResponseContent { status, content, entity }))
15606 }
15607}
15608
15609pub async fn post_o11y_messaging_queues_kafka_topic_throughput_producer(configuration: &configuration::Configuration, o11y_period_o11y_queue_in: models::O11yPeriodO11yQueueIn) -> Result<models::O11yPeriodO11yQueryRangeOut, Error<PostO11yMessagingQueuesKafkaTopicThroughputProducerError>> {
15611 let p_o11y_period_o11y_queue_in = o11y_period_o11y_queue_in;
15613
15614 let uri_str = format!("{}/v1/o11y/messaging-queues/kafka/topic-throughput/producer", configuration.base_path);
15615 let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
15616
15617 if let Some(ref user_agent) = configuration.user_agent {
15618 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
15619 }
15620 if let Some(ref token) = configuration.bearer_access_token {
15621 req_builder = req_builder.bearer_auth(token.to_owned());
15622 };
15623 req_builder = req_builder.json(&p_o11y_period_o11y_queue_in);
15624
15625 let req = req_builder.build()?;
15626 let resp = configuration.client.execute(req).await?;
15627
15628 let status = resp.status();
15629 let content_type = resp
15630 .headers()
15631 .get("content-type")
15632 .and_then(|v| v.to_str().ok())
15633 .unwrap_or("application/octet-stream");
15634 let content_type = super::ContentType::from(content_type);
15635
15636 if !status.is_client_error() && !status.is_server_error() {
15637 let content = resp.text().await?;
15638 match content_type {
15639 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
15640 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yQueryRangeOut`"))),
15641 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::O11yPeriodO11yQueryRangeOut`")))),
15642 }
15643 } else {
15644 let content = resp.text().await?;
15645 let entity: Option<PostO11yMessagingQueuesKafkaTopicThroughputProducerError> = serde_json::from_str(&content).ok();
15646 Err(Error::ResponseError(ResponseContent { status, content, entity }))
15647 }
15648}
15649
15650pub async fn post_o11y_messaging_queues_kafka_topic_throughput_producer_details(configuration: &configuration::Configuration, o11y_period_o11y_queue_in: models::O11yPeriodO11yQueueIn) -> Result<models::O11yPeriodO11yQueryRangeOut, Error<PostO11yMessagingQueuesKafkaTopicThroughputProducerDetailsError>> {
15652 let p_o11y_period_o11y_queue_in = o11y_period_o11y_queue_in;
15654
15655 let uri_str = format!("{}/v1/o11y/messaging-queues/kafka/topic-throughput/producer-details", configuration.base_path);
15656 let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
15657
15658 if let Some(ref user_agent) = configuration.user_agent {
15659 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
15660 }
15661 if let Some(ref token) = configuration.bearer_access_token {
15662 req_builder = req_builder.bearer_auth(token.to_owned());
15663 };
15664 req_builder = req_builder.json(&p_o11y_period_o11y_queue_in);
15665
15666 let req = req_builder.build()?;
15667 let resp = configuration.client.execute(req).await?;
15668
15669 let status = resp.status();
15670 let content_type = resp
15671 .headers()
15672 .get("content-type")
15673 .and_then(|v| v.to_str().ok())
15674 .unwrap_or("application/octet-stream");
15675 let content_type = super::ContentType::from(content_type);
15676
15677 if !status.is_client_error() && !status.is_server_error() {
15678 let content = resp.text().await?;
15679 match content_type {
15680 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
15681 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yQueryRangeOut`"))),
15682 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::O11yPeriodO11yQueryRangeOut`")))),
15683 }
15684 } else {
15685 let content = resp.text().await?;
15686 let entity: Option<PostO11yMessagingQueuesKafkaTopicThroughputProducerDetailsError> = serde_json::from_str(&content).ok();
15687 Err(Error::ResponseError(ResponseContent { status, content, entity }))
15688 }
15689}
15690
15691pub async fn post_o11y_messaging_queues_queue_overview(configuration: &configuration::Configuration, o11y_period_o11y_queue_list_in: models::O11yPeriodO11yQueueListIn) -> Result<models::O11yPeriodO11yQueueRowsOut, Error<PostO11yMessagingQueuesQueueOverviewError>> {
15693 let p_o11y_period_o11y_queue_list_in = o11y_period_o11y_queue_list_in;
15695
15696 let uri_str = format!("{}/v1/o11y/messaging-queues/queue-overview", configuration.base_path);
15697 let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
15698
15699 if let Some(ref user_agent) = configuration.user_agent {
15700 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
15701 }
15702 if let Some(ref token) = configuration.bearer_access_token {
15703 req_builder = req_builder.bearer_auth(token.to_owned());
15704 };
15705 req_builder = req_builder.json(&p_o11y_period_o11y_queue_list_in);
15706
15707 let req = req_builder.build()?;
15708 let resp = configuration.client.execute(req).await?;
15709
15710 let status = resp.status();
15711 let content_type = resp
15712 .headers()
15713 .get("content-type")
15714 .and_then(|v| v.to_str().ok())
15715 .unwrap_or("application/octet-stream");
15716 let content_type = super::ContentType::from(content_type);
15717
15718 if !status.is_client_error() && !status.is_server_error() {
15719 let content = resp.text().await?;
15720 match content_type {
15721 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
15722 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yQueueRowsOut`"))),
15723 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::O11yPeriodO11yQueueRowsOut`")))),
15724 }
15725 } else {
15726 let content = resp.text().await?;
15727 let entity: Option<PostO11yMessagingQueuesQueueOverviewError> = serde_json::from_str(&content).ok();
15728 Err(Error::ResponseError(ResponseContent { status, content, entity }))
15729 }
15730}
15731
15732pub async fn post_o11y_namespaces_list(configuration: &configuration::Configuration, o11y_period_namespace_list_request: models::O11yPeriodNamespaceListRequest) -> Result<models::O11yPeriodO11yNamespaceListOut, Error<PostO11yNamespacesListError>> {
15734 let p_o11y_period_namespace_list_request = o11y_period_namespace_list_request;
15736
15737 let uri_str = format!("{}/v1/o11y/namespaces/list", configuration.base_path);
15738 let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
15739
15740 if let Some(ref user_agent) = configuration.user_agent {
15741 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
15742 }
15743 if let Some(ref token) = configuration.bearer_access_token {
15744 req_builder = req_builder.bearer_auth(token.to_owned());
15745 };
15746 req_builder = req_builder.json(&p_o11y_period_namespace_list_request);
15747
15748 let req = req_builder.build()?;
15749 let resp = configuration.client.execute(req).await?;
15750
15751 let status = resp.status();
15752 let content_type = resp
15753 .headers()
15754 .get("content-type")
15755 .and_then(|v| v.to_str().ok())
15756 .unwrap_or("application/octet-stream");
15757 let content_type = super::ContentType::from(content_type);
15758
15759 if !status.is_client_error() && !status.is_server_error() {
15760 let content = resp.text().await?;
15761 match content_type {
15762 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
15763 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yNamespaceListOut`"))),
15764 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::O11yPeriodO11yNamespaceListOut`")))),
15765 }
15766 } else {
15767 let content = resp.text().await?;
15768 let entity: Option<PostO11yNamespacesListError> = serde_json::from_str(&content).ok();
15769 Err(Error::ResponseError(ResponseContent { status, content, entity }))
15770 }
15771}
15772
15773pub async fn post_o11y_nodes_list(configuration: &configuration::Configuration, o11y_period_node_list_request: models::O11yPeriodNodeListRequest) -> Result<models::O11yPeriodO11yNodeListOut, Error<PostO11yNodesListError>> {
15775 let p_o11y_period_node_list_request = o11y_period_node_list_request;
15777
15778 let uri_str = format!("{}/v1/o11y/nodes/list", configuration.base_path);
15779 let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
15780
15781 if let Some(ref user_agent) = configuration.user_agent {
15782 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
15783 }
15784 if let Some(ref token) = configuration.bearer_access_token {
15785 req_builder = req_builder.bearer_auth(token.to_owned());
15786 };
15787 req_builder = req_builder.json(&p_o11y_period_node_list_request);
15788
15789 let req = req_builder.build()?;
15790 let resp = configuration.client.execute(req).await?;
15791
15792 let status = resp.status();
15793 let content_type = resp
15794 .headers()
15795 .get("content-type")
15796 .and_then(|v| v.to_str().ok())
15797 .unwrap_or("application/octet-stream");
15798 let content_type = super::ContentType::from(content_type);
15799
15800 if !status.is_client_error() && !status.is_server_error() {
15801 let content = resp.text().await?;
15802 match content_type {
15803 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
15804 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yNodeListOut`"))),
15805 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::O11yPeriodO11yNodeListOut`")))),
15806 }
15807 } else {
15808 let content = resp.text().await?;
15809 let entity: Option<PostO11yNodesListError> = serde_json::from_str(&content).ok();
15810 Err(Error::ResponseError(ResponseContent { status, content, entity }))
15811 }
15812}
15813
15814pub async fn post_o11y_pods_list(configuration: &configuration::Configuration, o11y_period_pod_list_request: models::O11yPeriodPodListRequest) -> Result<models::O11yPeriodO11yPodListOut, Error<PostO11yPodsListError>> {
15816 let p_o11y_period_pod_list_request = o11y_period_pod_list_request;
15818
15819 let uri_str = format!("{}/v1/o11y/pods/list", configuration.base_path);
15820 let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
15821
15822 if let Some(ref user_agent) = configuration.user_agent {
15823 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
15824 }
15825 if let Some(ref token) = configuration.bearer_access_token {
15826 req_builder = req_builder.bearer_auth(token.to_owned());
15827 };
15828 req_builder = req_builder.json(&p_o11y_period_pod_list_request);
15829
15830 let req = req_builder.build()?;
15831 let resp = configuration.client.execute(req).await?;
15832
15833 let status = resp.status();
15834 let content_type = resp
15835 .headers()
15836 .get("content-type")
15837 .and_then(|v| v.to_str().ok())
15838 .unwrap_or("application/octet-stream");
15839 let content_type = super::ContentType::from(content_type);
15840
15841 if !status.is_client_error() && !status.is_server_error() {
15842 let content = resp.text().await?;
15843 match content_type {
15844 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
15845 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yPodListOut`"))),
15846 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::O11yPeriodO11yPodListOut`")))),
15847 }
15848 } else {
15849 let content = resp.text().await?;
15850 let entity: Option<PostO11yPodsListError> = serde_json::from_str(&content).ok();
15851 Err(Error::ResponseError(ResponseContent { status, content, entity }))
15852 }
15853}
15854
15855pub async fn post_o11y_processes_list(configuration: &configuration::Configuration, o11y_period_process_list_request: models::O11yPeriodProcessListRequest) -> Result<models::O11yPeriodO11yProcessListOut, Error<PostO11yProcessesListError>> {
15857 let p_o11y_period_process_list_request = o11y_period_process_list_request;
15859
15860 let uri_str = format!("{}/v1/o11y/processes/list", configuration.base_path);
15861 let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
15862
15863 if let Some(ref user_agent) = configuration.user_agent {
15864 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
15865 }
15866 if let Some(ref token) = configuration.bearer_access_token {
15867 req_builder = req_builder.bearer_auth(token.to_owned());
15868 };
15869 req_builder = req_builder.json(&p_o11y_period_process_list_request);
15870
15871 let req = req_builder.build()?;
15872 let resp = configuration.client.execute(req).await?;
15873
15874 let status = resp.status();
15875 let content_type = resp
15876 .headers()
15877 .get("content-type")
15878 .and_then(|v| v.to_str().ok())
15879 .unwrap_or("application/octet-stream");
15880 let content_type = super::ContentType::from(content_type);
15881
15882 if !status.is_client_error() && !status.is_server_error() {
15883 let content = resp.text().await?;
15884 match content_type {
15885 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
15886 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yProcessListOut`"))),
15887 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::O11yPeriodO11yProcessListOut`")))),
15888 }
15889 } else {
15890 let content = resp.text().await?;
15891 let entity: Option<PostO11yProcessesListError> = serde_json::from_str(&content).ok();
15892 Err(Error::ResponseError(ResponseContent { status, content, entity }))
15893 }
15894}
15895
15896pub async fn post_o11y_pvcs_list(configuration: &configuration::Configuration, o11y_period_volume_list_request: models::O11yPeriodVolumeListRequest) -> Result<models::O11yPeriodO11yPvcListOut, Error<PostO11yPvcsListError>> {
15898 let p_o11y_period_volume_list_request = o11y_period_volume_list_request;
15900
15901 let uri_str = format!("{}/v1/o11y/pvcs/list", configuration.base_path);
15902 let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
15903
15904 if let Some(ref user_agent) = configuration.user_agent {
15905 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
15906 }
15907 if let Some(ref token) = configuration.bearer_access_token {
15908 req_builder = req_builder.bearer_auth(token.to_owned());
15909 };
15910 req_builder = req_builder.json(&p_o11y_period_volume_list_request);
15911
15912 let req = req_builder.build()?;
15913 let resp = configuration.client.execute(req).await?;
15914
15915 let status = resp.status();
15916 let content_type = resp
15917 .headers()
15918 .get("content-type")
15919 .and_then(|v| v.to_str().ok())
15920 .unwrap_or("application/octet-stream");
15921 let content_type = super::ContentType::from(content_type);
15922
15923 if !status.is_client_error() && !status.is_server_error() {
15924 let content = resp.text().await?;
15925 match content_type {
15926 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
15927 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yPvcListOut`"))),
15928 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::O11yPeriodO11yPvcListOut`")))),
15929 }
15930 } else {
15931 let content = resp.text().await?;
15932 let entity: Option<PostO11yPvcsListError> = serde_json::from_str(&content).ok();
15933 Err(Error::ResponseError(ResponseContent { status, content, entity }))
15934 }
15935}
15936
15937pub async fn post_o11y_query_filter_analyze(configuration: &configuration::Configuration, o11y_period_o11y_analyze_in: models::O11yPeriodO11yAnalyzeIn) -> Result<models::O11yPeriodO11yAnalyzeOut, Error<PostO11yQueryFilterAnalyzeError>> {
15939 let p_o11y_period_o11y_analyze_in = o11y_period_o11y_analyze_in;
15941
15942 let uri_str = format!("{}/v1/o11y/query_filter/analyze", configuration.base_path);
15943 let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
15944
15945 if let Some(ref user_agent) = configuration.user_agent {
15946 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
15947 }
15948 if let Some(ref token) = configuration.bearer_access_token {
15949 req_builder = req_builder.bearer_auth(token.to_owned());
15950 };
15951 req_builder = req_builder.json(&p_o11y_period_o11y_analyze_in);
15952
15953 let req = req_builder.build()?;
15954 let resp = configuration.client.execute(req).await?;
15955
15956 let status = resp.status();
15957 let content_type = resp
15958 .headers()
15959 .get("content-type")
15960 .and_then(|v| v.to_str().ok())
15961 .unwrap_or("application/octet-stream");
15962 let content_type = super::ContentType::from(content_type);
15963
15964 if !status.is_client_error() && !status.is_server_error() {
15965 let content = resp.text().await?;
15966 match content_type {
15967 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
15968 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yAnalyzeOut`"))),
15969 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::O11yPeriodO11yAnalyzeOut`")))),
15970 }
15971 } else {
15972 let content = resp.text().await?;
15973 let entity: Option<PostO11yQueryFilterAnalyzeError> = serde_json::from_str(&content).ok();
15974 Err(Error::ResponseError(ResponseContent { status, content, entity }))
15975 }
15976}
15977
15978pub async fn post_o11y_query_range(configuration: &configuration::Configuration, o11y_period_query_range_request: models::O11yPeriodQueryRangeRequest) -> Result<models::O11yPeriodO11yQueryRangeOut, Error<PostO11yQueryRangeError>> {
15980 let p_o11y_period_query_range_request = o11y_period_query_range_request;
15982
15983 let uri_str = format!("{}/v1/o11y/query_range", configuration.base_path);
15984 let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
15985
15986 if let Some(ref user_agent) = configuration.user_agent {
15987 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
15988 }
15989 if let Some(ref token) = configuration.bearer_access_token {
15990 req_builder = req_builder.bearer_auth(token.to_owned());
15991 };
15992 req_builder = req_builder.json(&p_o11y_period_query_range_request);
15993
15994 let req = req_builder.build()?;
15995 let resp = configuration.client.execute(req).await?;
15996
15997 let status = resp.status();
15998 let content_type = resp
15999 .headers()
16000 .get("content-type")
16001 .and_then(|v| v.to_str().ok())
16002 .unwrap_or("application/octet-stream");
16003 let content_type = super::ContentType::from(content_type);
16004
16005 if !status.is_client_error() && !status.is_server_error() {
16006 let content = resp.text().await?;
16007 match content_type {
16008 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
16009 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yQueryRangeOut`"))),
16010 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::O11yPeriodO11yQueryRangeOut`")))),
16011 }
16012 } else {
16013 let content = resp.text().await?;
16014 let entity: Option<PostO11yQueryRangeError> = serde_json::from_str(&content).ok();
16015 Err(Error::ResponseError(ResponseContent { status, content, entity }))
16016 }
16017}
16018
16019pub async fn post_o11y_query_range_format(configuration: &configuration::Configuration, o11y_period_query_range_params_v3: models::O11yPeriodQueryRangeParamsV3) -> Result<models::O11yPeriodO11yQueryRangeFormatOut, Error<PostO11yQueryRangeFormatError>> {
16021 let p_o11y_period_query_range_params_v3 = o11y_period_query_range_params_v3;
16023
16024 let uri_str = format!("{}/v1/o11y/query_range/format", configuration.base_path);
16025 let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
16026
16027 if let Some(ref user_agent) = configuration.user_agent {
16028 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
16029 }
16030 if let Some(ref token) = configuration.bearer_access_token {
16031 req_builder = req_builder.bearer_auth(token.to_owned());
16032 };
16033 req_builder = req_builder.json(&p_o11y_period_query_range_params_v3);
16034
16035 let req = req_builder.build()?;
16036 let resp = configuration.client.execute(req).await?;
16037
16038 let status = resp.status();
16039 let content_type = resp
16040 .headers()
16041 .get("content-type")
16042 .and_then(|v| v.to_str().ok())
16043 .unwrap_or("application/octet-stream");
16044 let content_type = super::ContentType::from(content_type);
16045
16046 if !status.is_client_error() && !status.is_server_error() {
16047 let content = resp.text().await?;
16048 match content_type {
16049 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
16050 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yQueryRangeFormatOut`"))),
16051 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::O11yPeriodO11yQueryRangeFormatOut`")))),
16052 }
16053 } else {
16054 let content = resp.text().await?;
16055 let entity: Option<PostO11yQueryRangeFormatError> = serde_json::from_str(&content).ok();
16056 Err(Error::ResponseError(ResponseContent { status, content, entity }))
16057 }
16058}
16059
16060pub async fn post_o11y_query_range_preview(configuration: &configuration::Configuration, o11y_period_o11y_query_range_preview_in: models::O11yPeriodO11yQueryRangePreviewIn) -> Result<models::O11yPeriodO11yQueryRangePreviewOut, Error<PostO11yQueryRangePreviewError>> {
16062 let p_o11y_period_o11y_query_range_preview_in = o11y_period_o11y_query_range_preview_in;
16064
16065 let uri_str = format!("{}/v1/o11y/query_range/preview", configuration.base_path);
16066 let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
16067
16068 if let Some(ref user_agent) = configuration.user_agent {
16069 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
16070 }
16071 if let Some(ref token) = configuration.bearer_access_token {
16072 req_builder = req_builder.bearer_auth(token.to_owned());
16073 };
16074 req_builder = req_builder.json(&p_o11y_period_o11y_query_range_preview_in);
16075
16076 let req = req_builder.build()?;
16077 let resp = configuration.client.execute(req).await?;
16078
16079 let status = resp.status();
16080 let content_type = resp
16081 .headers()
16082 .get("content-type")
16083 .and_then(|v| v.to_str().ok())
16084 .unwrap_or("application/octet-stream");
16085 let content_type = super::ContentType::from(content_type);
16086
16087 if !status.is_client_error() && !status.is_server_error() {
16088 let content = resp.text().await?;
16089 match content_type {
16090 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
16091 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yQueryRangePreviewOut`"))),
16092 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::O11yPeriodO11yQueryRangePreviewOut`")))),
16093 }
16094 } else {
16095 let content = resp.text().await?;
16096 let entity: Option<PostO11yQueryRangePreviewError> = serde_json::from_str(&content).ok();
16097 Err(Error::ResponseError(ResponseContent { status, content, entity }))
16098 }
16099}
16100
16101pub async fn post_o11y_register(configuration: &configuration::Configuration, o11y_period_o11y_register_in: models::O11yPeriodO11yRegisterIn) -> Result<models::O11yPeriodO11yRegisterOut, Error<PostO11yRegisterError>> {
16103 let p_o11y_period_o11y_register_in = o11y_period_o11y_register_in;
16105
16106 let uri_str = format!("{}/v1/o11y/register", configuration.base_path);
16107 let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
16108
16109 if let Some(ref user_agent) = configuration.user_agent {
16110 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
16111 }
16112 if let Some(ref token) = configuration.bearer_access_token {
16113 req_builder = req_builder.bearer_auth(token.to_owned());
16114 };
16115 req_builder = req_builder.json(&p_o11y_period_o11y_register_in);
16116
16117 let req = req_builder.build()?;
16118 let resp = configuration.client.execute(req).await?;
16119
16120 let status = resp.status();
16121 let content_type = resp
16122 .headers()
16123 .get("content-type")
16124 .and_then(|v| v.to_str().ok())
16125 .unwrap_or("application/octet-stream");
16126 let content_type = super::ContentType::from(content_type);
16127
16128 if !status.is_client_error() && !status.is_server_error() {
16129 let content = resp.text().await?;
16130 match content_type {
16131 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
16132 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yRegisterOut`"))),
16133 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::O11yPeriodO11yRegisterOut`")))),
16134 }
16135 } else {
16136 let content = resp.text().await?;
16137 let entity: Option<PostO11yRegisterError> = serde_json::from_str(&content).ok();
16138 Err(Error::ResponseError(ResponseContent { status, content, entity }))
16139 }
16140}
16141
16142pub async fn post_o11y_reviews(configuration: &configuration::Configuration, o11y_period_create_queue_req: models::O11yPeriodCreateQueueReq) -> Result<models::O11yPeriodAnnQueueView, Error<PostO11yReviewsError>> {
16144 let p_o11y_period_create_queue_req = o11y_period_create_queue_req;
16146
16147 let uri_str = format!("{}/v1/o11y/reviews", configuration.base_path);
16148 let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
16149
16150 if let Some(ref user_agent) = configuration.user_agent {
16151 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
16152 }
16153 if let Some(ref token) = configuration.bearer_access_token {
16154 req_builder = req_builder.bearer_auth(token.to_owned());
16155 };
16156 req_builder = req_builder.json(&p_o11y_period_create_queue_req);
16157
16158 let req = req_builder.build()?;
16159 let resp = configuration.client.execute(req).await?;
16160
16161 let status = resp.status();
16162 let content_type = resp
16163 .headers()
16164 .get("content-type")
16165 .and_then(|v| v.to_str().ok())
16166 .unwrap_or("application/octet-stream");
16167 let content_type = super::ContentType::from(content_type);
16168
16169 if !status.is_client_error() && !status.is_server_error() {
16170 let content = resp.text().await?;
16171 match content_type {
16172 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
16173 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodAnnQueueView`"))),
16174 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::O11yPeriodAnnQueueView`")))),
16175 }
16176 } else {
16177 let content = resp.text().await?;
16178 let entity: Option<PostO11yReviewsError> = serde_json::from_str(&content).ok();
16179 Err(Error::ResponseError(ResponseContent { status, content, entity }))
16180 }
16181}
16182
16183pub async fn post_o11y_reviews_by_id_items(configuration: &configuration::Configuration, id: &str, o11y_period_add_items_in: models::O11yPeriodAddItemsIn) -> Result<models::O11yPeriodAnnItemsCreated, Error<PostO11yReviewsByIdItemsError>> {
16185 let p_id = id;
16187 let p_o11y_period_add_items_in = o11y_period_add_items_in;
16188
16189 let uri_str = format!("{}/v1/o11y/reviews/{id}/items", configuration.base_path, id=crate::apis::urlencode(p_id));
16190 let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
16191
16192 if let Some(ref user_agent) = configuration.user_agent {
16193 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
16194 }
16195 if let Some(ref token) = configuration.bearer_access_token {
16196 req_builder = req_builder.bearer_auth(token.to_owned());
16197 };
16198 req_builder = req_builder.json(&p_o11y_period_add_items_in);
16199
16200 let req = req_builder.build()?;
16201 let resp = configuration.client.execute(req).await?;
16202
16203 let status = resp.status();
16204 let content_type = resp
16205 .headers()
16206 .get("content-type")
16207 .and_then(|v| v.to_str().ok())
16208 .unwrap_or("application/octet-stream");
16209 let content_type = super::ContentType::from(content_type);
16210
16211 if !status.is_client_error() && !status.is_server_error() {
16212 let content = resp.text().await?;
16213 match content_type {
16214 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
16215 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodAnnItemsCreated`"))),
16216 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::O11yPeriodAnnItemsCreated`")))),
16217 }
16218 } else {
16219 let content = resp.text().await?;
16220 let entity: Option<PostO11yReviewsByIdItemsError> = serde_json::from_str(&content).ok();
16221 Err(Error::ResponseError(ResponseContent { status, content, entity }))
16222 }
16223}
16224
16225pub async fn post_o11y_sentinel_discover(configuration: &configuration::Configuration, o11y_period_o11y_discover_in: models::O11yPeriodO11yDiscoverIn) -> Result<models::O11yPeriodO11yDiscoverOut, Error<PostO11ySentinelDiscoverError>> {
16227 let p_o11y_period_o11y_discover_in = o11y_period_o11y_discover_in;
16229
16230 let uri_str = format!("{}/v1/o11y/sentinel/discover", configuration.base_path);
16231 let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
16232
16233 if let Some(ref user_agent) = configuration.user_agent {
16234 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
16235 }
16236 if let Some(ref token) = configuration.bearer_access_token {
16237 req_builder = req_builder.bearer_auth(token.to_owned());
16238 };
16239 req_builder = req_builder.json(&p_o11y_period_o11y_discover_in);
16240
16241 let req = req_builder.build()?;
16242 let resp = configuration.client.execute(req).await?;
16243
16244 let status = resp.status();
16245 let content_type = resp
16246 .headers()
16247 .get("content-type")
16248 .and_then(|v| v.to_str().ok())
16249 .unwrap_or("application/octet-stream");
16250 let content_type = super::ContentType::from(content_type);
16251
16252 if !status.is_client_error() && !status.is_server_error() {
16253 let content = resp.text().await?;
16254 match content_type {
16255 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
16256 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yDiscoverOut`"))),
16257 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::O11yPeriodO11yDiscoverOut`")))),
16258 }
16259 } else {
16260 let content = resp.text().await?;
16261 let entity: Option<PostO11ySentinelDiscoverError> = serde_json::from_str(&content).ok();
16262 Err(Error::ResponseError(ResponseContent { status, content, entity }))
16263 }
16264}
16265
16266pub async fn post_o11y_sentinel_projects(configuration: &configuration::Configuration, o11y_period_o11y_sentry_postable_project: models::O11yPeriodO11ySentryPostableProject) -> Result<models::O11yPeriodO11ySentryProjectOut, Error<PostO11ySentinelProjectsError>> {
16268 let p_o11y_period_o11y_sentry_postable_project = o11y_period_o11y_sentry_postable_project;
16270
16271 let uri_str = format!("{}/v1/o11y/sentinel/projects", configuration.base_path);
16272 let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
16273
16274 if let Some(ref user_agent) = configuration.user_agent {
16275 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
16276 }
16277 if let Some(ref token) = configuration.bearer_access_token {
16278 req_builder = req_builder.bearer_auth(token.to_owned());
16279 };
16280 req_builder = req_builder.json(&p_o11y_period_o11y_sentry_postable_project);
16281
16282 let req = req_builder.build()?;
16283 let resp = configuration.client.execute(req).await?;
16284
16285 let status = resp.status();
16286 let content_type = resp
16287 .headers()
16288 .get("content-type")
16289 .and_then(|v| v.to_str().ok())
16290 .unwrap_or("application/octet-stream");
16291 let content_type = super::ContentType::from(content_type);
16292
16293 if !status.is_client_error() && !status.is_server_error() {
16294 let content = resp.text().await?;
16295 match content_type {
16296 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
16297 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11ySentryProjectOut`"))),
16298 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::O11yPeriodO11ySentryProjectOut`")))),
16299 }
16300 } else {
16301 let content = resp.text().await?;
16302 let entity: Option<PostO11ySentinelProjectsError> = serde_json::from_str(&content).ok();
16303 Err(Error::ResponseError(ResponseContent { status, content, entity }))
16304 }
16305}
16306
16307pub async fn post_o11y_sentinel_projects_by_id_keys_rotate(configuration: &configuration::Configuration, id: &str) -> Result<models::O11yPeriodO11ySentryProjectOut, Error<PostO11ySentinelProjectsByIdKeysRotateError>> {
16309 let p_id = id;
16311
16312 let uri_str = format!("{}/v1/o11y/sentinel/projects/{id}/keys/rotate", configuration.base_path, id=crate::apis::urlencode(p_id));
16313 let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
16314
16315 if let Some(ref user_agent) = configuration.user_agent {
16316 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
16317 }
16318 if let Some(ref token) = configuration.bearer_access_token {
16319 req_builder = req_builder.bearer_auth(token.to_owned());
16320 };
16321
16322 let req = req_builder.build()?;
16323 let resp = configuration.client.execute(req).await?;
16324
16325 let status = resp.status();
16326 let content_type = resp
16327 .headers()
16328 .get("content-type")
16329 .and_then(|v| v.to_str().ok())
16330 .unwrap_or("application/octet-stream");
16331 let content_type = super::ContentType::from(content_type);
16332
16333 if !status.is_client_error() && !status.is_server_error() {
16334 let content = resp.text().await?;
16335 match content_type {
16336 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
16337 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11ySentryProjectOut`"))),
16338 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::O11yPeriodO11ySentryProjectOut`")))),
16339 }
16340 } else {
16341 let content = resp.text().await?;
16342 let entity: Option<PostO11ySentinelProjectsByIdKeysRotateError> = serde_json::from_str(&content).ok();
16343 Err(Error::ResponseError(ResponseContent { status, content, entity }))
16344 }
16345}
16346
16347pub async fn post_o11y_service_entry_point_operations(configuration: &configuration::Configuration, o11y_period_o11y_operations_in: models::O11yPeriodO11yOperationsIn) -> Result<models::O11yPeriodO11yOperationsOut, Error<PostO11yServiceEntryPointOperationsError>> {
16349 let p_o11y_period_o11y_operations_in = o11y_period_o11y_operations_in;
16351
16352 let uri_str = format!("{}/v1/o11y/service/entry_point_operations", configuration.base_path);
16353 let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
16354
16355 if let Some(ref user_agent) = configuration.user_agent {
16356 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
16357 }
16358 if let Some(ref token) = configuration.bearer_access_token {
16359 req_builder = req_builder.bearer_auth(token.to_owned());
16360 };
16361 req_builder = req_builder.json(&p_o11y_period_o11y_operations_in);
16362
16363 let req = req_builder.build()?;
16364 let resp = configuration.client.execute(req).await?;
16365
16366 let status = resp.status();
16367 let content_type = resp
16368 .headers()
16369 .get("content-type")
16370 .and_then(|v| v.to_str().ok())
16371 .unwrap_or("application/octet-stream");
16372 let content_type = super::ContentType::from(content_type);
16373
16374 if !status.is_client_error() && !status.is_server_error() {
16375 let content = resp.text().await?;
16376 match content_type {
16377 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
16378 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yOperationsOut`"))),
16379 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::O11yPeriodO11yOperationsOut`")))),
16380 }
16381 } else {
16382 let content = resp.text().await?;
16383 let entity: Option<PostO11yServiceEntryPointOperationsError> = serde_json::from_str(&content).ok();
16384 Err(Error::ResponseError(ResponseContent { status, content, entity }))
16385 }
16386}
16387
16388pub async fn post_o11y_service_top_level_operations(configuration: &configuration::Configuration, o11y_period_o11y_top_level_ops_in: models::O11yPeriodO11yTopLevelOpsIn) -> Result<std::collections::HashMap<String, Vec<String>>, Error<PostO11yServiceTopLevelOperationsError>> {
16390 let p_o11y_period_o11y_top_level_ops_in = o11y_period_o11y_top_level_ops_in;
16392
16393 let uri_str = format!("{}/v1/o11y/service/top_level_operations", configuration.base_path);
16394 let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
16395
16396 if let Some(ref user_agent) = configuration.user_agent {
16397 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
16398 }
16399 if let Some(ref token) = configuration.bearer_access_token {
16400 req_builder = req_builder.bearer_auth(token.to_owned());
16401 };
16402 req_builder = req_builder.json(&p_o11y_period_o11y_top_level_ops_in);
16403
16404 let req = req_builder.build()?;
16405 let resp = configuration.client.execute(req).await?;
16406
16407 let status = resp.status();
16408 let content_type = resp
16409 .headers()
16410 .get("content-type")
16411 .and_then(|v| v.to_str().ok())
16412 .unwrap_or("application/octet-stream");
16413 let content_type = super::ContentType::from(content_type);
16414
16415 if !status.is_client_error() && !status.is_server_error() {
16416 let content = resp.text().await?;
16417 match content_type {
16418 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
16419 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `std::collections::HashMap<String, Vec<String>>`"))),
16420 ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `std::collections::HashMap<String, Vec<String>>`")))),
16421 }
16422 } else {
16423 let content = resp.text().await?;
16424 let entity: Option<PostO11yServiceTopLevelOperationsError> = serde_json::from_str(&content).ok();
16425 Err(Error::ResponseError(ResponseContent { status, content, entity }))
16426 }
16427}
16428
16429pub async fn post_o11y_service_top_operations(configuration: &configuration::Configuration, o11y_period_o11y_operations_in: models::O11yPeriodO11yOperationsIn) -> Result<models::O11yPeriodO11yOperationsOut, Error<PostO11yServiceTopOperationsError>> {
16431 let p_o11y_period_o11y_operations_in = o11y_period_o11y_operations_in;
16433
16434 let uri_str = format!("{}/v1/o11y/service/top_operations", configuration.base_path);
16435 let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
16436
16437 if let Some(ref user_agent) = configuration.user_agent {
16438 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
16439 }
16440 if let Some(ref token) = configuration.bearer_access_token {
16441 req_builder = req_builder.bearer_auth(token.to_owned());
16442 };
16443 req_builder = req_builder.json(&p_o11y_period_o11y_operations_in);
16444
16445 let req = req_builder.build()?;
16446 let resp = configuration.client.execute(req).await?;
16447
16448 let status = resp.status();
16449 let content_type = resp
16450 .headers()
16451 .get("content-type")
16452 .and_then(|v| v.to_str().ok())
16453 .unwrap_or("application/octet-stream");
16454 let content_type = super::ContentType::from(content_type);
16455
16456 if !status.is_client_error() && !status.is_server_error() {
16457 let content = resp.text().await?;
16458 match content_type {
16459 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
16460 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yOperationsOut`"))),
16461 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::O11yPeriodO11yOperationsOut`")))),
16462 }
16463 } else {
16464 let content = resp.text().await?;
16465 let entity: Option<PostO11yServiceTopOperationsError> = serde_json::from_str(&content).ok();
16466 Err(Error::ResponseError(ResponseContent { status, content, entity }))
16467 }
16468}
16469
16470pub async fn post_o11y_services(configuration: &configuration::Configuration, o11y_period_o11y_services_in: models::O11yPeriodO11yServicesIn) -> Result<models::O11yPeriodO11yServicesOut, Error<PostO11yServicesError>> {
16472 let p_o11y_period_o11y_services_in = o11y_period_o11y_services_in;
16474
16475 let uri_str = format!("{}/v1/o11y/services", configuration.base_path);
16476 let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
16477
16478 if let Some(ref user_agent) = configuration.user_agent {
16479 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
16480 }
16481 if let Some(ref token) = configuration.bearer_access_token {
16482 req_builder = req_builder.bearer_auth(token.to_owned());
16483 };
16484 req_builder = req_builder.json(&p_o11y_period_o11y_services_in);
16485
16486 let req = req_builder.build()?;
16487 let resp = configuration.client.execute(req).await?;
16488
16489 let status = resp.status();
16490 let content_type = resp
16491 .headers()
16492 .get("content-type")
16493 .and_then(|v| v.to_str().ok())
16494 .unwrap_or("application/octet-stream");
16495 let content_type = super::ContentType::from(content_type);
16496
16497 if !status.is_client_error() && !status.is_server_error() {
16498 let content = resp.text().await?;
16499 match content_type {
16500 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
16501 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yServicesOut`"))),
16502 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::O11yPeriodO11yServicesOut`")))),
16503 }
16504 } else {
16505 let content = resp.text().await?;
16506 let entity: Option<PostO11yServicesError> = serde_json::from_str(&content).ok();
16507 Err(Error::ResponseError(ResponseContent { status, content, entity }))
16508 }
16509}
16510
16511pub async fn post_o11y_settings_apdex(configuration: &configuration::Configuration, o11y_period_o11y_apdex_set_in: models::O11yPeriodO11yApdexSetIn) -> Result<models::O11yPeriodO11yApdexSetOut, Error<PostO11ySettingsApdexError>> {
16513 let p_o11y_period_o11y_apdex_set_in = o11y_period_o11y_apdex_set_in;
16515
16516 let uri_str = format!("{}/v1/o11y/settings/apdex", configuration.base_path);
16517 let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
16518
16519 if let Some(ref user_agent) = configuration.user_agent {
16520 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
16521 }
16522 if let Some(ref token) = configuration.bearer_access_token {
16523 req_builder = req_builder.bearer_auth(token.to_owned());
16524 };
16525 req_builder = req_builder.json(&p_o11y_period_o11y_apdex_set_in);
16526
16527 let req = req_builder.build()?;
16528 let resp = configuration.client.execute(req).await?;
16529
16530 let status = resp.status();
16531 let content_type = resp
16532 .headers()
16533 .get("content-type")
16534 .and_then(|v| v.to_str().ok())
16535 .unwrap_or("application/octet-stream");
16536 let content_type = super::ContentType::from(content_type);
16537
16538 if !status.is_client_error() && !status.is_server_error() {
16539 let content = resp.text().await?;
16540 match content_type {
16541 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
16542 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yApdexSetOut`"))),
16543 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::O11yPeriodO11yApdexSetOut`")))),
16544 }
16545 } else {
16546 let content = resp.text().await?;
16547 let entity: Option<PostO11ySettingsApdexError> = serde_json::from_str(&content).ok();
16548 Err(Error::ResponseError(ResponseContent { status, content, entity }))
16549 }
16550}
16551
16552pub async fn post_o11y_settings_ttl(configuration: &configuration::Configuration, o11y_period_o11y_retention_set_in: models::O11yPeriodO11yRetentionSetIn) -> Result<models::O11yPeriodO11yRetentionSetOut, Error<PostO11ySettingsTtlError>> {
16554 let p_o11y_period_o11y_retention_set_in = o11y_period_o11y_retention_set_in;
16556
16557 let uri_str = format!("{}/v1/o11y/settings/ttl", configuration.base_path);
16558 let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
16559
16560 if let Some(ref user_agent) = configuration.user_agent {
16561 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
16562 }
16563 if let Some(ref token) = configuration.bearer_access_token {
16564 req_builder = req_builder.bearer_auth(token.to_owned());
16565 };
16566 req_builder = req_builder.json(&p_o11y_period_o11y_retention_set_in);
16567
16568 let req = req_builder.build()?;
16569 let resp = configuration.client.execute(req).await?;
16570
16571 let status = resp.status();
16572 let content_type = resp
16573 .headers()
16574 .get("content-type")
16575 .and_then(|v| v.to_str().ok())
16576 .unwrap_or("application/octet-stream");
16577 let content_type = super::ContentType::from(content_type);
16578
16579 if !status.is_client_error() && !status.is_server_error() {
16580 let content = resp.text().await?;
16581 match content_type {
16582 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
16583 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yRetentionSetOut`"))),
16584 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::O11yPeriodO11yRetentionSetOut`")))),
16585 }
16586 } else {
16587 let content = resp.text().await?;
16588 let entity: Option<PostO11ySettingsTtlError> = serde_json::from_str(&content).ok();
16589 Err(Error::ResponseError(ResponseContent { status, content, entity }))
16590 }
16591}
16592
16593pub async fn post_o11y_span_percentile(configuration: &configuration::Configuration, o11y_period_o11y_span_percentile_in: models::O11yPeriodO11ySpanPercentileIn) -> Result<models::O11yPeriodO11ySpanPercentileOut, Error<PostO11ySpanPercentileError>> {
16595 let p_o11y_period_o11y_span_percentile_in = o11y_period_o11y_span_percentile_in;
16597
16598 let uri_str = format!("{}/v1/o11y/span_percentile", configuration.base_path);
16599 let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
16600
16601 if let Some(ref user_agent) = configuration.user_agent {
16602 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
16603 }
16604 if let Some(ref token) = configuration.bearer_access_token {
16605 req_builder = req_builder.bearer_auth(token.to_owned());
16606 };
16607 req_builder = req_builder.json(&p_o11y_period_o11y_span_percentile_in);
16608
16609 let req = req_builder.build()?;
16610 let resp = configuration.client.execute(req).await?;
16611
16612 let status = resp.status();
16613 let content_type = resp
16614 .headers()
16615 .get("content-type")
16616 .and_then(|v| v.to_str().ok())
16617 .unwrap_or("application/octet-stream");
16618 let content_type = super::ContentType::from(content_type);
16619
16620 if !status.is_client_error() && !status.is_server_error() {
16621 let content = resp.text().await?;
16622 match content_type {
16623 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
16624 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11ySpanPercentileOut`"))),
16625 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::O11yPeriodO11ySpanPercentileOut`")))),
16626 }
16627 } else {
16628 let content = resp.text().await?;
16629 let entity: Option<PostO11ySpanPercentileError> = serde_json::from_str(&content).ok();
16630 Err(Error::ResponseError(ResponseContent { status, content, entity }))
16631 }
16632}
16633
16634pub async fn post_o11y_statefulsets_list(configuration: &configuration::Configuration, o11y_period_stateful_set_list_request: models::O11yPeriodStatefulSetListRequest) -> Result<models::O11yPeriodO11yStatefulSetListOut, Error<PostO11yStatefulsetsListError>> {
16636 let p_o11y_period_stateful_set_list_request = o11y_period_stateful_set_list_request;
16638
16639 let uri_str = format!("{}/v1/o11y/statefulsets/list", configuration.base_path);
16640 let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
16641
16642 if let Some(ref user_agent) = configuration.user_agent {
16643 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
16644 }
16645 if let Some(ref token) = configuration.bearer_access_token {
16646 req_builder = req_builder.bearer_auth(token.to_owned());
16647 };
16648 req_builder = req_builder.json(&p_o11y_period_stateful_set_list_request);
16649
16650 let req = req_builder.build()?;
16651 let resp = configuration.client.execute(req).await?;
16652
16653 let status = resp.status();
16654 let content_type = resp
16655 .headers()
16656 .get("content-type")
16657 .and_then(|v| v.to_str().ok())
16658 .unwrap_or("application/octet-stream");
16659 let content_type = super::ContentType::from(content_type);
16660
16661 if !status.is_client_error() && !status.is_server_error() {
16662 let content = resp.text().await?;
16663 match content_type {
16664 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
16665 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yStatefulSetListOut`"))),
16666 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::O11yPeriodO11yStatefulSetListOut`")))),
16667 }
16668 } else {
16669 let content = resp.text().await?;
16670 let entity: Option<PostO11yStatefulsetsListError> = serde_json::from_str(&content).ok();
16671 Err(Error::ResponseError(ResponseContent { status, content, entity }))
16672 }
16673}
16674
16675pub async fn post_o11y_substitute_vars(configuration: &configuration::Configuration, o11y_period_query_range_request: models::O11yPeriodQueryRangeRequest) -> Result<models::O11yPeriodO11ySubstituteVarsOut, Error<PostO11ySubstituteVarsError>> {
16677 let p_o11y_period_query_range_request = o11y_period_query_range_request;
16679
16680 let uri_str = format!("{}/v1/o11y/substitute_vars", configuration.base_path);
16681 let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
16682
16683 if let Some(ref user_agent) = configuration.user_agent {
16684 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
16685 }
16686 if let Some(ref token) = configuration.bearer_access_token {
16687 req_builder = req_builder.bearer_auth(token.to_owned());
16688 };
16689 req_builder = req_builder.json(&p_o11y_period_query_range_request);
16690
16691 let req = req_builder.build()?;
16692 let resp = configuration.client.execute(req).await?;
16693
16694 let status = resp.status();
16695 let content_type = resp
16696 .headers()
16697 .get("content-type")
16698 .and_then(|v| v.to_str().ok())
16699 .unwrap_or("application/octet-stream");
16700 let content_type = super::ContentType::from(content_type);
16701
16702 if !status.is_client_error() && !status.is_server_error() {
16703 let content = resp.text().await?;
16704 match content_type {
16705 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
16706 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11ySubstituteVarsOut`"))),
16707 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::O11yPeriodO11ySubstituteVarsOut`")))),
16708 }
16709 } else {
16710 let content = resp.text().await?;
16711 let entity: Option<PostO11ySubstituteVarsError> = serde_json::from_str(&content).ok();
16712 Err(Error::ResponseError(ResponseContent { status, content, entity }))
16713 }
16714}
16715
16716pub async fn post_o11y_third_party_apis_overview_domain(configuration: &configuration::Configuration, o11y_period_o11y_domains_in: models::O11yPeriodO11yDomainsIn) -> Result<models::O11yPeriodO11yDomainsOut, Error<PostO11yThirdPartyApisOverviewDomainError>> {
16718 let p_o11y_period_o11y_domains_in = o11y_period_o11y_domains_in;
16720
16721 let uri_str = format!("{}/v1/o11y/third-party-apis/overview/domain", configuration.base_path);
16722 let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
16723
16724 if let Some(ref user_agent) = configuration.user_agent {
16725 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
16726 }
16727 if let Some(ref token) = configuration.bearer_access_token {
16728 req_builder = req_builder.bearer_auth(token.to_owned());
16729 };
16730 req_builder = req_builder.json(&p_o11y_period_o11y_domains_in);
16731
16732 let req = req_builder.build()?;
16733 let resp = configuration.client.execute(req).await?;
16734
16735 let status = resp.status();
16736 let content_type = resp
16737 .headers()
16738 .get("content-type")
16739 .and_then(|v| v.to_str().ok())
16740 .unwrap_or("application/octet-stream");
16741 let content_type = super::ContentType::from(content_type);
16742
16743 if !status.is_client_error() && !status.is_server_error() {
16744 let content = resp.text().await?;
16745 match content_type {
16746 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
16747 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yDomainsOut`"))),
16748 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::O11yPeriodO11yDomainsOut`")))),
16749 }
16750 } else {
16751 let content = resp.text().await?;
16752 let entity: Option<PostO11yThirdPartyApisOverviewDomainError> = serde_json::from_str(&content).ok();
16753 Err(Error::ResponseError(ResponseContent { status, content, entity }))
16754 }
16755}
16756
16757pub async fn post_o11y_third_party_apis_overview_list(configuration: &configuration::Configuration, o11y_period_o11y_domains_in: models::O11yPeriodO11yDomainsIn) -> Result<models::O11yPeriodO11yDomainsOut, Error<PostO11yThirdPartyApisOverviewListError>> {
16759 let p_o11y_period_o11y_domains_in = o11y_period_o11y_domains_in;
16761
16762 let uri_str = format!("{}/v1/o11y/third-party-apis/overview/list", configuration.base_path);
16763 let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
16764
16765 if let Some(ref user_agent) = configuration.user_agent {
16766 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
16767 }
16768 if let Some(ref token) = configuration.bearer_access_token {
16769 req_builder = req_builder.bearer_auth(token.to_owned());
16770 };
16771 req_builder = req_builder.json(&p_o11y_period_o11y_domains_in);
16772
16773 let req = req_builder.build()?;
16774 let resp = configuration.client.execute(req).await?;
16775
16776 let status = resp.status();
16777 let content_type = resp
16778 .headers()
16779 .get("content-type")
16780 .and_then(|v| v.to_str().ok())
16781 .unwrap_or("application/octet-stream");
16782 let content_type = super::ContentType::from(content_type);
16783
16784 if !status.is_client_error() && !status.is_server_error() {
16785 let content = resp.text().await?;
16786 match content_type {
16787 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
16788 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yDomainsOut`"))),
16789 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::O11yPeriodO11yDomainsOut`")))),
16790 }
16791 } else {
16792 let content = resp.text().await?;
16793 let entity: Option<PostO11yThirdPartyApisOverviewListError> = serde_json::from_str(&content).ok();
16794 Err(Error::ResponseError(ResponseContent { status, content, entity }))
16795 }
16796}
16797
16798pub async fn post_o11y_variables_query(configuration: &configuration::Configuration, o11y_period_o11y_dashboard_vars_in: models::O11yPeriodO11yDashboardVarsIn) -> Result<models::O11yPeriodO11yDashboardVarsOut, Error<PostO11yVariablesQueryError>> {
16800 let p_o11y_period_o11y_dashboard_vars_in = o11y_period_o11y_dashboard_vars_in;
16802
16803 let uri_str = format!("{}/v1/o11y/variables/query", configuration.base_path);
16804 let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
16805
16806 if let Some(ref user_agent) = configuration.user_agent {
16807 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
16808 }
16809 if let Some(ref token) = configuration.bearer_access_token {
16810 req_builder = req_builder.bearer_auth(token.to_owned());
16811 };
16812 req_builder = req_builder.json(&p_o11y_period_o11y_dashboard_vars_in);
16813
16814 let req = req_builder.build()?;
16815 let resp = configuration.client.execute(req).await?;
16816
16817 let status = resp.status();
16818 let content_type = resp
16819 .headers()
16820 .get("content-type")
16821 .and_then(|v| v.to_str().ok())
16822 .unwrap_or("application/octet-stream");
16823 let content_type = super::ContentType::from(content_type);
16824
16825 if !status.is_client_error() && !status.is_server_error() {
16826 let content = resp.text().await?;
16827 match content_type {
16828 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
16829 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yDashboardVarsOut`"))),
16830 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::O11yPeriodO11yDashboardVarsOut`")))),
16831 }
16832 } else {
16833 let content = resp.text().await?;
16834 let entity: Option<PostO11yVariablesQueryError> = serde_json::from_str(&content).ok();
16835 Err(Error::ResponseError(ResponseContent { status, content, entity }))
16836 }
16837}
16838
16839pub async fn preview_metric_reduction_rule(configuration: &configuration::Configuration, o11y_period_o11y_reduction_rule_preview_in: models::O11yPeriodO11yReductionRulePreviewIn) -> Result<models::O11yPeriodO11yReductionRulePreviewOut, Error<PreviewMetricReductionRuleError>> {
16841 let p_o11y_period_o11y_reduction_rule_preview_in = o11y_period_o11y_reduction_rule_preview_in;
16843
16844 let uri_str = format!("{}/v1/o11y/metric_reduction_rules/preview", configuration.base_path);
16845 let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
16846
16847 if let Some(ref user_agent) = configuration.user_agent {
16848 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
16849 }
16850 if let Some(ref token) = configuration.bearer_access_token {
16851 req_builder = req_builder.bearer_auth(token.to_owned());
16852 };
16853 req_builder = req_builder.json(&p_o11y_period_o11y_reduction_rule_preview_in);
16854
16855 let req = req_builder.build()?;
16856 let resp = configuration.client.execute(req).await?;
16857
16858 let status = resp.status();
16859 let content_type = resp
16860 .headers()
16861 .get("content-type")
16862 .and_then(|v| v.to_str().ok())
16863 .unwrap_or("application/octet-stream");
16864 let content_type = super::ContentType::from(content_type);
16865
16866 if !status.is_client_error() && !status.is_server_error() {
16867 let content = resp.text().await?;
16868 match content_type {
16869 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
16870 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yReductionRulePreviewOut`"))),
16871 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::O11yPeriodO11yReductionRulePreviewOut`")))),
16872 }
16873 } else {
16874 let content = resp.text().await?;
16875 let entity: Option<PreviewMetricReductionRuleError> = serde_json::from_str(&content).ok();
16876 Err(Error::ResponseError(ResponseContent { status, content, entity }))
16877 }
16878}
16879
16880pub async fn put_host(configuration: &configuration::Configuration, o11y_period_postable_host: models::O11yPeriodPostableHost) -> Result<(), Error<PutHostError>> {
16882 let p_o11y_period_postable_host = o11y_period_postable_host;
16884
16885 let uri_str = format!("{}/v1/o11y/zeus/hosts", configuration.base_path);
16886 let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str);
16887
16888 if let Some(ref user_agent) = configuration.user_agent {
16889 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
16890 }
16891 if let Some(ref token) = configuration.bearer_access_token {
16892 req_builder = req_builder.bearer_auth(token.to_owned());
16893 };
16894 req_builder = req_builder.json(&p_o11y_period_postable_host);
16895
16896 let req = req_builder.build()?;
16897 let resp = configuration.client.execute(req).await?;
16898
16899 let status = resp.status();
16900
16901 if !status.is_client_error() && !status.is_server_error() {
16902 Ok(())
16903 } else {
16904 let content = resp.text().await?;
16905 let entity: Option<PutHostError> = serde_json::from_str(&content).ok();
16906 Err(Error::ResponseError(ResponseContent { status, content, entity }))
16907 }
16908}
16909
16910pub async fn put_o11y_explorer_views_by_viewid(configuration: &configuration::Configuration, view_id: &str, o11y_period_o11y_saved_view_update_in: models::O11yPeriodO11ySavedViewUpdateIn) -> Result<models::O11yPeriodO11ySavedViewOut, Error<PutO11yExplorerViewsByViewidError>> {
16912 let p_view_id = view_id;
16914 let p_o11y_period_o11y_saved_view_update_in = o11y_period_o11y_saved_view_update_in;
16915
16916 let uri_str = format!("{}/v1/o11y/explorer/views/{viewId}", configuration.base_path, viewId=crate::apis::urlencode(p_view_id));
16917 let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str);
16918
16919 if let Some(ref user_agent) = configuration.user_agent {
16920 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
16921 }
16922 if let Some(ref token) = configuration.bearer_access_token {
16923 req_builder = req_builder.bearer_auth(token.to_owned());
16924 };
16925 req_builder = req_builder.json(&p_o11y_period_o11y_saved_view_update_in);
16926
16927 let req = req_builder.build()?;
16928 let resp = configuration.client.execute(req).await?;
16929
16930 let status = resp.status();
16931 let content_type = resp
16932 .headers()
16933 .get("content-type")
16934 .and_then(|v| v.to_str().ok())
16935 .unwrap_or("application/octet-stream");
16936 let content_type = super::ContentType::from(content_type);
16937
16938 if !status.is_client_error() && !status.is_server_error() {
16939 let content = resp.text().await?;
16940 match content_type {
16941 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
16942 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11ySavedViewOut`"))),
16943 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::O11yPeriodO11ySavedViewOut`")))),
16944 }
16945 } else {
16946 let content = resp.text().await?;
16947 let entity: Option<PutO11yExplorerViewsByViewidError> = serde_json::from_str(&content).ok();
16948 Err(Error::ResponseError(ResponseContent { status, content, entity }))
16949 }
16950}
16951
16952pub async fn put_o11y_sentinel_issues_by_id(configuration: &configuration::Configuration, id: &str, o11y_period_o11y_sentry_update_issue_in: models::O11yPeriodO11ySentryUpdateIssueIn) -> Result<models::O11yPeriodO11yErrorIssueOut, Error<PutO11ySentinelIssuesByIdError>> {
16954 let p_id = id;
16956 let p_o11y_period_o11y_sentry_update_issue_in = o11y_period_o11y_sentry_update_issue_in;
16957
16958 let uri_str = format!("{}/v1/o11y/sentinel/issues/{id}", configuration.base_path, id=crate::apis::urlencode(p_id));
16959 let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str);
16960
16961 if let Some(ref user_agent) = configuration.user_agent {
16962 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
16963 }
16964 if let Some(ref token) = configuration.bearer_access_token {
16965 req_builder = req_builder.bearer_auth(token.to_owned());
16966 };
16967 req_builder = req_builder.json(&p_o11y_period_o11y_sentry_update_issue_in);
16968
16969 let req = req_builder.build()?;
16970 let resp = configuration.client.execute(req).await?;
16971
16972 let status = resp.status();
16973 let content_type = resp
16974 .headers()
16975 .get("content-type")
16976 .and_then(|v| v.to_str().ok())
16977 .unwrap_or("application/octet-stream");
16978 let content_type = super::ContentType::from(content_type);
16979
16980 if !status.is_client_error() && !status.is_server_error() {
16981 let content = resp.text().await?;
16982 match content_type {
16983 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
16984 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yErrorIssueOut`"))),
16985 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::O11yPeriodO11yErrorIssueOut`")))),
16986 }
16987 } else {
16988 let content = resp.text().await?;
16989 let entity: Option<PutO11ySentinelIssuesByIdError> = serde_json::from_str(&content).ok();
16990 Err(Error::ResponseError(ResponseContent { status, content, entity }))
16991 }
16992}
16993
16994pub async fn put_profile(configuration: &configuration::Configuration, o11y_period_postable_profile: models::O11yPeriodPostableProfile) -> Result<(), Error<PutProfileError>> {
16996 let p_o11y_period_postable_profile = o11y_period_postable_profile;
16998
16999 let uri_str = format!("{}/v1/o11y/zeus/profiles", configuration.base_path);
17000 let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str);
17001
17002 if let Some(ref user_agent) = configuration.user_agent {
17003 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
17004 }
17005 if let Some(ref token) = configuration.bearer_access_token {
17006 req_builder = req_builder.bearer_auth(token.to_owned());
17007 };
17008 req_builder = req_builder.json(&p_o11y_period_postable_profile);
17009
17010 let req = req_builder.build()?;
17011 let resp = configuration.client.execute(req).await?;
17012
17013 let status = resp.status();
17014
17015 if !status.is_client_error() && !status.is_server_error() {
17016 Ok(())
17017 } else {
17018 let content = resp.text().await?;
17019 let entity: Option<PutProfileError> = serde_json::from_str(&content).ok();
17020 Err(Error::ResponseError(ResponseContent { status, content, entity }))
17021 }
17022}
17023
17024pub async fn remove_user_role_by_user_id_and_role_id(configuration: &configuration::Configuration, id: &str, role_id: &str) -> Result<(), Error<RemoveUserRoleByUserIdAndRoleIdError>> {
17026 let p_id = id;
17028 let p_role_id = role_id;
17029
17030 let uri_str = format!("{}/v1/o11y/users/{id}/roles/{roleId}", configuration.base_path, id=crate::apis::urlencode(p_id), roleId=crate::apis::urlencode(p_role_id));
17031 let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str);
17032
17033 if let Some(ref user_agent) = configuration.user_agent {
17034 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
17035 }
17036 if let Some(ref token) = configuration.bearer_access_token {
17037 req_builder = req_builder.bearer_auth(token.to_owned());
17038 };
17039
17040 let req = req_builder.build()?;
17041 let resp = configuration.client.execute(req).await?;
17042
17043 let status = resp.status();
17044
17045 if !status.is_client_error() && !status.is_server_error() {
17046 Ok(())
17047 } else {
17048 let content = resp.text().await?;
17049 let entity: Option<RemoveUserRoleByUserIdAndRoleIdError> = serde_json::from_str(&content).ok();
17050 Err(Error::ResponseError(ResponseContent { status, content, entity }))
17051 }
17052}
17053
17054pub async fn reset_password(configuration: &configuration::Configuration, o11y_period_o11y_reset_password_in: models::O11yPeriodO11yResetPasswordIn) -> Result<(), Error<ResetPasswordError>> {
17056 let p_o11y_period_o11y_reset_password_in = o11y_period_o11y_reset_password_in;
17058
17059 let uri_str = format!("{}/v1/o11y/resetPassword", configuration.base_path);
17060 let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
17061
17062 if let Some(ref user_agent) = configuration.user_agent {
17063 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
17064 }
17065 if let Some(ref token) = configuration.bearer_access_token {
17066 req_builder = req_builder.bearer_auth(token.to_owned());
17067 };
17068 req_builder = req_builder.json(&p_o11y_period_o11y_reset_password_in);
17069
17070 let req = req_builder.build()?;
17071 let resp = configuration.client.execute(req).await?;
17072
17073 let status = resp.status();
17074
17075 if !status.is_client_error() && !status.is_server_error() {
17076 Ok(())
17077 } else {
17078 let content = resp.text().await?;
17079 let entity: Option<ResetPasswordError> = serde_json::from_str(&content).ok();
17080 Err(Error::ResponseError(ResponseContent { status, content, entity }))
17081 }
17082}
17083
17084pub async fn revoke_service_account_key(configuration: &configuration::Configuration, id: &str, fid: &str) -> Result<(), Error<RevokeServiceAccountKeyError>> {
17086 let p_id = id;
17088 let p_fid = fid;
17089
17090 let uri_str = format!("{}/v1/o11y/service_accounts/{id}/keys/{fid}", configuration.base_path, id=crate::apis::urlencode(p_id), fid=crate::apis::urlencode(p_fid));
17091 let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str);
17092
17093 if let Some(ref user_agent) = configuration.user_agent {
17094 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
17095 }
17096 if let Some(ref token) = configuration.bearer_access_token {
17097 req_builder = req_builder.bearer_auth(token.to_owned());
17098 };
17099
17100 let req = req_builder.build()?;
17101 let resp = configuration.client.execute(req).await?;
17102
17103 let status = resp.status();
17104
17105 if !status.is_client_error() && !status.is_server_error() {
17106 Ok(())
17107 } else {
17108 let content = resp.text().await?;
17109 let entity: Option<RevokeServiceAccountKeyError> = serde_json::from_str(&content).ok();
17110 Err(Error::ResponseError(ResponseContent { status, content, entity }))
17111 }
17112}
17113
17114pub async fn rotate_session(configuration: &configuration::Configuration, o11y_period_o11y_rotate_session_in: models::O11yPeriodO11yRotateSessionIn) -> Result<models::O11yPeriodO11yTokenOut, Error<RotateSessionError>> {
17116 let p_o11y_period_o11y_rotate_session_in = o11y_period_o11y_rotate_session_in;
17118
17119 let uri_str = format!("{}/v1/o11y/sessions/rotate", configuration.base_path);
17120 let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
17121
17122 if let Some(ref user_agent) = configuration.user_agent {
17123 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
17124 }
17125 if let Some(ref token) = configuration.bearer_access_token {
17126 req_builder = req_builder.bearer_auth(token.to_owned());
17127 };
17128 req_builder = req_builder.json(&p_o11y_period_o11y_rotate_session_in);
17129
17130 let req = req_builder.build()?;
17131 let resp = configuration.client.execute(req).await?;
17132
17133 let status = resp.status();
17134 let content_type = resp
17135 .headers()
17136 .get("content-type")
17137 .and_then(|v| v.to_str().ok())
17138 .unwrap_or("application/octet-stream");
17139 let content_type = super::ContentType::from(content_type);
17140
17141 if !status.is_client_error() && !status.is_server_error() {
17142 let content = resp.text().await?;
17143 match content_type {
17144 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
17145 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yTokenOut`"))),
17146 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::O11yPeriodO11yTokenOut`")))),
17147 }
17148 } else {
17149 let content = resp.text().await?;
17150 let entity: Option<RotateSessionError> = serde_json::from_str(&content).ok();
17151 Err(Error::ResponseError(ResponseContent { status, content, entity }))
17152 }
17153}
17154
17155pub async fn search_ingestion_keys(configuration: &configuration::Configuration, name: Option<&str>, page: Option<i32>, per_page: Option<i32>) -> Result<models::O11yPeriodO11yIngestionKeysOut, Error<SearchIngestionKeysError>> {
17157 let p_name = name;
17159 let p_page = page;
17160 let p_per_page = per_page;
17161
17162 let uri_str = format!("{}/v1/o11y/gateway/ingestion_keys/search", configuration.base_path);
17163 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
17164
17165 if let Some(ref param_value) = p_name {
17166 req_builder = req_builder.query(&[("name", ¶m_value.to_string())]);
17167 }
17168 if let Some(ref param_value) = p_page {
17169 req_builder = req_builder.query(&[("page", ¶m_value.to_string())]);
17170 }
17171 if let Some(ref param_value) = p_per_page {
17172 req_builder = req_builder.query(&[("per_page", ¶m_value.to_string())]);
17173 }
17174 if let Some(ref user_agent) = configuration.user_agent {
17175 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
17176 }
17177 if let Some(ref token) = configuration.bearer_access_token {
17178 req_builder = req_builder.bearer_auth(token.to_owned());
17179 };
17180
17181 let req = req_builder.build()?;
17182 let resp = configuration.client.execute(req).await?;
17183
17184 let status = resp.status();
17185 let content_type = resp
17186 .headers()
17187 .get("content-type")
17188 .and_then(|v| v.to_str().ok())
17189 .unwrap_or("application/octet-stream");
17190 let content_type = super::ContentType::from(content_type);
17191
17192 if !status.is_client_error() && !status.is_server_error() {
17193 let content = resp.text().await?;
17194 match content_type {
17195 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
17196 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yIngestionKeysOut`"))),
17197 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::O11yPeriodO11yIngestionKeysOut`")))),
17198 }
17199 } else {
17200 let content = resp.text().await?;
17201 let entity: Option<SearchIngestionKeysError> = serde_json::from_str(&content).ok();
17202 Err(Error::ResponseError(ResponseContent { status, content, entity }))
17203 }
17204}
17205
17206pub async fn search_traces(configuration: &configuration::Configuration, trace_id: &str, span_id: Option<&str>, level_up: Option<i32>, level_down: Option<i32>, span_render_limit: Option<i32>) -> Result<Vec<models::O11yPeriodO11yTraceSpanWindow>, Error<SearchTracesError>> {
17208 let p_trace_id = trace_id;
17210 let p_span_id = span_id;
17211 let p_level_up = level_up;
17212 let p_level_down = level_down;
17213 let p_span_render_limit = span_render_limit;
17214
17215 let uri_str = format!("{}/v1/o11y/traces/{traceId}", configuration.base_path, traceId=crate::apis::urlencode(p_trace_id));
17216 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
17217
17218 if let Some(ref param_value) = p_span_id {
17219 req_builder = req_builder.query(&[("spanId", ¶m_value.to_string())]);
17220 }
17221 if let Some(ref param_value) = p_level_up {
17222 req_builder = req_builder.query(&[("levelUp", ¶m_value.to_string())]);
17223 }
17224 if let Some(ref param_value) = p_level_down {
17225 req_builder = req_builder.query(&[("levelDown", ¶m_value.to_string())]);
17226 }
17227 if let Some(ref param_value) = p_span_render_limit {
17228 req_builder = req_builder.query(&[("spanRenderLimit", ¶m_value.to_string())]);
17229 }
17230 if let Some(ref user_agent) = configuration.user_agent {
17231 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
17232 }
17233 if let Some(ref token) = configuration.bearer_access_token {
17234 req_builder = req_builder.bearer_auth(token.to_owned());
17235 };
17236
17237 let req = req_builder.build()?;
17238 let resp = configuration.client.execute(req).await?;
17239
17240 let status = resp.status();
17241 let content_type = resp
17242 .headers()
17243 .get("content-type")
17244 .and_then(|v| v.to_str().ok())
17245 .unwrap_or("application/octet-stream");
17246 let content_type = super::ContentType::from(content_type);
17247
17248 if !status.is_client_error() && !status.is_server_error() {
17249 let content = resp.text().await?;
17250 match content_type {
17251 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
17252 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::O11yPeriodO11yTraceSpanWindow>`"))),
17253 ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<models::O11yPeriodO11yTraceSpanWindow>`")))),
17254 }
17255 } else {
17256 let content = resp.text().await?;
17257 let entity: Option<SearchTracesError> = serde_json::from_str(&content).ok();
17258 Err(Error::ResponseError(ResponseContent { status, content, entity }))
17259 }
17260}
17261
17262pub async fn set_role_by_user_id(configuration: &configuration::Configuration, id: &str, o11y_period_o11y_set_role_in: models::O11yPeriodO11ySetRoleIn) -> Result<models::O11yPeriodO11yAck, Error<SetRoleByUserIdError>> {
17264 let p_id = id;
17266 let p_o11y_period_o11y_set_role_in = o11y_period_o11y_set_role_in;
17267
17268 let uri_str = format!("{}/v1/o11y/users/{id}/roles", configuration.base_path, id=crate::apis::urlencode(p_id));
17269 let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
17270
17271 if let Some(ref user_agent) = configuration.user_agent {
17272 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
17273 }
17274 if let Some(ref token) = configuration.bearer_access_token {
17275 req_builder = req_builder.bearer_auth(token.to_owned());
17276 };
17277 req_builder = req_builder.json(&p_o11y_period_o11y_set_role_in);
17278
17279 let req = req_builder.build()?;
17280 let resp = configuration.client.execute(req).await?;
17281
17282 let status = resp.status();
17283 let content_type = resp
17284 .headers()
17285 .get("content-type")
17286 .and_then(|v| v.to_str().ok())
17287 .unwrap_or("application/octet-stream");
17288 let content_type = super::ContentType::from(content_type);
17289
17290 if !status.is_client_error() && !status.is_server_error() {
17291 let content = resp.text().await?;
17292 match content_type {
17293 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
17294 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yAck`"))),
17295 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::O11yPeriodO11yAck`")))),
17296 }
17297 } else {
17298 let content = resp.text().await?;
17299 let entity: Option<SetRoleByUserIdError> = serde_json::from_str(&content).ok();
17300 Err(Error::ResponseError(ResponseContent { status, content, entity }))
17301 }
17302}
17303
17304pub async fn test_channel(configuration: &configuration::Configuration, o11y_period_alertmanagertypes_period_receiver: models::O11yPeriodAlertmanagertypesPeriodReceiver) -> Result<(), Error<TestChannelError>> {
17306 let p_o11y_period_alertmanagertypes_period_receiver = o11y_period_alertmanagertypes_period_receiver;
17308
17309 let uri_str = format!("{}/v1/o11y/channels/test", configuration.base_path);
17310 let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
17311
17312 if let Some(ref user_agent) = configuration.user_agent {
17313 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
17314 }
17315 if let Some(ref token) = configuration.bearer_access_token {
17316 req_builder = req_builder.bearer_auth(token.to_owned());
17317 };
17318 req_builder = req_builder.json(&p_o11y_period_alertmanagertypes_period_receiver);
17319
17320 let req = req_builder.build()?;
17321 let resp = configuration.client.execute(req).await?;
17322
17323 let status = resp.status();
17324
17325 if !status.is_client_error() && !status.is_server_error() {
17326 Ok(())
17327 } else {
17328 let content = resp.text().await?;
17329 let entity: Option<TestChannelError> = serde_json::from_str(&content).ok();
17330 Err(Error::ResponseError(ResponseContent { status, content, entity }))
17331 }
17332}
17333
17334pub async fn test_channel_deprecated(configuration: &configuration::Configuration, o11y_period_alertmanagertypes_period_receiver: models::O11yPeriodAlertmanagertypesPeriodReceiver) -> Result<(), Error<TestChannelDeprecatedError>> {
17336 let p_o11y_period_alertmanagertypes_period_receiver = o11y_period_alertmanagertypes_period_receiver;
17338
17339 let uri_str = format!("{}/v1/o11y/testChannel", configuration.base_path);
17340 let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
17341
17342 if let Some(ref user_agent) = configuration.user_agent {
17343 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
17344 }
17345 if let Some(ref token) = configuration.bearer_access_token {
17346 req_builder = req_builder.bearer_auth(token.to_owned());
17347 };
17348 req_builder = req_builder.json(&p_o11y_period_alertmanagertypes_period_receiver);
17349
17350 let req = req_builder.build()?;
17351 let resp = configuration.client.execute(req).await?;
17352
17353 let status = resp.status();
17354
17355 if !status.is_client_error() && !status.is_server_error() {
17356 Ok(())
17357 } else {
17358 let content = resp.text().await?;
17359 let entity: Option<TestChannelDeprecatedError> = serde_json::from_str(&content).ok();
17360 Err(Error::ResponseError(ResponseContent { status, content, entity }))
17361 }
17362}
17363
17364pub async fn test_rule(configuration: &configuration::Configuration, body: Option<serde_json::Value>) -> Result<models::O11yPeriodO11yTestRuleOut, Error<TestRuleError>> {
17366 let p_body = body;
17368
17369 let uri_str = format!("{}/v1/o11y/rules/test", configuration.base_path);
17370 let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
17371
17372 if let Some(ref user_agent) = configuration.user_agent {
17373 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
17374 }
17375 if let Some(ref token) = configuration.bearer_access_token {
17376 req_builder = req_builder.bearer_auth(token.to_owned());
17377 };
17378 req_builder = req_builder.json(&p_body);
17379
17380 let req = req_builder.build()?;
17381 let resp = configuration.client.execute(req).await?;
17382
17383 let status = resp.status();
17384 let content_type = resp
17385 .headers()
17386 .get("content-type")
17387 .and_then(|v| v.to_str().ok())
17388 .unwrap_or("application/octet-stream");
17389 let content_type = super::ContentType::from(content_type);
17390
17391 if !status.is_client_error() && !status.is_server_error() {
17392 let content = resp.text().await?;
17393 match content_type {
17394 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
17395 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yTestRuleOut`"))),
17396 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::O11yPeriodO11yTestRuleOut`")))),
17397 }
17398 } else {
17399 let content = resp.text().await?;
17400 let entity: Option<TestRuleError> = serde_json::from_str(&content).ok();
17401 Err(Error::ResponseError(ResponseContent { status, content, entity }))
17402 }
17403}
17404
17405pub async fn test_rule_notification(configuration: &configuration::Configuration, body: Option<serde_json::Value>) -> Result<models::O11yPeriodO11yTestNotificationOut, Error<TestRuleNotificationError>> {
17407 let p_body = body;
17409
17410 let uri_str = format!("{}/v1/o11y/testRule", configuration.base_path);
17411 let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
17412
17413 if let Some(ref user_agent) = configuration.user_agent {
17414 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
17415 }
17416 if let Some(ref token) = configuration.bearer_access_token {
17417 req_builder = req_builder.bearer_auth(token.to_owned());
17418 };
17419 req_builder = req_builder.json(&p_body);
17420
17421 let req = req_builder.build()?;
17422 let resp = configuration.client.execute(req).await?;
17423
17424 let status = resp.status();
17425 let content_type = resp
17426 .headers()
17427 .get("content-type")
17428 .and_then(|v| v.to_str().ok())
17429 .unwrap_or("application/octet-stream");
17430 let content_type = super::ContentType::from(content_type);
17431
17432 if !status.is_client_error() && !status.is_server_error() {
17433 let content = resp.text().await?;
17434 match content_type {
17435 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
17436 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yTestNotificationOut`"))),
17437 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::O11yPeriodO11yTestNotificationOut`")))),
17438 }
17439 } else {
17440 let content = resp.text().await?;
17441 let entity: Option<TestRuleNotificationError> = serde_json::from_str(&content).ok();
17442 Err(Error::ResponseError(ResponseContent { status, content, entity }))
17443 }
17444}
17445
17446pub async fn uninstall_integration(configuration: &configuration::Configuration, o11y_period_uninstall_integration_request: models::O11yPeriodUninstallIntegrationRequest) -> Result<models::O11yPeriodO11yIntegrationAck, Error<UninstallIntegrationError>> {
17448 let p_o11y_period_uninstall_integration_request = o11y_period_uninstall_integration_request;
17450
17451 let uri_str = format!("{}/v1/o11y/integrations/uninstall", configuration.base_path);
17452 let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
17453
17454 if let Some(ref user_agent) = configuration.user_agent {
17455 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
17456 }
17457 if let Some(ref token) = configuration.bearer_access_token {
17458 req_builder = req_builder.bearer_auth(token.to_owned());
17459 };
17460 req_builder = req_builder.json(&p_o11y_period_uninstall_integration_request);
17461
17462 let req = req_builder.build()?;
17463 let resp = configuration.client.execute(req).await?;
17464
17465 let status = resp.status();
17466 let content_type = resp
17467 .headers()
17468 .get("content-type")
17469 .and_then(|v| v.to_str().ok())
17470 .unwrap_or("application/octet-stream");
17471 let content_type = super::ContentType::from(content_type);
17472
17473 if !status.is_client_error() && !status.is_server_error() {
17474 let content = resp.text().await?;
17475 match content_type {
17476 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
17477 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yIntegrationAck`"))),
17478 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::O11yPeriodO11yIntegrationAck`")))),
17479 }
17480 } else {
17481 let content = resp.text().await?;
17482 let entity: Option<UninstallIntegrationError> = serde_json::from_str(&content).ok();
17483 Err(Error::ResponseError(ResponseContent { status, content, entity }))
17484 }
17485}
17486
17487pub async fn unlock_dashboard_v2(configuration: &configuration::Configuration, id: &str) -> Result<(), Error<UnlockDashboardV2Error>> {
17489 let p_id = id;
17491
17492 let uri_str = format!("{}/v1/o11y/dashboards/{id}/lock", configuration.base_path, id=crate::apis::urlencode(p_id));
17493 let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str);
17494
17495 if let Some(ref user_agent) = configuration.user_agent {
17496 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
17497 }
17498 if let Some(ref token) = configuration.bearer_access_token {
17499 req_builder = req_builder.bearer_auth(token.to_owned());
17500 };
17501
17502 let req = req_builder.build()?;
17503 let resp = configuration.client.execute(req).await?;
17504
17505 let status = resp.status();
17506
17507 if !status.is_client_error() && !status.is_server_error() {
17508 Ok(())
17509 } else {
17510 let content = resp.text().await?;
17511 let entity: Option<UnlockDashboardV2Error> = serde_json::from_str(&content).ok();
17512 Err(Error::ResponseError(ResponseContent { status, content, entity }))
17513 }
17514}
17515
17516pub async fn unpin_dashboard_v2(configuration: &configuration::Configuration, id: &str) -> Result<(), Error<UnpinDashboardV2Error>> {
17518 let p_id = id;
17520
17521 let uri_str = format!("{}/v1/o11y/users/me/dashboards/{id}/pins", configuration.base_path, id=crate::apis::urlencode(p_id));
17522 let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str);
17523
17524 if let Some(ref user_agent) = configuration.user_agent {
17525 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
17526 }
17527 if let Some(ref token) = configuration.bearer_access_token {
17528 req_builder = req_builder.bearer_auth(token.to_owned());
17529 };
17530
17531 let req = req_builder.build()?;
17532 let resp = configuration.client.execute(req).await?;
17533
17534 let status = resp.status();
17535
17536 if !status.is_client_error() && !status.is_server_error() {
17537 Ok(())
17538 } else {
17539 let content = resp.text().await?;
17540 let entity: Option<UnpinDashboardV2Error> = serde_json::from_str(&content).ok();
17541 Err(Error::ResponseError(ResponseContent { status, content, entity }))
17542 }
17543}
17544
17545pub async fn update_account(configuration: &configuration::Configuration, cloud_provider: &str, id: &str, o11y_period_o11y_update_account_in: models::O11yPeriodO11yUpdateAccountIn) -> Result<(), Error<UpdateAccountError>> {
17547 let p_cloud_provider = cloud_provider;
17549 let p_id = id;
17550 let p_o11y_period_o11y_update_account_in = o11y_period_o11y_update_account_in;
17551
17552 let uri_str = format!("{}/v1/o11y/cloud_integrations/{cloud_provider}/accounts/{id}", configuration.base_path, cloud_provider=crate::apis::urlencode(p_cloud_provider), id=crate::apis::urlencode(p_id));
17553 let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str);
17554
17555 if let Some(ref user_agent) = configuration.user_agent {
17556 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
17557 }
17558 if let Some(ref token) = configuration.bearer_access_token {
17559 req_builder = req_builder.bearer_auth(token.to_owned());
17560 };
17561 req_builder = req_builder.json(&p_o11y_period_o11y_update_account_in);
17562
17563 let req = req_builder.build()?;
17564 let resp = configuration.client.execute(req).await?;
17565
17566 let status = resp.status();
17567
17568 if !status.is_client_error() && !status.is_server_error() {
17569 Ok(())
17570 } else {
17571 let content = resp.text().await?;
17572 let entity: Option<UpdateAccountError> = serde_json::from_str(&content).ok();
17573 Err(Error::ResponseError(ResponseContent { status, content, entity }))
17574 }
17575}
17576
17577pub async fn update_auth_domain(configuration: &configuration::Configuration, id: &str, o11y_period_o11y_updatable_auth_domain: models::O11yPeriodO11yUpdatableAuthDomain) -> Result<(), Error<UpdateAuthDomainError>> {
17579 let p_id = id;
17581 let p_o11y_period_o11y_updatable_auth_domain = o11y_period_o11y_updatable_auth_domain;
17582
17583 let uri_str = format!("{}/v1/o11y/domains/{id}", configuration.base_path, id=crate::apis::urlencode(p_id));
17584 let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str);
17585
17586 if let Some(ref user_agent) = configuration.user_agent {
17587 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
17588 }
17589 if let Some(ref token) = configuration.bearer_access_token {
17590 req_builder = req_builder.bearer_auth(token.to_owned());
17591 };
17592 req_builder = req_builder.json(&p_o11y_period_o11y_updatable_auth_domain);
17593
17594 let req = req_builder.build()?;
17595 let resp = configuration.client.execute(req).await?;
17596
17597 let status = resp.status();
17598
17599 if !status.is_client_error() && !status.is_server_error() {
17600 Ok(())
17601 } else {
17602 let content = resp.text().await?;
17603 let entity: Option<UpdateAuthDomainError> = serde_json::from_str(&content).ok();
17604 Err(Error::ResponseError(ResponseContent { status, content, entity }))
17605 }
17606}
17607
17608pub async fn update_channel_by_id(configuration: &configuration::Configuration, id: &str, o11y_period_o11y_channel_update_in: models::O11yPeriodO11yChannelUpdateIn) -> Result<(), Error<UpdateChannelByIdError>> {
17610 let p_id = id;
17612 let p_o11y_period_o11y_channel_update_in = o11y_period_o11y_channel_update_in;
17613
17614 let uri_str = format!("{}/v1/o11y/channels/{id}", configuration.base_path, id=crate::apis::urlencode(p_id));
17615 let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str);
17616
17617 if let Some(ref user_agent) = configuration.user_agent {
17618 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
17619 }
17620 if let Some(ref token) = configuration.bearer_access_token {
17621 req_builder = req_builder.bearer_auth(token.to_owned());
17622 };
17623 req_builder = req_builder.json(&p_o11y_period_o11y_channel_update_in);
17624
17625 let req = req_builder.build()?;
17626 let resp = configuration.client.execute(req).await?;
17627
17628 let status = resp.status();
17629
17630 if !status.is_client_error() && !status.is_server_error() {
17631 Ok(())
17632 } else {
17633 let content = resp.text().await?;
17634 let entity: Option<UpdateChannelByIdError> = serde_json::from_str(&content).ok();
17635 Err(Error::ResponseError(ResponseContent { status, content, entity }))
17636 }
17637}
17638
17639pub async fn update_dashboard_v2(configuration: &configuration::Configuration, id: &str, o11y_period_o11y_dashboard_update_in: models::O11yPeriodO11yDashboardUpdateIn) -> Result<models::O11yPeriodO11yDashboardOut, Error<UpdateDashboardV2Error>> {
17641 let p_id = id;
17643 let p_o11y_period_o11y_dashboard_update_in = o11y_period_o11y_dashboard_update_in;
17644
17645 let uri_str = format!("{}/v1/o11y/dashboards/{id}", configuration.base_path, id=crate::apis::urlencode(p_id));
17646 let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str);
17647
17648 if let Some(ref user_agent) = configuration.user_agent {
17649 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
17650 }
17651 if let Some(ref token) = configuration.bearer_access_token {
17652 req_builder = req_builder.bearer_auth(token.to_owned());
17653 };
17654 req_builder = req_builder.json(&p_o11y_period_o11y_dashboard_update_in);
17655
17656 let req = req_builder.build()?;
17657 let resp = configuration.client.execute(req).await?;
17658
17659 let status = resp.status();
17660 let content_type = resp
17661 .headers()
17662 .get("content-type")
17663 .and_then(|v| v.to_str().ok())
17664 .unwrap_or("application/octet-stream");
17665 let content_type = super::ContentType::from(content_type);
17666
17667 if !status.is_client_error() && !status.is_server_error() {
17668 let content = resp.text().await?;
17669 match content_type {
17670 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
17671 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yDashboardOut`"))),
17672 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::O11yPeriodO11yDashboardOut`")))),
17673 }
17674 } else {
17675 let content = resp.text().await?;
17676 let entity: Option<UpdateDashboardV2Error> = serde_json::from_str(&content).ok();
17677 Err(Error::ResponseError(ResponseContent { status, content, entity }))
17678 }
17679}
17680
17681pub async fn update_dashboard_view(configuration: &configuration::Configuration, id: &str, o11y_period_o11y_dashboard_view_update_in: models::O11yPeriodO11yDashboardViewUpdateIn) -> Result<models::O11yPeriodO11yDashboardViewOut, Error<UpdateDashboardViewError>> {
17683 let p_id = id;
17685 let p_o11y_period_o11y_dashboard_view_update_in = o11y_period_o11y_dashboard_view_update_in;
17686
17687 let uri_str = format!("{}/v1/o11y/dashboard_views/{id}", configuration.base_path, id=crate::apis::urlencode(p_id));
17688 let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str);
17689
17690 if let Some(ref user_agent) = configuration.user_agent {
17691 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
17692 }
17693 if let Some(ref token) = configuration.bearer_access_token {
17694 req_builder = req_builder.bearer_auth(token.to_owned());
17695 };
17696 req_builder = req_builder.json(&p_o11y_period_o11y_dashboard_view_update_in);
17697
17698 let req = req_builder.build()?;
17699 let resp = configuration.client.execute(req).await?;
17700
17701 let status = resp.status();
17702 let content_type = resp
17703 .headers()
17704 .get("content-type")
17705 .and_then(|v| v.to_str().ok())
17706 .unwrap_or("application/octet-stream");
17707 let content_type = super::ContentType::from(content_type);
17708
17709 if !status.is_client_error() && !status.is_server_error() {
17710 let content = resp.text().await?;
17711 match content_type {
17712 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
17713 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yDashboardViewOut`"))),
17714 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::O11yPeriodO11yDashboardViewOut`")))),
17715 }
17716 } else {
17717 let content = resp.text().await?;
17718 let entity: Option<UpdateDashboardViewError> = serde_json::from_str(&content).ok();
17719 Err(Error::ResponseError(ResponseContent { status, content, entity }))
17720 }
17721}
17722
17723pub async fn update_downtime_schedule_by_id(configuration: &configuration::Configuration, id: &str, o11y_period_o11y_downtime_update_in: models::O11yPeriodO11yDowntimeUpdateIn) -> Result<(), Error<UpdateDowntimeScheduleByIdError>> {
17725 let p_id = id;
17727 let p_o11y_period_o11y_downtime_update_in = o11y_period_o11y_downtime_update_in;
17728
17729 let uri_str = format!("{}/v1/o11y/downtime_schedules/{id}", configuration.base_path, id=crate::apis::urlencode(p_id));
17730 let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str);
17731
17732 if let Some(ref user_agent) = configuration.user_agent {
17733 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
17734 }
17735 if let Some(ref token) = configuration.bearer_access_token {
17736 req_builder = req_builder.bearer_auth(token.to_owned());
17737 };
17738 req_builder = req_builder.json(&p_o11y_period_o11y_downtime_update_in);
17739
17740 let req = req_builder.build()?;
17741 let resp = configuration.client.execute(req).await?;
17742
17743 let status = resp.status();
17744
17745 if !status.is_client_error() && !status.is_server_error() {
17746 Ok(())
17747 } else {
17748 let content = resp.text().await?;
17749 let entity: Option<UpdateDowntimeScheduleByIdError> = serde_json::from_str(&content).ok();
17750 Err(Error::ResponseError(ResponseContent { status, content, entity }))
17751 }
17752}
17753
17754pub async fn update_ingestion_key(configuration: &configuration::Configuration, key_id: &str, o11y_period_o11y_update_ingestion_key_in: models::O11yPeriodO11yUpdateIngestionKeyIn) -> Result<(), Error<UpdateIngestionKeyError>> {
17756 let p_key_id = key_id;
17758 let p_o11y_period_o11y_update_ingestion_key_in = o11y_period_o11y_update_ingestion_key_in;
17759
17760 let uri_str = format!("{}/v1/o11y/gateway/ingestion_keys/{keyId}", configuration.base_path, keyId=crate::apis::urlencode(p_key_id));
17761 let mut req_builder = configuration.client.request(reqwest::Method::PATCH, &uri_str);
17762
17763 if let Some(ref user_agent) = configuration.user_agent {
17764 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
17765 }
17766 if let Some(ref token) = configuration.bearer_access_token {
17767 req_builder = req_builder.bearer_auth(token.to_owned());
17768 };
17769 req_builder = req_builder.json(&p_o11y_period_o11y_update_ingestion_key_in);
17770
17771 let req = req_builder.build()?;
17772 let resp = configuration.client.execute(req).await?;
17773
17774 let status = resp.status();
17775
17776 if !status.is_client_error() && !status.is_server_error() {
17777 Ok(())
17778 } else {
17779 let content = resp.text().await?;
17780 let entity: Option<UpdateIngestionKeyError> = serde_json::from_str(&content).ok();
17781 Err(Error::ResponseError(ResponseContent { status, content, entity }))
17782 }
17783}
17784
17785pub async fn update_ingestion_key_limit(configuration: &configuration::Configuration, limit_id: &str, o11y_period_o11y_update_limit_in: models::O11yPeriodO11yUpdateLimitIn) -> Result<(), Error<UpdateIngestionKeyLimitError>> {
17787 let p_limit_id = limit_id;
17789 let p_o11y_period_o11y_update_limit_in = o11y_period_o11y_update_limit_in;
17790
17791 let uri_str = format!("{}/v1/o11y/gateway/ingestion_keys/limits/{limitId}", configuration.base_path, limitId=crate::apis::urlencode(p_limit_id));
17792 let mut req_builder = configuration.client.request(reqwest::Method::PATCH, &uri_str);
17793
17794 if let Some(ref user_agent) = configuration.user_agent {
17795 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
17796 }
17797 if let Some(ref token) = configuration.bearer_access_token {
17798 req_builder = req_builder.bearer_auth(token.to_owned());
17799 };
17800 req_builder = req_builder.json(&p_o11y_period_o11y_update_limit_in);
17801
17802 let req = req_builder.build()?;
17803 let resp = configuration.client.execute(req).await?;
17804
17805 let status = resp.status();
17806
17807 if !status.is_client_error() && !status.is_server_error() {
17808 Ok(())
17809 } else {
17810 let content = resp.text().await?;
17811 let entity: Option<UpdateIngestionKeyLimitError> = serde_json::from_str(&content).ok();
17812 Err(Error::ResponseError(ResponseContent { status, content, entity }))
17813 }
17814}
17815
17816pub async fn update_metric_metadata(configuration: &configuration::Configuration, o11y_period_o11y_metric_metadata_save_in: models::O11yPeriodO11yMetricMetadataSaveIn) -> Result<models::O11yPeriodO11yMetricAckOut, Error<UpdateMetricMetadataError>> {
17818 let p_o11y_period_o11y_metric_metadata_save_in = o11y_period_o11y_metric_metadata_save_in;
17820
17821 let uri_str = format!("{}/v1/o11y/metrics/metadata", configuration.base_path);
17822 let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
17823
17824 if let Some(ref user_agent) = configuration.user_agent {
17825 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
17826 }
17827 if let Some(ref token) = configuration.bearer_access_token {
17828 req_builder = req_builder.bearer_auth(token.to_owned());
17829 };
17830 req_builder = req_builder.json(&p_o11y_period_o11y_metric_metadata_save_in);
17831
17832 let req = req_builder.build()?;
17833 let resp = configuration.client.execute(req).await?;
17834
17835 let status = resp.status();
17836 let content_type = resp
17837 .headers()
17838 .get("content-type")
17839 .and_then(|v| v.to_str().ok())
17840 .unwrap_or("application/octet-stream");
17841 let content_type = super::ContentType::from(content_type);
17842
17843 if !status.is_client_error() && !status.is_server_error() {
17844 let content = resp.text().await?;
17845 match content_type {
17846 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
17847 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yMetricAckOut`"))),
17848 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::O11yPeriodO11yMetricAckOut`")))),
17849 }
17850 } else {
17851 let content = resp.text().await?;
17852 let entity: Option<UpdateMetricMetadataError> = serde_json::from_str(&content).ok();
17853 Err(Error::ResponseError(ResponseContent { status, content, entity }))
17854 }
17855}
17856
17857pub async fn update_metric_reduction_rule_by_id(configuration: &configuration::Configuration, id: &str, o11y_period_o11y_reduction_rule_save_in: models::O11yPeriodO11yReductionRuleSaveIn) -> Result<models::O11yPeriodO11yReductionRuleOut, Error<UpdateMetricReductionRuleByIdError>> {
17859 let p_id = id;
17861 let p_o11y_period_o11y_reduction_rule_save_in = o11y_period_o11y_reduction_rule_save_in;
17862
17863 let uri_str = format!("{}/v1/o11y/metric_reduction_rules/{id}", configuration.base_path, id=crate::apis::urlencode(p_id));
17864 let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str);
17865
17866 if let Some(ref user_agent) = configuration.user_agent {
17867 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
17868 }
17869 if let Some(ref token) = configuration.bearer_access_token {
17870 req_builder = req_builder.bearer_auth(token.to_owned());
17871 };
17872 req_builder = req_builder.json(&p_o11y_period_o11y_reduction_rule_save_in);
17873
17874 let req = req_builder.build()?;
17875 let resp = configuration.client.execute(req).await?;
17876
17877 let status = resp.status();
17878 let content_type = resp
17879 .headers()
17880 .get("content-type")
17881 .and_then(|v| v.to_str().ok())
17882 .unwrap_or("application/octet-stream");
17883 let content_type = super::ContentType::from(content_type);
17884
17885 if !status.is_client_error() && !status.is_server_error() {
17886 let content = resp.text().await?;
17887 match content_type {
17888 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
17889 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yReductionRuleOut`"))),
17890 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::O11yPeriodO11yReductionRuleOut`")))),
17891 }
17892 } else {
17893 let content = resp.text().await?;
17894 let entity: Option<UpdateMetricReductionRuleByIdError> = serde_json::from_str(&content).ok();
17895 Err(Error::ResponseError(ResponseContent { status, content, entity }))
17896 }
17897}
17898
17899pub async fn update_my_organization(configuration: &configuration::Configuration, o11y_period_o11y_organization: models::O11yPeriodO11yOrganization) -> Result<(), Error<UpdateMyOrganizationError>> {
17901 let p_o11y_period_o11y_organization = o11y_period_o11y_organization;
17903
17904 let uri_str = format!("{}/v1/o11y/orgs/me", configuration.base_path);
17905 let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str);
17906
17907 if let Some(ref user_agent) = configuration.user_agent {
17908 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
17909 }
17910 if let Some(ref token) = configuration.bearer_access_token {
17911 req_builder = req_builder.bearer_auth(token.to_owned());
17912 };
17913 req_builder = req_builder.json(&p_o11y_period_o11y_organization);
17914
17915 let req = req_builder.build()?;
17916 let resp = configuration.client.execute(req).await?;
17917
17918 let status = resp.status();
17919
17920 if !status.is_client_error() && !status.is_server_error() {
17921 Ok(())
17922 } else {
17923 let content = resp.text().await?;
17924 let entity: Option<UpdateMyOrganizationError> = serde_json::from_str(&content).ok();
17925 Err(Error::ResponseError(ResponseContent { status, content, entity }))
17926 }
17927}
17928
17929pub async fn update_my_password(configuration: &configuration::Configuration, o11y_period_o11y_change_password_in: models::O11yPeriodO11yChangePasswordIn) -> Result<(), Error<UpdateMyPasswordError>> {
17931 let p_o11y_period_o11y_change_password_in = o11y_period_o11y_change_password_in;
17933
17934 let uri_str = format!("{}/v1/o11y/users/me/factor_password", configuration.base_path);
17935 let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str);
17936
17937 if let Some(ref user_agent) = configuration.user_agent {
17938 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
17939 }
17940 if let Some(ref token) = configuration.bearer_access_token {
17941 req_builder = req_builder.bearer_auth(token.to_owned());
17942 };
17943 req_builder = req_builder.json(&p_o11y_period_o11y_change_password_in);
17944
17945 let req = req_builder.build()?;
17946 let resp = configuration.client.execute(req).await?;
17947
17948 let status = resp.status();
17949
17950 if !status.is_client_error() && !status.is_server_error() {
17951 Ok(())
17952 } else {
17953 let content = resp.text().await?;
17954 let entity: Option<UpdateMyPasswordError> = serde_json::from_str(&content).ok();
17955 Err(Error::ResponseError(ResponseContent { status, content, entity }))
17956 }
17957}
17958
17959pub async fn update_my_service_account(configuration: &configuration::Configuration, o11y_period_o11y_my_service_account_update_in: models::O11yPeriodO11yMyServiceAccountUpdateIn) -> Result<(), Error<UpdateMyServiceAccountError>> {
17961 let p_o11y_period_o11y_my_service_account_update_in = o11y_period_o11y_my_service_account_update_in;
17963
17964 let uri_str = format!("{}/v1/o11y/service_accounts/me", configuration.base_path);
17965 let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str);
17966
17967 if let Some(ref user_agent) = configuration.user_agent {
17968 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
17969 }
17970 if let Some(ref token) = configuration.bearer_access_token {
17971 req_builder = req_builder.bearer_auth(token.to_owned());
17972 };
17973 req_builder = req_builder.json(&p_o11y_period_o11y_my_service_account_update_in);
17974
17975 let req = req_builder.build()?;
17976 let resp = configuration.client.execute(req).await?;
17977
17978 let status = resp.status();
17979
17980 if !status.is_client_error() && !status.is_server_error() {
17981 Ok(())
17982 } else {
17983 let content = resp.text().await?;
17984 let entity: Option<UpdateMyServiceAccountError> = serde_json::from_str(&content).ok();
17985 Err(Error::ResponseError(ResponseContent { status, content, entity }))
17986 }
17987}
17988
17989pub async fn update_my_user_v2(configuration: &configuration::Configuration, o11y_period_o11y_updatable_user: models::O11yPeriodO11yUpdatableUser) -> Result<(), Error<UpdateMyUserV2Error>> {
17991 let p_o11y_period_o11y_updatable_user = o11y_period_o11y_updatable_user;
17993
17994 let uri_str = format!("{}/v1/o11y/users/me", configuration.base_path);
17995 let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str);
17996
17997 if let Some(ref user_agent) = configuration.user_agent {
17998 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
17999 }
18000 if let Some(ref token) = configuration.bearer_access_token {
18001 req_builder = req_builder.bearer_auth(token.to_owned());
18002 };
18003 req_builder = req_builder.json(&p_o11y_period_o11y_updatable_user);
18004
18005 let req = req_builder.build()?;
18006 let resp = configuration.client.execute(req).await?;
18007
18008 let status = resp.status();
18009
18010 if !status.is_client_error() && !status.is_server_error() {
18011 Ok(())
18012 } else {
18013 let content = resp.text().await?;
18014 let entity: Option<UpdateMyUserV2Error> = serde_json::from_str(&content).ok();
18015 Err(Error::ResponseError(ResponseContent { status, content, entity }))
18016 }
18017}
18018
18019pub async fn update_org_preference(configuration: &configuration::Configuration, name: &str, o11y_period_o11y_updatable_preference: models::O11yPeriodO11yUpdatablePreference) -> Result<(), Error<UpdateOrgPreferenceError>> {
18021 let p_name = name;
18023 let p_o11y_period_o11y_updatable_preference = o11y_period_o11y_updatable_preference;
18024
18025 let uri_str = format!("{}/v1/o11y/org/preferences/{name}", configuration.base_path, name=crate::apis::urlencode(p_name));
18026 let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str);
18027
18028 if let Some(ref user_agent) = configuration.user_agent {
18029 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
18030 }
18031 if let Some(ref token) = configuration.bearer_access_token {
18032 req_builder = req_builder.bearer_auth(token.to_owned());
18033 };
18034 req_builder = req_builder.json(&p_o11y_period_o11y_updatable_preference);
18035
18036 let req = req_builder.build()?;
18037 let resp = configuration.client.execute(req).await?;
18038
18039 let status = resp.status();
18040
18041 if !status.is_client_error() && !status.is_server_error() {
18042 Ok(())
18043 } else {
18044 let content = resp.text().await?;
18045 let entity: Option<UpdateOrgPreferenceError> = serde_json::from_str(&content).ok();
18046 Err(Error::ResponseError(ResponseContent { status, content, entity }))
18047 }
18048}
18049
18050pub async fn update_public_dashboard(configuration: &configuration::Configuration, id: &str, o11y_period_o11y_public_dashboard_write_in: models::O11yPeriodO11yPublicDashboardWriteIn) -> Result<(), Error<UpdatePublicDashboardError>> {
18052 let p_id = id;
18054 let p_o11y_period_o11y_public_dashboard_write_in = o11y_period_o11y_public_dashboard_write_in;
18055
18056 let uri_str = format!("{}/v1/o11y/dashboards/{id}/public", configuration.base_path, id=crate::apis::urlencode(p_id));
18057 let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str);
18058
18059 if let Some(ref user_agent) = configuration.user_agent {
18060 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
18061 }
18062 if let Some(ref token) = configuration.bearer_access_token {
18063 req_builder = req_builder.bearer_auth(token.to_owned());
18064 };
18065 req_builder = req_builder.json(&p_o11y_period_o11y_public_dashboard_write_in);
18066
18067 let req = req_builder.build()?;
18068 let resp = configuration.client.execute(req).await?;
18069
18070 let status = resp.status();
18071
18072 if !status.is_client_error() && !status.is_server_error() {
18073 Ok(())
18074 } else {
18075 let content = resp.text().await?;
18076 let entity: Option<UpdatePublicDashboardError> = serde_json::from_str(&content).ok();
18077 Err(Error::ResponseError(ResponseContent { status, content, entity }))
18078 }
18079}
18080
18081pub async fn update_quick_filters(configuration: &configuration::Configuration, o11y_period_o11y_updatable_quick_filters: models::O11yPeriodO11yUpdatableQuickFilters) -> Result<(), Error<UpdateQuickFiltersError>> {
18083 let p_o11y_period_o11y_updatable_quick_filters = o11y_period_o11y_updatable_quick_filters;
18085
18086 let uri_str = format!("{}/v1/o11y/orgs/me/filters", configuration.base_path);
18087 let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str);
18088
18089 if let Some(ref user_agent) = configuration.user_agent {
18090 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
18091 }
18092 if let Some(ref token) = configuration.bearer_access_token {
18093 req_builder = req_builder.bearer_auth(token.to_owned());
18094 };
18095 req_builder = req_builder.json(&p_o11y_period_o11y_updatable_quick_filters);
18096
18097 let req = req_builder.build()?;
18098 let resp = configuration.client.execute(req).await?;
18099
18100 let status = resp.status();
18101
18102 if !status.is_client_error() && !status.is_server_error() {
18103 Ok(())
18104 } else {
18105 let content = resp.text().await?;
18106 let entity: Option<UpdateQuickFiltersError> = serde_json::from_str(&content).ok();
18107 Err(Error::ResponseError(ResponseContent { status, content, entity }))
18108 }
18109}
18110
18111pub async fn update_role(configuration: &configuration::Configuration, id: &str, o11y_period_o11y_role_update_in: models::O11yPeriodO11yRoleUpdateIn) -> Result<(), Error<UpdateRoleError>> {
18113 let p_id = id;
18115 let p_o11y_period_o11y_role_update_in = o11y_period_o11y_role_update_in;
18116
18117 let uri_str = format!("{}/v1/o11y/roles/{id}", configuration.base_path, id=crate::apis::urlencode(p_id));
18118 let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str);
18119
18120 if let Some(ref user_agent) = configuration.user_agent {
18121 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
18122 }
18123 if let Some(ref token) = configuration.bearer_access_token {
18124 req_builder = req_builder.bearer_auth(token.to_owned());
18125 };
18126 req_builder = req_builder.json(&p_o11y_period_o11y_role_update_in);
18127
18128 let req = req_builder.build()?;
18129 let resp = configuration.client.execute(req).await?;
18130
18131 let status = resp.status();
18132
18133 if !status.is_client_error() && !status.is_server_error() {
18134 Ok(())
18135 } else {
18136 let content = resp.text().await?;
18137 let entity: Option<UpdateRoleError> = serde_json::from_str(&content).ok();
18138 Err(Error::ResponseError(ResponseContent { status, content, entity }))
18139 }
18140}
18141
18142pub async fn update_route_policy(configuration: &configuration::Configuration, id: &str, o11y_period_o11y_route_policy_update_in: models::O11yPeriodO11yRoutePolicyUpdateIn) -> Result<models::O11yPeriodO11yRoutePolicyOut, Error<UpdateRoutePolicyError>> {
18144 let p_id = id;
18146 let p_o11y_period_o11y_route_policy_update_in = o11y_period_o11y_route_policy_update_in;
18147
18148 let uri_str = format!("{}/v1/o11y/route_policies/{id}", configuration.base_path, id=crate::apis::urlencode(p_id));
18149 let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str);
18150
18151 if let Some(ref user_agent) = configuration.user_agent {
18152 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
18153 }
18154 if let Some(ref token) = configuration.bearer_access_token {
18155 req_builder = req_builder.bearer_auth(token.to_owned());
18156 };
18157 req_builder = req_builder.json(&p_o11y_period_o11y_route_policy_update_in);
18158
18159 let req = req_builder.build()?;
18160 let resp = configuration.client.execute(req).await?;
18161
18162 let status = resp.status();
18163 let content_type = resp
18164 .headers()
18165 .get("content-type")
18166 .and_then(|v| v.to_str().ok())
18167 .unwrap_or("application/octet-stream");
18168 let content_type = super::ContentType::from(content_type);
18169
18170 if !status.is_client_error() && !status.is_server_error() {
18171 let content = resp.text().await?;
18172 match content_type {
18173 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
18174 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yRoutePolicyOut`"))),
18175 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::O11yPeriodO11yRoutePolicyOut`")))),
18176 }
18177 } else {
18178 let content = resp.text().await?;
18179 let entity: Option<UpdateRoutePolicyError> = serde_json::from_str(&content).ok();
18180 Err(Error::ResponseError(ResponseContent { status, content, entity }))
18181 }
18182}
18183
18184pub async fn update_rule_by_id(configuration: &configuration::Configuration, id: &str, body: Option<serde_json::Value>) -> Result<(), Error<UpdateRuleByIdError>> {
18186 let p_id = id;
18188 let p_body = body;
18189
18190 let uri_str = format!("{}/v1/o11y/rules/{id}", configuration.base_path, id=crate::apis::urlencode(p_id));
18191 let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str);
18192
18193 if let Some(ref user_agent) = configuration.user_agent {
18194 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
18195 }
18196 if let Some(ref token) = configuration.bearer_access_token {
18197 req_builder = req_builder.bearer_auth(token.to_owned());
18198 };
18199 req_builder = req_builder.json(&p_body);
18200
18201 let req = req_builder.build()?;
18202 let resp = configuration.client.execute(req).await?;
18203
18204 let status = resp.status();
18205
18206 if !status.is_client_error() && !status.is_server_error() {
18207 Ok(())
18208 } else {
18209 let content = resp.text().await?;
18210 let entity: Option<UpdateRuleByIdError> = serde_json::from_str(&content).ok();
18211 Err(Error::ResponseError(ResponseContent { status, content, entity }))
18212 }
18213}
18214
18215pub async fn update_service(configuration: &configuration::Configuration, cloud_provider: &str, id: &str, service_id: &str, o11y_period_o11y_update_service_in: models::O11yPeriodO11yUpdateServiceIn) -> Result<(), Error<UpdateServiceError>> {
18217 let p_cloud_provider = cloud_provider;
18219 let p_id = id;
18220 let p_service_id = service_id;
18221 let p_o11y_period_o11y_update_service_in = o11y_period_o11y_update_service_in;
18222
18223 let uri_str = format!("{}/v1/o11y/cloud_integrations/{cloud_provider}/accounts/{id}/services/{service_id}", configuration.base_path, cloud_provider=crate::apis::urlencode(p_cloud_provider), id=crate::apis::urlencode(p_id), service_id=crate::apis::urlencode(p_service_id));
18224 let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str);
18225
18226 if let Some(ref user_agent) = configuration.user_agent {
18227 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
18228 }
18229 if let Some(ref token) = configuration.bearer_access_token {
18230 req_builder = req_builder.bearer_auth(token.to_owned());
18231 };
18232 req_builder = req_builder.json(&p_o11y_period_o11y_update_service_in);
18233
18234 let req = req_builder.build()?;
18235 let resp = configuration.client.execute(req).await?;
18236
18237 let status = resp.status();
18238
18239 if !status.is_client_error() && !status.is_server_error() {
18240 Ok(())
18241 } else {
18242 let content = resp.text().await?;
18243 let entity: Option<UpdateServiceError> = serde_json::from_str(&content).ok();
18244 Err(Error::ResponseError(ResponseContent { status, content, entity }))
18245 }
18246}
18247
18248pub async fn update_service_account(configuration: &configuration::Configuration, id: &str, o11y_period_o11y_service_account_update_in: models::O11yPeriodO11yServiceAccountUpdateIn) -> Result<(), Error<UpdateServiceAccountError>> {
18250 let p_id = id;
18252 let p_o11y_period_o11y_service_account_update_in = o11y_period_o11y_service_account_update_in;
18253
18254 let uri_str = format!("{}/v1/o11y/service_accounts/{id}", configuration.base_path, id=crate::apis::urlencode(p_id));
18255 let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str);
18256
18257 if let Some(ref user_agent) = configuration.user_agent {
18258 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
18259 }
18260 if let Some(ref token) = configuration.bearer_access_token {
18261 req_builder = req_builder.bearer_auth(token.to_owned());
18262 };
18263 req_builder = req_builder.json(&p_o11y_period_o11y_service_account_update_in);
18264
18265 let req = req_builder.build()?;
18266 let resp = configuration.client.execute(req).await?;
18267
18268 let status = resp.status();
18269
18270 if !status.is_client_error() && !status.is_server_error() {
18271 Ok(())
18272 } else {
18273 let content = resp.text().await?;
18274 let entity: Option<UpdateServiceAccountError> = serde_json::from_str(&content).ok();
18275 Err(Error::ResponseError(ResponseContent { status, content, entity }))
18276 }
18277}
18278
18279pub async fn update_service_account_key(configuration: &configuration::Configuration, id: &str, fid: &str, o11y_period_o11y_api_key_update_in: models::O11yPeriodO11yApiKeyUpdateIn) -> Result<(), Error<UpdateServiceAccountKeyError>> {
18281 let p_id = id;
18283 let p_fid = fid;
18284 let p_o11y_period_o11y_api_key_update_in = o11y_period_o11y_api_key_update_in;
18285
18286 let uri_str = format!("{}/v1/o11y/service_accounts/{id}/keys/{fid}", configuration.base_path, id=crate::apis::urlencode(p_id), fid=crate::apis::urlencode(p_fid));
18287 let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str);
18288
18289 if let Some(ref user_agent) = configuration.user_agent {
18290 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
18291 }
18292 if let Some(ref token) = configuration.bearer_access_token {
18293 req_builder = req_builder.bearer_auth(token.to_owned());
18294 };
18295 req_builder = req_builder.json(&p_o11y_period_o11y_api_key_update_in);
18296
18297 let req = req_builder.build()?;
18298 let resp = configuration.client.execute(req).await?;
18299
18300 let status = resp.status();
18301
18302 if !status.is_client_error() && !status.is_server_error() {
18303 Ok(())
18304 } else {
18305 let content = resp.text().await?;
18306 let entity: Option<UpdateServiceAccountKeyError> = serde_json::from_str(&content).ok();
18307 Err(Error::ResponseError(ResponseContent { status, content, entity }))
18308 }
18309}
18310
18311pub async fn update_span_mapper(configuration: &configuration::Configuration, group_id: &str, mapper_id: &str, o11y_period_o11y_span_mapper_update_in: models::O11yPeriodO11ySpanMapperUpdateIn) -> Result<(), Error<UpdateSpanMapperError>> {
18313 let p_group_id = group_id;
18315 let p_mapper_id = mapper_id;
18316 let p_o11y_period_o11y_span_mapper_update_in = o11y_period_o11y_span_mapper_update_in;
18317
18318 let uri_str = format!("{}/v1/o11y/span_mapper_groups/{groupId}/span_mappers/{mapperId}", configuration.base_path, groupId=crate::apis::urlencode(p_group_id), mapperId=crate::apis::urlencode(p_mapper_id));
18319 let mut req_builder = configuration.client.request(reqwest::Method::PATCH, &uri_str);
18320
18321 if let Some(ref user_agent) = configuration.user_agent {
18322 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
18323 }
18324 if let Some(ref token) = configuration.bearer_access_token {
18325 req_builder = req_builder.bearer_auth(token.to_owned());
18326 };
18327 req_builder = req_builder.json(&p_o11y_period_o11y_span_mapper_update_in);
18328
18329 let req = req_builder.build()?;
18330 let resp = configuration.client.execute(req).await?;
18331
18332 let status = resp.status();
18333
18334 if !status.is_client_error() && !status.is_server_error() {
18335 Ok(())
18336 } else {
18337 let content = resp.text().await?;
18338 let entity: Option<UpdateSpanMapperError> = serde_json::from_str(&content).ok();
18339 Err(Error::ResponseError(ResponseContent { status, content, entity }))
18340 }
18341}
18342
18343pub async fn update_span_mapper_group(configuration: &configuration::Configuration, group_id: &str, o11y_period_o11y_span_mapper_group_update_in: models::O11yPeriodO11ySpanMapperGroupUpdateIn) -> Result<(), Error<UpdateSpanMapperGroupError>> {
18345 let p_group_id = group_id;
18347 let p_o11y_period_o11y_span_mapper_group_update_in = o11y_period_o11y_span_mapper_group_update_in;
18348
18349 let uri_str = format!("{}/v1/o11y/span_mapper_groups/{groupId}", configuration.base_path, groupId=crate::apis::urlencode(p_group_id));
18350 let mut req_builder = configuration.client.request(reqwest::Method::PATCH, &uri_str);
18351
18352 if let Some(ref user_agent) = configuration.user_agent {
18353 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
18354 }
18355 if let Some(ref token) = configuration.bearer_access_token {
18356 req_builder = req_builder.bearer_auth(token.to_owned());
18357 };
18358 req_builder = req_builder.json(&p_o11y_period_o11y_span_mapper_group_update_in);
18359
18360 let req = req_builder.build()?;
18361 let resp = configuration.client.execute(req).await?;
18362
18363 let status = resp.status();
18364
18365 if !status.is_client_error() && !status.is_server_error() {
18366 Ok(())
18367 } else {
18368 let content = resp.text().await?;
18369 let entity: Option<UpdateSpanMapperGroupError> = serde_json::from_str(&content).ok();
18370 Err(Error::ResponseError(ResponseContent { status, content, entity }))
18371 }
18372}
18373
18374pub async fn update_trace_field(configuration: &configuration::Configuration, o11y_period_o11y_field_setting: models::O11yPeriodO11yFieldSetting) -> Result<models::O11yPeriodO11yFieldSetting, Error<UpdateTraceFieldError>> {
18376 let p_o11y_period_o11y_field_setting = o11y_period_o11y_field_setting;
18378
18379 let uri_str = format!("{}/v1/o11y/traces/fields", configuration.base_path);
18380 let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
18381
18382 if let Some(ref user_agent) = configuration.user_agent {
18383 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
18384 }
18385 if let Some(ref token) = configuration.bearer_access_token {
18386 req_builder = req_builder.bearer_auth(token.to_owned());
18387 };
18388 req_builder = req_builder.json(&p_o11y_period_o11y_field_setting);
18389
18390 let req = req_builder.build()?;
18391 let resp = configuration.client.execute(req).await?;
18392
18393 let status = resp.status();
18394 let content_type = resp
18395 .headers()
18396 .get("content-type")
18397 .and_then(|v| v.to_str().ok())
18398 .unwrap_or("application/octet-stream");
18399 let content_type = super::ContentType::from(content_type);
18400
18401 if !status.is_client_error() && !status.is_server_error() {
18402 let content = resp.text().await?;
18403 match content_type {
18404 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
18405 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yFieldSetting`"))),
18406 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::O11yPeriodO11yFieldSetting`")))),
18407 }
18408 } else {
18409 let content = resp.text().await?;
18410 let entity: Option<UpdateTraceFieldError> = serde_json::from_str(&content).ok();
18411 Err(Error::ResponseError(ResponseContent { status, content, entity }))
18412 }
18413}
18414
18415pub async fn update_trace_funnel(configuration: &configuration::Configuration, funnel_id: &str, o11y_period_o11y_funnel_update_in: models::O11yPeriodO11yFunnelUpdateIn) -> Result<models::O11yPeriodO11yFunnelOut, Error<UpdateTraceFunnelError>> {
18417 let p_funnel_id = funnel_id;
18419 let p_o11y_period_o11y_funnel_update_in = o11y_period_o11y_funnel_update_in;
18420
18421 let uri_str = format!("{}/v1/o11y/trace-funnels/{funnel_id}", configuration.base_path, funnel_id=crate::apis::urlencode(p_funnel_id));
18422 let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str);
18423
18424 if let Some(ref user_agent) = configuration.user_agent {
18425 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
18426 }
18427 if let Some(ref token) = configuration.bearer_access_token {
18428 req_builder = req_builder.bearer_auth(token.to_owned());
18429 };
18430 req_builder = req_builder.json(&p_o11y_period_o11y_funnel_update_in);
18431
18432 let req = req_builder.build()?;
18433 let resp = configuration.client.execute(req).await?;
18434
18435 let status = resp.status();
18436 let content_type = resp
18437 .headers()
18438 .get("content-type")
18439 .and_then(|v| v.to_str().ok())
18440 .unwrap_or("application/octet-stream");
18441 let content_type = super::ContentType::from(content_type);
18442
18443 if !status.is_client_error() && !status.is_server_error() {
18444 let content = resp.text().await?;
18445 match content_type {
18446 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
18447 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yFunnelOut`"))),
18448 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::O11yPeriodO11yFunnelOut`")))),
18449 }
18450 } else {
18451 let content = resp.text().await?;
18452 let entity: Option<UpdateTraceFunnelError> = serde_json::from_str(&content).ok();
18453 Err(Error::ResponseError(ResponseContent { status, content, entity }))
18454 }
18455}
18456
18457pub async fn update_trace_funnel_steps(configuration: &configuration::Configuration, o11y_period_o11y_funnel_steps_update_in: models::O11yPeriodO11yFunnelStepsUpdateIn) -> Result<models::O11yPeriodO11yFunnelOut, Error<UpdateTraceFunnelStepsError>> {
18459 let p_o11y_period_o11y_funnel_steps_update_in = o11y_period_o11y_funnel_steps_update_in;
18461
18462 let uri_str = format!("{}/v1/o11y/trace-funnels/steps/update", configuration.base_path);
18463 let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str);
18464
18465 if let Some(ref user_agent) = configuration.user_agent {
18466 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
18467 }
18468 if let Some(ref token) = configuration.bearer_access_token {
18469 req_builder = req_builder.bearer_auth(token.to_owned());
18470 };
18471 req_builder = req_builder.json(&p_o11y_period_o11y_funnel_steps_update_in);
18472
18473 let req = req_builder.build()?;
18474 let resp = configuration.client.execute(req).await?;
18475
18476 let status = resp.status();
18477 let content_type = resp
18478 .headers()
18479 .get("content-type")
18480 .and_then(|v| v.to_str().ok())
18481 .unwrap_or("application/octet-stream");
18482 let content_type = super::ContentType::from(content_type);
18483
18484 if !status.is_client_error() && !status.is_server_error() {
18485 let content = resp.text().await?;
18486 match content_type {
18487 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
18488 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yFunnelOut`"))),
18489 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::O11yPeriodO11yFunnelOut`")))),
18490 }
18491 } else {
18492 let content = resp.text().await?;
18493 let entity: Option<UpdateTraceFunnelStepsError> = serde_json::from_str(&content).ok();
18494 Err(Error::ResponseError(ResponseContent { status, content, entity }))
18495 }
18496}
18497
18498pub async fn update_user(configuration: &configuration::Configuration, id: &str, o11y_period_o11y_user_update: models::O11yPeriodO11yUserUpdate) -> Result<(), Error<UpdateUserError>> {
18500 let p_id = id;
18502 let p_o11y_period_o11y_user_update = o11y_period_o11y_user_update;
18503
18504 let uri_str = format!("{}/v1/o11y/users/{id}", configuration.base_path, id=crate::apis::urlencode(p_id));
18505 let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str);
18506
18507 if let Some(ref user_agent) = configuration.user_agent {
18508 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
18509 }
18510 if let Some(ref token) = configuration.bearer_access_token {
18511 req_builder = req_builder.bearer_auth(token.to_owned());
18512 };
18513 req_builder = req_builder.json(&p_o11y_period_o11y_user_update);
18514
18515 let req = req_builder.build()?;
18516 let resp = configuration.client.execute(req).await?;
18517
18518 let status = resp.status();
18519
18520 if !status.is_client_error() && !status.is_server_error() {
18521 Ok(())
18522 } else {
18523 let content = resp.text().await?;
18524 let entity: Option<UpdateUserError> = serde_json::from_str(&content).ok();
18525 Err(Error::ResponseError(ResponseContent { status, content, entity }))
18526 }
18527}
18528
18529pub async fn update_user_deprecated(configuration: &configuration::Configuration, id: &str, o11y_period_o11y_deprecated_user_update: models::O11yPeriodO11yDeprecatedUserUpdate) -> Result<models::O11yPeriodO11yDeprecatedUserOut, Error<UpdateUserDeprecatedError>> {
18531 let p_id = id;
18533 let p_o11y_period_o11y_deprecated_user_update = o11y_period_o11y_deprecated_user_update;
18534
18535 let uri_str = format!("{}/v1/o11y/user/{id}", configuration.base_path, id=crate::apis::urlencode(p_id));
18536 let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str);
18537
18538 if let Some(ref user_agent) = configuration.user_agent {
18539 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
18540 }
18541 if let Some(ref token) = configuration.bearer_access_token {
18542 req_builder = req_builder.bearer_auth(token.to_owned());
18543 };
18544 req_builder = req_builder.json(&p_o11y_period_o11y_deprecated_user_update);
18545
18546 let req = req_builder.build()?;
18547 let resp = configuration.client.execute(req).await?;
18548
18549 let status = resp.status();
18550 let content_type = resp
18551 .headers()
18552 .get("content-type")
18553 .and_then(|v| v.to_str().ok())
18554 .unwrap_or("application/octet-stream");
18555 let content_type = super::ContentType::from(content_type);
18556
18557 if !status.is_client_error() && !status.is_server_error() {
18558 let content = resp.text().await?;
18559 match content_type {
18560 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
18561 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yDeprecatedUserOut`"))),
18562 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::O11yPeriodO11yDeprecatedUserOut`")))),
18563 }
18564 } else {
18565 let content = resp.text().await?;
18566 let entity: Option<UpdateUserDeprecatedError> = serde_json::from_str(&content).ok();
18567 Err(Error::ResponseError(ResponseContent { status, content, entity }))
18568 }
18569}
18570
18571pub async fn update_user_preference(configuration: &configuration::Configuration, name: &str, o11y_period_o11y_updatable_preference: models::O11yPeriodO11yUpdatablePreference) -> Result<(), Error<UpdateUserPreferenceError>> {
18573 let p_name = name;
18575 let p_o11y_period_o11y_updatable_preference = o11y_period_o11y_updatable_preference;
18576
18577 let uri_str = format!("{}/v1/o11y/user/preferences/{name}", configuration.base_path, name=crate::apis::urlencode(p_name));
18578 let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str);
18579
18580 if let Some(ref user_agent) = configuration.user_agent {
18581 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
18582 }
18583 if let Some(ref token) = configuration.bearer_access_token {
18584 req_builder = req_builder.bearer_auth(token.to_owned());
18585 };
18586 req_builder = req_builder.json(&p_o11y_period_o11y_updatable_preference);
18587
18588 let req = req_builder.build()?;
18589 let resp = configuration.client.execute(req).await?;
18590
18591 let status = resp.status();
18592
18593 if !status.is_client_error() && !status.is_server_error() {
18594 Ok(())
18595 } else {
18596 let content = resp.text().await?;
18597 let entity: Option<UpdateUserPreferenceError> = serde_json::from_str(&content).ok();
18598 Err(Error::ResponseError(ResponseContent { status, content, entity }))
18599 }
18600}
18601
18602pub async fn validate_draft_funnel_traces(configuration: &configuration::Configuration, o11y_period_o11y_draft_funnel_in: models::O11yPeriodO11yDraftFunnelIn) -> Result<models::O11yPeriodO11yFunnelRowsOut, Error<ValidateDraftFunnelTracesError>> {
18604 let p_o11y_period_o11y_draft_funnel_in = o11y_period_o11y_draft_funnel_in;
18606
18607 let uri_str = format!("{}/v1/o11y/trace-funnels/analytics/validate", configuration.base_path);
18608 let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
18609
18610 if let Some(ref user_agent) = configuration.user_agent {
18611 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
18612 }
18613 if let Some(ref token) = configuration.bearer_access_token {
18614 req_builder = req_builder.bearer_auth(token.to_owned());
18615 };
18616 req_builder = req_builder.json(&p_o11y_period_o11y_draft_funnel_in);
18617
18618 let req = req_builder.build()?;
18619 let resp = configuration.client.execute(req).await?;
18620
18621 let status = resp.status();
18622 let content_type = resp
18623 .headers()
18624 .get("content-type")
18625 .and_then(|v| v.to_str().ok())
18626 .unwrap_or("application/octet-stream");
18627 let content_type = super::ContentType::from(content_type);
18628
18629 if !status.is_client_error() && !status.is_server_error() {
18630 let content = resp.text().await?;
18631 match content_type {
18632 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
18633 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yFunnelRowsOut`"))),
18634 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::O11yPeriodO11yFunnelRowsOut`")))),
18635 }
18636 } else {
18637 let content = resp.text().await?;
18638 let entity: Option<ValidateDraftFunnelTracesError> = serde_json::from_str(&content).ok();
18639 Err(Error::ResponseError(ResponseContent { status, content, entity }))
18640 }
18641}
18642
18643pub async fn validate_trace_funnel_traces(configuration: &configuration::Configuration, funnel_id: &str, o11y_period_o11y_funnel_window_in: models::O11yPeriodO11yFunnelWindowIn) -> Result<models::O11yPeriodO11yFunnelRowsOut, Error<ValidateTraceFunnelTracesError>> {
18645 let p_funnel_id = funnel_id;
18647 let p_o11y_period_o11y_funnel_window_in = o11y_period_o11y_funnel_window_in;
18648
18649 let uri_str = format!("{}/v1/o11y/trace-funnels/{funnel_id}/analytics/validate", configuration.base_path, funnel_id=crate::apis::urlencode(p_funnel_id));
18650 let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
18651
18652 if let Some(ref user_agent) = configuration.user_agent {
18653 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
18654 }
18655 if let Some(ref token) = configuration.bearer_access_token {
18656 req_builder = req_builder.bearer_auth(token.to_owned());
18657 };
18658 req_builder = req_builder.json(&p_o11y_period_o11y_funnel_window_in);
18659
18660 let req = req_builder.build()?;
18661 let resp = configuration.client.execute(req).await?;
18662
18663 let status = resp.status();
18664 let content_type = resp
18665 .headers()
18666 .get("content-type")
18667 .and_then(|v| v.to_str().ok())
18668 .unwrap_or("application/octet-stream");
18669 let content_type = super::ContentType::from(content_type);
18670
18671 if !status.is_client_error() && !status.is_server_error() {
18672 let content = resp.text().await?;
18673 match content_type {
18674 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
18675 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yFunnelRowsOut`"))),
18676 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::O11yPeriodO11yFunnelRowsOut`")))),
18677 }
18678 } else {
18679 let content = resp.text().await?;
18680 let entity: Option<ValidateTraceFunnelTracesError> = serde_json::from_str(&content).ok();
18681 Err(Error::ResponseError(ResponseContent { status, content, entity }))
18682 }
18683}
18684
18685pub async fn verify_reset_password_token(configuration: &configuration::Configuration, o11y_period_o11y_reset_token_ref: models::O11yPeriodO11yResetTokenRef) -> Result<(), Error<VerifyResetPasswordTokenError>> {
18687 let p_o11y_period_o11y_reset_token_ref = o11y_period_o11y_reset_token_ref;
18689
18690 let uri_str = format!("{}/v1/o11y/reset_password_tokens/verify", configuration.base_path);
18691 let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
18692
18693 if let Some(ref user_agent) = configuration.user_agent {
18694 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
18695 }
18696 if let Some(ref token) = configuration.bearer_access_token {
18697 req_builder = req_builder.bearer_auth(token.to_owned());
18698 };
18699 req_builder = req_builder.json(&p_o11y_period_o11y_reset_token_ref);
18700
18701 let req = req_builder.build()?;
18702 let resp = configuration.client.execute(req).await?;
18703
18704 let status = resp.status();
18705
18706 if !status.is_client_error() && !status.is_server_error() {
18707 Ok(())
18708 } else {
18709 let content = resp.text().await?;
18710 let entity: Option<VerifyResetPasswordTokenError> = serde_json::from_str(&content).ok();
18711 Err(Error::ResponseError(ResponseContent { status, content, entity }))
18712 }
18713}
18714