/*
* Hanzo Cloud API
*
* The Hanzo Cloud API as a customer calls it: every operation under /v1/ except the operator's admin product, relay routes, legacy spellings and capabilities still reached by flag. Tagged by product: the first path segment after /v1/.
*
* The version of the OpenAPI document: v1
*
* Generated by: https://openapi-generator.tech
*/
use reqwest;
use serde::{Deserialize, Serialize, de::Error as _};
use crate::{apis::ResponseContent, models};
use super::{Error, configuration, ContentType};
/// struct for typed errors of method [`agent_check_in`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum AgentCheckInError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`agent_check_in_deprecated`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum AgentCheckInDeprecatedError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`authz_check`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum AuthzCheckError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`clone_dashboard_v2`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum CloneDashboardV2Error {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`create_account`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum CreateAccountError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`create_auth_domain`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum CreateAuthDomainError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`create_bulk_invite`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum CreateBulkInviteError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`create_channel`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum CreateChannelError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`create_dashboard_v2`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum CreateDashboardV2Error {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`create_dashboard_view`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum CreateDashboardViewError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`create_downtime_schedule`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum CreateDowntimeScheduleError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`create_ingestion_key`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum CreateIngestionKeyError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`create_ingestion_key_limit`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum CreateIngestionKeyLimitError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`create_invite`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum CreateInviteError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`create_llm_annotation`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum CreateLlmAnnotationError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`create_llm_score`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum CreateLlmScoreError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`create_metric_reduction_rule`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum CreateMetricReductionRuleError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`create_or_update_llm_pricing_rules`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum CreateOrUpdateLlmPricingRulesError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`create_public_dashboard`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum CreatePublicDashboardError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`create_reset_password_token`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum CreateResetPasswordTokenError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`create_role`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum CreateRoleError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`create_route_policy`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum CreateRoutePolicyError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`create_rule`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum CreateRuleError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`create_service_account`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum CreateServiceAccountError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`create_service_account_key`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum CreateServiceAccountKeyError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`create_service_account_role`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum CreateServiceAccountRoleError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`create_session_by_email_password`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum CreateSessionByEmailPasswordError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`create_span_mapper`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum CreateSpanMapperError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`create_span_mapper_group`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum CreateSpanMapperGroupError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`create_trace_funnel`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum CreateTraceFunnelError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`create_user`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum CreateUserError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`delete_auth_domain`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum DeleteAuthDomainError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`delete_channel_by_id`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum DeleteChannelByIdError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`delete_dashboard_v2`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum DeleteDashboardV2Error {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`delete_dashboard_view`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum DeleteDashboardViewError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`delete_downtime_schedule_by_id`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum DeleteDowntimeScheduleByIdError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`delete_ingestion_key`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum DeleteIngestionKeyError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`delete_ingestion_key_limit`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum DeleteIngestionKeyLimitError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`delete_llm_pricing_rule`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum DeleteLlmPricingRuleError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`delete_llm_score`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum DeleteLlmScoreError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`delete_metric_reduction_rule_by_id`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum DeleteMetricReductionRuleByIdError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`delete_o11y_explorer_views_by_viewid`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum DeleteO11yExplorerViewsByViewidError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`delete_o11y_reviews_by_id`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum DeleteO11yReviewsByIdError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`delete_o11y_sentinel_projects_by_id`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum DeleteO11ySentinelProjectsByIdError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`delete_public_dashboard`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum DeletePublicDashboardError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`delete_role`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum DeleteRoleError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`delete_route_policy_by_id`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum DeleteRoutePolicyByIdError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`delete_rule_by_id`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum DeleteRuleByIdError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`delete_service_account`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum DeleteServiceAccountError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`delete_service_account_role`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum DeleteServiceAccountRoleError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`delete_session`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum DeleteSessionError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`delete_span_mapper`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum DeleteSpanMapperError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`delete_span_mapper_group`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum DeleteSpanMapperGroupError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`delete_trace_funnel`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum DeleteTraceFunnelError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`delete_user`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum DeleteUserError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`delete_user_deprecated`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum DeleteUserDeprecatedError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`disconnect_account`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum DisconnectAccountError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`forgot_password`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum ForgotPasswordError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`get_account`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum GetAccountError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`get_account_service`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum GetAccountServiceError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`get_alerts`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum GetAlertsError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`get_all_route_policies`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum GetAllRoutePoliciesError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`get_auth_domain`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum GetAuthDomainError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`get_channel_by_id`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum GetChannelByIdError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`get_connection_credentials`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum GetConnectionCredentialsError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`get_dashboard_v2`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum GetDashboardV2Error {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`get_downtime_schedule_by_id`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum GetDowntimeScheduleByIdError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`get_draft_funnel_error_traces`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum GetDraftFunnelErrorTracesError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`get_draft_funnel_overview`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum GetDraftFunnelOverviewError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`get_draft_funnel_slow_traces`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum GetDraftFunnelSlowTracesError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`get_draft_funnel_step_metrics`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum GetDraftFunnelStepMetricsError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`get_draft_funnel_step_overview`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum GetDraftFunnelStepOverviewError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`get_flamegraph`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum GetFlamegraphError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`get_hosts`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum GetHostsError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`get_ingestion_keys`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum GetIngestionKeysError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`get_integration`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum GetIntegrationError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`get_integration_connection_status`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum GetIntegrationConnectionStatusError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`get_llm_pricing_rule`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum GetLlmPricingRuleError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`get_llm_score`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum GetLlmScoreError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`get_metric_alerts`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum GetMetricAlertsError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`get_metric_attributes`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum GetMetricAttributesError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`get_metric_dashboards_v2`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum GetMetricDashboardsV2Error {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`get_metric_highlights`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum GetMetricHighlightsError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`get_metric_metadata`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum GetMetricMetadataError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`get_metric_reduction_rule_by_id`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum GetMetricReductionRuleByIdError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`get_metric_reduction_rule_stats`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum GetMetricReductionRuleStatsError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`get_metric_reduction_rule_timeseries`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum GetMetricReductionRuleTimeseriesError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`get_metrics_onboarding_status`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum GetMetricsOnboardingStatusError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`get_metrics_stats`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum GetMetricsStatsError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`get_metrics_treemap`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum GetMetricsTreemapError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`get_my_organization`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum GetMyOrganizationError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`get_my_service_account`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum GetMyServiceAccountError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`get_my_user`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum GetMyUserError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`get_my_user_deprecated`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum GetMyUserDeprecatedError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`get_o11y_alerts_last`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum GetO11yAlertsLastError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`get_o11y_autocomplete_aggregate_attributes`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum GetO11yAutocompleteAggregateAttributesError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`get_o11y_autocomplete_attribute_keys`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum GetO11yAutocompleteAttributeKeysError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`get_o11y_autocomplete_attribute_values`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum GetO11yAutocompleteAttributeValuesError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`get_o11y_availability`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum GetO11yAvailabilityError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`get_o11y_clusters_attribute_keys`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum GetO11yClustersAttributeKeysError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`get_o11y_clusters_attribute_values`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum GetO11yClustersAttributeValuesError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`get_o11y_complete_google`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum GetO11yCompleteGoogleError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`get_o11y_complete_oidc`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum GetO11yCompleteOidcError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`get_o11y_daemonsets_attribute_keys`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum GetO11yDaemonsetsAttributeKeysError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`get_o11y_daemonsets_attribute_values`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum GetO11yDaemonsetsAttributeValuesError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`get_o11y_deployments_attribute_keys`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum GetO11yDeploymentsAttributeKeysError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`get_o11y_deployments_attribute_values`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum GetO11yDeploymentsAttributeValuesError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`get_o11y_disks`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum GetO11yDisksError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`get_o11y_errorfromerrorid`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum GetO11yErrorfromerroridError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`get_o11y_errorfromgroupid`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum GetO11yErrorfromgroupidError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`get_o11y_errortracking_issues`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum GetO11yErrortrackingIssuesError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`get_o11y_errortracking_issues_by_id`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum GetO11yErrortrackingIssuesByIdError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`get_o11y_explorer_views`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum GetO11yExplorerViewsError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`get_o11y_explorer_views_by_viewid`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum GetO11yExplorerViewsByViewidError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`get_o11y_features`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum GetO11yFeaturesError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`get_o11y_fields_keys`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum GetO11yFieldsKeysError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`get_o11y_fields_values`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum GetO11yFieldsValuesError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`get_o11y_filter_suggestions`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum GetO11yFilterSuggestionsError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`get_o11y_global_config`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum GetO11yGlobalConfigError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`get_o11y_health`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum GetO11yHealthError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`get_o11y_healthz`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum GetO11yHealthzError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`get_o11y_hosts_attribute_keys`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum GetO11yHostsAttributeKeysError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`get_o11y_hosts_attribute_values`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum GetO11yHostsAttributeValuesError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`get_o11y_infra_monitoring_checks`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum GetO11yInfraMonitoringChecksError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`get_o11y_infra_onboarding_k8s_status`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum GetO11yInfraOnboardingK8sStatusError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`get_o11y_jobs_attribute_keys`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum GetO11yJobsAttributeKeysError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`get_o11y_jobs_attribute_values`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum GetO11yJobsAttributeValuesError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`get_o11y_licenses`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum GetO11yLicensesError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`get_o11y_licenses_active`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum GetO11yLicensesActiveError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`get_o11y_livez`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum GetO11yLivezError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`get_o11y_login`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum GetO11yLoginError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`get_o11y_logs`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum GetO11yLogsError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`get_o11y_logs_aggregate`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum GetO11yLogsAggregateError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`get_o11y_logs_fields`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum GetO11yLogsFieldsError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`get_o11y_logs_livetail`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum GetO11yLogsLivetailError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`get_o11y_logs_pipelines_by_version`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum GetO11yLogsPipelinesByVersionError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`get_o11y_logs_promote_paths`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum GetO11yLogsPromotePathsError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`get_o11y_metric_metric_metadata`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum GetO11yMetricMetricMetadataError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`get_o11y_namespaces_attribute_keys`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum GetO11yNamespacesAttributeKeysError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`get_o11y_namespaces_attribute_values`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum GetO11yNamespacesAttributeValuesError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`get_o11y_nextpreverrorids`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum GetO11yNextpreverroridsError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`get_o11y_nodes_attribute_keys`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum GetO11yNodesAttributeKeysError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`get_o11y_nodes_attribute_values`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum GetO11yNodesAttributeValuesError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`get_o11y_pods_attribute_keys`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum GetO11yPodsAttributeKeysError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`get_o11y_pods_attribute_values`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum GetO11yPodsAttributeValuesError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`get_o11y_processes_attribute_keys`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum GetO11yProcessesAttributeKeysError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`get_o11y_processes_attribute_values`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum GetO11yProcessesAttributeValuesError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`get_o11y_product_metrics`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum GetO11yProductMetricsError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`get_o11y_pvcs_attribute_keys`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum GetO11yPvcsAttributeKeysError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`get_o11y_pvcs_attribute_values`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum GetO11yPvcsAttributeValuesError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`get_o11y_query`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum GetO11yQueryError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`get_o11y_query_progress`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum GetO11yQueryProgressError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`get_o11y_query_range`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum GetO11yQueryRangeError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`get_o11y_readyz`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum GetO11yReadyzError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`get_o11y_reviews`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum GetO11yReviewsError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`get_o11y_reviews_by_id`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum GetO11yReviewsByIdError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`get_o11y_reviews_by_id_items`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum GetO11yReviewsByIdItemsError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`get_o11y_sentinel_events_by_id`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum GetO11ySentinelEventsByIdError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`get_o11y_sentinel_issues`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum GetO11ySentinelIssuesError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`get_o11y_sentinel_issues_by_id`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum GetO11ySentinelIssuesByIdError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`get_o11y_sentinel_issues_by_id_events`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum GetO11ySentinelIssuesByIdEventsError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`get_o11y_sentinel_logs`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum GetO11ySentinelLogsError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`get_o11y_sentinel_projects`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum GetO11ySentinelProjectsError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`get_o11y_sentinel_projects_by_id`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum GetO11ySentinelProjectsByIdError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`get_o11y_sentinel_stats`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum GetO11ySentinelStatsError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`get_o11y_sentinel_traces`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum GetO11ySentinelTracesError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`get_o11y_sentinel_traces_by_id`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum GetO11ySentinelTracesByIdError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`get_o11y_services_list`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum GetO11yServicesListError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`get_o11y_sessions`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum GetO11ySessionsError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`get_o11y_settings_apdex`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum GetO11ySettingsApdexError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`get_o11y_settings_ttl`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum GetO11ySettingsTtlError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`get_o11y_statefulsets_attribute_keys`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum GetO11yStatefulsetsAttributeKeysError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`get_o11y_statefulsets_attribute_values`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum GetO11yStatefulsetsAttributeValuesError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`get_o11y_stats`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum GetO11yStatsError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`get_o11y_status`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum GetO11yStatusError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`get_o11y_summary`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum GetO11ySummaryError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`get_o11y_traces`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum GetO11yTracesError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`get_o11y_usage`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum GetO11yUsageError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`get_o11y_version`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum GetO11yVersionError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`get_org_preference`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum GetOrgPreferenceError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`get_overall_state_transitions`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum GetOverallStateTransitionsError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`get_public_dashboard`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum GetPublicDashboardError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`get_public_dashboard_data`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum GetPublicDashboardDataError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`get_public_dashboard_widget_query_range`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum GetPublicDashboardWidgetQueryRangeError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`get_quick_filters`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum GetQuickFiltersError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`get_reset_password_token`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum GetResetPasswordTokenError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`get_reset_password_token_deprecated`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum GetResetPasswordTokenDeprecatedError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`get_role`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum GetRoleError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`get_roles_by_user_id`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum GetRolesByUserIdError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`get_route_policy_by_id`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum GetRoutePolicyByIdError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`get_rule_by_id`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum GetRuleByIdError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`get_rule_history_filter_keys`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum GetRuleHistoryFilterKeysError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`get_rule_history_filter_values`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum GetRuleHistoryFilterValuesError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`get_rule_history_overall_status`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum GetRuleHistoryOverallStatusError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`get_rule_history_stats`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum GetRuleHistoryStatsError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`get_rule_history_timeline`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum GetRuleHistoryTimelineError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`get_rule_history_top_contributors`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum GetRuleHistoryTopContributorsError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`get_rule_state_history`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum GetRuleStateHistoryError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`get_rule_state_history_top_contributors`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum GetRuleStateHistoryTopContributorsError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`get_rule_stats`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum GetRuleStatsError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`get_service`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum GetServiceError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`get_service_account`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum GetServiceAccountError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`get_service_account_roles`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum GetServiceAccountRolesError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`get_session_context`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum GetSessionContextError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`get_signal_filters`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum GetSignalFiltersError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`get_trace_aggregations`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum GetTraceAggregationsError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`get_trace_fields`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum GetTraceFieldsError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`get_trace_funnel`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum GetTraceFunnelError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`get_trace_funnel_error_traces`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum GetTraceFunnelErrorTracesError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`get_trace_funnel_overview`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum GetTraceFunnelOverviewError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`get_trace_funnel_slow_traces`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum GetTraceFunnelSlowTracesError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`get_trace_funnel_step_metrics`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum GetTraceFunnelStepMetricsError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`get_trace_funnel_step_overview`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum GetTraceFunnelStepOverviewError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`get_user`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum GetUserError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`get_user_deprecated`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum GetUserDeprecatedError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`get_user_preference`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum GetUserPreferenceError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`get_users_by_role_id`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum GetUsersByRoleIdError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`get_waterfall_v4`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum GetWaterfallV4Error {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`inspect_metrics`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum InspectMetricsError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`install_integration`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum InstallIntegrationError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`list_account_services_metadata`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum ListAccountServicesMetadataError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`list_accounts`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum ListAccountsError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`list_auth_domains`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum ListAuthDomainsError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`list_channels`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum ListChannelsError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`list_dashboard_views`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum ListDashboardViewsError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`list_dashboards_for_user_v2`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum ListDashboardsForUserV2Error {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`list_dashboards_v2`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum ListDashboardsV2Error {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`list_downtime_schedules`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum ListDowntimeSchedulesError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`list_integrations`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum ListIntegrationsError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`list_llm_annotations`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum ListLlmAnnotationsError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`list_llm_observations`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum ListLlmObservationsError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`list_llm_pricing_rules`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum ListLlmPricingRulesError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`list_llm_scores`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum ListLlmScoresError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`list_llm_sessions`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum ListLlmSessionsError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`list_llm_traces`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum ListLlmTracesError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`list_llm_users`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum ListLlmUsersError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`list_metric_reduction_rules`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum ListMetricReductionRulesError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`list_metrics`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum ListMetricsError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`list_org_preferences`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum ListOrgPreferencesError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`list_roles`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum ListRolesError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`list_rules`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum ListRulesError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`list_service_account_keys`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum ListServiceAccountKeysError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`list_service_accounts`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum ListServiceAccountsError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`list_services_metadata`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum ListServicesMetadataError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`list_span_mapper_groups`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum ListSpanMapperGroupsError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`list_span_mappers`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum ListSpanMappersError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`list_trace_funnels`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum ListTraceFunnelsError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`list_user_preferences`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum ListUserPreferencesError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`list_users`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum ListUsersError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`list_users_deprecated`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum ListUsersDeprecatedError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`lock_dashboard_v2`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum LockDashboardV2Error {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`patch_dashboard_v2`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum PatchDashboardV2Error {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`patch_o11y_reviews_by_id`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum PatchO11yReviewsByIdError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`patch_o11y_reviews_by_id_items_by_itemid`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum PatchO11yReviewsByIdItemsByItemidError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`patch_rule_by_id`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum PatchRuleByIdError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`pin_dashboard_v2`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum PinDashboardV2Error {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`post_o11y_alerts_by_receiver`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum PostO11yAlertsByReceiverError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`post_o11y_api_by_project_id_envelope`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum PostO11yApiByProjectIdEnvelopeError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`post_o11y_api_by_project_id_store`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum PostO11yApiByProjectIdStoreError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`post_o11y_auto_complete_attribute_values`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum PostO11yAutoCompleteAttributeValuesError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`post_o11y_clusters_list`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum PostO11yClustersListError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`post_o11y_complete_saml`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum PostO11yCompleteSamlError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`post_o11y_counterrors`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum PostO11yCounterrorsError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`post_o11y_daemonsets_list`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum PostO11yDaemonsetsListError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`post_o11y_dependency_graph`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum PostO11yDependencyGraphError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`post_o11y_deployments_list`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum PostO11yDeploymentsListError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`post_o11y_errortracking_issues_by_id`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum PostO11yErrortrackingIssuesByIdError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`post_o11y_event`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum PostO11yEventError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`post_o11y_explorer_views`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum PostO11yExplorerViewsError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`post_o11y_export_raw_data`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum PostO11yExportRawDataError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`post_o11y_hosts_list`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum PostO11yHostsListError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`post_o11y_infra_monitoring_clusters`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum PostO11yInfraMonitoringClustersError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`post_o11y_infra_monitoring_daemonsets`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum PostO11yInfraMonitoringDaemonsetsError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`post_o11y_infra_monitoring_deployments`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum PostO11yInfraMonitoringDeploymentsError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`post_o11y_infra_monitoring_hosts`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum PostO11yInfraMonitoringHostsError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`post_o11y_infra_monitoring_jobs`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum PostO11yInfraMonitoringJobsError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`post_o11y_infra_monitoring_namespaces`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum PostO11yInfraMonitoringNamespacesError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`post_o11y_infra_monitoring_nodes`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum PostO11yInfraMonitoringNodesError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`post_o11y_infra_monitoring_pods`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum PostO11yInfraMonitoringPodsError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`post_o11y_infra_monitoring_pvcs`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum PostO11yInfraMonitoringPvcsError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`post_o11y_infra_monitoring_statefulsets`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum PostO11yInfraMonitoringStatefulsetsError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`post_o11y_jobs_list`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum PostO11yJobsListError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`post_o11y_listerrors`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum PostO11yListerrorsError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`post_o11y_logs_fields`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum PostO11yLogsFieldsError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`post_o11y_logs_pipelines`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum PostO11yLogsPipelinesError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`post_o11y_logs_pipelines_preview`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum PostO11yLogsPipelinesPreviewError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`post_o11y_logs_promote_paths`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum PostO11yLogsPromotePathsError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`post_o11y_messaging_queues_kafka_consumer_lag_consumer_details`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum PostO11yMessagingQueuesKafkaConsumerLagConsumerDetailsError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`post_o11y_messaging_queues_kafka_consumer_lag_network_latency`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum PostO11yMessagingQueuesKafkaConsumerLagNetworkLatencyError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`post_o11y_messaging_queues_kafka_consumer_lag_producer_details`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum PostO11yMessagingQueuesKafkaConsumerLagProducerDetailsError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`post_o11y_messaging_queues_kafka_onboarding_consumers`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum PostO11yMessagingQueuesKafkaOnboardingConsumersError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`post_o11y_messaging_queues_kafka_onboarding_kafka`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum PostO11yMessagingQueuesKafkaOnboardingKafkaError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`post_o11y_messaging_queues_kafka_onboarding_producers`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum PostO11yMessagingQueuesKafkaOnboardingProducersError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`post_o11y_messaging_queues_kafka_partition_latency_consumer`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum PostO11yMessagingQueuesKafkaPartitionLatencyConsumerError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`post_o11y_messaging_queues_kafka_partition_latency_overview`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum PostO11yMessagingQueuesKafkaPartitionLatencyOverviewError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`post_o11y_messaging_queues_kafka_span_evaluation`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum PostO11yMessagingQueuesKafkaSpanEvaluationError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`post_o11y_messaging_queues_kafka_topic_throughput_consumer`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum PostO11yMessagingQueuesKafkaTopicThroughputConsumerError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`post_o11y_messaging_queues_kafka_topic_throughput_consumer_details`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum PostO11yMessagingQueuesKafkaTopicThroughputConsumerDetailsError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`post_o11y_messaging_queues_kafka_topic_throughput_producer`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum PostO11yMessagingQueuesKafkaTopicThroughputProducerError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`post_o11y_messaging_queues_kafka_topic_throughput_producer_details`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum PostO11yMessagingQueuesKafkaTopicThroughputProducerDetailsError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`post_o11y_messaging_queues_queue_overview`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum PostO11yMessagingQueuesQueueOverviewError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`post_o11y_namespaces_list`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum PostO11yNamespacesListError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`post_o11y_nodes_list`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum PostO11yNodesListError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`post_o11y_pods_list`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum PostO11yPodsListError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`post_o11y_processes_list`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum PostO11yProcessesListError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`post_o11y_pvcs_list`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum PostO11yPvcsListError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`post_o11y_query_filter_analyze`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum PostO11yQueryFilterAnalyzeError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`post_o11y_query_range`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum PostO11yQueryRangeError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`post_o11y_query_range_format`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum PostO11yQueryRangeFormatError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`post_o11y_query_range_preview`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum PostO11yQueryRangePreviewError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`post_o11y_register`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum PostO11yRegisterError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`post_o11y_reviews`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum PostO11yReviewsError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`post_o11y_reviews_by_id_items`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum PostO11yReviewsByIdItemsError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`post_o11y_sentinel_discover`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum PostO11ySentinelDiscoverError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`post_o11y_sentinel_projects`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum PostO11ySentinelProjectsError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`post_o11y_sentinel_projects_by_id_keys_rotate`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum PostO11ySentinelProjectsByIdKeysRotateError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`post_o11y_service_entry_point_operations`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum PostO11yServiceEntryPointOperationsError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`post_o11y_service_top_level_operations`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum PostO11yServiceTopLevelOperationsError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`post_o11y_service_top_operations`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum PostO11yServiceTopOperationsError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`post_o11y_services`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum PostO11yServicesError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`post_o11y_settings_apdex`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum PostO11ySettingsApdexError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`post_o11y_settings_ttl`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum PostO11ySettingsTtlError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`post_o11y_span_percentile`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum PostO11ySpanPercentileError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`post_o11y_statefulsets_list`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum PostO11yStatefulsetsListError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`post_o11y_substitute_vars`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum PostO11ySubstituteVarsError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`post_o11y_third_party_apis_overview_domain`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum PostO11yThirdPartyApisOverviewDomainError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`post_o11y_third_party_apis_overview_list`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum PostO11yThirdPartyApisOverviewListError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`post_o11y_variables_query`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum PostO11yVariablesQueryError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`preview_metric_reduction_rule`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum PreviewMetricReductionRuleError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`put_host`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum PutHostError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`put_o11y_explorer_views_by_viewid`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum PutO11yExplorerViewsByViewidError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`put_o11y_sentinel_issues_by_id`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum PutO11ySentinelIssuesByIdError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`put_profile`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum PutProfileError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`remove_user_role_by_user_id_and_role_id`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum RemoveUserRoleByUserIdAndRoleIdError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`reset_password`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum ResetPasswordError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`revoke_service_account_key`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum RevokeServiceAccountKeyError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`rotate_session`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum RotateSessionError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`search_ingestion_keys`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum SearchIngestionKeysError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`search_traces`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum SearchTracesError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`set_role_by_user_id`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum SetRoleByUserIdError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`test_channel`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum TestChannelError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`test_channel_deprecated`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum TestChannelDeprecatedError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`test_rule`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum TestRuleError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`test_rule_notification`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum TestRuleNotificationError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`uninstall_integration`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum UninstallIntegrationError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`unlock_dashboard_v2`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum UnlockDashboardV2Error {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`unpin_dashboard_v2`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum UnpinDashboardV2Error {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`update_account`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum UpdateAccountError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`update_auth_domain`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum UpdateAuthDomainError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`update_channel_by_id`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum UpdateChannelByIdError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`update_dashboard_v2`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum UpdateDashboardV2Error {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`update_dashboard_view`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum UpdateDashboardViewError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`update_downtime_schedule_by_id`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum UpdateDowntimeScheduleByIdError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`update_ingestion_key`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum UpdateIngestionKeyError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`update_ingestion_key_limit`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum UpdateIngestionKeyLimitError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`update_metric_metadata`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum UpdateMetricMetadataError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`update_metric_reduction_rule_by_id`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum UpdateMetricReductionRuleByIdError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`update_my_organization`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum UpdateMyOrganizationError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`update_my_password`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum UpdateMyPasswordError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`update_my_service_account`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum UpdateMyServiceAccountError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`update_my_user_v2`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum UpdateMyUserV2Error {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`update_org_preference`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum UpdateOrgPreferenceError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`update_public_dashboard`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum UpdatePublicDashboardError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`update_quick_filters`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum UpdateQuickFiltersError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`update_role`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum UpdateRoleError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`update_route_policy`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum UpdateRoutePolicyError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`update_rule_by_id`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum UpdateRuleByIdError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`update_service`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum UpdateServiceError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`update_service_account`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum UpdateServiceAccountError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`update_service_account_key`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum UpdateServiceAccountKeyError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`update_span_mapper`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum UpdateSpanMapperError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`update_span_mapper_group`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum UpdateSpanMapperGroupError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`update_trace_field`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum UpdateTraceFieldError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`update_trace_funnel`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum UpdateTraceFunnelError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`update_trace_funnel_steps`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum UpdateTraceFunnelStepsError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`update_user`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum UpdateUserError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`update_user_deprecated`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum UpdateUserDeprecatedError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`update_user_preference`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum UpdateUserPreferenceError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`validate_draft_funnel_traces`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum ValidateDraftFunnelTracesError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`validate_trace_funnel_traces`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum ValidateTraceFunnelTracesError {
UnknownValue(serde_json::Value),
}
/// struct for typed errors of method [`verify_reset_password_token`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum VerifyResetPasswordTokenError {
UnknownValue(serde_json::Value),
}
/// Is the deployed agent's check-in — the path consistent with the account surface, reporting the agent's account and telemetry state so the connection can be tracked. Viewer gate — the agent's role is viewer.
pub 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>> {
// add a prefix to parameters to efficiently prevent name collisions
let p_cloud_provider = cloud_provider;
let p_o11y_period_o11y_agent_check_in_in = o11y_period_o11y_agent_check_in_in;
let uri_str = format!("{}/v1/o11y/cloud_integrations/{cloud_provider}/accounts/check_in", configuration.base_path, cloud_provider=crate::apis::urlencode(p_cloud_provider));
let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
req_builder = req_builder.json(&p_o11y_period_o11y_agent_check_in_in);
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
let content_type = resp
.headers()
.get("content-type")
.and_then(|v| v.to_str().ok())
.unwrap_or("application/octet-stream");
let content_type = super::ContentType::from(content_type);
if !status.is_client_error() && !status.is_server_error() {
let content = resp.text().await?;
match content_type {
ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yAgentCheckInOut`"))),
ContentType::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`")))),
}
} else {
let content = resp.text().await?;
let entity: Option<AgentCheckInError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Is the deployed agent's check-in on its original hyphenated path, kept for backward compatibility with agents already running. Viewer gate — the agent's role is viewer.
pub 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>> {
// add a prefix to parameters to efficiently prevent name collisions
let p_cloud_provider = cloud_provider;
let p_o11y_period_o11y_agent_check_in_in = o11y_period_o11y_agent_check_in_in;
let uri_str = format!("{}/v1/o11y/cloud-integrations/{cloud_provider}/agent-check-in", configuration.base_path, cloud_provider=crate::apis::urlencode(p_cloud_provider));
let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
req_builder = req_builder.json(&p_o11y_period_o11y_agent_check_in_in);
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
let content_type = resp
.headers()
.get("content-type")
.and_then(|v| v.to_str().ok())
.unwrap_or("application/octet-stream");
let content_type = super::ContentType::from(content_type);
if !status.is_client_error() && !status.is_server_error() {
let content = resp.text().await?;
match content_type {
ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yAgentCheckInOut`"))),
ContentType::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`")))),
}
} else {
let content = resp.text().await?;
let entity: Option<AgentCheckInDeprecatedError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Evaluates a batch of transactions — relation plus object — for the authenticated caller and answers each with its authorization verdict, in the order they were asked. It is the read a UI uses to decide which controls to show.
pub async fn authz_check(configuration: &configuration::Configuration, o11y_period_o11y_transaction: Vec<models::O11yPeriodO11yTransaction>) -> Result<models::O11yPeriodO11yCheckOut, Error<AuthzCheckError>> {
// add a prefix to parameters to efficiently prevent name collisions
let p_o11y_period_o11y_transaction = o11y_period_o11y_transaction;
let uri_str = format!("{}/v1/o11y/authz/check", configuration.base_path);
let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
req_builder = req_builder.json(&p_o11y_period_o11y_transaction);
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
let content_type = resp
.headers()
.get("content-type")
.and_then(|v| v.to_str().ok())
.unwrap_or("application/octet-stream");
let content_type = super::ContentType::from(content_type);
if !status.is_client_error() && !status.is_server_error() {
let content = resp.text().await?;
match content_type {
ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yCheckOut`"))),
ContentType::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`")))),
}
} else {
let content = resp.text().await?;
let entity: Option<AuthzCheckError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Clones an existing v2-shape dashboard. User and integration dashboards can be cloned; system dashboards are rejected. The clone keeps the source's display name, panels and tags, but gets a freshly generated unique internal name and is always created as an unlocked user dashboard owned by the caller. Callers need the editor role; the runtime's own gate enforces it.
pub async fn clone_dashboard_v2(configuration: &configuration::Configuration, id: &str) -> Result<models::O11yPeriodO11yDashboardOut, Error<CloneDashboardV2Error>> {
// add a prefix to parameters to efficiently prevent name collisions
let p_id = id;
let uri_str = format!("{}/v1/o11y/dashboards/{id}/clone", configuration.base_path, id=crate::apis::urlencode(p_id));
let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
let content_type = resp
.headers()
.get("content-type")
.and_then(|v| v.to_str().ok())
.unwrap_or("application/octet-stream");
let content_type = super::ContentType::from(content_type);
if !status.is_client_error() && !status.is_server_error() {
let content = resp.text().await?;
match content_type {
ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yDashboardOut`"))),
ContentType::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`")))),
}
} else {
let content = resp.text().await?;
let entity: Option<CloneDashboardV2Error> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Connects a new cloud-integration account for the given provider from its posted config and credentials, answering with the account and the artifact the agent deploys to complete the connection. Admin gate.
pub async fn create_account(configuration: &configuration::Configuration, cloud_provider: &str, o11y_period_o11y_create_account_in: models::O11yPeriodO11yCreateAccountIn) -> Result<models::O11yPeriodO11yCreateAccountOut, Error<CreateAccountError>> {
// add a prefix to parameters to efficiently prevent name collisions
let p_cloud_provider = cloud_provider;
let p_o11y_period_o11y_create_account_in = o11y_period_o11y_create_account_in;
let uri_str = format!("{}/v1/o11y/cloud_integrations/{cloud_provider}/accounts", configuration.base_path, cloud_provider=crate::apis::urlencode(p_cloud_provider));
let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
req_builder = req_builder.json(&p_o11y_period_o11y_create_account_in);
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
let content_type = resp
.headers()
.get("content-type")
.and_then(|v| v.to_str().ok())
.unwrap_or("application/octet-stream");
let content_type = super::ContentType::from(content_type);
if !status.is_client_error() && !status.is_server_error() {
let content = resp.text().await?;
match content_type {
ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yCreateAccountOut`"))),
ContentType::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`")))),
}
} else {
let content = resp.text().await?;
let entity: Option<CreateAccountError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Claims an email domain for the org and configures how its users sign in; the answer is the new domain's id. Admin gate.
pub async fn create_auth_domain(configuration: &configuration::Configuration, o11y_period_o11y_postable_auth_domain: models::O11yPeriodO11yPostableAuthDomain) -> Result<models::O11yPeriodO11yCreatedOut, Error<CreateAuthDomainError>> {
// add a prefix to parameters to efficiently prevent name collisions
let p_o11y_period_o11y_postable_auth_domain = o11y_period_o11y_postable_auth_domain;
let uri_str = format!("{}/v1/o11y/domains", configuration.base_path);
let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
req_builder = req_builder.json(&p_o11y_period_o11y_postable_auth_domain);
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
let content_type = resp
.headers()
.get("content-type")
.and_then(|v| v.to_str().ok())
.unwrap_or("application/octet-stream");
let content_type = super::ContentType::from(content_type);
if !status.is_client_error() && !status.is_server_error() {
let content = resp.text().await?;
match content_type {
ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yCreatedOut`"))),
ContentType::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`")))),
}
} else {
let content = resp.text().await?;
let entity: Option<CreateAuthDomainError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Invites several people to the caller's org in one call, refusing the whole batch when any email repeats. Deprecated alongside createInvite. Admin gate.
pub async fn create_bulk_invite(configuration: &configuration::Configuration, o11y_period_o11y_bulk_invite_in: models::O11yPeriodO11yBulkInviteIn) -> Result<models::O11yPeriodO11yAck, Error<CreateBulkInviteError>> {
// add a prefix to parameters to efficiently prevent name collisions
let p_o11y_period_o11y_bulk_invite_in = o11y_period_o11y_bulk_invite_in;
let uri_str = format!("{}/v1/o11y/invite/bulk", configuration.base_path);
let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
req_builder = req_builder.json(&p_o11y_period_o11y_bulk_invite_in);
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
let content_type = resp
.headers()
.get("content-type")
.and_then(|v| v.to_str().ok())
.unwrap_or("application/octet-stream");
let content_type = super::ContentType::from(content_type);
if !status.is_client_error() && !status.is_server_error() {
let content = resp.text().await?;
match content_type {
ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yAck`"))),
ContentType::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`")))),
}
} else {
let content = resp.text().await?;
let entity: Option<CreateBulkInviteError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Creates a notification channel, answering with the stored channel. Admin gate.
pub async fn create_channel(configuration: &configuration::Configuration, o11y_period_postable_channel: models::O11yPeriodPostableChannel) -> Result<models::O11yPeriodO11yChannelOut, Error<CreateChannelError>> {
// add a prefix to parameters to efficiently prevent name collisions
let p_o11y_period_postable_channel = o11y_period_postable_channel;
let uri_str = format!("{}/v1/o11y/channels", configuration.base_path);
let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
req_builder = req_builder.json(&p_o11y_period_postable_channel);
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
let content_type = resp
.headers()
.get("content-type")
.and_then(|v| v.to_str().ok())
.unwrap_or("application/octet-stream");
let content_type = super::ContentType::from(content_type);
if !status.is_client_error() && !status.is_server_error() {
let content = resp.text().await?;
match content_type {
ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yChannelOut`"))),
ContentType::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`")))),
}
} else {
let content = resp.text().await?;
let entity: Option<CreateChannelError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Creates a dashboard in the v2 format that follows the Perses spec and answers with the stored dashboard. Callers need the editor role; the runtime's own gate enforces it.
pub async fn create_dashboard_v2(configuration: &configuration::Configuration, o11y_period_o11y_dashboard_postable: models::O11yPeriodO11yDashboardPostable) -> Result<models::O11yPeriodO11yDashboardOut, Error<CreateDashboardV2Error>> {
// add a prefix to parameters to efficiently prevent name collisions
let p_o11y_period_o11y_dashboard_postable = o11y_period_o11y_dashboard_postable;
let uri_str = format!("{}/v1/o11y/dashboards", configuration.base_path);
let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
req_builder = req_builder.json(&p_o11y_period_o11y_dashboard_postable);
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
let content_type = resp
.headers()
.get("content-type")
.and_then(|v| v.to_str().ok())
.unwrap_or("application/octet-stream");
let content_type = super::ContentType::from(content_type);
if !status.is_client_error() && !status.is_server_error() {
let content = resp.text().await?;
match content_type {
ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yDashboardOut`"))),
ContentType::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`")))),
}
} else {
let content = resp.text().await?;
let entity: Option<CreateDashboardV2Error> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Persists the calling user's dashboard-listing state (query, sort, order) as a named, reusable view shared across the org. Callers need the editor role; the runtime's own gate enforces it.
pub async fn create_dashboard_view(configuration: &configuration::Configuration, o11y_period_o11y_dashboard_view_postable: models::O11yPeriodO11yDashboardViewPostable) -> Result<models::O11yPeriodO11yDashboardViewOut, Error<CreateDashboardViewError>> {
// add a prefix to parameters to efficiently prevent name collisions
let p_o11y_period_o11y_dashboard_view_postable = o11y_period_o11y_dashboard_view_postable;
let uri_str = format!("{}/v1/o11y/dashboard_views", configuration.base_path);
let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
req_builder = req_builder.json(&p_o11y_period_o11y_dashboard_view_postable);
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
let content_type = resp
.headers()
.get("content-type")
.and_then(|v| v.to_str().ok())
.unwrap_or("application/octet-stream");
let content_type = super::ContentType::from(content_type);
if !status.is_client_error() && !status.is_server_error() {
let content = resp.text().await?;
match content_type {
ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yDashboardViewOut`"))),
ContentType::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`")))),
}
} else {
let content = resp.text().await?;
let entity: Option<CreateDashboardViewError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Creates a planned maintenance window, answering with the stored schedule. Editor gate.
pub async fn create_downtime_schedule(configuration: &configuration::Configuration, o11y_period_postable_planned_maintenance: models::O11yPeriodPostablePlannedMaintenance) -> Result<models::O11yPeriodO11yDowntimeScheduleOut, Error<CreateDowntimeScheduleError>> {
// add a prefix to parameters to efficiently prevent name collisions
let p_o11y_period_postable_planned_maintenance = o11y_period_postable_planned_maintenance;
let uri_str = format!("{}/v1/o11y/downtime_schedules", configuration.base_path);
let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
req_builder = req_builder.json(&p_o11y_period_postable_planned_maintenance);
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
let content_type = resp
.headers()
.get("content-type")
.and_then(|v| v.to_str().ok())
.unwrap_or("application/octet-stream");
let content_type = super::ContentType::from(content_type);
if !status.is_client_error() && !status.is_server_error() {
let content = resp.text().await?;
match content_type {
ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yDowntimeScheduleOut`"))),
ContentType::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`")))),
}
} else {
let content = resp.text().await?;
let entity: Option<CreateDowntimeScheduleError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Mints an ingestion key for the workspace, answering with the created key. Editor gate.
pub async fn create_ingestion_key(configuration: &configuration::Configuration, o11y_period_postable_ingestion_key: models::O11yPeriodPostableIngestionKey) -> Result<models::O11yPeriodO11yCreatedIngestionKeyOut, Error<CreateIngestionKeyError>> {
// add a prefix to parameters to efficiently prevent name collisions
let p_o11y_period_postable_ingestion_key = o11y_period_postable_ingestion_key;
let uri_str = format!("{}/v1/o11y/gateway/ingestion_keys", configuration.base_path);
let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
req_builder = req_builder.json(&p_o11y_period_postable_ingestion_key);
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
let content_type = resp
.headers()
.get("content-type")
.and_then(|v| v.to_str().ok())
.unwrap_or("application/octet-stream");
let content_type = super::ContentType::from(content_type);
if !status.is_client_error() && !status.is_server_error() {
let content = resp.text().await?;
match content_type {
ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yCreatedIngestionKeyOut`"))),
ContentType::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`")))),
}
} else {
let content = resp.text().await?;
let entity: Option<CreateIngestionKeyError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Sets a signal limit on an ingestion key, by key id, answering with the created limit. Editor gate.
pub 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>> {
// add a prefix to parameters to efficiently prevent name collisions
let p_key_id = key_id;
let p_o11y_period_o11y_create_limit_in = o11y_period_o11y_create_limit_in;
let uri_str = format!("{}/v1/o11y/gateway/ingestion_keys/{keyId}/limits", configuration.base_path, keyId=crate::apis::urlencode(p_key_id));
let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
req_builder = req_builder.json(&p_o11y_period_o11y_create_limit_in);
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
let content_type = resp
.headers()
.get("content-type")
.and_then(|v| v.to_str().ok())
.unwrap_or("application/octet-stream");
let content_type = super::ContentType::from(content_type);
if !status.is_client_error() && !status.is_server_error() {
let content = resp.text().await?;
match content_type {
ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yCreatedLimitOut`"))),
ContentType::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`")))),
}
} else {
let content = resp.text().await?;
let entity: Option<CreateIngestionKeyLimitError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Invites one person to the caller's org by email, with the role they will hold when they accept. Deprecated in favor of creating users directly; kept because callers still hold it. Admin gate, enforced by the runtime this op relays to.
pub async fn create_invite(configuration: &configuration::Configuration, o11y_period_o11y_invite_in: models::O11yPeriodO11yInviteIn) -> Result<models::O11yPeriodO11yInviteOut, Error<CreateInviteError>> {
// add a prefix to parameters to efficiently prevent name collisions
let p_o11y_period_o11y_invite_in = o11y_period_o11y_invite_in;
let uri_str = format!("{}/v1/o11y/invite", configuration.base_path);
let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
req_builder = req_builder.json(&p_o11y_period_o11y_invite_in);
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
let content_type = resp
.headers()
.get("content-type")
.and_then(|v| v.to_str().ok())
.unwrap_or("application/octet-stream");
let content_type = super::ContentType::from(content_type);
if !status.is_client_error() && !status.is_server_error() {
let content = resp.text().await?;
match content_type {
ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yInviteOut`"))),
ContentType::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`")))),
}
} else {
let content = resp.text().await?;
let entity: Option<CreateInviteError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Adds a human annotation to a trace or observation, optionally in a review queue. Callers need the editor role; the runtime's own gate enforces it, and it validates the payload and stamps the annotation's author and org.
pub async fn create_llm_annotation(configuration: &configuration::Configuration, o11y_period_o11y_llm_ingest_annotation: models::O11yPeriodO11yLlmIngestAnnotation) -> Result<models::O11yPeriodO11yLlmAnnotationOut, Error<CreateLlmAnnotationError>> {
// add a prefix to parameters to efficiently prevent name collisions
let p_o11y_period_o11y_llm_ingest_annotation = o11y_period_o11y_llm_ingest_annotation;
let uri_str = format!("{}/v1/o11y/llm/annotation", configuration.base_path);
let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
req_builder = req_builder.json(&p_o11y_period_o11y_llm_ingest_annotation);
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
let content_type = resp
.headers()
.get("content-type")
.and_then(|v| v.to_str().ok())
.unwrap_or("application/octet-stream");
let content_type = super::ContentType::from(content_type);
if !status.is_client_error() && !status.is_server_error() {
let content = resp.text().await?;
match content_type {
ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yLlmAnnotationOut`"))),
ContentType::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`")))),
}
} else {
let content = resp.text().await?;
let entity: Option<CreateLlmAnnotationError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Attaches an eval score or human-feedback signal to a trace or a single observation. Callers need the editor role; the runtime's own gate enforces it, and it validates the payload and stamps the score's author and org.
pub async fn create_llm_score(configuration: &configuration::Configuration, o11y_period_o11y_llm_ingest_score: models::O11yPeriodO11yLlmIngestScore) -> Result<models::O11yPeriodO11yLlmScoreOut, Error<CreateLlmScoreError>> {
// add a prefix to parameters to efficiently prevent name collisions
let p_o11y_period_o11y_llm_ingest_score = o11y_period_o11y_llm_ingest_score;
let uri_str = format!("{}/v1/o11y/llm/scores", configuration.base_path);
let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
req_builder = req_builder.json(&p_o11y_period_o11y_llm_ingest_score);
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
let content_type = resp
.headers()
.get("content-type")
.and_then(|v| v.to_str().ok())
.unwrap_or("application/octet-stream");
let content_type = super::ContentType::from(content_type);
if !status.is_client_error() && !status.is_server_error() {
let content = resp.text().await?;
match content_type {
ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yLlmScoreOut`"))),
ContentType::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`")))),
}
} else {
let content = resp.text().await?;
let entity: Option<CreateLlmScoreError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Creates a volume-control rule for a metric and returns it with its id; a metric that already has a rule is refused.
pub async fn create_metric_reduction_rule(configuration: &configuration::Configuration, o11y_period_o11y_reduction_rule_create_in: models::O11yPeriodO11yReductionRuleCreateIn) -> Result<models::O11yPeriodO11yReductionRuleOut, Error<CreateMetricReductionRuleError>> {
// add a prefix to parameters to efficiently prevent name collisions
let p_o11y_period_o11y_reduction_rule_create_in = o11y_period_o11y_reduction_rule_create_in;
let uri_str = format!("{}/v1/o11y/metric_reduction_rules", configuration.base_path);
let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
req_builder = req_builder.json(&p_o11y_period_o11y_reduction_rule_create_in);
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
let content_type = resp
.headers()
.get("content-type")
.and_then(|v| v.to_str().ok())
.unwrap_or("application/octet-stream");
let content_type = super::ContentType::from(content_type);
if !status.is_client_error() && !status.is_server_error() {
let content = resp.text().await?;
match content_type {
ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yReductionRuleOut`"))),
ContentType::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`")))),
}
} else {
let content = resp.text().await?;
let entity: Option<CreateMetricReductionRuleError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Writes the pricing-rule batch — the single write endpoint used by both the user and the Zeus sync job. Per-rule match is by id, then sourceId, then insert; an override row is fully preserved when the request omits isOverride, only its synced_at stamped. Callers need the admin role; the runtime's own gate enforces it.
pub async fn create_or_update_llm_pricing_rules(configuration: &configuration::Configuration, o11y_period_o11y_llm_updatable_pricing_rules: models::O11yPeriodO11yLlmUpdatablePricingRules) -> Result<(), Error<CreateOrUpdateLlmPricingRulesError>> {
// add a prefix to parameters to efficiently prevent name collisions
let p_o11y_period_o11y_llm_updatable_pricing_rules = o11y_period_o11y_llm_updatable_pricing_rules;
let uri_str = format!("{}/v1/o11y/llm_pricing_rules", configuration.base_path);
let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str);
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
req_builder = req_builder.json(&p_o11y_period_o11y_llm_updatable_pricing_rules);
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
if !status.is_client_error() && !status.is_server_error() {
Ok(())
} else {
let content = resp.text().await?;
let entity: Option<CreateOrUpdateLlmPricingRulesError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Creates the public-sharing config for a dashboard and enables public sharing, answering with the new share's id. Callers need the admin role; the runtime's own gate enforces it.
pub async fn create_public_dashboard(configuration: &configuration::Configuration, id: &str, o11y_period_o11y_public_dashboard_write_in: models::O11yPeriodO11yPublicDashboardWriteIn) -> Result<models::O11yPeriodO11yIdentifiableOut, Error<CreatePublicDashboardError>> {
// add a prefix to parameters to efficiently prevent name collisions
let p_id = id;
let p_o11y_period_o11y_public_dashboard_write_in = o11y_period_o11y_public_dashboard_write_in;
let uri_str = format!("{}/v1/o11y/dashboards/{id}/public", configuration.base_path, id=crate::apis::urlencode(p_id));
let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
req_builder = req_builder.json(&p_o11y_period_o11y_public_dashboard_write_in);
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
let content_type = resp
.headers()
.get("content-type")
.and_then(|v| v.to_str().ok())
.unwrap_or("application/octet-stream");
let content_type = super::ContentType::from(content_type);
if !status.is_client_error() && !status.is_server_error() {
let content = resp.text().await?;
match content_type {
ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yIdentifiableOut`"))),
ContentType::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`")))),
}
} else {
let content = resp.text().await?;
let entity: Option<CreatePublicDashboardError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Creates or regenerates a user's reset-password token: a live token is returned as it is, an expired one is replaced. Admin gate.
pub async fn create_reset_password_token(configuration: &configuration::Configuration, id: &str) -> Result<models::O11yPeriodO11yResetTokenOut, Error<CreateResetPasswordTokenError>> {
// add a prefix to parameters to efficiently prevent name collisions
let p_id = id;
let uri_str = format!("{}/v1/o11y/users/{id}/reset_password_tokens", configuration.base_path, id=crate::apis::urlencode(p_id));
let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str);
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
let content_type = resp
.headers()
.get("content-type")
.and_then(|v| v.to_str().ok())
.unwrap_or("application/octet-stream");
let content_type = super::ContentType::from(content_type);
if !status.is_client_error() && !status.is_server_error() {
let content = resp.text().await?;
match content_type {
ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yResetTokenOut`"))),
ContentType::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`")))),
}
} else {
let content = resp.text().await?;
let entity: Option<CreateResetPasswordTokenError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Creates a custom role in the caller's org from a name, an optional description and the transaction groups it grants, answering the new role's id. Names are lowercase letters and hyphens only, and may not start with the reserved managed-role prefix; the runtime refuses anything else.
pub async fn create_role(configuration: &configuration::Configuration, o11y_period_o11y_role_create_in: models::O11yPeriodO11yRoleCreateIn) -> Result<models::O11yPeriodO11yRoleCreateOut, Error<CreateRoleError>> {
// add a prefix to parameters to efficiently prevent name collisions
let p_o11y_period_o11y_role_create_in = o11y_period_o11y_role_create_in;
let uri_str = format!("{}/v1/o11y/roles", configuration.base_path);
let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
req_builder = req_builder.json(&p_o11y_period_o11y_role_create_in);
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
let content_type = resp
.headers()
.get("content-type")
.and_then(|v| v.to_str().ok())
.unwrap_or("application/octet-stream");
let content_type = super::ContentType::from(content_type);
if !status.is_client_error() && !status.is_server_error() {
let content = resp.text().await?;
match content_type {
ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yRoleCreateOut`"))),
ContentType::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`")))),
}
} else {
let content = resp.text().await?;
let entity: Option<CreateRoleError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Creates a route policy, answering with the stored policy. Admin gate.
pub async fn create_route_policy(configuration: &configuration::Configuration, o11y_period_postable_route_policy: models::O11yPeriodPostableRoutePolicy) -> Result<models::O11yPeriodO11yRoutePolicyOut, Error<CreateRoutePolicyError>> {
// add a prefix to parameters to efficiently prevent name collisions
let p_o11y_period_postable_route_policy = o11y_period_postable_route_policy;
let uri_str = format!("{}/v1/o11y/route_policies", configuration.base_path);
let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
req_builder = req_builder.json(&p_o11y_period_postable_route_policy);
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
let content_type = resp
.headers()
.get("content-type")
.and_then(|v| v.to_str().ok())
.unwrap_or("application/octet-stream");
let content_type = super::ContentType::from(content_type);
if !status.is_client_error() && !status.is_server_error() {
let content = resp.text().await?;
match content_type {
ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yRoutePolicyOut`"))),
ContentType::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`")))),
}
} else {
let content = resp.text().await?;
let entity: Option<CreateRoutePolicyError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Creates a new alert rule and answers with the stored rule. Editor gate.
pub async fn create_rule(configuration: &configuration::Configuration, body: Option<serde_json::Value>) -> Result<models::O11yPeriodO11yRuleOut, Error<CreateRuleError>> {
// add a prefix to parameters to efficiently prevent name collisions
let p_body = body;
let uri_str = format!("{}/v1/o11y/rules", configuration.base_path);
let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
req_builder = req_builder.json(&p_body);
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
let content_type = resp
.headers()
.get("content-type")
.and_then(|v| v.to_str().ok())
.unwrap_or("application/octet-stream");
let content_type = super::ContentType::from(content_type);
if !status.is_client_error() && !status.is_server_error() {
let content = resp.text().await?;
match content_type {
ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yRuleOut`"))),
ContentType::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`")))),
}
} else {
let content = resp.text().await?;
let entity: Option<CreateRuleError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Creates a service account in the caller's org, answering its id. The name — a lowercase letter followed by lowercase letters, digits or hyphens — becomes the account's email local part.
pub async fn create_service_account(configuration: &configuration::Configuration, o11y_period_o11y_service_account_create_in: models::O11yPeriodO11yServiceAccountCreateIn) -> Result<models::O11yPeriodO11yServiceAccountCreateOut, Error<CreateServiceAccountError>> {
// add a prefix to parameters to efficiently prevent name collisions
let p_o11y_period_o11y_service_account_create_in = o11y_period_o11y_service_account_create_in;
let uri_str = format!("{}/v1/o11y/service_accounts", configuration.base_path);
let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
req_builder = req_builder.json(&p_o11y_period_o11y_service_account_create_in);
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
let content_type = resp
.headers()
.get("content-type")
.and_then(|v| v.to_str().ok())
.unwrap_or("application/octet-stream");
let content_type = super::ContentType::from(content_type);
if !status.is_client_error() && !status.is_server_error() {
let content = resp.text().await?;
match content_type {
ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yServiceAccountCreateOut`"))),
ContentType::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`")))),
}
} else {
let content = resp.text().await?;
let entity: Option<CreateServiceAccountError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Mints an API key for a service account and answers the key's id and its secret — the one time the secret is ever shown. ExpiresAt is a unix timestamp in seconds; zero means the key never expires, and a timestamp in the past is refused.
pub 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>> {
// add a prefix to parameters to efficiently prevent name collisions
let p_id = id;
let p_o11y_period_o11y_api_key_create_in = o11y_period_o11y_api_key_create_in;
let uri_str = format!("{}/v1/o11y/service_accounts/{id}/keys", configuration.base_path, id=crate::apis::urlencode(p_id));
let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
req_builder = req_builder.json(&p_o11y_period_o11y_api_key_create_in);
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
let content_type = resp
.headers()
.get("content-type")
.and_then(|v| v.to_str().ok())
.unwrap_or("application/octet-stream");
let content_type = super::ContentType::from(content_type);
if !status.is_client_error() && !status.is_server_error() {
let content = resp.text().await?;
match content_type {
ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yApiKeyCreateOut`"))),
ContentType::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`")))),
}
} else {
let content = resp.text().await?;
let entity: Option<CreateServiceAccountKeyError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Assigns a role, named by its id, to a service account.
pub async fn create_service_account_role(configuration: &configuration::Configuration, id: &str, o11y_period_o11y_service_account_role_grant_in: models::O11yPeriodO11yServiceAccountRoleGrantIn) -> Result<(), Error<CreateServiceAccountRoleError>> {
// add a prefix to parameters to efficiently prevent name collisions
let p_id = id;
let p_o11y_period_o11y_service_account_role_grant_in = o11y_period_o11y_service_account_role_grant_in;
let uri_str = format!("{}/v1/o11y/service_accounts/{id}/roles", configuration.base_path, id=crate::apis::urlencode(p_id));
let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
req_builder = req_builder.json(&p_o11y_period_o11y_service_account_role_grant_in);
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
if !status.is_client_error() && !status.is_server_error() {
Ok(())
} else {
let content = resp.text().await?;
let entity: Option<CreateServiceAccountRoleError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Signs a user in with email and password and answers with the session's token pair. Unauthenticated: this call is how authentication begins.
pub async fn create_session_by_email_password(configuration: &configuration::Configuration, o11y_period_o11y_email_password_session_in: models::O11yPeriodO11yEmailPasswordSessionIn) -> Result<models::O11yPeriodO11yTokenOut, Error<CreateSessionByEmailPasswordError>> {
// add a prefix to parameters to efficiently prevent name collisions
let p_o11y_period_o11y_email_password_session_in = o11y_period_o11y_email_password_session_in;
let uri_str = format!("{}/v1/o11y/sessions/email_password", configuration.base_path);
let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
req_builder = req_builder.json(&p_o11y_period_o11y_email_password_session_in);
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
let content_type = resp
.headers()
.get("content-type")
.and_then(|v| v.to_str().ok())
.unwrap_or("application/octet-stream");
let content_type = super::ContentType::from(content_type);
if !status.is_client_error() && !status.is_server_error() {
let content = resp.text().await?;
match content_type {
ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yTokenOut`"))),
ContentType::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`")))),
}
} else {
let content = resp.text().await?;
let entity: Option<CreateSessionByEmailPasswordError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Adds a mapper to a group: which field context it reads, the move or copy it performs, and whether it is on. Callers need the admin role; the runtime's own gate enforces it.
pub 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>> {
// add a prefix to parameters to efficiently prevent name collisions
let p_group_id = group_id;
let p_o11y_period_o11y_span_mapper_create_in = o11y_period_o11y_span_mapper_create_in;
let uri_str = format!("{}/v1/o11y/span_mapper_groups/{groupId}/span_mappers", configuration.base_path, groupId=crate::apis::urlencode(p_group_id));
let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
req_builder = req_builder.json(&p_o11y_period_o11y_span_mapper_create_in);
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
let content_type = resp
.headers()
.get("content-type")
.and_then(|v| v.to_str().ok())
.unwrap_or("application/octet-stream");
let content_type = super::ContentType::from(content_type);
if !status.is_client_error() && !status.is_server_error() {
let content = resp.text().await?;
match content_type {
ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11ySpanMapperOut`"))),
ContentType::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`")))),
}
} else {
let content = resp.text().await?;
let entity: Option<CreateSpanMapperError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Creates a mapping group: the name it is known by, the span and resource attributes whose presence selects a span into it, and whether it is on. Callers need the admin role; the runtime's own gate enforces it.
pub async fn create_span_mapper_group(configuration: &configuration::Configuration, o11y_period_postable_span_mapper_group: models::O11yPeriodPostableSpanMapperGroup) -> Result<models::O11yPeriodO11ySpanMapperGroupOut, Error<CreateSpanMapperGroupError>> {
// add a prefix to parameters to efficiently prevent name collisions
let p_o11y_period_postable_span_mapper_group = o11y_period_postable_span_mapper_group;
let uri_str = format!("{}/v1/o11y/span_mapper_groups", configuration.base_path);
let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
req_builder = req_builder.json(&p_o11y_period_postable_span_mapper_group);
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
let content_type = resp
.headers()
.get("content-type")
.and_then(|v| v.to_str().ok())
.unwrap_or("application/octet-stream");
let content_type = super::ContentType::from(content_type);
if !status.is_client_error() && !status.is_server_error() {
let content = resp.text().await?;
match content_type {
ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11ySpanMapperGroupOut`"))),
ContentType::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`")))),
}
} else {
let content = resp.text().await?;
let entity: Option<CreateSpanMapperGroupError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Creates an empty funnel with a name, answering the funnel it created. Steps are added afterwards with the steps update. Callers need the editor role; the runtime's own gate enforces it.
pub async fn create_trace_funnel(configuration: &configuration::Configuration, o11y_period_o11y_funnel_create_in: models::O11yPeriodO11yFunnelCreateIn) -> Result<models::O11yPeriodO11yFunnelOut, Error<CreateTraceFunnelError>> {
// add a prefix to parameters to efficiently prevent name collisions
let p_o11y_period_o11y_funnel_create_in = o11y_period_o11y_funnel_create_in;
let uri_str = format!("{}/v1/o11y/trace-funnels/new", configuration.base_path);
let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
req_builder = req_builder.json(&p_o11y_period_o11y_funnel_create_in);
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
let content_type = resp
.headers()
.get("content-type")
.and_then(|v| v.to_str().ok())
.unwrap_or("application/octet-stream");
let content_type = super::ContentType::from(content_type);
if !status.is_client_error() && !status.is_server_error() {
let content = resp.text().await?;
match content_type {
ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yFunnelOut`"))),
ContentType::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`")))),
}
} else {
let content = resp.text().await?;
let entity: Option<CreateTraceFunnelError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Creates a member of the caller's org in the pending-invite state and mails them their invitation; the answer is the new user's id. Admin gate.
pub async fn create_user(configuration: &configuration::Configuration, o11y_period_o11y_postable_user: models::O11yPeriodO11yPostableUser) -> Result<models::O11yPeriodO11yCreatedOut, Error<CreateUserError>> {
// add a prefix to parameters to efficiently prevent name collisions
let p_o11y_period_o11y_postable_user = o11y_period_o11y_postable_user;
let uri_str = format!("{}/v1/o11y/users", configuration.base_path);
let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
req_builder = req_builder.json(&p_o11y_period_o11y_postable_user);
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
let content_type = resp
.headers()
.get("content-type")
.and_then(|v| v.to_str().ok())
.unwrap_or("application/octet-stream");
let content_type = super::ContentType::from(content_type);
if !status.is_client_error() && !status.is_server_error() {
let content = resp.text().await?;
match content_type {
ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yCreatedOut`"))),
ContentType::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`")))),
}
} else {
let content = resp.text().await?;
let entity: Option<CreateUserError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Releases an email domain and discards its SSO configuration, by id. Admin gate.
pub async fn delete_auth_domain(configuration: &configuration::Configuration, id: &str) -> Result<(), Error<DeleteAuthDomainError>> {
// add a prefix to parameters to efficiently prevent name collisions
let p_id = id;
let uri_str = format!("{}/v1/o11y/domains/{id}", configuration.base_path, id=crate::apis::urlencode(p_id));
let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str);
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
if !status.is_client_error() && !status.is_server_error() {
Ok(())
} else {
let content = resp.text().await?;
let entity: Option<DeleteAuthDomainError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Removes a notification channel, by id. Admin gate.
pub async fn delete_channel_by_id(configuration: &configuration::Configuration, id: &str) -> Result<(), Error<DeleteChannelByIdError>> {
// add a prefix to parameters to efficiently prevent name collisions
let p_id = id;
let uri_str = format!("{}/v1/o11y/channels/{id}", configuration.base_path, id=crate::apis::urlencode(p_id));
let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str);
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
if !status.is_client_error() && !status.is_server_error() {
Ok(())
} else {
let content = resp.text().await?;
let entity: Option<DeleteChannelByIdError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Deletes a v2-shape dashboard along with its tag relations. Locked dashboards are rejected. Callers need the editor role; the runtime's own gate enforces it.
pub async fn delete_dashboard_v2(configuration: &configuration::Configuration, id: &str) -> Result<(), Error<DeleteDashboardV2Error>> {
// add a prefix to parameters to efficiently prevent name collisions
let p_id = id;
let uri_str = format!("{}/v1/o11y/dashboards/{id}", configuration.base_path, id=crate::apis::urlencode(p_id));
let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str);
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
if !status.is_client_error() && !status.is_server_error() {
Ok(())
} else {
let content = resp.text().await?;
let entity: Option<DeleteDashboardV2Error> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Removes a saved view. Saved views are shared org-wide. Deleting a non-existent view refuses with the runtime's not-found. Callers need the editor role; the runtime's own gate enforces it.
pub async fn delete_dashboard_view(configuration: &configuration::Configuration, id: &str) -> Result<(), Error<DeleteDashboardViewError>> {
// add a prefix to parameters to efficiently prevent name collisions
let p_id = id;
let uri_str = format!("{}/v1/o11y/dashboard_views/{id}", configuration.base_path, id=crate::apis::urlencode(p_id));
let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str);
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
if !status.is_client_error() && !status.is_server_error() {
Ok(())
} else {
let content = resp.text().await?;
let entity: Option<DeleteDashboardViewError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Removes a planned maintenance window, by id. Editor gate.
pub async fn delete_downtime_schedule_by_id(configuration: &configuration::Configuration, id: &str) -> Result<(), Error<DeleteDowntimeScheduleByIdError>> {
// add a prefix to parameters to efficiently prevent name collisions
let p_id = id;
let uri_str = format!("{}/v1/o11y/downtime_schedules/{id}", configuration.base_path, id=crate::apis::urlencode(p_id));
let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str);
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
if !status.is_client_error() && !status.is_server_error() {
Ok(())
} else {
let content = resp.text().await?;
let entity: Option<DeleteDowntimeScheduleByIdError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Removes an ingestion key, by id. Editor gate.
pub async fn delete_ingestion_key(configuration: &configuration::Configuration, key_id: &str) -> Result<(), Error<DeleteIngestionKeyError>> {
// add a prefix to parameters to efficiently prevent name collisions
let p_key_id = key_id;
let uri_str = format!("{}/v1/o11y/gateway/ingestion_keys/{keyId}", configuration.base_path, keyId=crate::apis::urlencode(p_key_id));
let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str);
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
if !status.is_client_error() && !status.is_server_error() {
Ok(())
} else {
let content = resp.text().await?;
let entity: Option<DeleteIngestionKeyError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Removes an ingestion key limit, by limit id. Editor gate.
pub async fn delete_ingestion_key_limit(configuration: &configuration::Configuration, limit_id: &str) -> Result<(), Error<DeleteIngestionKeyLimitError>> {
// add a prefix to parameters to efficiently prevent name collisions
let p_limit_id = limit_id;
let uri_str = format!("{}/v1/o11y/gateway/ingestion_keys/limits/{limitId}", configuration.base_path, limitId=crate::apis::urlencode(p_limit_id));
let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str);
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
if !status.is_client_error() && !status.is_server_error() {
Ok(())
} else {
let content = resp.text().await?;
let entity: Option<DeleteIngestionKeyLimitError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Hard-deletes a pricing rule by id. If the rule was auto-synced, the next sync cycle recreates it. Callers need the admin role; the runtime's own gate enforces it.
pub async fn delete_llm_pricing_rule(configuration: &configuration::Configuration, id: &str) -> Result<(), Error<DeleteLlmPricingRuleError>> {
// add a prefix to parameters to efficiently prevent name collisions
let p_id = id;
let uri_str = format!("{}/v1/o11y/llm_pricing_rules/{id}", configuration.base_path, id=crate::apis::urlencode(p_id));
let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str);
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
if !status.is_client_error() && !status.is_server_error() {
Ok(())
} else {
let content = resp.text().await?;
let entity: Option<DeleteLlmPricingRuleError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Hard-deletes a score by id. Callers need the editor role; the runtime's own gate enforces it.
pub async fn delete_llm_score(configuration: &configuration::Configuration, id: &str) -> Result<(), Error<DeleteLlmScoreError>> {
// add a prefix to parameters to efficiently prevent name collisions
let p_id = id;
let uri_str = format!("{}/v1/o11y/llm/score/{id}", configuration.base_path, id=crate::apis::urlencode(p_id));
let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str);
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
if !status.is_client_error() && !status.is_server_error() {
Ok(())
} else {
let content = resp.text().await?;
let entity: Option<DeleteLlmScoreError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Deletes a volume-control rule by its id.
pub async fn delete_metric_reduction_rule_by_id(configuration: &configuration::Configuration, id: &str) -> Result<(), Error<DeleteMetricReductionRuleByIdError>> {
// add a prefix to parameters to efficiently prevent name collisions
let p_id = id;
let uri_str = format!("{}/v1/o11y/metric_reduction_rules/{id}", configuration.base_path, id=crate::apis::urlencode(p_id));
let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str);
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
if !status.is_client_error() && !status.is_server_error() {
Ok(())
} else {
let content = resp.text().await?;
let entity: Option<DeleteMetricReductionRuleByIdError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Deletes one saved explorer view by id. Callers need the editor role; the runtime's own gate enforces it.
pub async fn delete_o11y_explorer_views_by_viewid(configuration: &configuration::Configuration, view_id: &str) -> Result<models::O11yPeriodO11ySavedViewDeleteOut, Error<DeleteO11yExplorerViewsByViewidError>> {
// add a prefix to parameters to efficiently prevent name collisions
let p_view_id = view_id;
let uri_str = format!("{}/v1/o11y/explorer/views/{viewId}", configuration.base_path, viewId=crate::apis::urlencode(p_view_id));
let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str);
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
let content_type = resp
.headers()
.get("content-type")
.and_then(|v| v.to_str().ok())
.unwrap_or("application/octet-stream");
let content_type = super::ContentType::from(content_type);
if !status.is_client_error() && !status.is_server_error() {
let content = resp.text().await?;
match content_type {
ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11ySavedViewDeleteOut`"))),
ContentType::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`")))),
}
} else {
let content = resp.text().await?;
let entity: Option<DeleteO11yExplorerViewsByViewidError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Removes one review queue and every item in it. A queue id belonging to another org answers the same 404 an unknown id does, so a probe learns nothing about what exists.
pub async fn delete_o11y_reviews_by_id(configuration: &configuration::Configuration, id: &str) -> Result<models::O11yPeriodAnnQueueDeleted, Error<DeleteO11yReviewsByIdError>> {
// add a prefix to parameters to efficiently prevent name collisions
let p_id = id;
let uri_str = format!("{}/v1/o11y/reviews/{id}", configuration.base_path, id=crate::apis::urlencode(p_id));
let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str);
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
let content_type = resp
.headers()
.get("content-type")
.and_then(|v| v.to_str().ok())
.unwrap_or("application/octet-stream");
let content_type = super::ContentType::from(content_type);
if !status.is_client_error() && !status.is_server_error() {
let content = resp.text().await?;
match content_type {
ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodAnnQueueDeleted`"))),
ContentType::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`")))),
}
} else {
let content = resp.text().await?;
let entity: Option<DeleteO11yReviewsByIdError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Deletes one Sentry project of the caller's org. Its DSN stops resolving immediately, so ingest for that id fails closed exactly as an unknown project does; retained events are not touched. Answers 204. Callers need the editor role; the runtime's own gate enforces it.
pub async fn delete_o11y_sentinel_projects_by_id(configuration: &configuration::Configuration, id: &str) -> Result<(), Error<DeleteO11ySentinelProjectsByIdError>> {
// add a prefix to parameters to efficiently prevent name collisions
let p_id = id;
let uri_str = format!("{}/v1/o11y/sentinel/projects/{id}", configuration.base_path, id=crate::apis::urlencode(p_id));
let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str);
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
if !status.is_client_error() && !status.is_server_error() {
Ok(())
} else {
let content = resp.text().await?;
let entity: Option<DeleteO11ySentinelProjectsByIdError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Deletes the public-sharing config and disables public sharing of a dashboard. Callers need the admin role; the runtime's own gate enforces it.
pub async fn delete_public_dashboard(configuration: &configuration::Configuration, id: &str) -> Result<(), Error<DeletePublicDashboardError>> {
// add a prefix to parameters to efficiently prevent name collisions
let p_id = id;
let uri_str = format!("{}/v1/o11y/dashboards/{id}/public", configuration.base_path, id=crate::apis::urlencode(p_id));
let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str);
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
if !status.is_client_error() && !status.is_server_error() {
Ok(())
} else {
let content = resp.text().await?;
let entity: Option<DeletePublicDashboardError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Deletes a custom role. A role that still has user or service-account assignees, or an auth-domain mapping, is refused; managed roles cannot be deleted.
pub async fn delete_role(configuration: &configuration::Configuration, id: &str) -> Result<(), Error<DeleteRoleError>> {
// add a prefix to parameters to efficiently prevent name collisions
let p_id = id;
let uri_str = format!("{}/v1/o11y/roles/{id}", configuration.base_path, id=crate::apis::urlencode(p_id));
let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str);
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
if !status.is_client_error() && !status.is_server_error() {
Ok(())
} else {
let content = resp.text().await?;
let entity: Option<DeleteRoleError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Removes a route policy, by id. Admin gate.
pub async fn delete_route_policy_by_id(configuration: &configuration::Configuration, id: &str) -> Result<(), Error<DeleteRoutePolicyByIdError>> {
// add a prefix to parameters to efficiently prevent name collisions
let p_id = id;
let uri_str = format!("{}/v1/o11y/route_policies/{id}", configuration.base_path, id=crate::apis::urlencode(p_id));
let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str);
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
if !status.is_client_error() && !status.is_server_error() {
Ok(())
} else {
let content = resp.text().await?;
let entity: Option<DeleteRoutePolicyByIdError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Removes an alert rule, by id. Editor gate.
pub async fn delete_rule_by_id(configuration: &configuration::Configuration, id: &str) -> Result<(), Error<DeleteRuleByIdError>> {
// add a prefix to parameters to efficiently prevent name collisions
let p_id = id;
let uri_str = format!("{}/v1/o11y/rules/{id}", configuration.base_path, id=crate::apis::urlencode(p_id));
let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str);
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
if !status.is_client_error() && !status.is_server_error() {
Ok(())
} else {
let content = resp.text().await?;
let entity: Option<DeleteRuleByIdError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Deletes a service account and revokes every key it holds.
pub async fn delete_service_account(configuration: &configuration::Configuration, id: &str) -> Result<(), Error<DeleteServiceAccountError>> {
// add a prefix to parameters to efficiently prevent name collisions
let p_id = id;
let uri_str = format!("{}/v1/o11y/service_accounts/{id}", configuration.base_path, id=crate::apis::urlencode(p_id));
let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str);
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
if !status.is_client_error() && !status.is_server_error() {
Ok(())
} else {
let content = resp.text().await?;
let entity: Option<DeleteServiceAccountError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Removes a role from a service account.
pub async fn delete_service_account_role(configuration: &configuration::Configuration, id: &str, rid: &str) -> Result<(), Error<DeleteServiceAccountRoleError>> {
// add a prefix to parameters to efficiently prevent name collisions
let p_id = id;
let p_rid = rid;
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));
let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str);
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
if !status.is_client_error() && !status.is_server_error() {
Ok(())
} else {
let content = resp.text().await?;
let entity: Option<DeleteServiceAccountRoleError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Signs the calling session out, invalidating its tokens. The access token on the call names the session to end.
pub async fn delete_session(configuration: &configuration::Configuration, ) -> Result<(), Error<DeleteSessionError>> {
let uri_str = format!("{}/v1/o11y/sessions", configuration.base_path);
let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str);
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
if !status.is_client_error() && !status.is_server_error() {
Ok(())
} else {
let content = resp.text().await?;
let entity: Option<DeleteSessionError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Deletes one mapper from a group. Callers need the admin role; the runtime's own gate enforces it.
pub async fn delete_span_mapper(configuration: &configuration::Configuration, group_id: &str, mapper_id: &str) -> Result<(), Error<DeleteSpanMapperError>> {
// add a prefix to parameters to efficiently prevent name collisions
let p_group_id = group_id;
let p_mapper_id = mapper_id;
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));
let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str);
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
if !status.is_client_error() && !status.is_server_error() {
Ok(())
} else {
let content = resp.text().await?;
let entity: Option<DeleteSpanMapperError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Deletes a mapping group and every mapper under it. Callers need the admin role; the runtime's own gate enforces it.
pub async fn delete_span_mapper_group(configuration: &configuration::Configuration, group_id: &str) -> Result<(), Error<DeleteSpanMapperGroupError>> {
// add a prefix to parameters to efficiently prevent name collisions
let p_group_id = group_id;
let uri_str = format!("{}/v1/o11y/span_mapper_groups/{groupId}", configuration.base_path, groupId=crate::apis::urlencode(p_group_id));
let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str);
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
if !status.is_client_error() && !status.is_server_error() {
Ok(())
} else {
let content = resp.text().await?;
let entity: Option<DeleteSpanMapperGroupError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Deletes a funnel. The answer carries no data — the runtime acknowledges with the success envelope alone, which is what this Out says. Callers need the editor role; the runtime's own gate enforces it.
pub async fn delete_trace_funnel(configuration: &configuration::Configuration, funnel_id: &str) -> Result<models::O11yPeriodO11yFunnelDeleteOut, Error<DeleteTraceFunnelError>> {
// add a prefix to parameters to efficiently prevent name collisions
let p_funnel_id = funnel_id;
let uri_str = format!("{}/v1/o11y/trace-funnels/{funnel_id}", configuration.base_path, funnel_id=crate::apis::urlencode(p_funnel_id));
let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str);
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
let content_type = resp
.headers()
.get("content-type")
.and_then(|v| v.to_str().ok())
.unwrap_or("application/octet-stream");
let content_type = super::ContentType::from(content_type);
if !status.is_client_error() && !status.is_server_error() {
let content = resp.text().await?;
match content_type {
ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yFunnelDeleteOut`"))),
ContentType::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`")))),
}
} else {
let content = resp.text().await?;
let entity: Option<DeleteTraceFunnelError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Removes one org member, by user id. Admin gate.
pub async fn delete_user(configuration: &configuration::Configuration, id: &str) -> Result<(), Error<DeleteUserError>> {
// add a prefix to parameters to efficiently prevent name collisions
let p_id = id;
let uri_str = format!("{}/v1/o11y/users/{id}", configuration.base_path, id=crate::apis::urlencode(p_id));
let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str);
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
if !status.is_client_error() && !status.is_server_error() {
Ok(())
} else {
let content = resp.text().await?;
let entity: Option<DeleteUserError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Removes one org member, by user id. The same operation as deleteUser on the legacy singular path. Admin gate.
pub async fn delete_user_deprecated(configuration: &configuration::Configuration, id: &str) -> Result<(), Error<DeleteUserDeprecatedError>> {
// add a prefix to parameters to efficiently prevent name collisions
let p_id = id;
let uri_str = format!("{}/v1/o11y/user/{id}", configuration.base_path, id=crate::apis::urlencode(p_id));
let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str);
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
if !status.is_client_error() && !status.is_server_error() {
Ok(())
} else {
let content = resp.text().await?;
let entity: Option<DeleteUserDeprecatedError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Tears down a connected account for the given provider, by id. Admin gate.
pub async fn disconnect_account(configuration: &configuration::Configuration, cloud_provider: &str, id: &str) -> Result<(), Error<DisconnectAccountError>> {
// add a prefix to parameters to efficiently prevent name collisions
let p_cloud_provider = cloud_provider;
let p_id = id;
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));
let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str);
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
if !status.is_client_error() && !status.is_server_error() {
Ok(())
} else {
let content = resp.text().await?;
let entity: Option<DisconnectAccountError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Starts the forgotten-password flow: the named user is mailed a reset link. Unauthenticated by design, and deliberately quiet about whether the address exists.
pub async fn forgot_password(configuration: &configuration::Configuration, o11y_period_o11y_forgot_password_in: models::O11yPeriodO11yForgotPasswordIn) -> Result<(), Error<ForgotPasswordError>> {
// add a prefix to parameters to efficiently prevent name collisions
let p_o11y_period_o11y_forgot_password_in = o11y_period_o11y_forgot_password_in;
let uri_str = format!("{}/v1/o11y/factor_password/forgot", configuration.base_path);
let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
req_builder = req_builder.json(&p_o11y_period_o11y_forgot_password_in);
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
if !status.is_client_error() && !status.is_server_error() {
Ok(())
} else {
let content = resp.text().await?;
let entity: Option<ForgotPasswordError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Returns one connected account for the given provider, by id. Admin gate.
pub async fn get_account(configuration: &configuration::Configuration, cloud_provider: &str, id: &str) -> Result<models::O11yPeriodO11yAccountOut, Error<GetAccountError>> {
// add a prefix to parameters to efficiently prevent name collisions
let p_cloud_provider = cloud_provider;
let p_id = id;
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));
let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
let content_type = resp
.headers()
.get("content-type")
.and_then(|v| v.to_str().ok())
.unwrap_or("application/octet-stream");
let content_type = super::ContentType::from(content_type);
if !status.is_client_error() && !status.is_server_error() {
let content = resp.text().await?;
match content_type {
ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yAccountOut`"))),
ContentType::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`")))),
}
} else {
let content = resp.text().await?;
let entity: Option<GetAccountError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Returns one service and its configuration for a connected account of the given provider, by account id and service id. Admin gate.
pub async fn get_account_service(configuration: &configuration::Configuration, cloud_provider: &str, id: &str, service_id: &str) -> Result<models::O11yPeriodO11yServiceOut, Error<GetAccountServiceError>> {
// add a prefix to parameters to efficiently prevent name collisions
let p_cloud_provider = cloud_provider;
let p_id = id;
let p_service_id = service_id;
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));
let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
let content_type = resp
.headers()
.get("content-type")
.and_then(|v| v.to_str().ok())
.unwrap_or("application/octet-stream");
let content_type = super::ContentType::from(content_type);
if !status.is_client_error() && !status.is_server_error() {
let content = resp.text().await?;
match content_type {
ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yServiceOut`"))),
ContentType::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`")))),
}
} else {
let content = resp.text().await?;
let entity: Option<GetAccountServiceError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Returns the org's current alerts. Viewer gate.
pub async fn get_alerts(configuration: &configuration::Configuration, ) -> Result<models::O11yPeriodO11yAlertsOut, Error<GetAlertsError>> {
let uri_str = format!("{}/v1/o11y/alerts", configuration.base_path);
let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
let content_type = resp
.headers()
.get("content-type")
.and_then(|v| v.to_str().ok())
.unwrap_or("application/octet-stream");
let content_type = super::ContentType::from(content_type);
if !status.is_client_error() && !status.is_server_error() {
let content = resp.text().await?;
match content_type {
ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yAlertsOut`"))),
ContentType::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`")))),
}
} else {
let content = resp.text().await?;
let entity: Option<GetAlertsError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Lists the org's route policies. Viewer gate.
pub async fn get_all_route_policies(configuration: &configuration::Configuration, ) -> Result<models::O11yPeriodO11yRoutePoliciesOut, Error<GetAllRoutePoliciesError>> {
let uri_str = format!("{}/v1/o11y/route_policies", configuration.base_path);
let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
let content_type = resp
.headers()
.get("content-type")
.and_then(|v| v.to_str().ok())
.unwrap_or("application/octet-stream");
let content_type = super::ContentType::from(content_type);
if !status.is_client_error() && !status.is_server_error() {
let content = resp.text().await?;
match content_type {
ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yRoutePoliciesOut`"))),
ContentType::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`")))),
}
} else {
let content = resp.text().await?;
let entity: Option<GetAllRoutePoliciesError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Returns one auth domain with its SSO configuration, by id. Admin gate.
pub async fn get_auth_domain(configuration: &configuration::Configuration, id: &str) -> Result<models::O11yPeriodO11yAuthDomainOut, Error<GetAuthDomainError>> {
// add a prefix to parameters to efficiently prevent name collisions
let p_id = id;
let uri_str = format!("{}/v1/o11y/domains/{id}", configuration.base_path, id=crate::apis::urlencode(p_id));
let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
let content_type = resp
.headers()
.get("content-type")
.and_then(|v| v.to_str().ok())
.unwrap_or("application/octet-stream");
let content_type = super::ContentType::from(content_type);
if !status.is_client_error() && !status.is_server_error() {
let content = resp.text().await?;
match content_type {
ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yAuthDomainOut`"))),
ContentType::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`")))),
}
} else {
let content = resp.text().await?;
let entity: Option<GetAuthDomainError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Returns one notification channel, by id. Viewer gate.
pub async fn get_channel_by_id(configuration: &configuration::Configuration, id: &str) -> Result<models::O11yPeriodO11yChannelOut, Error<GetChannelByIdError>> {
// add a prefix to parameters to efficiently prevent name collisions
let p_id = id;
let uri_str = format!("{}/v1/o11y/channels/{id}", configuration.base_path, id=crate::apis::urlencode(p_id));
let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
let content_type = resp
.headers()
.get("content-type")
.and_then(|v| v.to_str().ok())
.unwrap_or("application/octet-stream");
let content_type = super::ContentType::from(content_type);
if !status.is_client_error() && !status.is_server_error() {
let content = resp.text().await?;
match content_type {
ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yChannelOut`"))),
ContentType::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`")))),
}
} else {
let content = resp.text().await?;
let entity: Option<GetChannelByIdError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Returns the credentials the connecting agent needs to establish the cloud integration, for the given cloud provider. Admin gate.
pub async fn get_connection_credentials(configuration: &configuration::Configuration, cloud_provider: &str) -> Result<models::O11yPeriodO11yCredentialsOut, Error<GetConnectionCredentialsError>> {
// add a prefix to parameters to efficiently prevent name collisions
let p_cloud_provider = cloud_provider;
let uri_str = format!("{}/v1/o11y/cloud_integrations/{cloud_provider}/credentials", configuration.base_path, cloud_provider=crate::apis::urlencode(p_cloud_provider));
let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
let content_type = resp
.headers()
.get("content-type")
.and_then(|v| v.to_str().ok())
.unwrap_or("application/octet-stream");
let content_type = super::ContentType::from(content_type);
if !status.is_client_error() && !status.is_server_error() {
let content = resp.text().await?;
match content_type {
ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yCredentialsOut`"))),
ContentType::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`")))),
}
} else {
let content = resp.text().await?;
let entity: Option<GetConnectionCredentialsError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Returns a v2-shape dashboard. Callers need the viewer role; the runtime's own gate enforces it.
pub async fn get_dashboard_v2(configuration: &configuration::Configuration, id: &str) -> Result<models::O11yPeriodO11yDashboardOut, Error<GetDashboardV2Error>> {
// add a prefix to parameters to efficiently prevent name collisions
let p_id = id;
let uri_str = format!("{}/v1/o11y/dashboards/{id}", configuration.base_path, id=crate::apis::urlencode(p_id));
let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
let content_type = resp
.headers()
.get("content-type")
.and_then(|v| v.to_str().ok())
.unwrap_or("application/octet-stream");
let content_type = super::ContentType::from(content_type);
if !status.is_client_error() && !status.is_server_error() {
let content = resp.text().await?;
match content_type {
ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yDashboardOut`"))),
ContentType::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`")))),
}
} else {
let content = resp.text().await?;
let entity: Option<GetDashboardV2Error> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Returns one planned maintenance window, by id. Viewer gate.
pub async fn get_downtime_schedule_by_id(configuration: &configuration::Configuration, id: &str) -> Result<models::O11yPeriodO11yDowntimeScheduleOut, Error<GetDowntimeScheduleByIdError>> {
// add a prefix to parameters to efficiently prevent name collisions
let p_id = id;
let uri_str = format!("{}/v1/o11y/downtime_schedules/{id}", configuration.base_path, id=crate::apis::urlencode(p_id));
let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
let content_type = resp
.headers()
.get("content-type")
.and_then(|v| v.to_str().ok())
.unwrap_or("application/octet-stream");
let content_type = super::ContentType::from(content_type);
if !status.is_client_error() && !status.is_server_error() {
let content = resp.text().await?;
match content_type {
ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yDowntimeScheduleOut`"))),
ContentType::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`")))),
}
} else {
let content = resp.text().await?;
let entity: Option<GetDowntimeScheduleByIdError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Returns the errored traces through a step transition of a funnel described inline.
pub async fn get_draft_funnel_error_traces(configuration: &configuration::Configuration, o11y_period_o11y_draft_funnel_in: models::O11yPeriodO11yDraftFunnelIn) -> Result<models::O11yPeriodO11yFunnelRowsOut, Error<GetDraftFunnelErrorTracesError>> {
// add a prefix to parameters to efficiently prevent name collisions
let p_o11y_period_o11y_draft_funnel_in = o11y_period_o11y_draft_funnel_in;
let uri_str = format!("{}/v1/o11y/trace-funnels/analytics/error-traces", configuration.base_path);
let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
req_builder = req_builder.json(&p_o11y_period_o11y_draft_funnel_in);
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
let content_type = resp
.headers()
.get("content-type")
.and_then(|v| v.to_str().ok())
.unwrap_or("application/octet-stream");
let content_type = super::ContentType::from(content_type);
if !status.is_client_error() && !status.is_server_error() {
let content = resp.text().await?;
match content_type {
ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yFunnelRowsOut`"))),
ContentType::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`")))),
}
} else {
let content = resp.text().await?;
let entity: Option<GetDraftFunnelErrorTracesError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Returns the conversion overview of a funnel described inline.
pub async fn get_draft_funnel_overview(configuration: &configuration::Configuration, o11y_period_o11y_draft_funnel_in: models::O11yPeriodO11yDraftFunnelIn) -> Result<models::O11yPeriodO11yFunnelRowsOut, Error<GetDraftFunnelOverviewError>> {
// add a prefix to parameters to efficiently prevent name collisions
let p_o11y_period_o11y_draft_funnel_in = o11y_period_o11y_draft_funnel_in;
let uri_str = format!("{}/v1/o11y/trace-funnels/analytics/overview", configuration.base_path);
let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
req_builder = req_builder.json(&p_o11y_period_o11y_draft_funnel_in);
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
let content_type = resp
.headers()
.get("content-type")
.and_then(|v| v.to_str().ok())
.unwrap_or("application/octet-stream");
let content_type = super::ContentType::from(content_type);
if !status.is_client_error() && !status.is_server_error() {
let content = resp.text().await?;
match content_type {
ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yFunnelRowsOut`"))),
ContentType::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`")))),
}
} else {
let content = resp.text().await?;
let entity: Option<GetDraftFunnelOverviewError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Returns the slowest traces through a step transition of a funnel described inline.
pub async fn get_draft_funnel_slow_traces(configuration: &configuration::Configuration, o11y_period_o11y_draft_funnel_in: models::O11yPeriodO11yDraftFunnelIn) -> Result<models::O11yPeriodO11yFunnelRowsOut, Error<GetDraftFunnelSlowTracesError>> {
// add a prefix to parameters to efficiently prevent name collisions
let p_o11y_period_o11y_draft_funnel_in = o11y_period_o11y_draft_funnel_in;
let uri_str = format!("{}/v1/o11y/trace-funnels/analytics/slow-traces", configuration.base_path);
let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
req_builder = req_builder.json(&p_o11y_period_o11y_draft_funnel_in);
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
let content_type = resp
.headers()
.get("content-type")
.and_then(|v| v.to_str().ok())
.unwrap_or("application/octet-stream");
let content_type = super::ContentType::from(content_type);
if !status.is_client_error() && !status.is_server_error() {
let content = resp.text().await?;
match content_type {
ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yFunnelRowsOut`"))),
ContentType::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`")))),
}
} else {
let content = resp.text().await?;
let entity: Option<GetDraftFunnelSlowTracesError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Returns the per-step metrics of a funnel described inline.
pub async fn get_draft_funnel_step_metrics(configuration: &configuration::Configuration, o11y_period_o11y_draft_funnel_in: models::O11yPeriodO11yDraftFunnelIn) -> Result<models::O11yPeriodO11yFunnelRowsOut, Error<GetDraftFunnelStepMetricsError>> {
// add a prefix to parameters to efficiently prevent name collisions
let p_o11y_period_o11y_draft_funnel_in = o11y_period_o11y_draft_funnel_in;
let uri_str = format!("{}/v1/o11y/trace-funnels/analytics/steps", configuration.base_path);
let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
req_builder = req_builder.json(&p_o11y_period_o11y_draft_funnel_in);
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
let content_type = resp
.headers()
.get("content-type")
.and_then(|v| v.to_str().ok())
.unwrap_or("application/octet-stream");
let content_type = super::ContentType::from(content_type);
if !status.is_client_error() && !status.is_server_error() {
let content = resp.text().await?;
match content_type {
ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yFunnelRowsOut`"))),
ContentType::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`")))),
}
} else {
let content = resp.text().await?;
let entity: Option<GetDraftFunnelStepMetricsError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Returns the conversion between two steps of a funnel described inline.
pub async fn get_draft_funnel_step_overview(configuration: &configuration::Configuration, o11y_period_o11y_draft_funnel_in: models::O11yPeriodO11yDraftFunnelIn) -> Result<models::O11yPeriodO11yFunnelRowsOut, Error<GetDraftFunnelStepOverviewError>> {
// add a prefix to parameters to efficiently prevent name collisions
let p_o11y_period_o11y_draft_funnel_in = o11y_period_o11y_draft_funnel_in;
let uri_str = format!("{}/v1/o11y/trace-funnels/analytics/steps/overview", configuration.base_path);
let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
req_builder = req_builder.json(&p_o11y_period_o11y_draft_funnel_in);
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
let content_type = resp
.headers()
.get("content-type")
.and_then(|v| v.to_str().ok())
.unwrap_or("application/octet-stream");
let content_type = super::ContentType::from(content_type);
if !status.is_client_error() && !status.is_server_error() {
let content = resp.text().await?;
match content_type {
ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yFunnelRowsOut`"))),
ContentType::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`")))),
}
} else {
let content = resp.text().await?;
let entity: Option<GetDraftFunnelStepOverviewError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Returns a trace's flamegraph: spans bucketed by depth level, each level ordered as it is drawn, around the selected span. Callers need the viewer role; the runtime's own gate enforces it.
pub async fn get_flamegraph(configuration: &configuration::Configuration, trace_id: &str, o11y_period_o11y_trace_flamegraph_in: models::O11yPeriodO11yTraceFlamegraphIn) -> Result<models::O11yPeriodO11yTraceFlamegraphOut, Error<GetFlamegraphError>> {
// add a prefix to parameters to efficiently prevent name collisions
let p_trace_id = trace_id;
let p_o11y_period_o11y_trace_flamegraph_in = o11y_period_o11y_trace_flamegraph_in;
let uri_str = format!("{}/v1/o11y/traces/{traceId}/flamegraph", configuration.base_path, traceId=crate::apis::urlencode(p_trace_id));
let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
req_builder = req_builder.json(&p_o11y_period_o11y_trace_flamegraph_in);
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
let content_type = resp
.headers()
.get("content-type")
.and_then(|v| v.to_str().ok())
.unwrap_or("application/octet-stream");
let content_type = super::ContentType::from(content_type);
if !status.is_client_error() && !status.is_server_error() {
let content = resp.text().await?;
match content_type {
ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yTraceFlamegraphOut`"))),
ContentType::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`")))),
}
} else {
let content = resp.text().await?;
let entity: Option<GetFlamegraphError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Returns the deployment's host info from Zeus. Viewer gate.
pub async fn get_hosts(configuration: &configuration::Configuration, ) -> Result<models::O11yPeriodO11yGettableHostOut, Error<GetHostsError>> {
let uri_str = format!("{}/v1/o11y/zeus/hosts", configuration.base_path);
let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
let content_type = resp
.headers()
.get("content-type")
.and_then(|v| v.to_str().ok())
.unwrap_or("application/octet-stream");
let content_type = super::ContentType::from(content_type);
if !status.is_client_error() && !status.is_server_error() {
let content = resp.text().await?;
match content_type {
ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yGettableHostOut`"))),
ContentType::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`")))),
}
} else {
let content = resp.text().await?;
let entity: Option<GetHostsError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Lists the workspace's ingestion keys, paginated. Editor gate.
pub async fn get_ingestion_keys(configuration: &configuration::Configuration, page: Option<i32>, per_page: Option<i32>) -> Result<models::O11yPeriodO11yIngestionKeysOut, Error<GetIngestionKeysError>> {
// add a prefix to parameters to efficiently prevent name collisions
let p_page = page;
let p_per_page = per_page;
let uri_str = format!("{}/v1/o11y/gateway/ingestion_keys", configuration.base_path);
let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
if let Some(ref param_value) = p_page {
req_builder = req_builder.query(&[("page", ¶m_value.to_string())]);
}
if let Some(ref param_value) = p_per_page {
req_builder = req_builder.query(&[("per_page", ¶m_value.to_string())]);
}
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
let content_type = resp
.headers()
.get("content-type")
.and_then(|v| v.to_str().ok())
.unwrap_or("application/octet-stream");
let content_type = super::ContentType::from(content_type);
if !status.is_client_error() && !status.is_server_error() {
let content = resp.text().await?;
match content_type {
ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yIngestionKeysOut`"))),
ContentType::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`")))),
}
} else {
let content = resp.text().await?;
let entity: Option<GetIngestionKeysError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Returns one integration's full detail — its overview, configuration steps, collected data and assets — together with its installation record when the org has installed it. Viewer gate.
pub async fn get_integration(configuration: &configuration::Configuration, integration_id: &str) -> Result<models::O11yPeriodO11yIntegrationOut, Error<GetIntegrationError>> {
// add a prefix to parameters to efficiently prevent name collisions
let p_integration_id = integration_id;
let uri_str = format!("{}/v1/o11y/integrations/{integrationId}", configuration.base_path, integrationId=crate::apis::urlencode(p_integration_id));
let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
let content_type = resp
.headers()
.get("content-type")
.and_then(|v| v.to_str().ok())
.unwrap_or("application/octet-stream");
let content_type = super::ContentType::from(content_type);
if !status.is_client_error() && !status.is_server_error() {
let content = resp.text().await?;
match content_type {
ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yIntegrationOut`"))),
ContentType::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`")))),
}
} else {
let content = resp.text().await?;
let entity: Option<GetIntegrationError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Reports whether the integration's logs and metrics have been received over the lookback window, so the console can show a live connection state. An integration that is not installed answers with an empty status rather than an error. Viewer gate.
pub async fn get_integration_connection_status(configuration: &configuration::Configuration, integration_id: &str, lookback_seconds: Option<i32>) -> Result<models::O11yPeriodO11yConnectionStatusOut, Error<GetIntegrationConnectionStatusError>> {
// add a prefix to parameters to efficiently prevent name collisions
let p_integration_id = integration_id;
let p_lookback_seconds = lookback_seconds;
let uri_str = format!("{}/v1/o11y/integrations/{integrationId}/connection_status", configuration.base_path, integrationId=crate::apis::urlencode(p_integration_id));
let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
if let Some(ref param_value) = p_lookback_seconds {
req_builder = req_builder.query(&[("lookback_seconds", ¶m_value.to_string())]);
}
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
let content_type = resp
.headers()
.get("content-type")
.and_then(|v| v.to_str().ok())
.unwrap_or("application/octet-stream");
let content_type = super::ContentType::from(content_type);
if !status.is_client_error() && !status.is_server_error() {
let content = resp.text().await?;
match content_type {
ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yConnectionStatusOut`"))),
ContentType::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`")))),
}
} else {
let content = resp.text().await?;
let entity: Option<GetIntegrationConnectionStatusError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Returns a single LLM pricing rule by id. Callers need the viewer role; the runtime's own gate enforces it.
pub async fn get_llm_pricing_rule(configuration: &configuration::Configuration, id: &str) -> Result<models::O11yPeriodO11yLlmPricingRuleOut, Error<GetLlmPricingRuleError>> {
// add a prefix to parameters to efficiently prevent name collisions
let p_id = id;
let uri_str = format!("{}/v1/o11y/llm_pricing_rules/{id}", configuration.base_path, id=crate::apis::urlencode(p_id));
let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
let content_type = resp
.headers()
.get("content-type")
.and_then(|v| v.to_str().ok())
.unwrap_or("application/octet-stream");
let content_type = super::ContentType::from(content_type);
if !status.is_client_error() && !status.is_server_error() {
let content = resp.text().await?;
match content_type {
ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yLlmPricingRuleOut`"))),
ContentType::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`")))),
}
} else {
let content = resp.text().await?;
let entity: Option<GetLlmPricingRuleError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Returns a single score by id. Callers need the viewer role; the runtime's own gate enforces it.
pub async fn get_llm_score(configuration: &configuration::Configuration, id: &str) -> Result<models::O11yPeriodO11yLlmScoreOut, Error<GetLlmScoreError>> {
// add a prefix to parameters to efficiently prevent name collisions
let p_id = id;
let uri_str = format!("{}/v1/o11y/llm/score/{id}", configuration.base_path, id=crate::apis::urlencode(p_id));
let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
let content_type = resp
.headers()
.get("content-type")
.and_then(|v| v.to_str().ok())
.unwrap_or("application/octet-stream");
let content_type = super::ContentType::from(content_type);
if !status.is_client_error() && !status.is_server_error() {
let content = resp.text().await?;
match content_type {
ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yLlmScoreOut`"))),
ContentType::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`")))),
}
} else {
let content = resp.text().await?;
let entity: Option<GetLlmScoreError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Lists the alert rules that reference a metric.
pub async fn get_metric_alerts(configuration: &configuration::Configuration, metric_name: &str) -> Result<models::O11yPeriodO11yMetricAlertsOut, Error<GetMetricAlertsError>> {
// add a prefix to parameters to efficiently prevent name collisions
let p_metric_name = metric_name;
let uri_str = format!("{}/v1/o11y/metrics/alerts", configuration.base_path);
let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
req_builder = req_builder.query(&[("metricName", &p_metric_name.to_string())]);
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
let content_type = resp
.headers()
.get("content-type")
.and_then(|v| v.to_str().ok())
.unwrap_or("application/octet-stream");
let content_type = super::ContentType::from(content_type);
if !status.is_client_error() && !status.is_server_error() {
let content = resp.text().await?;
match content_type {
ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yMetricAlertsOut`"))),
ContentType::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`")))),
}
} else {
let content = resp.text().await?;
let entity: Option<GetMetricAlertsError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Returns one metric's attribute keys, each with its unique values and their count.
pub async fn get_metric_attributes(configuration: &configuration::Configuration, metric_name: &str, start: Option<i32>, end: Option<i32>) -> Result<models::O11yPeriodO11yMetricAttributesOut, Error<GetMetricAttributesError>> {
// add a prefix to parameters to efficiently prevent name collisions
let p_metric_name = metric_name;
let p_start = start;
let p_end = end;
let uri_str = format!("{}/v1/o11y/metrics/attributes", configuration.base_path);
let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
req_builder = req_builder.query(&[("metricName", &p_metric_name.to_string())]);
if let Some(ref param_value) = p_start {
req_builder = req_builder.query(&[("start", ¶m_value.to_string())]);
}
if let Some(ref param_value) = p_end {
req_builder = req_builder.query(&[("end", ¶m_value.to_string())]);
}
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
let content_type = resp
.headers()
.get("content-type")
.and_then(|v| v.to_str().ok())
.unwrap_or("application/octet-stream");
let content_type = super::ContentType::from(content_type);
if !status.is_client_error() && !status.is_server_error() {
let content = resp.text().await?;
match content_type {
ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yMetricAttributesOut`"))),
ContentType::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`")))),
}
} else {
let content = resp.text().await?;
let entity: Option<GetMetricAttributesError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Lists the dashboard panels that reference a metric.
pub async fn get_metric_dashboards_v2(configuration: &configuration::Configuration, metric_name: &str) -> Result<models::O11yPeriodO11yMetricDashboardsOut, Error<GetMetricDashboardsV2Error>> {
// add a prefix to parameters to efficiently prevent name collisions
let p_metric_name = metric_name;
let uri_str = format!("{}/v1/o11y/metrics/dashboards", configuration.base_path);
let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
req_builder = req_builder.query(&[("metricName", &p_metric_name.to_string())]);
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
let content_type = resp
.headers()
.get("content-type")
.and_then(|v| v.to_str().ok())
.unwrap_or("application/octet-stream");
let content_type = super::ContentType::from(content_type);
if !status.is_client_error() && !status.is_server_error() {
let content = resp.text().await?;
match content_type {
ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yMetricDashboardsOut`"))),
ContentType::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`")))),
}
} else {
let content = resp.text().await?;
let entity: Option<GetMetricDashboardsV2Error> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Returns one metric's headline numbers: data points, total and active time series, and when it was last received.
pub async fn get_metric_highlights(configuration: &configuration::Configuration, metric_name: &str) -> Result<models::O11yPeriodO11yMetricHighlightsOut, Error<GetMetricHighlightsError>> {
// add a prefix to parameters to efficiently prevent name collisions
let p_metric_name = metric_name;
let uri_str = format!("{}/v1/o11y/metrics/highlights", configuration.base_path);
let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
req_builder = req_builder.query(&[("metricName", &p_metric_name.to_string())]);
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
let content_type = resp
.headers()
.get("content-type")
.and_then(|v| v.to_str().ok())
.unwrap_or("application/octet-stream");
let content_type = super::ContentType::from(content_type);
if !status.is_client_error() && !status.is_server_error() {
let content = resp.text().await?;
match content_type {
ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yMetricHighlightsOut`"))),
ContentType::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`")))),
}
} else {
let content = resp.text().await?;
let entity: Option<GetMetricHighlightsError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Returns one metric's metadata: description, type, unit, temporality and monotonicity.
pub async fn get_metric_metadata(configuration: &configuration::Configuration, metric_name: &str) -> Result<models::O11yPeriodO11yMetricMetadataOut, Error<GetMetricMetadataError>> {
// add a prefix to parameters to efficiently prevent name collisions
let p_metric_name = metric_name;
let uri_str = format!("{}/v1/o11y/metrics/metadata", configuration.base_path);
let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
req_builder = req_builder.query(&[("metricName", &p_metric_name.to_string())]);
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
let content_type = resp
.headers()
.get("content-type")
.and_then(|v| v.to_str().ok())
.unwrap_or("application/octet-stream");
let content_type = super::ContentType::from(content_type);
if !status.is_client_error() && !status.is_server_error() {
let content = resp.text().await?;
match content_type {
ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yMetricMetadataOut`"))),
ContentType::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`")))),
}
} else {
let content = resp.text().await?;
let entity: Option<GetMetricMetadataError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Returns one volume-control rule by its id.
pub async fn get_metric_reduction_rule_by_id(configuration: &configuration::Configuration, id: &str) -> Result<models::O11yPeriodO11yReductionRuleOut, Error<GetMetricReductionRuleByIdError>> {
// add a prefix to parameters to efficiently prevent name collisions
let p_id = id;
let uri_str = format!("{}/v1/o11y/metric_reduction_rules/{id}", configuration.base_path, id=crate::apis::urlencode(p_id));
let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
let content_type = resp
.headers()
.get("content-type")
.and_then(|v| v.to_str().ok())
.unwrap_or("application/octet-stream");
let content_type = super::ContentType::from(content_type);
if !status.is_client_error() && !status.is_server_error() {
let content = resp.text().await?;
match content_type {
ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yReductionRuleOut`"))),
ContentType::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`")))),
}
} else {
let content = resp.text().await?;
let entity: Option<GetMetricReductionRuleByIdError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Returns total ingested vs retained series and samples and the estimated monthly savings across all volume-control rules.
pub async fn get_metric_reduction_rule_stats(configuration: &configuration::Configuration, ) -> Result<models::O11yPeriodO11yReductionStatsOut, Error<GetMetricReductionRuleStatsError>> {
let uri_str = format!("{}/v1/o11y/metric_reduction_rules/stats", configuration.base_path);
let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
let content_type = resp
.headers()
.get("content-type")
.and_then(|v| v.to_str().ok())
.unwrap_or("application/octet-stream");
let content_type = super::ContentType::from(content_type);
if !status.is_client_error() && !status.is_server_error() {
let content = resp.text().await?;
match content_type {
ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yReductionStatsOut`"))),
ContentType::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`")))),
}
} else {
let content = resp.text().await?;
let entity: Option<GetMetricReductionRuleStatsError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Returns ingested vs retained series over time across all volume-control rules, in hourly buckets, in the query-range time-series response shape.
pub async fn get_metric_reduction_rule_timeseries(configuration: &configuration::Configuration, ) -> Result<models::O11yPeriodO11yReductionSeriesOut, Error<GetMetricReductionRuleTimeseriesError>> {
let uri_str = format!("{}/v1/o11y/metric_reduction_rules/timeseries", configuration.base_path);
let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
let content_type = resp
.headers()
.get("content-type")
.and_then(|v| v.to_str().ok())
.unwrap_or("application/octet-stream");
let content_type = super::ContentType::from(content_type);
if !status.is_client_error() && !status.is_server_error() {
let content = resp.text().await?;
match content_type {
ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yReductionSeriesOut`"))),
ContentType::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`")))),
}
} else {
let content = resp.text().await?;
let entity: Option<GetMetricReductionRuleTimeseriesError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Reports whether any non-O11y metrics have been ingested — the lightweight check onboarding polls.
pub async fn get_metrics_onboarding_status(configuration: &configuration::Configuration, ) -> Result<models::O11yPeriodO11yMetricOnboardingOut, Error<GetMetricsOnboardingStatusError>> {
let uri_str = format!("{}/v1/o11y/metrics/onboarding", configuration.base_path);
let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
let content_type = resp
.headers()
.get("content-type")
.and_then(|v| v.to_str().ok())
.unwrap_or("application/octet-stream");
let content_type = super::ContentType::from(content_type);
if !status.is_client_error() && !status.is_server_error() {
let content = resp.text().await?;
match content_type {
ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yMetricOnboardingOut`"))),
ContentType::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`")))),
}
} else {
let content = resp.text().await?;
let entity: Option<GetMetricsOnboardingStatusError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Lists metrics with their sample and time-series counts for a time range — the volume view of the metrics explorer, pageable and sortable.
pub async fn get_metrics_stats(configuration: &configuration::Configuration, o11y_period_o11y_metric_stats_in: models::O11yPeriodO11yMetricStatsIn) -> Result<models::O11yPeriodO11yMetricStatsOut, Error<GetMetricsStatsError>> {
// add a prefix to parameters to efficiently prevent name collisions
let p_o11y_period_o11y_metric_stats_in = o11y_period_o11y_metric_stats_in;
let uri_str = format!("{}/v1/o11y/metrics/stats", configuration.base_path);
let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
req_builder = req_builder.json(&p_o11y_period_o11y_metric_stats_in);
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
let content_type = resp
.headers()
.get("content-type")
.and_then(|v| v.to_str().ok())
.unwrap_or("application/octet-stream");
let content_type = super::ContentType::from(content_type);
if !status.is_client_error() && !status.is_server_error() {
let content = resp.text().await?;
match content_type {
ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yMetricStatsOut`"))),
ContentType::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`")))),
}
} else {
let content = resp.text().await?;
let entity: Option<GetMetricsStatsError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Returns the proportional distribution of metrics by sample count or time-series count, as the entries of a treemap.
pub async fn get_metrics_treemap(configuration: &configuration::Configuration, o11y_period_o11y_metric_treemap_in: models::O11yPeriodO11yMetricTreemapIn) -> Result<models::O11yPeriodO11yMetricTreemapOut, Error<GetMetricsTreemapError>> {
// add a prefix to parameters to efficiently prevent name collisions
let p_o11y_period_o11y_metric_treemap_in = o11y_period_o11y_metric_treemap_in;
let uri_str = format!("{}/v1/o11y/metrics/treemap", configuration.base_path);
let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
req_builder = req_builder.json(&p_o11y_period_o11y_metric_treemap_in);
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
let content_type = resp
.headers()
.get("content-type")
.and_then(|v| v.to_str().ok())
.unwrap_or("application/octet-stream");
let content_type = super::ContentType::from(content_type);
if !status.is_client_error() && !status.is_server_error() {
let content = resp.text().await?;
match content_type {
ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yMetricTreemapOut`"))),
ContentType::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`")))),
}
} else {
let content = resp.text().await?;
let entity: Option<GetMetricsTreemapError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Returns the caller's own organization. Admin gate.
pub async fn get_my_organization(configuration: &configuration::Configuration, ) -> Result<models::O11yPeriodO11yOrganizationOut, Error<GetMyOrganizationError>> {
let uri_str = format!("{}/v1/o11y/orgs/me", configuration.base_path);
let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
let content_type = resp
.headers()
.get("content-type")
.and_then(|v| v.to_str().ok())
.unwrap_or("application/octet-stream");
let content_type = super::ContentType::from(content_type);
if !status.is_client_error() && !status.is_server_error() {
let content = resp.text().await?;
match content_type {
ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yOrganizationOut`"))),
ContentType::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`")))),
}
} else {
let content = resp.text().await?;
let entity: Option<GetMyOrganizationError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Returns the calling service account itself, with the roles it holds — the self-inspection read for a key-authenticated caller.
pub async fn get_my_service_account(configuration: &configuration::Configuration, ) -> Result<models::O11yPeriodO11yServiceAccountOut, Error<GetMyServiceAccountError>> {
let uri_str = format!("{}/v1/o11y/service_accounts/me", configuration.base_path);
let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
let content_type = resp
.headers()
.get("content-type")
.and_then(|v| v.to_str().ok())
.unwrap_or("application/octet-stream");
let content_type = super::ContentType::from(content_type);
if !status.is_client_error() && !status.is_server_error() {
let content = resp.text().await?;
match content_type {
ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yServiceAccountOut`"))),
ContentType::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`")))),
}
} else {
let content = resp.text().await?;
let entity: Option<GetMyServiceAccountError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Returns the calling user together with every role they hold. Open to any authenticated caller.
pub async fn get_my_user(configuration: &configuration::Configuration, ) -> Result<models::O11yPeriodO11yUserWithRolesOut, Error<GetMyUserError>> {
let uri_str = format!("{}/v1/o11y/users/me", configuration.base_path);
let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
let content_type = resp
.headers()
.get("content-type")
.and_then(|v| v.to_str().ok())
.unwrap_or("application/octet-stream");
let content_type = super::ContentType::from(content_type);
if !status.is_client_error() && !status.is_server_error() {
let content = resp.text().await?;
match content_type {
ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yUserWithRolesOut`"))),
ContentType::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`")))),
}
} else {
let content = resp.text().await?;
let entity: Option<GetMyUserError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Returns the calling user with their single legacy role. Deprecated in favor of getMyUser. Open to any authenticated caller.
pub async fn get_my_user_deprecated(configuration: &configuration::Configuration, ) -> Result<models::O11yPeriodO11yDeprecatedUserOut, Error<GetMyUserDeprecatedError>> {
let uri_str = format!("{}/v1/o11y/user/me", configuration.base_path);
let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
let content_type = resp
.headers()
.get("content-type")
.and_then(|v| v.to_str().ok())
.unwrap_or("application/octet-stream");
let content_type = super::ContentType::from(content_type);
if !status.is_client_error() && !status.is_server_error() {
let content = resp.text().await?;
match content_type {
ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yDeprecatedUserOut`"))),
ContentType::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`")))),
}
} else {
let content = resp.text().await?;
let entity: Option<GetMyUserDeprecatedError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Answers the most recent Alertmanager deliveries THIS process received, as plain text — one greppable `ALERT-RECEIVED` line per alert, followed by the `ALERT-DELIVERED` / `ALERT-UNDELIVERED` outcome of carrying it out of the process, newest last, so piping to `tail` reads in arrival order. `(none)` when nothing has landed. Arrival and delivery are separate lines because they are separate facts that fail independently. Alertmanager can tell you it dispatched a notification, never that anything received it; this process taking the call says nothing about whether a human was reached. Reading only the first as if it were the second is how a pager stays silent for months behind a log where everything looks fine. The ring is PROCESS-LOCAL and bounded to the last 200 lines. Both are the point: a record that outlived the process that took the call would be a claim about something nobody observed, and an unbounded log is a memory leak with a nice name. A restart empties it.
pub async fn get_o11y_alerts_last(configuration: &configuration::Configuration, ) -> Result<(), Error<GetO11yAlertsLastError>> {
let uri_str = format!("{}/v1/o11y/alerts/last", configuration.base_path);
let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
if !status.is_client_error() && !status.is_server_error() {
Ok(())
} else {
let content = resp.text().await?;
let entity: Option<GetO11yAlertsLastError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Lists the attributes usable as an aggregate target for the given telemetry and operator — what a filter builder offers after the aggregation is chosen. Callers need the viewer role; the runtime's own gate enforces it.
pub 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>> {
// add a prefix to parameters to efficiently prevent name collisions
let p_data_source = data_source;
let p_aggregate_operator = aggregate_operator;
let p_search_text = search_text;
let p_limit = limit;
let uri_str = format!("{}/v1/o11y/autocomplete/aggregate_attributes", configuration.base_path);
let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
if let Some(ref param_value) = p_data_source {
req_builder = req_builder.query(&[("dataSource", ¶m_value.to_string())]);
}
if let Some(ref param_value) = p_aggregate_operator {
req_builder = req_builder.query(&[("aggregateOperator", ¶m_value.to_string())]);
}
if let Some(ref param_value) = p_search_text {
req_builder = req_builder.query(&[("searchText", ¶m_value.to_string())]);
}
if let Some(ref param_value) = p_limit {
req_builder = req_builder.query(&[("limit", ¶m_value.to_string())]);
}
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
let content_type = resp
.headers()
.get("content-type")
.and_then(|v| v.to_str().ok())
.unwrap_or("application/octet-stream");
let content_type = super::ContentType::from(content_type);
if !status.is_client_error() && !status.is_server_error() {
let content = resp.text().await?;
match content_type {
ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yAggregateAttributesOut`"))),
ContentType::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`")))),
}
} else {
let content = resp.text().await?;
let entity: Option<GetO11yAutocompleteAggregateAttributesError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Lists the attribute keys available for filtering the given telemetry, each with its data type and whether it is a materialized column. Callers need the viewer role; the runtime's own gate enforces it.
pub 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>> {
// add a prefix to parameters to efficiently prevent name collisions
let p_data_source = data_source;
let p_aggregate_operator = aggregate_operator;
let p_aggregate_attribute = aggregate_attribute;
let p_search_text = search_text;
let p_tag_type = tag_type;
let p_limit = limit;
let uri_str = format!("{}/v1/o11y/autocomplete/attribute_keys", configuration.base_path);
let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
if let Some(ref param_value) = p_data_source {
req_builder = req_builder.query(&[("dataSource", ¶m_value.to_string())]);
}
if let Some(ref param_value) = p_aggregate_operator {
req_builder = req_builder.query(&[("aggregateOperator", ¶m_value.to_string())]);
}
if let Some(ref param_value) = p_aggregate_attribute {
req_builder = req_builder.query(&[("aggregateAttribute", ¶m_value.to_string())]);
}
if let Some(ref param_value) = p_search_text {
req_builder = req_builder.query(&[("searchText", ¶m_value.to_string())]);
}
if let Some(ref param_value) = p_tag_type {
req_builder = req_builder.query(&[("tagType", ¶m_value.to_string())]);
}
if let Some(ref param_value) = p_limit {
req_builder = req_builder.query(&[("limit", ¶m_value.to_string())]);
}
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
let content_type = resp
.headers()
.get("content-type")
.and_then(|v| v.to_str().ok())
.unwrap_or("application/octet-stream");
let content_type = super::ContentType::from(content_type);
if !status.is_client_error() && !status.is_server_error() {
let content = resp.text().await?;
match content_type {
ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yAttributeKeysOut`"))),
ContentType::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`")))),
}
} else {
let content = resp.text().await?;
let entity: Option<GetO11yAutocompleteAttributeKeysError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Lists the values one attribute key has taken — string, number and bool values in their own lists — for completing a filter. Callers need the viewer role; the runtime's own gate enforces it.
pub 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>> {
// add a prefix to parameters to efficiently prevent name collisions
let p_data_source = data_source;
let p_aggregate_operator = aggregate_operator;
let p_aggregate_attribute = aggregate_attribute;
let p_attribute_key = attribute_key;
let p_filter_attribute_key_data_type = filter_attribute_key_data_type;
let p_search_text = search_text;
let p_tag_type = tag_type;
let p_limit = limit;
let uri_str = format!("{}/v1/o11y/autocomplete/attribute_values", configuration.base_path);
let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
if let Some(ref param_value) = p_data_source {
req_builder = req_builder.query(&[("dataSource", ¶m_value.to_string())]);
}
if let Some(ref param_value) = p_aggregate_operator {
req_builder = req_builder.query(&[("aggregateOperator", ¶m_value.to_string())]);
}
if let Some(ref param_value) = p_aggregate_attribute {
req_builder = req_builder.query(&[("aggregateAttribute", ¶m_value.to_string())]);
}
if let Some(ref param_value) = p_attribute_key {
req_builder = req_builder.query(&[("attributeKey", ¶m_value.to_string())]);
}
if let Some(ref param_value) = p_filter_attribute_key_data_type {
req_builder = req_builder.query(&[("filterAttributeKeyDataType", ¶m_value.to_string())]);
}
if let Some(ref param_value) = p_search_text {
req_builder = req_builder.query(&[("searchText", ¶m_value.to_string())]);
}
if let Some(ref param_value) = p_tag_type {
req_builder = req_builder.query(&[("tagType", ¶m_value.to_string())]);
}
if let Some(ref param_value) = p_limit {
req_builder = req_builder.query(&[("limit", ¶m_value.to_string())]);
}
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
let content_type = resp
.headers()
.get("content-type")
.and_then(|v| v.to_str().ok())
.unwrap_or("application/octet-stream");
let content_type = super::ContentType::from(content_type);
if !status.is_client_error() && !status.is_server_error() {
let content = resp.text().await?;
match content_type {
ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yAttributeValuesOut`"))),
ContentType::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`")))),
}
} else {
let content = resp.text().await?;
let entity: Option<GetO11yAutocompleteAttributeValuesError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Reports how much of the Hanzo fleet is up — the current per-service inventory plus an up-versus-reporting trend across the window. Both come from the fleet prober's own measurements: every service is asked its health URL every 30 seconds, so a service is listed as down because it did not answer, never because something failed to collect it. PLATFORM SUDO ONLY — this is the whole fleet's inventory, not tenant data, so every customer is 403. An unreachable telemetry store answers 503 rather than an empty trend, because a board of zeroes and a fleet that is down look identical.
pub async fn get_o11y_availability(configuration: &configuration::Configuration, range: Option<i32>, step_sec: Option<i32>) -> Result<models::O11yPeriodAvailabilityResponse, Error<GetO11yAvailabilityError>> {
// add a prefix to parameters to efficiently prevent name collisions
let p_range = range;
let p_step_sec = step_sec;
let uri_str = format!("{}/v1/o11y/availability", configuration.base_path);
let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
if let Some(ref param_value) = p_range {
req_builder = req_builder.query(&[("range", ¶m_value.to_string())]);
}
if let Some(ref param_value) = p_step_sec {
req_builder = req_builder.query(&[("stepSec", ¶m_value.to_string())]);
}
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
let content_type = resp
.headers()
.get("content-type")
.and_then(|v| v.to_str().ok())
.unwrap_or("application/octet-stream");
let content_type = super::ContentType::from(content_type);
if !status.is_client_error() && !status.is_server_error() {
let content = resp.text().await?;
match content_type {
ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodAvailabilityResponse`"))),
ContentType::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`")))),
}
} else {
let content = resp.text().await?;
let entity: Option<GetO11yAvailabilityError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Lists the metric attribute keys Kubernetes clusters report, for building cluster filters.
pub 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>> {
// add a prefix to parameters to efficiently prevent name collisions
let p_data_source = data_source;
let p_aggregate_operator = aggregate_operator;
let p_aggregate_attribute = aggregate_attribute;
let p_search_text = search_text;
let p_tag_type = tag_type;
let p_limit = limit;
let uri_str = format!("{}/v1/o11y/clusters/attribute_keys", configuration.base_path);
let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
if let Some(ref param_value) = p_data_source {
req_builder = req_builder.query(&[("dataSource", ¶m_value.to_string())]);
}
if let Some(ref param_value) = p_aggregate_operator {
req_builder = req_builder.query(&[("aggregateOperator", ¶m_value.to_string())]);
}
if let Some(ref param_value) = p_aggregate_attribute {
req_builder = req_builder.query(&[("aggregateAttribute", ¶m_value.to_string())]);
}
if let Some(ref param_value) = p_search_text {
req_builder = req_builder.query(&[("searchText", ¶m_value.to_string())]);
}
if let Some(ref param_value) = p_tag_type {
req_builder = req_builder.query(&[("tagType", ¶m_value.to_string())]);
}
if let Some(ref param_value) = p_limit {
req_builder = req_builder.query(&[("limit", ¶m_value.to_string())]);
}
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
let content_type = resp
.headers()
.get("content-type")
.and_then(|v| v.to_str().ok())
.unwrap_or("application/octet-stream");
let content_type = super::ContentType::from(content_type);
if !status.is_client_error() && !status.is_server_error() {
let content = resp.text().await?;
match content_type {
ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yInfraAttributeKeysOut`"))),
ContentType::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`")))),
}
} else {
let content = resp.text().await?;
let entity: Option<GetO11yClustersAttributeKeysError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Lists the values one cluster attribute key has taken, for building cluster filters.
pub 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>> {
// add a prefix to parameters to efficiently prevent name collisions
let p_data_source = data_source;
let p_aggregate_operator = aggregate_operator;
let p_aggregate_attribute = aggregate_attribute;
let p_attribute_key = attribute_key;
let p_filter_attribute_key_data_type = filter_attribute_key_data_type;
let p_search_text = search_text;
let p_tag_type = tag_type;
let p_limit = limit;
let uri_str = format!("{}/v1/o11y/clusters/attribute_values", configuration.base_path);
let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
if let Some(ref param_value) = p_data_source {
req_builder = req_builder.query(&[("dataSource", ¶m_value.to_string())]);
}
if let Some(ref param_value) = p_aggregate_operator {
req_builder = req_builder.query(&[("aggregateOperator", ¶m_value.to_string())]);
}
if let Some(ref param_value) = p_aggregate_attribute {
req_builder = req_builder.query(&[("aggregateAttribute", ¶m_value.to_string())]);
}
if let Some(ref param_value) = p_attribute_key {
req_builder = req_builder.query(&[("attributeKey", ¶m_value.to_string())]);
}
if let Some(ref param_value) = p_filter_attribute_key_data_type {
req_builder = req_builder.query(&[("filterAttributeKeyDataType", ¶m_value.to_string())]);
}
if let Some(ref param_value) = p_search_text {
req_builder = req_builder.query(&[("searchText", ¶m_value.to_string())]);
}
if let Some(ref param_value) = p_tag_type {
req_builder = req_builder.query(&[("tagType", ¶m_value.to_string())]);
}
if let Some(ref param_value) = p_limit {
req_builder = req_builder.query(&[("limit", ¶m_value.to_string())]);
}
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
let content_type = resp
.headers()
.get("content-type")
.and_then(|v| v.to_str().ok())
.unwrap_or("application/octet-stream");
let content_type = super::ContentType::from(content_type);
if !status.is_client_error() && !status.is_server_error() {
let content = resp.text().await?;
match content_type {
ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yInfraAttributeValuesOut`"))),
ContentType::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`")))),
}
} else {
let content = resp.text().await?;
let entity: Option<GetO11yClustersAttributeValuesError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// The callback Google redirects a user back to after they approve the sign-in. It exchanges the authorization code, establishes the session and answers 303 to the console. The answer is a Location header and no body, which is why it is not a typed operation — declaring a JSON response for a redirect would publish a shape that does not exist and hide the header that is the entire point. UNAUTHENTICATED by necessity: it is how a caller GETS a principal, so requiring one would be circular. It is not an open endpoint — the code it carries is single-use and verified against the provider.
pub async fn get_o11y_complete_google(configuration: &configuration::Configuration, ) -> Result<(), Error<GetO11yCompleteGoogleError>> {
let uri_str = format!("{}/v1/o11y/complete/google", configuration.base_path);
let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
if !status.is_client_error() && !status.is_server_error() {
Ok(())
} else {
let content = resp.text().await?;
let entity: Option<GetO11yCompleteGoogleError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// The callback any configured OIDC provider redirects back to. Same shape and same reasoning as the Google callback: the code is exchanged, the session is established, and the answer is a 303 to the console rather than a body. UNAUTHENTICATED by necessity — this is the act of obtaining a principal, and the provider's own code is what authenticates it.
pub async fn get_o11y_complete_oidc(configuration: &configuration::Configuration, ) -> Result<(), Error<GetO11yCompleteOidcError>> {
let uri_str = format!("{}/v1/o11y/complete/oidc", configuration.base_path);
let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
if !status.is_client_error() && !status.is_server_error() {
Ok(())
} else {
let content = resp.text().await?;
let entity: Option<GetO11yCompleteOidcError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Lists the metric attribute keys Kubernetes daemonsets report, for building daemonset filters.
pub 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>> {
// add a prefix to parameters to efficiently prevent name collisions
let p_data_source = data_source;
let p_aggregate_operator = aggregate_operator;
let p_aggregate_attribute = aggregate_attribute;
let p_search_text = search_text;
let p_tag_type = tag_type;
let p_limit = limit;
let uri_str = format!("{}/v1/o11y/daemonsets/attribute_keys", configuration.base_path);
let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
if let Some(ref param_value) = p_data_source {
req_builder = req_builder.query(&[("dataSource", ¶m_value.to_string())]);
}
if let Some(ref param_value) = p_aggregate_operator {
req_builder = req_builder.query(&[("aggregateOperator", ¶m_value.to_string())]);
}
if let Some(ref param_value) = p_aggregate_attribute {
req_builder = req_builder.query(&[("aggregateAttribute", ¶m_value.to_string())]);
}
if let Some(ref param_value) = p_search_text {
req_builder = req_builder.query(&[("searchText", ¶m_value.to_string())]);
}
if let Some(ref param_value) = p_tag_type {
req_builder = req_builder.query(&[("tagType", ¶m_value.to_string())]);
}
if let Some(ref param_value) = p_limit {
req_builder = req_builder.query(&[("limit", ¶m_value.to_string())]);
}
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
let content_type = resp
.headers()
.get("content-type")
.and_then(|v| v.to_str().ok())
.unwrap_or("application/octet-stream");
let content_type = super::ContentType::from(content_type);
if !status.is_client_error() && !status.is_server_error() {
let content = resp.text().await?;
match content_type {
ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yInfraAttributeKeysOut`"))),
ContentType::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`")))),
}
} else {
let content = resp.text().await?;
let entity: Option<GetO11yDaemonsetsAttributeKeysError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Lists the values one daemonset attribute key has taken, for building daemonset filters.
pub 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>> {
// add a prefix to parameters to efficiently prevent name collisions
let p_data_source = data_source;
let p_aggregate_operator = aggregate_operator;
let p_aggregate_attribute = aggregate_attribute;
let p_attribute_key = attribute_key;
let p_filter_attribute_key_data_type = filter_attribute_key_data_type;
let p_search_text = search_text;
let p_tag_type = tag_type;
let p_limit = limit;
let uri_str = format!("{}/v1/o11y/daemonsets/attribute_values", configuration.base_path);
let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
if let Some(ref param_value) = p_data_source {
req_builder = req_builder.query(&[("dataSource", ¶m_value.to_string())]);
}
if let Some(ref param_value) = p_aggregate_operator {
req_builder = req_builder.query(&[("aggregateOperator", ¶m_value.to_string())]);
}
if let Some(ref param_value) = p_aggregate_attribute {
req_builder = req_builder.query(&[("aggregateAttribute", ¶m_value.to_string())]);
}
if let Some(ref param_value) = p_attribute_key {
req_builder = req_builder.query(&[("attributeKey", ¶m_value.to_string())]);
}
if let Some(ref param_value) = p_filter_attribute_key_data_type {
req_builder = req_builder.query(&[("filterAttributeKeyDataType", ¶m_value.to_string())]);
}
if let Some(ref param_value) = p_search_text {
req_builder = req_builder.query(&[("searchText", ¶m_value.to_string())]);
}
if let Some(ref param_value) = p_tag_type {
req_builder = req_builder.query(&[("tagType", ¶m_value.to_string())]);
}
if let Some(ref param_value) = p_limit {
req_builder = req_builder.query(&[("limit", ¶m_value.to_string())]);
}
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
let content_type = resp
.headers()
.get("content-type")
.and_then(|v| v.to_str().ok())
.unwrap_or("application/octet-stream");
let content_type = super::ContentType::from(content_type);
if !status.is_client_error() && !status.is_server_error() {
let content = resp.text().await?;
match content_type {
ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yInfraAttributeValuesOut`"))),
ContentType::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`")))),
}
} else {
let content = resp.text().await?;
let entity: Option<GetO11yDaemonsetsAttributeValuesError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Lists the metric attribute keys Kubernetes deployments report, for building deployment filters.
pub 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>> {
// add a prefix to parameters to efficiently prevent name collisions
let p_data_source = data_source;
let p_aggregate_operator = aggregate_operator;
let p_aggregate_attribute = aggregate_attribute;
let p_search_text = search_text;
let p_tag_type = tag_type;
let p_limit = limit;
let uri_str = format!("{}/v1/o11y/deployments/attribute_keys", configuration.base_path);
let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
if let Some(ref param_value) = p_data_source {
req_builder = req_builder.query(&[("dataSource", ¶m_value.to_string())]);
}
if let Some(ref param_value) = p_aggregate_operator {
req_builder = req_builder.query(&[("aggregateOperator", ¶m_value.to_string())]);
}
if let Some(ref param_value) = p_aggregate_attribute {
req_builder = req_builder.query(&[("aggregateAttribute", ¶m_value.to_string())]);
}
if let Some(ref param_value) = p_search_text {
req_builder = req_builder.query(&[("searchText", ¶m_value.to_string())]);
}
if let Some(ref param_value) = p_tag_type {
req_builder = req_builder.query(&[("tagType", ¶m_value.to_string())]);
}
if let Some(ref param_value) = p_limit {
req_builder = req_builder.query(&[("limit", ¶m_value.to_string())]);
}
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
let content_type = resp
.headers()
.get("content-type")
.and_then(|v| v.to_str().ok())
.unwrap_or("application/octet-stream");
let content_type = super::ContentType::from(content_type);
if !status.is_client_error() && !status.is_server_error() {
let content = resp.text().await?;
match content_type {
ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yInfraAttributeKeysOut`"))),
ContentType::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`")))),
}
} else {
let content = resp.text().await?;
let entity: Option<GetO11yDeploymentsAttributeKeysError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Lists the values one deployment attribute key has taken, for building deployment filters.
pub 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>> {
// add a prefix to parameters to efficiently prevent name collisions
let p_data_source = data_source;
let p_aggregate_operator = aggregate_operator;
let p_aggregate_attribute = aggregate_attribute;
let p_attribute_key = attribute_key;
let p_filter_attribute_key_data_type = filter_attribute_key_data_type;
let p_search_text = search_text;
let p_tag_type = tag_type;
let p_limit = limit;
let uri_str = format!("{}/v1/o11y/deployments/attribute_values", configuration.base_path);
let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
if let Some(ref param_value) = p_data_source {
req_builder = req_builder.query(&[("dataSource", ¶m_value.to_string())]);
}
if let Some(ref param_value) = p_aggregate_operator {
req_builder = req_builder.query(&[("aggregateOperator", ¶m_value.to_string())]);
}
if let Some(ref param_value) = p_aggregate_attribute {
req_builder = req_builder.query(&[("aggregateAttribute", ¶m_value.to_string())]);
}
if let Some(ref param_value) = p_attribute_key {
req_builder = req_builder.query(&[("attributeKey", ¶m_value.to_string())]);
}
if let Some(ref param_value) = p_filter_attribute_key_data_type {
req_builder = req_builder.query(&[("filterAttributeKeyDataType", ¶m_value.to_string())]);
}
if let Some(ref param_value) = p_search_text {
req_builder = req_builder.query(&[("searchText", ¶m_value.to_string())]);
}
if let Some(ref param_value) = p_tag_type {
req_builder = req_builder.query(&[("tagType", ¶m_value.to_string())]);
}
if let Some(ref param_value) = p_limit {
req_builder = req_builder.query(&[("limit", ¶m_value.to_string())]);
}
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
let content_type = resp
.headers()
.get("content-type")
.and_then(|v| v.to_str().ok())
.unwrap_or("application/octet-stream");
let content_type = super::ContentType::from(content_type);
if !status.is_client_error() && !status.is_server_error() {
let content = resp.text().await?;
match content_type {
ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yInfraAttributeValuesOut`"))),
ContentType::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`")))),
}
} else {
let content = resp.text().await?;
let entity: Option<GetO11yDeploymentsAttributeValuesError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Lists the storage disks the datastore reports, with their names and types. Callers need the viewer role; the runtime's own gate enforces it.
pub async fn get_o11y_disks(configuration: &configuration::Configuration, ) -> Result<Vec<models::O11yPeriodO11yDisk>, Error<GetO11yDisksError>> {
let uri_str = format!("{}/v1/o11y/disks", configuration.base_path);
let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
let content_type = resp
.headers()
.get("content-type")
.and_then(|v| v.to_str().ok())
.unwrap_or("application/octet-stream");
let content_type = super::ContentType::from(content_type);
if !status.is_client_error() && !status.is_server_error() {
let content = resp.text().await?;
match content_type {
ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::O11yPeriodO11yDisk>`"))),
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>`")))),
}
} else {
let content = resp.text().await?;
let entity: Option<GetO11yDisksError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Returns one exception instance and the span it happened on, by its error id within a group at a timestamp. Callers need the viewer role; the runtime's own gate enforces it.
pub async fn get_o11y_errorfromerrorid(configuration: &configuration::Configuration, timestamp: &str, group_id: &str, error_id: Option<&str>) -> Result<models::O11yPeriodO11yErrorWithSpan, Error<GetO11yErrorfromerroridError>> {
// add a prefix to parameters to efficiently prevent name collisions
let p_timestamp = timestamp;
let p_group_id = group_id;
let p_error_id = error_id;
let uri_str = format!("{}/v1/o11y/errorFromErrorID", configuration.base_path);
let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
req_builder = req_builder.query(&[("timestamp", &p_timestamp.to_string())]);
req_builder = req_builder.query(&[("groupID", &p_group_id.to_string())]);
if let Some(ref param_value) = p_error_id {
req_builder = req_builder.query(&[("errorID", ¶m_value.to_string())]);
}
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
let content_type = resp
.headers()
.get("content-type")
.and_then(|v| v.to_str().ok())
.unwrap_or("application/octet-stream");
let content_type = super::ContentType::from(content_type);
if !status.is_client_error() && !status.is_server_error() {
let content = resp.text().await?;
match content_type {
ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yErrorWithSpan`"))),
ContentType::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`")))),
}
} else {
let content = resp.text().await?;
let entity: Option<GetO11yErrorfromerroridError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Returns the representative exception instance of a group at a timestamp, and the span it happened on. Callers need the viewer role; the runtime's own gate enforces it.
pub async fn get_o11y_errorfromgroupid(configuration: &configuration::Configuration, timestamp: &str, group_id: &str, error_id: Option<&str>) -> Result<models::O11yPeriodO11yErrorWithSpan, Error<GetO11yErrorfromgroupidError>> {
// add a prefix to parameters to efficiently prevent name collisions
let p_timestamp = timestamp;
let p_group_id = group_id;
let p_error_id = error_id;
let uri_str = format!("{}/v1/o11y/errorFromGroupID", configuration.base_path);
let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
req_builder = req_builder.query(&[("timestamp", &p_timestamp.to_string())]);
req_builder = req_builder.query(&[("groupID", &p_group_id.to_string())]);
if let Some(ref param_value) = p_error_id {
req_builder = req_builder.query(&[("errorID", ¶m_value.to_string())]);
}
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
let content_type = resp
.headers()
.get("content-type")
.and_then(|v| v.to_str().ok())
.unwrap_or("application/octet-stream");
let content_type = super::ContentType::from(content_type);
if !status.is_client_error() && !status.is_server_error() {
let content = resp.text().await?;
match content_type {
ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yErrorWithSpan`"))),
ContentType::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`")))),
}
} else {
let content = resp.text().await?;
let entity: Option<GetO11yErrorfromgroupidError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Lists the caller's org's grouped error issues (by fingerprint) with status, level, counts and first/last-seen. Callers need the viewer role; the runtime's own gate enforces it.
pub 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>> {
// add a prefix to parameters to efficiently prevent name collisions
let p_status = status;
let p_level = level;
let p_environment = environment;
let p_service_name = service_name;
let p_query = query;
let p_sort = sort;
let p_offset = offset;
let p_limit = limit;
let uri_str = format!("{}/v1/o11y/errortracking/issues", configuration.base_path);
let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
if let Some(ref param_value) = p_status {
req_builder = req_builder.query(&[("status", ¶m_value.to_string())]);
}
if let Some(ref param_value) = p_level {
req_builder = req_builder.query(&[("level", ¶m_value.to_string())]);
}
if let Some(ref param_value) = p_environment {
req_builder = req_builder.query(&[("environment", ¶m_value.to_string())]);
}
if let Some(ref param_value) = p_service_name {
req_builder = req_builder.query(&[("serviceName", ¶m_value.to_string())]);
}
if let Some(ref param_value) = p_query {
req_builder = req_builder.query(&[("query", ¶m_value.to_string())]);
}
if let Some(ref param_value) = p_sort {
req_builder = req_builder.query(&[("sort", ¶m_value.to_string())]);
}
if let Some(ref param_value) = p_offset {
req_builder = req_builder.query(&[("offset", ¶m_value.to_string())]);
}
if let Some(ref param_value) = p_limit {
req_builder = req_builder.query(&[("limit", ¶m_value.to_string())]);
}
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
let content_type = resp
.headers()
.get("content-type")
.and_then(|v| v.to_str().ok())
.unwrap_or("application/octet-stream");
let content_type = super::ContentType::from(content_type);
if !status.is_client_error() && !status.is_server_error() {
let content = resp.text().await?;
match content_type {
ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yErrorIssuesOut`"))),
ContentType::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`")))),
}
} else {
let content = resp.text().await?;
let entity: Option<GetO11yErrortrackingIssuesError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Returns one grouped issue with its latest occurrence sample. Callers need the viewer role; the runtime's own gate enforces it.
pub async fn get_o11y_errortracking_issues_by_id(configuration: &configuration::Configuration, id: &str) -> Result<models::O11yPeriodO11yErrorGettableIssueOut, Error<GetO11yErrortrackingIssuesByIdError>> {
// add a prefix to parameters to efficiently prevent name collisions
let p_id = id;
let uri_str = format!("{}/v1/o11y/errortracking/issues/{id}", configuration.base_path, id=crate::apis::urlencode(p_id));
let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
let content_type = resp
.headers()
.get("content-type")
.and_then(|v| v.to_str().ok())
.unwrap_or("application/octet-stream");
let content_type = super::ContentType::from(content_type);
if !status.is_client_error() && !status.is_server_error() {
let content = resp.text().await?;
match content_type {
ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yErrorGettableIssueOut`"))),
ContentType::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`")))),
}
} else {
let content = resp.text().await?;
let entity: Option<GetO11yErrortrackingIssuesByIdError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Lists the caller's org's saved explorer views, optionally narrowed to one source page, name or category. Callers need the viewer role; the runtime's own gate enforces it.
pub async fn get_o11y_explorer_views(configuration: &configuration::Configuration, source_page: Option<&str>, name: Option<&str>, category: Option<&str>) -> Result<models::O11yPeriodO11ySavedViewListOut, Error<GetO11yExplorerViewsError>> {
// add a prefix to parameters to efficiently prevent name collisions
let p_source_page = source_page;
let p_name = name;
let p_category = category;
let uri_str = format!("{}/v1/o11y/explorer/views", configuration.base_path);
let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
if let Some(ref param_value) = p_source_page {
req_builder = req_builder.query(&[("sourcePage", ¶m_value.to_string())]);
}
if let Some(ref param_value) = p_name {
req_builder = req_builder.query(&[("name", ¶m_value.to_string())]);
}
if let Some(ref param_value) = p_category {
req_builder = req_builder.query(&[("category", ¶m_value.to_string())]);
}
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
let content_type = resp
.headers()
.get("content-type")
.and_then(|v| v.to_str().ok())
.unwrap_or("application/octet-stream");
let content_type = super::ContentType::from(content_type);
if !status.is_client_error() && !status.is_server_error() {
let content = resp.text().await?;
match content_type {
ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11ySavedViewListOut`"))),
ContentType::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`")))),
}
} else {
let content = resp.text().await?;
let entity: Option<GetO11yExplorerViewsError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Returns one saved explorer view by id. Callers need the viewer role; the runtime's own gate enforces it.
pub async fn get_o11y_explorer_views_by_viewid(configuration: &configuration::Configuration, view_id: &str) -> Result<models::O11yPeriodO11ySavedViewOut, Error<GetO11yExplorerViewsByViewidError>> {
// add a prefix to parameters to efficiently prevent name collisions
let p_view_id = view_id;
let uri_str = format!("{}/v1/o11y/explorer/views/{viewId}", configuration.base_path, viewId=crate::apis::urlencode(p_view_id));
let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
let content_type = resp
.headers()
.get("content-type")
.and_then(|v| v.to_str().ok())
.unwrap_or("application/octet-stream");
let content_type = super::ContentType::from(content_type);
if !status.is_client_error() && !status.is_server_error() {
let content = resp.text().await?;
match content_type {
ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11ySavedViewOut`"))),
ContentType::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`")))),
}
} else {
let content = resp.text().await?;
let entity: Option<GetO11yExplorerViewsByViewidError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Returns the supported feature flags and their resolved values for the caller's org. Callers need the viewer role; the runtime's own gate enforces it.
pub async fn get_o11y_features(configuration: &configuration::Configuration, ) -> Result<models::O11yPeriodO11yFeaturesOut, Error<GetO11yFeaturesError>> {
let uri_str = format!("{}/v1/o11y/features", configuration.base_path);
let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
let content_type = resp
.headers()
.get("content-type")
.and_then(|v| v.to_str().ok())
.unwrap_or("application/octet-stream");
let content_type = super::ContentType::from(content_type);
if !status.is_client_error() && !status.is_server_error() {
let content = resp.text().await?;
match content_type {
ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yFeaturesOut`"))),
ContentType::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`")))),
}
} else {
let content = resp.text().await?;
let entity: Option<GetO11yFeaturesError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Returns the telemetry field keys matching the selector — the signal's fields grouped by name, and whether the catalog is complete. Callers need the viewer role; the runtime's own gate enforces it.
pub 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>> {
// add a prefix to parameters to efficiently prevent name collisions
let p_signal = signal;
let p_source = source;
let p_limit = limit;
let p_start_unix_milli = start_unix_milli;
let p_end_unix_milli = end_unix_milli;
let p_field_context = field_context;
let p_field_data_type = field_data_type;
let p_metric_name = metric_name;
let p_metric_namespace = metric_namespace;
let p_search_text = search_text;
let uri_str = format!("{}/v1/o11y/fields/keys", configuration.base_path);
let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
if let Some(ref param_value) = p_signal {
req_builder = req_builder.query(&[("signal", ¶m_value.to_string())]);
}
if let Some(ref param_value) = p_source {
req_builder = req_builder.query(&[("source", ¶m_value.to_string())]);
}
if let Some(ref param_value) = p_limit {
req_builder = req_builder.query(&[("limit", ¶m_value.to_string())]);
}
if let Some(ref param_value) = p_start_unix_milli {
req_builder = req_builder.query(&[("startUnixMilli", ¶m_value.to_string())]);
}
if let Some(ref param_value) = p_end_unix_milli {
req_builder = req_builder.query(&[("endUnixMilli", ¶m_value.to_string())]);
}
if let Some(ref param_value) = p_field_context {
req_builder = req_builder.query(&[("fieldContext", ¶m_value.to_string())]);
}
if let Some(ref param_value) = p_field_data_type {
req_builder = req_builder.query(&[("fieldDataType", ¶m_value.to_string())]);
}
if let Some(ref param_value) = p_metric_name {
req_builder = req_builder.query(&[("metricName", ¶m_value.to_string())]);
}
if let Some(ref param_value) = p_metric_namespace {
req_builder = req_builder.query(&[("metricNamespace", ¶m_value.to_string())]);
}
if let Some(ref param_value) = p_search_text {
req_builder = req_builder.query(&[("searchText", ¶m_value.to_string())]);
}
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
let content_type = resp
.headers()
.get("content-type")
.and_then(|v| v.to_str().ok())
.unwrap_or("application/octet-stream");
let content_type = super::ContentType::from(content_type);
if !status.is_client_error() && !status.is_server_error() {
let content = resp.text().await?;
match content_type {
ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yFieldKeysOut`"))),
ContentType::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`")))),
}
} else {
let content = resp.text().await?;
let entity: Option<GetO11yFieldsKeysError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Returns the values one telemetry field has taken — string, bool, number and related values — and whether the value list is complete. Callers need the viewer role; the runtime's own gate enforces it.
pub 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>> {
// add a prefix to parameters to efficiently prevent name collisions
let p_signal = signal;
let p_source = source;
let p_limit = limit;
let p_start_unix_milli = start_unix_milli;
let p_end_unix_milli = end_unix_milli;
let p_field_context = field_context;
let p_field_data_type = field_data_type;
let p_metric_name = metric_name;
let p_metric_namespace = metric_namespace;
let p_search_text = search_text;
let p_name = name;
let p_existing_query = existing_query;
let uri_str = format!("{}/v1/o11y/fields/values", configuration.base_path);
let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
if let Some(ref param_value) = p_signal {
req_builder = req_builder.query(&[("signal", ¶m_value.to_string())]);
}
if let Some(ref param_value) = p_source {
req_builder = req_builder.query(&[("source", ¶m_value.to_string())]);
}
if let Some(ref param_value) = p_limit {
req_builder = req_builder.query(&[("limit", ¶m_value.to_string())]);
}
if let Some(ref param_value) = p_start_unix_milli {
req_builder = req_builder.query(&[("startUnixMilli", ¶m_value.to_string())]);
}
if let Some(ref param_value) = p_end_unix_milli {
req_builder = req_builder.query(&[("endUnixMilli", ¶m_value.to_string())]);
}
if let Some(ref param_value) = p_field_context {
req_builder = req_builder.query(&[("fieldContext", ¶m_value.to_string())]);
}
if let Some(ref param_value) = p_field_data_type {
req_builder = req_builder.query(&[("fieldDataType", ¶m_value.to_string())]);
}
if let Some(ref param_value) = p_metric_name {
req_builder = req_builder.query(&[("metricName", ¶m_value.to_string())]);
}
if let Some(ref param_value) = p_metric_namespace {
req_builder = req_builder.query(&[("metricNamespace", ¶m_value.to_string())]);
}
if let Some(ref param_value) = p_search_text {
req_builder = req_builder.query(&[("searchText", ¶m_value.to_string())]);
}
if let Some(ref param_value) = p_name {
req_builder = req_builder.query(&[("name", ¶m_value.to_string())]);
}
if let Some(ref param_value) = p_existing_query {
req_builder = req_builder.query(&[("existingQuery", ¶m_value.to_string())]);
}
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
let content_type = resp
.headers()
.get("content-type")
.and_then(|v| v.to_str().ok())
.unwrap_or("application/octet-stream");
let content_type = super::ContentType::from(content_type);
if !status.is_client_error() && !status.is_server_error() {
let content = resp.text().await?;
match content_type {
ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yFieldValuesOut`"))),
ContentType::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`")))),
}
} else {
let content = resp.text().await?;
let entity: Option<GetO11yFieldsValuesError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Suggests attribute keys and example filter queries for the query builder, seeded by what the org's own telemetry carries. Only the logs data source is supported today. Callers need the viewer role; the runtime's own gate enforces it.
pub 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>> {
// add a prefix to parameters to efficiently prevent name collisions
let p_data_source = data_source;
let p_search_text = search_text;
let p_existing_filter = existing_filter;
let p_attributes_limit = attributes_limit;
let p_examples_limit = examples_limit;
let uri_str = format!("{}/v1/o11y/filter_suggestions", configuration.base_path);
let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
req_builder = req_builder.query(&[("dataSource", &p_data_source.to_string())]);
if let Some(ref param_value) = p_search_text {
req_builder = req_builder.query(&[("searchText", ¶m_value.to_string())]);
}
if let Some(ref param_value) = p_existing_filter {
req_builder = req_builder.query(&[("existingFilter", ¶m_value.to_string())]);
}
if let Some(ref param_value) = p_attributes_limit {
req_builder = req_builder.query(&[("attributesLimit", ¶m_value.to_string())]);
}
if let Some(ref param_value) = p_examples_limit {
req_builder = req_builder.query(&[("examplesLimit", ¶m_value.to_string())]);
}
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
let content_type = resp
.headers()
.get("content-type")
.and_then(|v| v.to_str().ok())
.unwrap_or("application/octet-stream");
let content_type = super::ContentType::from(content_type);
if !status.is_client_error() && !status.is_server_error() {
let content = resp.text().await?;
match content_type {
ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yFilterSuggestionsOut`"))),
ContentType::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`")))),
}
} else {
let content = resp.text().await?;
let entity: Option<GetO11yFilterSuggestionsError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Returns the deployment's global configuration: its public endpoints and which identity providers are enabled. Open by design — the sign-in page reads it before anyone is signed in. Open by design; the runtime's own gate is OpenAccess.
pub async fn get_o11y_global_config(configuration: &configuration::Configuration, ) -> Result<models::O11yPeriodO11yGlobalConfigOut, Error<GetO11yGlobalConfigError>> {
let uri_str = format!("{}/v1/o11y/global/config", configuration.base_path);
let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
let content_type = resp
.headers()
.get("content-type")
.and_then(|v| v.to_str().ok())
.unwrap_or("application/octet-stream");
let content_type = super::ContentType::from(content_type);
if !status.is_client_error() && !status.is_server_error() {
let content = resp.text().await?;
match content_type {
ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yGlobalConfigOut`"))),
ContentType::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`")))),
}
} else {
let content = resp.text().await?;
let entity: Option<GetO11yGlobalConfigError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Reports service health. With live set, the datastore connection is checked too and an unhealthy store refuses with 503. Open by design; the runtime's own gate is OpenAccess.
pub async fn get_o11y_health(configuration: &configuration::Configuration, live: Option<bool>) -> Result<models::O11yPeriodO11yHealthOut, Error<GetO11yHealthError>> {
// add a prefix to parameters to efficiently prevent name collisions
let p_live = live;
let uri_str = format!("{}/v1/o11y/health", configuration.base_path);
let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
if let Some(ref param_value) = p_live {
req_builder = req_builder.query(&[("live", ¶m_value.to_string())]);
}
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
let content_type = resp
.headers()
.get("content-type")
.and_then(|v| v.to_str().ok())
.unwrap_or("application/octet-stream");
let content_type = super::ContentType::from(content_type);
if !status.is_client_error() && !status.is_server_error() {
let content = resp.text().await?;
match content_type {
ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yHealthOut`"))),
ContentType::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`")))),
}
} else {
let content = resp.text().await?;
let entity: Option<GetO11yHealthError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Reports whether every service in the runtime's registry is healthy, and names them grouped by state — so a failure says WHICH component is down, not merely that something is. An unhealthy registry answers 503, not a 200 with a false flag inside, so a plain status check cannot read a sick runtime as well. UNAUTHENTICATED by design, like the other two probes: it carries no tenant data and is reached by k8s and by external checks that hold no principal.
pub async fn get_o11y_healthz(configuration: &configuration::Configuration, ) -> Result<(), Error<GetO11yHealthzError>> {
let uri_str = format!("{}/v1/o11y/healthz", configuration.base_path);
let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
if !status.is_client_error() && !status.is_server_error() {
Ok(())
} else {
let content = resp.text().await?;
let entity: Option<GetO11yHealthzError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Lists the metric attribute keys hosts report, for building host filters — each with its data type and whether it is a materialized column.
pub 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>> {
// add a prefix to parameters to efficiently prevent name collisions
let p_data_source = data_source;
let p_aggregate_operator = aggregate_operator;
let p_aggregate_attribute = aggregate_attribute;
let p_search_text = search_text;
let p_tag_type = tag_type;
let p_limit = limit;
let uri_str = format!("{}/v1/o11y/hosts/attribute_keys", configuration.base_path);
let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
if let Some(ref param_value) = p_data_source {
req_builder = req_builder.query(&[("dataSource", ¶m_value.to_string())]);
}
if let Some(ref param_value) = p_aggregate_operator {
req_builder = req_builder.query(&[("aggregateOperator", ¶m_value.to_string())]);
}
if let Some(ref param_value) = p_aggregate_attribute {
req_builder = req_builder.query(&[("aggregateAttribute", ¶m_value.to_string())]);
}
if let Some(ref param_value) = p_search_text {
req_builder = req_builder.query(&[("searchText", ¶m_value.to_string())]);
}
if let Some(ref param_value) = p_tag_type {
req_builder = req_builder.query(&[("tagType", ¶m_value.to_string())]);
}
if let Some(ref param_value) = p_limit {
req_builder = req_builder.query(&[("limit", ¶m_value.to_string())]);
}
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
let content_type = resp
.headers()
.get("content-type")
.and_then(|v| v.to_str().ok())
.unwrap_or("application/octet-stream");
let content_type = super::ContentType::from(content_type);
if !status.is_client_error() && !status.is_server_error() {
let content = resp.text().await?;
match content_type {
ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yInfraAttributeKeysOut`"))),
ContentType::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`")))),
}
} else {
let content = resp.text().await?;
let entity: Option<GetO11yHostsAttributeKeysError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Lists the values one host attribute key has taken, for building host filters — string, number and bool values in their own lists.
pub 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>> {
// add a prefix to parameters to efficiently prevent name collisions
let p_data_source = data_source;
let p_aggregate_operator = aggregate_operator;
let p_aggregate_attribute = aggregate_attribute;
let p_attribute_key = attribute_key;
let p_filter_attribute_key_data_type = filter_attribute_key_data_type;
let p_search_text = search_text;
let p_tag_type = tag_type;
let p_limit = limit;
let uri_str = format!("{}/v1/o11y/hosts/attribute_values", configuration.base_path);
let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
if let Some(ref param_value) = p_data_source {
req_builder = req_builder.query(&[("dataSource", ¶m_value.to_string())]);
}
if let Some(ref param_value) = p_aggregate_operator {
req_builder = req_builder.query(&[("aggregateOperator", ¶m_value.to_string())]);
}
if let Some(ref param_value) = p_aggregate_attribute {
req_builder = req_builder.query(&[("aggregateAttribute", ¶m_value.to_string())]);
}
if let Some(ref param_value) = p_attribute_key {
req_builder = req_builder.query(&[("attributeKey", ¶m_value.to_string())]);
}
if let Some(ref param_value) = p_filter_attribute_key_data_type {
req_builder = req_builder.query(&[("filterAttributeKeyDataType", ¶m_value.to_string())]);
}
if let Some(ref param_value) = p_search_text {
req_builder = req_builder.query(&[("searchText", ¶m_value.to_string())]);
}
if let Some(ref param_value) = p_tag_type {
req_builder = req_builder.query(&[("tagType", ¶m_value.to_string())]);
}
if let Some(ref param_value) = p_limit {
req_builder = req_builder.query(&[("limit", ¶m_value.to_string())]);
}
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
let content_type = resp
.headers()
.get("content-type")
.and_then(|v| v.to_str().ok())
.unwrap_or("application/octet-stream");
let content_type = super::ContentType::from(content_type);
if !status.is_client_error() && !status.is_server_error() {
let content = resp.text().await?;
match content_type {
ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yInfraAttributeValuesOut`"))),
ContentType::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`")))),
}
} else {
let content = resp.text().await?;
let entity: Option<GetO11yHostsAttributeValuesError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Reports whether the metrics and attributes an infra-monitoring section needs are being received — for each collector receiver or processor involved, what is present and what is missing, with a user-facing message and a docs link per missing piece. Ready is true only when nothing is missing.
pub async fn get_o11y_infra_monitoring_checks(configuration: &configuration::Configuration, r#type: &str) -> Result<models::O11yPeriodO11yInfraChecksOut, Error<GetO11yInfraMonitoringChecksError>> {
// add a prefix to parameters to efficiently prevent name collisions
let p_type = r#type;
let uri_str = format!("{}/v1/o11y/infra_monitoring/checks", configuration.base_path);
let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
req_builder = req_builder.query(&[("type", &p_type.to_string())]);
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
let content_type = resp
.headers()
.get("content-type")
.and_then(|v| v.to_str().ok())
.unwrap_or("application/octet-stream");
let content_type = super::ContentType::from(content_type);
if !status.is_client_error() && !status.is_server_error() {
let content = resp.text().await?;
match content_type {
ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yInfraChecksOut`"))),
ContentType::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`")))),
}
} else {
let content = resp.text().await?;
let entity: Option<GetO11yInfraMonitoringChecksError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Reports how far Kubernetes infra onboarding has progressed: which metric families have arrived and, per pod, which required metadata labels are present. Callers need the viewer role; the runtime's own gate enforces it.
pub async fn get_o11y_infra_onboarding_k8s_status(configuration: &configuration::Configuration, ) -> Result<models::O11yPeriodO11yOnboardingOut, Error<GetO11yInfraOnboardingK8sStatusError>> {
let uri_str = format!("{}/v1/o11y/infra_onboarding/k8s/status", configuration.base_path);
let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
let content_type = resp
.headers()
.get("content-type")
.and_then(|v| v.to_str().ok())
.unwrap_or("application/octet-stream");
let content_type = super::ContentType::from(content_type);
if !status.is_client_error() && !status.is_server_error() {
let content = resp.text().await?;
match content_type {
ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yOnboardingOut`"))),
ContentType::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`")))),
}
} else {
let content = resp.text().await?;
let entity: Option<GetO11yInfraOnboardingK8sStatusError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Lists the metric attribute keys Kubernetes jobs report, for building job filters.
pub 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>> {
// add a prefix to parameters to efficiently prevent name collisions
let p_data_source = data_source;
let p_aggregate_operator = aggregate_operator;
let p_aggregate_attribute = aggregate_attribute;
let p_search_text = search_text;
let p_tag_type = tag_type;
let p_limit = limit;
let uri_str = format!("{}/v1/o11y/jobs/attribute_keys", configuration.base_path);
let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
if let Some(ref param_value) = p_data_source {
req_builder = req_builder.query(&[("dataSource", ¶m_value.to_string())]);
}
if let Some(ref param_value) = p_aggregate_operator {
req_builder = req_builder.query(&[("aggregateOperator", ¶m_value.to_string())]);
}
if let Some(ref param_value) = p_aggregate_attribute {
req_builder = req_builder.query(&[("aggregateAttribute", ¶m_value.to_string())]);
}
if let Some(ref param_value) = p_search_text {
req_builder = req_builder.query(&[("searchText", ¶m_value.to_string())]);
}
if let Some(ref param_value) = p_tag_type {
req_builder = req_builder.query(&[("tagType", ¶m_value.to_string())]);
}
if let Some(ref param_value) = p_limit {
req_builder = req_builder.query(&[("limit", ¶m_value.to_string())]);
}
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
let content_type = resp
.headers()
.get("content-type")
.and_then(|v| v.to_str().ok())
.unwrap_or("application/octet-stream");
let content_type = super::ContentType::from(content_type);
if !status.is_client_error() && !status.is_server_error() {
let content = resp.text().await?;
match content_type {
ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yInfraAttributeKeysOut`"))),
ContentType::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`")))),
}
} else {
let content = resp.text().await?;
let entity: Option<GetO11yJobsAttributeKeysError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Lists the values one job attribute key has taken, for building job filters.
pub 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>> {
// add a prefix to parameters to efficiently prevent name collisions
let p_data_source = data_source;
let p_aggregate_operator = aggregate_operator;
let p_aggregate_attribute = aggregate_attribute;
let p_attribute_key = attribute_key;
let p_filter_attribute_key_data_type = filter_attribute_key_data_type;
let p_search_text = search_text;
let p_tag_type = tag_type;
let p_limit = limit;
let uri_str = format!("{}/v1/o11y/jobs/attribute_values", configuration.base_path);
let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
if let Some(ref param_value) = p_data_source {
req_builder = req_builder.query(&[("dataSource", ¶m_value.to_string())]);
}
if let Some(ref param_value) = p_aggregate_operator {
req_builder = req_builder.query(&[("aggregateOperator", ¶m_value.to_string())]);
}
if let Some(ref param_value) = p_aggregate_attribute {
req_builder = req_builder.query(&[("aggregateAttribute", ¶m_value.to_string())]);
}
if let Some(ref param_value) = p_attribute_key {
req_builder = req_builder.query(&[("attributeKey", ¶m_value.to_string())]);
}
if let Some(ref param_value) = p_filter_attribute_key_data_type {
req_builder = req_builder.query(&[("filterAttributeKeyDataType", ¶m_value.to_string())]);
}
if let Some(ref param_value) = p_search_text {
req_builder = req_builder.query(&[("searchText", ¶m_value.to_string())]);
}
if let Some(ref param_value) = p_tag_type {
req_builder = req_builder.query(&[("tagType", ¶m_value.to_string())]);
}
if let Some(ref param_value) = p_limit {
req_builder = req_builder.query(&[("limit", ¶m_value.to_string())]);
}
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
let content_type = resp
.headers()
.get("content-type")
.and_then(|v| v.to_str().ok())
.unwrap_or("application/octet-stream");
let content_type = super::ContentType::from(content_type);
if !status.is_client_error() && !status.is_server_error() {
let content = resp.text().await?;
match content_type {
ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yInfraAttributeValuesOut`"))),
ContentType::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`")))),
}
} else {
let content = resp.text().await?;
let entity: Option<GetO11yJobsAttributeValuesError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Lists the org's licenses. This build has no enterprise edition, so the list is intentionally empty. Callers need the viewer role; the runtime's own gate enforces it.
pub async fn get_o11y_licenses(configuration: &configuration::Configuration, ) -> Result<models::O11yPeriodO11yLicensesOut, Error<GetO11yLicensesError>> {
let uri_str = format!("{}/v1/o11y/licenses", configuration.base_path);
let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
let content_type = resp
.headers()
.get("content-type")
.and_then(|v| v.to_str().ok())
.unwrap_or("application/octet-stream");
let content_type = super::ContentType::from(content_type);
if !status.is_client_error() && !status.is_server_error() {
let content = resp.text().await?;
match content_type {
ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yLicensesOut`"))),
ContentType::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`")))),
}
} else {
let content = resp.text().await?;
let entity: Option<GetO11yLicensesError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Activates the enterprise license. This build has no enterprise edition, so the licensing provider refuses it as unsupported. Callers need the viewer role; the runtime's own gate enforces it.
pub async fn get_o11y_licenses_active(configuration: &configuration::Configuration, ) -> Result<models::O11yPeriodO11yLicenseActiveOut, Error<GetO11yLicensesActiveError>> {
let uri_str = format!("{}/v1/o11y/licenses/active", configuration.base_path);
let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
let content_type = resp
.headers()
.get("content-type")
.and_then(|v| v.to_str().ok())
.unwrap_or("application/octet-stream");
let content_type = super::ContentType::from(content_type);
if !status.is_client_error() && !status.is_server_error() {
let content = resp.text().await?;
match content_type {
ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yLicenseActiveOut`"))),
ContentType::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`")))),
}
} else {
let content = resp.text().await?;
let entity: Option<GetO11yLicensesActiveError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Answers 200 unconditionally while the process is running, and asserts NOTHING about the telemetry stores behind it. That is what makes it a liveness probe: a container that answers this is worth leaving alive, and restarting on a store outage would only remove the thing reporting the outage. UNAUTHENTICATED by design, and one of exactly three /v1/o11y paths that are. It carries no tenant data, and gating it would break the k8s probes and the external health checks without protecting anything. Use the health probe, not this one, to ask whether the runtime can actually serve.
pub async fn get_o11y_livez(configuration: &configuration::Configuration, ) -> Result<(), Error<GetO11yLivezError>> {
let uri_str = format!("{}/v1/o11y/livez", configuration.base_path);
let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
if !status.is_client_error() && !status.is_server_error() {
Ok(())
} else {
let content = resp.text().await?;
let entity: Option<GetO11yLivezError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Where a failed sign-in callback lands. The module builds that redirect with a path and no host, so it can only be same-origin, and its assumption is that the console lives beside the API. Here the console is a separate host, so this answers as the API it belongs to rather than redirecting onward — a hostname baked into a shared surface is how one brand's identity ends up in front of another brand's customer. 401 with the provider's own reason, carried from the query the module already populated. Unauthenticated by necessity: it exists precisely for the case where no principal was established.
pub async fn get_o11y_login(configuration: &configuration::Configuration, ) -> Result<(), Error<GetO11yLoginError>> {
let uri_str = format!("{}/v1/o11y/login", configuration.base_path);
let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
if !status.is_client_error() && !status.is_server_error() {
Ok(())
} else {
let content = resp.text().await?;
let entity: Option<GetO11yLoginError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Returns the most recent log records in the query window, newest first — each record an open object carrying its nanosecond timestamp and whatever fields the record was ingested with. Callers need the viewer role; the runtime's own gate enforces it.
pub async fn get_o11y_logs(configuration: &configuration::Configuration, limit: Option<i32>, timestamp_start: Option<i32>, timestamp_end: Option<i32>) -> Result<models::O11yPeriodO11yLogRecordsOut, Error<GetO11yLogsError>> {
// add a prefix to parameters to efficiently prevent name collisions
let p_limit = limit;
let p_timestamp_start = timestamp_start;
let p_timestamp_end = timestamp_end;
let uri_str = format!("{}/v1/o11y/logs", configuration.base_path);
let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
if let Some(ref param_value) = p_limit {
req_builder = req_builder.query(&[("limit", ¶m_value.to_string())]);
}
if let Some(ref param_value) = p_timestamp_start {
req_builder = req_builder.query(&[("timestampStart", ¶m_value.to_string())]);
}
if let Some(ref param_value) = p_timestamp_end {
req_builder = req_builder.query(&[("timestampEnd", ¶m_value.to_string())]);
}
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
let content_type = resp
.headers()
.get("content-type")
.and_then(|v| v.to_str().ok())
.unwrap_or("application/octet-stream");
let content_type = super::ContentType::from(content_type);
if !status.is_client_error() && !status.is_server_error() {
let content = resp.text().await?;
match content_type {
ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yLogRecordsOut`"))),
ContentType::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`")))),
}
} else {
let content = resp.text().await?;
let entity: Option<GetO11yLogsError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Returns the logs aggregate buckets for the query window. The runtime currently answers the empty set; the shape is the contract. Callers need the viewer role; the runtime's own gate enforces it.
pub async fn get_o11y_logs_aggregate(configuration: &configuration::Configuration, ) -> Result<models::O11yPeriodO11yLogAggregateOut, Error<GetO11yLogsAggregateError>> {
let uri_str = format!("{}/v1/o11y/logs/aggregate", configuration.base_path);
let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
let content_type = resp
.headers()
.get("content-type")
.and_then(|v| v.to_str().ok())
.unwrap_or("application/octet-stream");
let content_type = super::ContentType::from(content_type);
if !status.is_client_error() && !status.is_server_error() {
let content = resp.text().await?;
match content_type {
ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yLogAggregateOut`"))),
ContentType::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`")))),
}
} else {
let content = resp.text().await?;
let entity: Option<GetO11yLogsAggregateError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Returns the log field catalog: the fields already selected as indexed columns, and the interesting ones seen in the data that could be. Callers need the viewer role; the runtime's own gate enforces it.
pub async fn get_o11y_logs_fields(configuration: &configuration::Configuration, ) -> Result<models::O11yPeriodO11yFieldCatalogOut, Error<GetO11yLogsFieldsError>> {
let uri_str = format!("{}/v1/o11y/logs/fields", configuration.base_path);
let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
let content_type = resp
.headers()
.get("content-type")
.and_then(|v| v.to_str().ok())
.unwrap_or("application/octet-stream");
let content_type = super::ContentType::from(content_type);
if !status.is_client_error() && !status.is_server_error() {
let content = resp.text().await?;
match content_type {
ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yFieldCatalogOut`"))),
ContentType::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`")))),
}
} else {
let content = resp.text().await?;
let entity: Option<GetO11yLogsFieldsError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Streams matching log records continuously instead of answering once, so a console tail shows lines as they land rather than at the end of a window. It is a STREAM, which is why it is not a typed operation: there is no single complete value to name, and a generated client that waited for one would hang on the first tail. Read the bounded window with the log read instead when you want an answer rather than a feed. A validated, org-scoped principal is required and the feed carries that principal's own tenant only.
pub async fn get_o11y_logs_livetail(configuration: &configuration::Configuration, ) -> Result<(), Error<GetO11yLogsLivetailError>> {
let uri_str = format!("{}/v1/o11y/logs/livetail", configuration.base_path);
let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
if !status.is_client_error() && !status.is_server_error() {
Ok(())
} else {
let content = resp.text().await?;
let entity: Option<GetO11yLogsLivetailError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Returns the caller's org's log parsing pipelines at one config version — \"latest\" for the newest — along with that version's deployment record and the recent version history. Callers need the viewer role; the runtime's own gate enforces it.
pub async fn get_o11y_logs_pipelines_by_version(configuration: &configuration::Configuration, version: &str) -> Result<models::O11yPeriodO11yLogPipelinesOut, Error<GetO11yLogsPipelinesByVersionError>> {
// add a prefix to parameters to efficiently prevent name collisions
let p_version = version;
let uri_str = format!("{}/v1/o11y/logs/pipelines/{version}", configuration.base_path, version=crate::apis::urlencode(p_version));
let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
let content_type = resp
.headers()
.get("content-type")
.and_then(|v| v.to_str().ok())
.unwrap_or("application/octet-stream");
let content_type = super::ContentType::from(content_type);
if !status.is_client_error() && !status.is_server_error() {
let content = resp.text().await?;
match content_type {
ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yLogPipelinesOut`"))),
ContentType::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`")))),
}
} else {
let content = resp.text().await?;
let entity: Option<GetO11yLogsPipelinesByVersionError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Lists the log body paths already promoted or indexed, with the indexes each carries. Callers need the viewer role; the runtime's own gate enforces it.
pub async fn get_o11y_logs_promote_paths(configuration: &configuration::Configuration, ) -> Result<models::O11yPeriodO11yLogPromotedOut, Error<GetO11yLogsPromotePathsError>> {
let uri_str = format!("{}/v1/o11y/logs/promote_paths", configuration.base_path);
let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
let content_type = resp
.headers()
.get("content-type")
.and_then(|v| v.to_str().ok())
.unwrap_or("application/octet-stream");
let content_type = super::ContentType::from(content_type);
if !status.is_client_error() && !status.is_server_error() {
let content = resp.text().await?;
match content_type {
ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yLogPromotedOut`"))),
ContentType::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`")))),
}
} else {
let content = resp.text().await?;
let entity: Option<GetO11yLogsPromotePathsError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Serves the OLDER /metric/metric_metadata route. It is NOT the same op as metrics.go's metricMetadata (/metrics/metadata): different path, different input (this one also scopes by service). Two slices named one Go function for two routes; the route is the identity, so the name follows it. Renamed rather than merged — collapsing them would silently drop the service scope this one accepts. It returns one metric's metadata — its type, unit, description, temporality, monotonicity and histogram buckets — optionally scoped to the metric as one service reports it. Callers need the viewer role; the runtime's own gate enforces it.
pub async fn get_o11y_metric_metric_metadata(configuration: &configuration::Configuration, metric_name: Option<&str>, service_name: Option<&str>) -> Result<models::O11yPeriodO11yMetricMetadataOut, Error<GetO11yMetricMetricMetadataError>> {
// add a prefix to parameters to efficiently prevent name collisions
let p_metric_name = metric_name;
let p_service_name = service_name;
let uri_str = format!("{}/v1/o11y/metric/metric_metadata", configuration.base_path);
let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
if let Some(ref param_value) = p_metric_name {
req_builder = req_builder.query(&[("metricName", ¶m_value.to_string())]);
}
if let Some(ref param_value) = p_service_name {
req_builder = req_builder.query(&[("serviceName", ¶m_value.to_string())]);
}
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
let content_type = resp
.headers()
.get("content-type")
.and_then(|v| v.to_str().ok())
.unwrap_or("application/octet-stream");
let content_type = super::ContentType::from(content_type);
if !status.is_client_error() && !status.is_server_error() {
let content = resp.text().await?;
match content_type {
ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yMetricMetadataOut`"))),
ContentType::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`")))),
}
} else {
let content = resp.text().await?;
let entity: Option<GetO11yMetricMetricMetadataError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Lists the metric attribute keys Kubernetes namespaces report, for building namespace filters.
pub 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>> {
// add a prefix to parameters to efficiently prevent name collisions
let p_data_source = data_source;
let p_aggregate_operator = aggregate_operator;
let p_aggregate_attribute = aggregate_attribute;
let p_search_text = search_text;
let p_tag_type = tag_type;
let p_limit = limit;
let uri_str = format!("{}/v1/o11y/namespaces/attribute_keys", configuration.base_path);
let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
if let Some(ref param_value) = p_data_source {
req_builder = req_builder.query(&[("dataSource", ¶m_value.to_string())]);
}
if let Some(ref param_value) = p_aggregate_operator {
req_builder = req_builder.query(&[("aggregateOperator", ¶m_value.to_string())]);
}
if let Some(ref param_value) = p_aggregate_attribute {
req_builder = req_builder.query(&[("aggregateAttribute", ¶m_value.to_string())]);
}
if let Some(ref param_value) = p_search_text {
req_builder = req_builder.query(&[("searchText", ¶m_value.to_string())]);
}
if let Some(ref param_value) = p_tag_type {
req_builder = req_builder.query(&[("tagType", ¶m_value.to_string())]);
}
if let Some(ref param_value) = p_limit {
req_builder = req_builder.query(&[("limit", ¶m_value.to_string())]);
}
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
let content_type = resp
.headers()
.get("content-type")
.and_then(|v| v.to_str().ok())
.unwrap_or("application/octet-stream");
let content_type = super::ContentType::from(content_type);
if !status.is_client_error() && !status.is_server_error() {
let content = resp.text().await?;
match content_type {
ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yInfraAttributeKeysOut`"))),
ContentType::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`")))),
}
} else {
let content = resp.text().await?;
let entity: Option<GetO11yNamespacesAttributeKeysError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Lists the values one namespace attribute key has taken, for building namespace filters.
pub 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>> {
// add a prefix to parameters to efficiently prevent name collisions
let p_data_source = data_source;
let p_aggregate_operator = aggregate_operator;
let p_aggregate_attribute = aggregate_attribute;
let p_attribute_key = attribute_key;
let p_filter_attribute_key_data_type = filter_attribute_key_data_type;
let p_search_text = search_text;
let p_tag_type = tag_type;
let p_limit = limit;
let uri_str = format!("{}/v1/o11y/namespaces/attribute_values", configuration.base_path);
let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
if let Some(ref param_value) = p_data_source {
req_builder = req_builder.query(&[("dataSource", ¶m_value.to_string())]);
}
if let Some(ref param_value) = p_aggregate_operator {
req_builder = req_builder.query(&[("aggregateOperator", ¶m_value.to_string())]);
}
if let Some(ref param_value) = p_aggregate_attribute {
req_builder = req_builder.query(&[("aggregateAttribute", ¶m_value.to_string())]);
}
if let Some(ref param_value) = p_attribute_key {
req_builder = req_builder.query(&[("attributeKey", ¶m_value.to_string())]);
}
if let Some(ref param_value) = p_filter_attribute_key_data_type {
req_builder = req_builder.query(&[("filterAttributeKeyDataType", ¶m_value.to_string())]);
}
if let Some(ref param_value) = p_search_text {
req_builder = req_builder.query(&[("searchText", ¶m_value.to_string())]);
}
if let Some(ref param_value) = p_tag_type {
req_builder = req_builder.query(&[("tagType", ¶m_value.to_string())]);
}
if let Some(ref param_value) = p_limit {
req_builder = req_builder.query(&[("limit", ¶m_value.to_string())]);
}
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
let content_type = resp
.headers()
.get("content-type")
.and_then(|v| v.to_str().ok())
.unwrap_or("application/octet-stream");
let content_type = super::ContentType::from(content_type);
if !status.is_client_error() && !status.is_server_error() {
let content = resp.text().await?;
match content_type {
ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yInfraAttributeValuesOut`"))),
ContentType::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`")))),
}
} else {
let content = resp.text().await?;
let entity: Option<GetO11yNamespacesAttributeValuesError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Returns the ids of the exception instances immediately after and before a given one within its group — the paging cursor the error detail view walks. Callers need the viewer role; the runtime's own gate enforces it.
pub async fn get_o11y_nextpreverrorids(configuration: &configuration::Configuration, timestamp: &str, group_id: &str, error_id: Option<&str>) -> Result<models::O11yPeriodO11yNextPrevErrorIds, Error<GetO11yNextpreverroridsError>> {
// add a prefix to parameters to efficiently prevent name collisions
let p_timestamp = timestamp;
let p_group_id = group_id;
let p_error_id = error_id;
let uri_str = format!("{}/v1/o11y/nextPrevErrorIDs", configuration.base_path);
let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
req_builder = req_builder.query(&[("timestamp", &p_timestamp.to_string())]);
req_builder = req_builder.query(&[("groupID", &p_group_id.to_string())]);
if let Some(ref param_value) = p_error_id {
req_builder = req_builder.query(&[("errorID", ¶m_value.to_string())]);
}
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
let content_type = resp
.headers()
.get("content-type")
.and_then(|v| v.to_str().ok())
.unwrap_or("application/octet-stream");
let content_type = super::ContentType::from(content_type);
if !status.is_client_error() && !status.is_server_error() {
let content = resp.text().await?;
match content_type {
ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yNextPrevErrorIds`"))),
ContentType::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`")))),
}
} else {
let content = resp.text().await?;
let entity: Option<GetO11yNextpreverroridsError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Lists the metric attribute keys Kubernetes nodes report, for building node filters.
pub 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>> {
// add a prefix to parameters to efficiently prevent name collisions
let p_data_source = data_source;
let p_aggregate_operator = aggregate_operator;
let p_aggregate_attribute = aggregate_attribute;
let p_search_text = search_text;
let p_tag_type = tag_type;
let p_limit = limit;
let uri_str = format!("{}/v1/o11y/nodes/attribute_keys", configuration.base_path);
let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
if let Some(ref param_value) = p_data_source {
req_builder = req_builder.query(&[("dataSource", ¶m_value.to_string())]);
}
if let Some(ref param_value) = p_aggregate_operator {
req_builder = req_builder.query(&[("aggregateOperator", ¶m_value.to_string())]);
}
if let Some(ref param_value) = p_aggregate_attribute {
req_builder = req_builder.query(&[("aggregateAttribute", ¶m_value.to_string())]);
}
if let Some(ref param_value) = p_search_text {
req_builder = req_builder.query(&[("searchText", ¶m_value.to_string())]);
}
if let Some(ref param_value) = p_tag_type {
req_builder = req_builder.query(&[("tagType", ¶m_value.to_string())]);
}
if let Some(ref param_value) = p_limit {
req_builder = req_builder.query(&[("limit", ¶m_value.to_string())]);
}
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
let content_type = resp
.headers()
.get("content-type")
.and_then(|v| v.to_str().ok())
.unwrap_or("application/octet-stream");
let content_type = super::ContentType::from(content_type);
if !status.is_client_error() && !status.is_server_error() {
let content = resp.text().await?;
match content_type {
ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yInfraAttributeKeysOut`"))),
ContentType::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`")))),
}
} else {
let content = resp.text().await?;
let entity: Option<GetO11yNodesAttributeKeysError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Lists the values one node attribute key has taken, for building node filters.
pub 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>> {
// add a prefix to parameters to efficiently prevent name collisions
let p_data_source = data_source;
let p_aggregate_operator = aggregate_operator;
let p_aggregate_attribute = aggregate_attribute;
let p_attribute_key = attribute_key;
let p_filter_attribute_key_data_type = filter_attribute_key_data_type;
let p_search_text = search_text;
let p_tag_type = tag_type;
let p_limit = limit;
let uri_str = format!("{}/v1/o11y/nodes/attribute_values", configuration.base_path);
let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
if let Some(ref param_value) = p_data_source {
req_builder = req_builder.query(&[("dataSource", ¶m_value.to_string())]);
}
if let Some(ref param_value) = p_aggregate_operator {
req_builder = req_builder.query(&[("aggregateOperator", ¶m_value.to_string())]);
}
if let Some(ref param_value) = p_aggregate_attribute {
req_builder = req_builder.query(&[("aggregateAttribute", ¶m_value.to_string())]);
}
if let Some(ref param_value) = p_attribute_key {
req_builder = req_builder.query(&[("attributeKey", ¶m_value.to_string())]);
}
if let Some(ref param_value) = p_filter_attribute_key_data_type {
req_builder = req_builder.query(&[("filterAttributeKeyDataType", ¶m_value.to_string())]);
}
if let Some(ref param_value) = p_search_text {
req_builder = req_builder.query(&[("searchText", ¶m_value.to_string())]);
}
if let Some(ref param_value) = p_tag_type {
req_builder = req_builder.query(&[("tagType", ¶m_value.to_string())]);
}
if let Some(ref param_value) = p_limit {
req_builder = req_builder.query(&[("limit", ¶m_value.to_string())]);
}
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
let content_type = resp
.headers()
.get("content-type")
.and_then(|v| v.to_str().ok())
.unwrap_or("application/octet-stream");
let content_type = super::ContentType::from(content_type);
if !status.is_client_error() && !status.is_server_error() {
let content = resp.text().await?;
match content_type {
ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yInfraAttributeValuesOut`"))),
ContentType::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`")))),
}
} else {
let content = resp.text().await?;
let entity: Option<GetO11yNodesAttributeValuesError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Lists the metric attribute keys Kubernetes pods report, for building pod filters.
pub 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>> {
// add a prefix to parameters to efficiently prevent name collisions
let p_data_source = data_source;
let p_aggregate_operator = aggregate_operator;
let p_aggregate_attribute = aggregate_attribute;
let p_search_text = search_text;
let p_tag_type = tag_type;
let p_limit = limit;
let uri_str = format!("{}/v1/o11y/pods/attribute_keys", configuration.base_path);
let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
if let Some(ref param_value) = p_data_source {
req_builder = req_builder.query(&[("dataSource", ¶m_value.to_string())]);
}
if let Some(ref param_value) = p_aggregate_operator {
req_builder = req_builder.query(&[("aggregateOperator", ¶m_value.to_string())]);
}
if let Some(ref param_value) = p_aggregate_attribute {
req_builder = req_builder.query(&[("aggregateAttribute", ¶m_value.to_string())]);
}
if let Some(ref param_value) = p_search_text {
req_builder = req_builder.query(&[("searchText", ¶m_value.to_string())]);
}
if let Some(ref param_value) = p_tag_type {
req_builder = req_builder.query(&[("tagType", ¶m_value.to_string())]);
}
if let Some(ref param_value) = p_limit {
req_builder = req_builder.query(&[("limit", ¶m_value.to_string())]);
}
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
let content_type = resp
.headers()
.get("content-type")
.and_then(|v| v.to_str().ok())
.unwrap_or("application/octet-stream");
let content_type = super::ContentType::from(content_type);
if !status.is_client_error() && !status.is_server_error() {
let content = resp.text().await?;
match content_type {
ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yInfraAttributeKeysOut`"))),
ContentType::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`")))),
}
} else {
let content = resp.text().await?;
let entity: Option<GetO11yPodsAttributeKeysError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Lists the values one pod attribute key has taken, for building pod filters.
pub 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>> {
// add a prefix to parameters to efficiently prevent name collisions
let p_data_source = data_source;
let p_aggregate_operator = aggregate_operator;
let p_aggregate_attribute = aggregate_attribute;
let p_attribute_key = attribute_key;
let p_filter_attribute_key_data_type = filter_attribute_key_data_type;
let p_search_text = search_text;
let p_tag_type = tag_type;
let p_limit = limit;
let uri_str = format!("{}/v1/o11y/pods/attribute_values", configuration.base_path);
let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
if let Some(ref param_value) = p_data_source {
req_builder = req_builder.query(&[("dataSource", ¶m_value.to_string())]);
}
if let Some(ref param_value) = p_aggregate_operator {
req_builder = req_builder.query(&[("aggregateOperator", ¶m_value.to_string())]);
}
if let Some(ref param_value) = p_aggregate_attribute {
req_builder = req_builder.query(&[("aggregateAttribute", ¶m_value.to_string())]);
}
if let Some(ref param_value) = p_attribute_key {
req_builder = req_builder.query(&[("attributeKey", ¶m_value.to_string())]);
}
if let Some(ref param_value) = p_filter_attribute_key_data_type {
req_builder = req_builder.query(&[("filterAttributeKeyDataType", ¶m_value.to_string())]);
}
if let Some(ref param_value) = p_search_text {
req_builder = req_builder.query(&[("searchText", ¶m_value.to_string())]);
}
if let Some(ref param_value) = p_tag_type {
req_builder = req_builder.query(&[("tagType", ¶m_value.to_string())]);
}
if let Some(ref param_value) = p_limit {
req_builder = req_builder.query(&[("limit", ¶m_value.to_string())]);
}
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
let content_type = resp
.headers()
.get("content-type")
.and_then(|v| v.to_str().ok())
.unwrap_or("application/octet-stream");
let content_type = super::ContentType::from(content_type);
if !status.is_client_error() && !status.is_server_error() {
let content = resp.text().await?;
match content_type {
ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yInfraAttributeValuesOut`"))),
ContentType::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`")))),
}
} else {
let content = resp.text().await?;
let entity: Option<GetO11yPodsAttributeValuesError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Lists the metric attribute keys processes report, for building process filters.
pub 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>> {
// add a prefix to parameters to efficiently prevent name collisions
let p_data_source = data_source;
let p_aggregate_operator = aggregate_operator;
let p_aggregate_attribute = aggregate_attribute;
let p_search_text = search_text;
let p_tag_type = tag_type;
let p_limit = limit;
let uri_str = format!("{}/v1/o11y/processes/attribute_keys", configuration.base_path);
let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
if let Some(ref param_value) = p_data_source {
req_builder = req_builder.query(&[("dataSource", ¶m_value.to_string())]);
}
if let Some(ref param_value) = p_aggregate_operator {
req_builder = req_builder.query(&[("aggregateOperator", ¶m_value.to_string())]);
}
if let Some(ref param_value) = p_aggregate_attribute {
req_builder = req_builder.query(&[("aggregateAttribute", ¶m_value.to_string())]);
}
if let Some(ref param_value) = p_search_text {
req_builder = req_builder.query(&[("searchText", ¶m_value.to_string())]);
}
if let Some(ref param_value) = p_tag_type {
req_builder = req_builder.query(&[("tagType", ¶m_value.to_string())]);
}
if let Some(ref param_value) = p_limit {
req_builder = req_builder.query(&[("limit", ¶m_value.to_string())]);
}
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
let content_type = resp
.headers()
.get("content-type")
.and_then(|v| v.to_str().ok())
.unwrap_or("application/octet-stream");
let content_type = super::ContentType::from(content_type);
if !status.is_client_error() && !status.is_server_error() {
let content = resp.text().await?;
match content_type {
ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yInfraAttributeKeysOut`"))),
ContentType::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`")))),
}
} else {
let content = resp.text().await?;
let entity: Option<GetO11yProcessesAttributeKeysError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Lists the values one process attribute key has taken, for building process filters.
pub 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>> {
// add a prefix to parameters to efficiently prevent name collisions
let p_data_source = data_source;
let p_aggregate_operator = aggregate_operator;
let p_aggregate_attribute = aggregate_attribute;
let p_attribute_key = attribute_key;
let p_filter_attribute_key_data_type = filter_attribute_key_data_type;
let p_search_text = search_text;
let p_tag_type = tag_type;
let p_limit = limit;
let uri_str = format!("{}/v1/o11y/processes/attribute_values", configuration.base_path);
let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
if let Some(ref param_value) = p_data_source {
req_builder = req_builder.query(&[("dataSource", ¶m_value.to_string())]);
}
if let Some(ref param_value) = p_aggregate_operator {
req_builder = req_builder.query(&[("aggregateOperator", ¶m_value.to_string())]);
}
if let Some(ref param_value) = p_aggregate_attribute {
req_builder = req_builder.query(&[("aggregateAttribute", ¶m_value.to_string())]);
}
if let Some(ref param_value) = p_attribute_key {
req_builder = req_builder.query(&[("attributeKey", ¶m_value.to_string())]);
}
if let Some(ref param_value) = p_filter_attribute_key_data_type {
req_builder = req_builder.query(&[("filterAttributeKeyDataType", ¶m_value.to_string())]);
}
if let Some(ref param_value) = p_search_text {
req_builder = req_builder.query(&[("searchText", ¶m_value.to_string())]);
}
if let Some(ref param_value) = p_tag_type {
req_builder = req_builder.query(&[("tagType", ¶m_value.to_string())]);
}
if let Some(ref param_value) = p_limit {
req_builder = req_builder.query(&[("limit", ¶m_value.to_string())]);
}
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
let content_type = resp
.headers()
.get("content-type")
.and_then(|v| v.to_str().ok())
.unwrap_or("application/octet-stream");
let content_type = super::ContentType::from(content_type);
if !status.is_client_error() && !status.is_server_error() {
let content = resp.text().await?;
match content_type {
ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yInfraAttributeValuesOut`"))),
ContentType::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`")))),
}
} else {
let content = resp.text().await?;
let entity: Option<GetO11yProcessesAttributeValuesError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Returns one product's RED series — request rate, errors, p50 and p95 latency — for the caller's org, plus that org's LLM usage rollup over the same window. The series come from org-tagged request spans, so a tenant only ever aggregates its own traffic; a validated platform SuperAdmin sees the whole product's RED, while usage stays the caller's own org either way. A well-formed product with no backing workload answers empty series; a malformed slug is a 400.
pub async fn get_o11y_product_metrics(configuration: &configuration::Configuration, product: Option<&str>, range: Option<i32>, step_sec: Option<i32>) -> Result<models::O11yPeriodMetricsResponse, Error<GetO11yProductMetricsError>> {
// add a prefix to parameters to efficiently prevent name collisions
let p_product = product;
let p_range = range;
let p_step_sec = step_sec;
let uri_str = format!("{}/v1/o11y/product/metrics", configuration.base_path);
let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
if let Some(ref param_value) = p_product {
req_builder = req_builder.query(&[("product", ¶m_value.to_string())]);
}
if let Some(ref param_value) = p_range {
req_builder = req_builder.query(&[("range", ¶m_value.to_string())]);
}
if let Some(ref param_value) = p_step_sec {
req_builder = req_builder.query(&[("stepSec", ¶m_value.to_string())]);
}
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
let content_type = resp
.headers()
.get("content-type")
.and_then(|v| v.to_str().ok())
.unwrap_or("application/octet-stream");
let content_type = super::ContentType::from(content_type);
if !status.is_client_error() && !status.is_server_error() {
let content = resp.text().await?;
match content_type {
ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodMetricsResponse`"))),
ContentType::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`")))),
}
} else {
let content = resp.text().await?;
let entity: Option<GetO11yProductMetricsError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Lists the metric attribute keys persistent volume claims report, for building volume filters.
pub 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>> {
// add a prefix to parameters to efficiently prevent name collisions
let p_data_source = data_source;
let p_aggregate_operator = aggregate_operator;
let p_aggregate_attribute = aggregate_attribute;
let p_search_text = search_text;
let p_tag_type = tag_type;
let p_limit = limit;
let uri_str = format!("{}/v1/o11y/pvcs/attribute_keys", configuration.base_path);
let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
if let Some(ref param_value) = p_data_source {
req_builder = req_builder.query(&[("dataSource", ¶m_value.to_string())]);
}
if let Some(ref param_value) = p_aggregate_operator {
req_builder = req_builder.query(&[("aggregateOperator", ¶m_value.to_string())]);
}
if let Some(ref param_value) = p_aggregate_attribute {
req_builder = req_builder.query(&[("aggregateAttribute", ¶m_value.to_string())]);
}
if let Some(ref param_value) = p_search_text {
req_builder = req_builder.query(&[("searchText", ¶m_value.to_string())]);
}
if let Some(ref param_value) = p_tag_type {
req_builder = req_builder.query(&[("tagType", ¶m_value.to_string())]);
}
if let Some(ref param_value) = p_limit {
req_builder = req_builder.query(&[("limit", ¶m_value.to_string())]);
}
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
let content_type = resp
.headers()
.get("content-type")
.and_then(|v| v.to_str().ok())
.unwrap_or("application/octet-stream");
let content_type = super::ContentType::from(content_type);
if !status.is_client_error() && !status.is_server_error() {
let content = resp.text().await?;
match content_type {
ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yInfraAttributeKeysOut`"))),
ContentType::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`")))),
}
} else {
let content = resp.text().await?;
let entity: Option<GetO11yPvcsAttributeKeysError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Lists the values one persistent-volume-claim attribute key has taken, for building volume filters.
pub 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>> {
// add a prefix to parameters to efficiently prevent name collisions
let p_data_source = data_source;
let p_aggregate_operator = aggregate_operator;
let p_aggregate_attribute = aggregate_attribute;
let p_attribute_key = attribute_key;
let p_filter_attribute_key_data_type = filter_attribute_key_data_type;
let p_search_text = search_text;
let p_tag_type = tag_type;
let p_limit = limit;
let uri_str = format!("{}/v1/o11y/pvcs/attribute_values", configuration.base_path);
let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
if let Some(ref param_value) = p_data_source {
req_builder = req_builder.query(&[("dataSource", ¶m_value.to_string())]);
}
if let Some(ref param_value) = p_aggregate_operator {
req_builder = req_builder.query(&[("aggregateOperator", ¶m_value.to_string())]);
}
if let Some(ref param_value) = p_aggregate_attribute {
req_builder = req_builder.query(&[("aggregateAttribute", ¶m_value.to_string())]);
}
if let Some(ref param_value) = p_attribute_key {
req_builder = req_builder.query(&[("attributeKey", ¶m_value.to_string())]);
}
if let Some(ref param_value) = p_filter_attribute_key_data_type {
req_builder = req_builder.query(&[("filterAttributeKeyDataType", ¶m_value.to_string())]);
}
if let Some(ref param_value) = p_search_text {
req_builder = req_builder.query(&[("searchText", ¶m_value.to_string())]);
}
if let Some(ref param_value) = p_tag_type {
req_builder = req_builder.query(&[("tagType", ¶m_value.to_string())]);
}
if let Some(ref param_value) = p_limit {
req_builder = req_builder.query(&[("limit", ¶m_value.to_string())]);
}
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
let content_type = resp
.headers()
.get("content-type")
.and_then(|v| v.to_str().ok())
.unwrap_or("application/octet-stream");
let content_type = super::ContentType::from(content_type);
if !status.is_client_error() && !status.is_server_error() {
let content = resp.text().await?;
match content_type {
ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yInfraAttributeValuesOut`"))),
ContentType::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`")))),
}
} else {
let content = resp.text().await?;
let entity: Option<GetO11yPvcsAttributeValuesError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Evaluates one instant PromQL query against the org's metrics and returns the result at a single point in time. The result is polymorphic by PromQL's own contract — a matrix, vector, scalar or string, discriminated by resultType — so it is carried verbatim rather than forced into one of its shapes. Callers need the viewer role; the runtime's own gate enforces it.
pub async fn get_o11y_query(configuration: &configuration::Configuration, query: &str, time: Option<&str>, stats: Option<&str>, timeout: Option<&str>) -> Result<models::O11yPeriodO11yPromQueryOut, Error<GetO11yQueryError>> {
// add a prefix to parameters to efficiently prevent name collisions
let p_query = query;
let p_time = time;
let p_stats = stats;
let p_timeout = timeout;
let uri_str = format!("{}/v1/o11y/query", configuration.base_path);
let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
req_builder = req_builder.query(&[("query", &p_query.to_string())]);
if let Some(ref param_value) = p_time {
req_builder = req_builder.query(&[("time", ¶m_value.to_string())]);
}
if let Some(ref param_value) = p_stats {
req_builder = req_builder.query(&[("stats", ¶m_value.to_string())]);
}
if let Some(ref param_value) = p_timeout {
req_builder = req_builder.query(&[("timeout", ¶m_value.to_string())]);
}
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
let content_type = resp
.headers()
.get("content-type")
.and_then(|v| v.to_str().ok())
.unwrap_or("application/octet-stream");
let content_type = super::ContentType::from(content_type);
if !status.is_client_error() && !status.is_server_error() {
let content = resp.text().await?;
match content_type {
ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yPromQueryOut`"))),
ContentType::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`")))),
}
} else {
let content = resp.text().await?;
let entity: Option<GetO11yQueryError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Reports how far a submitted query has got — rows scanned, bytes read, elapsed — and HOLDS the connection until the next update rather than answering immediately. ONE ADDRESS, TWO PROTOCOLS. Send an Upgrade and this is a websocket carrying the same progress; send an ordinary GET and it is a long poll. The Upgrade is a property of the request, not of the address, so the read that used to answer at /ws/query_progress answers here. The long poll is the whole point, and the reason this cannot be a typed operation: an answer that arrived only when the query finished would report progress on nothing, and an upgraded connection has no JSON response to declare. A validated, org-scoped principal is required; a query id belonging to another tenant is simply not found.
pub async fn get_o11y_query_progress(configuration: &configuration::Configuration, ) -> Result<(), Error<GetO11yQueryProgressError>> {
let uri_str = format!("{}/v1/o11y/query_progress", configuration.base_path);
let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
if !status.is_client_error() && !status.is_server_error() {
Ok(())
} else {
let content = resp.text().await?;
let entity: Option<GetO11yQueryProgressError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Runs a Prometheus-style range query over metrics — the legacy read that predates the v5 querier — and returns the matrix, vector or scalar the query resolved to. Callers need the viewer role; the runtime's own gate enforces it.
pub 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>> {
// add a prefix to parameters to efficiently prevent name collisions
let p_start = start;
let p_end = end;
let p_step = step;
let p_query = query;
let p_stats = stats;
let p_timeout = timeout;
let uri_str = format!("{}/v1/o11y/query_range", configuration.base_path);
let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
req_builder = req_builder.query(&[("start", &p_start.to_string())]);
req_builder = req_builder.query(&[("end", &p_end.to_string())]);
req_builder = req_builder.query(&[("step", &p_step.to_string())]);
req_builder = req_builder.query(&[("query", &p_query.to_string())]);
if let Some(ref param_value) = p_stats {
req_builder = req_builder.query(&[("stats", ¶m_value.to_string())]);
}
if let Some(ref param_value) = p_timeout {
req_builder = req_builder.query(&[("timeout", ¶m_value.to_string())]);
}
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
let content_type = resp
.headers()
.get("content-type")
.and_then(|v| v.to_str().ok())
.unwrap_or("application/octet-stream");
let content_type = super::ContentType::from(content_type);
if !status.is_client_error() && !status.is_server_error() {
let content = resp.text().await?;
match content_type {
ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yMetricsQueryRangeOut`"))),
ContentType::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`")))),
}
} else {
let content = resp.text().await?;
let entity: Option<GetO11yQueryRangeError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Reports whether the runtime's registered services are healthy enough to take traffic, and answers 503 when they are not — which is what takes a booting or degraded replica out of the load balancer instead of letting it serve errors. UNAUTHENTICATED by design, like the other two probes. It reads the same service registry the health probe reads, so the two agree by construction; readiness is the question a router asks and health is the question an operator asks.
pub async fn get_o11y_readyz(configuration: &configuration::Configuration, ) -> Result<(), Error<GetO11yReadyzError>> {
let uri_str = format!("{}/v1/o11y/readyz", configuration.base_path);
let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
if !status.is_client_error() && !status.is_server_error() {
Ok(())
} else {
let content = resp.text().await?;
let entity: Option<GetO11yReadyzError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Returns a page of the caller org's human-review queues, newest first, narrowed to the caller's project. Another org's queues are never visible.
pub async fn get_o11y_reviews(configuration: &configuration::Configuration, page: Option<i32>, limit: Option<i32>) -> Result<models::O11yPeriodAnnQueueList, Error<GetO11yReviewsError>> {
// add a prefix to parameters to efficiently prevent name collisions
let p_page = page;
let p_limit = limit;
let uri_str = format!("{}/v1/o11y/reviews", configuration.base_path);
let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
if let Some(ref param_value) = p_page {
req_builder = req_builder.query(&[("page", ¶m_value.to_string())]);
}
if let Some(ref param_value) = p_limit {
req_builder = req_builder.query(&[("limit", ¶m_value.to_string())]);
}
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
let content_type = resp
.headers()
.get("content-type")
.and_then(|v| v.to_str().ok())
.unwrap_or("application/octet-stream");
let content_type = super::ContentType::from(content_type);
if !status.is_client_error() && !status.is_server_error() {
let content = resp.text().await?;
match content_type {
ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodAnnQueueList`"))),
ContentType::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`")))),
}
} else {
let content = resp.text().await?;
let entity: Option<GetO11yReviewsError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Returns one review queue with its pending and completed counts and its first page of items. A queue id belonging to another org is a 404, never a cross-tenant read.
pub async fn get_o11y_reviews_by_id(configuration: &configuration::Configuration, id: &str) -> Result<models::O11yPeriodAnnQueueDetailView, Error<GetO11yReviewsByIdError>> {
// add a prefix to parameters to efficiently prevent name collisions
let p_id = id;
let uri_str = format!("{}/v1/o11y/reviews/{id}", configuration.base_path, id=crate::apis::urlencode(p_id));
let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
let content_type = resp
.headers()
.get("content-type")
.and_then(|v| v.to_str().ok())
.unwrap_or("application/octet-stream");
let content_type = super::ContentType::from(content_type);
if !status.is_client_error() && !status.is_server_error() {
let content = resp.text().await?;
match content_type {
ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodAnnQueueDetailView`"))),
ContentType::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`")))),
}
} else {
let content = resp.text().await?;
let entity: Option<GetO11yReviewsByIdError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Returns a page of one review queue's items, newest first, optionally filtered to PENDING or COMPLETED. A queue id belonging to another org is a 404, never a cross-tenant list.
pub 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>> {
// add a prefix to parameters to efficiently prevent name collisions
let p_id = id;
let p_status = status;
let p_page = page;
let p_limit = limit;
let uri_str = format!("{}/v1/o11y/reviews/{id}/items", configuration.base_path, id=crate::apis::urlencode(p_id));
let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
if let Some(ref param_value) = p_status {
req_builder = req_builder.query(&[("status", ¶m_value.to_string())]);
}
if let Some(ref param_value) = p_page {
req_builder = req_builder.query(&[("page", ¶m_value.to_string())]);
}
if let Some(ref param_value) = p_limit {
req_builder = req_builder.query(&[("limit", ¶m_value.to_string())]);
}
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
let content_type = resp
.headers()
.get("content-type")
.and_then(|v| v.to_str().ok())
.unwrap_or("application/octet-stream");
let content_type = super::ContentType::from(content_type);
if !status.is_client_error() && !status.is_server_error() {
let content = resp.text().await?;
match content_type {
ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodAnnItemList`"))),
ContentType::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`")))),
}
} else {
let content = resp.text().await?;
let entity: Option<GetO11yReviewsByIdItemsError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Returns one captured error event of a project, by its id. Callers need the viewer role; the runtime's own gate enforces it.
pub async fn get_o11y_sentinel_events_by_id(configuration: &configuration::Configuration, id: &str, project: &str) -> Result<models::O11yPeriodO11ySentryEventOut, Error<GetO11ySentinelEventsByIdError>> {
// add a prefix to parameters to efficiently prevent name collisions
let p_id = id;
let p_project = project;
let uri_str = format!("{}/v1/o11y/sentinel/events/{id}", configuration.base_path, id=crate::apis::urlencode(p_id));
let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
req_builder = req_builder.query(&[("project", &p_project.to_string())]);
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
let content_type = resp
.headers()
.get("content-type")
.and_then(|v| v.to_str().ok())
.unwrap_or("application/octet-stream");
let content_type = super::ContentType::from(content_type);
if !status.is_client_error() && !status.is_server_error() {
let content = resp.text().await?;
match content_type {
ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11ySentryEventOut`"))),
ContentType::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`")))),
}
} else {
let content = resp.text().await?;
let entity: Option<GetO11ySentinelEventsByIdError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Lists the caller's org's grouped error issues, optionally narrowed to one project and one time window, and filtered by status, level, environment, service, a free-text query and a sort. Callers need the viewer role; the runtime's own gate enforces it.
pub 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>> {
// add a prefix to parameters to efficiently prevent name collisions
let p_status = status;
let p_level = level;
let p_environment = environment;
let p_service_name = service_name;
let p_query = query;
let p_sort = sort;
let p_offset = offset;
let p_limit = limit;
let p_project = project;
let p_period = period;
let uri_str = format!("{}/v1/o11y/sentinel/issues", configuration.base_path);
let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
if let Some(ref param_value) = p_status {
req_builder = req_builder.query(&[("status", ¶m_value.to_string())]);
}
if let Some(ref param_value) = p_level {
req_builder = req_builder.query(&[("level", ¶m_value.to_string())]);
}
if let Some(ref param_value) = p_environment {
req_builder = req_builder.query(&[("environment", ¶m_value.to_string())]);
}
if let Some(ref param_value) = p_service_name {
req_builder = req_builder.query(&[("serviceName", ¶m_value.to_string())]);
}
if let Some(ref param_value) = p_query {
req_builder = req_builder.query(&[("query", ¶m_value.to_string())]);
}
if let Some(ref param_value) = p_sort {
req_builder = req_builder.query(&[("sort", ¶m_value.to_string())]);
}
if let Some(ref param_value) = p_offset {
req_builder = req_builder.query(&[("offset", ¶m_value.to_string())]);
}
if let Some(ref param_value) = p_limit {
req_builder = req_builder.query(&[("limit", ¶m_value.to_string())]);
}
if let Some(ref param_value) = p_project {
req_builder = req_builder.query(&[("project", ¶m_value.to_string())]);
}
if let Some(ref param_value) = p_period {
req_builder = req_builder.query(&[("period", ¶m_value.to_string())]);
}
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
let content_type = resp
.headers()
.get("content-type")
.and_then(|v| v.to_str().ok())
.unwrap_or("application/octet-stream");
let content_type = super::ContentType::from(content_type);
if !status.is_client_error() && !status.is_server_error() {
let content = resp.text().await?;
match content_type {
ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yErrorIssuesOut`"))),
ContentType::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`")))),
}
} else {
let content = resp.text().await?;
let entity: Option<GetO11ySentinelIssuesError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Returns one grouped issue of the caller's org with its latest occurrence sample. Callers need the viewer role; the runtime's own gate enforces it.
pub async fn get_o11y_sentinel_issues_by_id(configuration: &configuration::Configuration, id: &str) -> Result<models::O11yPeriodO11yErrorGettableIssueOut, Error<GetO11ySentinelIssuesByIdError>> {
// add a prefix to parameters to efficiently prevent name collisions
let p_id = id;
let uri_str = format!("{}/v1/o11y/sentinel/issues/{id}", configuration.base_path, id=crate::apis::urlencode(p_id));
let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
let content_type = resp
.headers()
.get("content-type")
.and_then(|v| v.to_str().ok())
.unwrap_or("application/octet-stream");
let content_type = super::ContentType::from(content_type);
if !status.is_client_error() && !status.is_server_error() {
let content = resp.text().await?;
match content_type {
ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yErrorGettableIssueOut`"))),
ContentType::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`")))),
}
} else {
let content = resp.text().await?;
let entity: Option<GetO11ySentinelIssuesByIdError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Lists one issue's captured occurrences, scoped to a project — a project is an isolation unit, so the caller declares which project's occurrences to read. Callers need the viewer role; the runtime's own gate enforces it.
pub async fn get_o11y_sentinel_issues_by_id_events(configuration: &configuration::Configuration, id: &str, project: &str, limit: Option<i32>) -> Result<models::O11yPeriodO11ySentryIssueEventsOut, Error<GetO11ySentinelIssuesByIdEventsError>> {
// add a prefix to parameters to efficiently prevent name collisions
let p_id = id;
let p_project = project;
let p_limit = limit;
let uri_str = format!("{}/v1/o11y/sentinel/issues/{id}/events", configuration.base_path, id=crate::apis::urlencode(p_id));
let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
req_builder = req_builder.query(&[("project", &p_project.to_string())]);
if let Some(ref param_value) = p_limit {
req_builder = req_builder.query(&[("limit", ¶m_value.to_string())]);
}
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
let content_type = resp
.headers()
.get("content-type")
.and_then(|v| v.to_str().ok())
.unwrap_or("application/octet-stream");
let content_type = super::ContentType::from(content_type);
if !status.is_client_error() && !status.is_server_error() {
let content = resp.text().await?;
match content_type {
ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11ySentryIssueEventsOut`"))),
ContentType::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`")))),
}
} else {
let content = resp.text().await?;
let entity: Option<GetO11ySentinelIssuesByIdEventsError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Lists a project's captured error events, newest first, optionally narrowed to those whose message or exception text contains a search string.
pub 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>> {
// add a prefix to parameters to efficiently prevent name collisions
let p_project = project;
let p_query = query;
let p_period = period;
let p_limit = limit;
let uri_str = format!("{}/v1/o11y/sentinel/logs", configuration.base_path);
let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
req_builder = req_builder.query(&[("project", &p_project.to_string())]);
if let Some(ref param_value) = p_query {
req_builder = req_builder.query(&[("query", ¶m_value.to_string())]);
}
if let Some(ref param_value) = p_period {
req_builder = req_builder.query(&[("period", ¶m_value.to_string())]);
}
if let Some(ref param_value) = p_limit {
req_builder = req_builder.query(&[("limit", ¶m_value.to_string())]);
}
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
let content_type = resp
.headers()
.get("content-type")
.and_then(|v| v.to_str().ok())
.unwrap_or("application/octet-stream");
let content_type = super::ContentType::from(content_type);
if !status.is_client_error() && !status.is_server_error() {
let content = resp.text().await?;
match content_type {
ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yLogsOut`"))),
ContentType::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`")))),
}
} else {
let content = resp.text().await?;
let entity: Option<GetO11ySentinelLogsError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Lists the caller's org's Sentry projects, each with its freshly-derived DSN. Callers need the viewer role; the runtime's own gate enforces it.
pub async fn get_o11y_sentinel_projects(configuration: &configuration::Configuration, ) -> Result<models::O11yPeriodO11ySentryProjectsOut, Error<GetO11ySentinelProjectsError>> {
let uri_str = format!("{}/v1/o11y/sentinel/projects", configuration.base_path);
let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
let content_type = resp
.headers()
.get("content-type")
.and_then(|v| v.to_str().ok())
.unwrap_or("application/octet-stream");
let content_type = super::ContentType::from(content_type);
if !status.is_client_error() && !status.is_server_error() {
let content = resp.text().await?;
match content_type {
ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11ySentryProjectsOut`"))),
ContentType::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`")))),
}
} else {
let content = resp.text().await?;
let entity: Option<GetO11ySentinelProjectsError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Returns one Sentry project of the caller's org, DSN included. Callers need the viewer role; the runtime's own gate enforces it.
pub async fn get_o11y_sentinel_projects_by_id(configuration: &configuration::Configuration, id: &str) -> Result<models::O11yPeriodO11ySentryProjectOut, Error<GetO11ySentinelProjectsByIdError>> {
// add a prefix to parameters to efficiently prevent name collisions
let p_id = id;
let uri_str = format!("{}/v1/o11y/sentinel/projects/{id}", configuration.base_path, id=crate::apis::urlencode(p_id));
let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
let content_type = resp
.headers()
.get("content-type")
.and_then(|v| v.to_str().ok())
.unwrap_or("application/octet-stream");
let content_type = super::ContentType::from(content_type);
if !status.is_client_error() && !status.is_server_error() {
let content = resp.text().await?;
match content_type {
ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11ySentryProjectOut`"))),
ContentType::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`")))),
}
} else {
let content = resp.text().await?;
let entity: Option<GetO11ySentinelProjectsByIdError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Returns a project's event-rate timeseries: one bucket per interval over the requested period, counting the events in it.
pub async fn get_o11y_sentinel_stats(configuration: &configuration::Configuration, project: &str, field: Option<&str>, period: Option<&str>) -> Result<models::O11yPeriodO11yStatsOut, Error<GetO11ySentinelStatsError>> {
// add a prefix to parameters to efficiently prevent name collisions
let p_project = project;
let p_field = field;
let p_period = period;
let uri_str = format!("{}/v1/o11y/sentinel/stats", configuration.base_path);
let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
req_builder = req_builder.query(&[("project", &p_project.to_string())]);
if let Some(ref param_value) = p_field {
req_builder = req_builder.query(&[("field", ¶m_value.to_string())]);
}
if let Some(ref param_value) = p_period {
req_builder = req_builder.query(&[("period", ¶m_value.to_string())]);
}
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
let content_type = resp
.headers()
.get("content-type")
.and_then(|v| v.to_str().ok())
.unwrap_or("application/octet-stream");
let content_type = super::ContentType::from(content_type);
if !status.is_client_error() && !status.is_server_error() {
let content = resp.text().await?;
match content_type {
ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yStatsOut`"))),
ContentType::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`")))),
}
} else {
let content = resp.text().await?;
let entity: Option<GetO11ySentinelStatsError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Lists the traces a project's captured errors reference, each with how many errors landed on it, when they started and stopped, and the latest message seen — the entry point for \"which requests are failing\".
pub async fn get_o11y_sentinel_traces(configuration: &configuration::Configuration, project: &str, period: Option<&str>, limit: Option<i32>) -> Result<models::O11yPeriodO11yTracesOut, Error<GetO11ySentinelTracesError>> {
// add a prefix to parameters to efficiently prevent name collisions
let p_project = project;
let p_period = period;
let p_limit = limit;
let uri_str = format!("{}/v1/o11y/sentinel/traces", configuration.base_path);
let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
req_builder = req_builder.query(&[("project", &p_project.to_string())]);
if let Some(ref param_value) = p_period {
req_builder = req_builder.query(&[("period", ¶m_value.to_string())]);
}
if let Some(ref param_value) = p_limit {
req_builder = req_builder.query(&[("limit", ¶m_value.to_string())]);
}
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
let content_type = resp
.headers()
.get("content-type")
.and_then(|v| v.to_str().ok())
.unwrap_or("application/octet-stream");
let content_type = super::ContentType::from(content_type);
if !status.is_client_error() && !status.is_server_error() {
let content = resp.text().await?;
match content_type {
ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yTracesOut`"))),
ContentType::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`")))),
}
} else {
let content = resp.text().await?;
let entity: Option<GetO11ySentinelTracesError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Returns one trace's captured errors for a project — every error event that carried the trace id, in the order the events plane holds them.
pub async fn get_o11y_sentinel_traces_by_id(configuration: &configuration::Configuration, id: &str, project: &str) -> Result<models::O11yPeriodO11yTraceOut, Error<GetO11ySentinelTracesByIdError>> {
// add a prefix to parameters to efficiently prevent name collisions
let p_id = id;
let p_project = project;
let uri_str = format!("{}/v1/o11y/sentinel/traces/{id}", configuration.base_path, id=crate::apis::urlencode(p_id));
let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
req_builder = req_builder.query(&[("project", &p_project.to_string())]);
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
let content_type = resp
.headers()
.get("content-type")
.and_then(|v| v.to_str().ok())
.unwrap_or("application/octet-stream");
let content_type = super::ContentType::from(content_type);
if !status.is_client_error() && !status.is_server_error() {
let content = resp.text().await?;
match content_type {
ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yTraceOut`"))),
ContentType::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`")))),
}
} else {
let content = resp.text().await?;
let entity: Option<GetO11ySentinelTracesByIdError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Lists the name of every service the trace store holds, with no window applied — the complete catalog, for pickers and autocomplete.
pub async fn get_o11y_services_list(configuration: &configuration::Configuration, ) -> Result<Vec<String>, Error<GetO11yServicesListError>> {
let uri_str = format!("{}/v1/o11y/services/list", configuration.base_path);
let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
let content_type = resp
.headers()
.get("content-type")
.and_then(|v| v.to_str().ok())
.unwrap_or("application/octet-stream");
let content_type = super::ContentType::from(content_type);
if !status.is_client_error() && !status.is_server_error() {
let content = resp.text().await?;
match content_type {
ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<String>`"))),
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>`")))),
}
} else {
let content = resp.text().await?;
let entity: Option<GetO11yServicesListError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Answers the caller org's LLM-observability sessions — traces grouped by session id on the gen_ai span plane — paged by limit and offset, in the runtime's own envelope, passed through unchanged. An org-less caller is refused HERE, at the cloud boundary, before the request reaches the runtime, and the org the runtime then scopes on is that SAME validated tenant. The two cannot disagree: the tenant is minted from the principal's own claim at ingress and a client copy never survives it. There is deliberately no session-detail route to pair with this. The runtime serves the list only; detail is composed client-side from this list plus the traces filtered by session, so a caller looking for one is looking for something that was never served rather than something that broke.
pub async fn get_o11y_sessions(configuration: &configuration::Configuration, ) -> Result<(), Error<GetO11ySessionsError>> {
let uri_str = format!("{}/v1/o11y/sessions", configuration.base_path);
let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
if !status.is_client_error() && !status.is_server_error() {
Ok(())
} else {
let content = resp.text().await?;
let entity: Option<GetO11ySessionsError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Returns apdex settings for the named services. Callers need the viewer role; the runtime's own gate enforces it.
pub async fn get_o11y_settings_apdex(configuration: &configuration::Configuration, services: Option<&str>) -> Result<models::O11yPeriodO11yApdexOut, Error<GetO11ySettingsApdexError>> {
// add a prefix to parameters to efficiently prevent name collisions
let p_services = services;
let uri_str = format!("{}/v1/o11y/settings/apdex", configuration.base_path);
let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
if let Some(ref param_value) = p_services {
req_builder = req_builder.query(&[("services", ¶m_value.to_string())]);
}
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
let content_type = resp
.headers()
.get("content-type")
.and_then(|v| v.to_str().ok())
.unwrap_or("application/octet-stream");
let content_type = super::ContentType::from(content_type);
if !status.is_client_error() && !status.is_server_error() {
let content = resp.text().await?;
match content_type {
ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yApdexOut`"))),
ContentType::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`")))),
}
} else {
let content = resp.text().await?;
let entity: Option<GetO11ySettingsApdexError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Returns the org's current retention policy: default TTL, custom per-label rules, and cold-storage settings where configured. Callers need the viewer role; the runtime's own gate enforces it.
pub async fn get_o11y_settings_ttl(configuration: &configuration::Configuration, ) -> Result<models::O11yPeriodO11yRetentionOut, Error<GetO11ySettingsTtlError>> {
let uri_str = format!("{}/v1/o11y/settings/ttl", configuration.base_path);
let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
let content_type = resp
.headers()
.get("content-type")
.and_then(|v| v.to_str().ok())
.unwrap_or("application/octet-stream");
let content_type = super::ContentType::from(content_type);
if !status.is_client_error() && !status.is_server_error() {
let content = resp.text().await?;
match content_type {
ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yRetentionOut`"))),
ContentType::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`")))),
}
} else {
let content = resp.text().await?;
let entity: Option<GetO11ySettingsTtlError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Lists the metric attribute keys Kubernetes statefulsets report, for building statefulset filters.
pub 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>> {
// add a prefix to parameters to efficiently prevent name collisions
let p_data_source = data_source;
let p_aggregate_operator = aggregate_operator;
let p_aggregate_attribute = aggregate_attribute;
let p_search_text = search_text;
let p_tag_type = tag_type;
let p_limit = limit;
let uri_str = format!("{}/v1/o11y/statefulsets/attribute_keys", configuration.base_path);
let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
if let Some(ref param_value) = p_data_source {
req_builder = req_builder.query(&[("dataSource", ¶m_value.to_string())]);
}
if let Some(ref param_value) = p_aggregate_operator {
req_builder = req_builder.query(&[("aggregateOperator", ¶m_value.to_string())]);
}
if let Some(ref param_value) = p_aggregate_attribute {
req_builder = req_builder.query(&[("aggregateAttribute", ¶m_value.to_string())]);
}
if let Some(ref param_value) = p_search_text {
req_builder = req_builder.query(&[("searchText", ¶m_value.to_string())]);
}
if let Some(ref param_value) = p_tag_type {
req_builder = req_builder.query(&[("tagType", ¶m_value.to_string())]);
}
if let Some(ref param_value) = p_limit {
req_builder = req_builder.query(&[("limit", ¶m_value.to_string())]);
}
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
let content_type = resp
.headers()
.get("content-type")
.and_then(|v| v.to_str().ok())
.unwrap_or("application/octet-stream");
let content_type = super::ContentType::from(content_type);
if !status.is_client_error() && !status.is_server_error() {
let content = resp.text().await?;
match content_type {
ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yInfraAttributeKeysOut`"))),
ContentType::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`")))),
}
} else {
let content = resp.text().await?;
let entity: Option<GetO11yStatefulsetsAttributeKeysError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Lists the values one statefulset attribute key has taken, for building statefulset filters.
pub 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>> {
// add a prefix to parameters to efficiently prevent name collisions
let p_data_source = data_source;
let p_aggregate_operator = aggregate_operator;
let p_aggregate_attribute = aggregate_attribute;
let p_attribute_key = attribute_key;
let p_filter_attribute_key_data_type = filter_attribute_key_data_type;
let p_search_text = search_text;
let p_tag_type = tag_type;
let p_limit = limit;
let uri_str = format!("{}/v1/o11y/statefulsets/attribute_values", configuration.base_path);
let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
if let Some(ref param_value) = p_data_source {
req_builder = req_builder.query(&[("dataSource", ¶m_value.to_string())]);
}
if let Some(ref param_value) = p_aggregate_operator {
req_builder = req_builder.query(&[("aggregateOperator", ¶m_value.to_string())]);
}
if let Some(ref param_value) = p_aggregate_attribute {
req_builder = req_builder.query(&[("aggregateAttribute", ¶m_value.to_string())]);
}
if let Some(ref param_value) = p_attribute_key {
req_builder = req_builder.query(&[("attributeKey", ¶m_value.to_string())]);
}
if let Some(ref param_value) = p_filter_attribute_key_data_type {
req_builder = req_builder.query(&[("filterAttributeKeyDataType", ¶m_value.to_string())]);
}
if let Some(ref param_value) = p_search_text {
req_builder = req_builder.query(&[("searchText", ¶m_value.to_string())]);
}
if let Some(ref param_value) = p_tag_type {
req_builder = req_builder.query(&[("tagType", ¶m_value.to_string())]);
}
if let Some(ref param_value) = p_limit {
req_builder = req_builder.query(&[("limit", ¶m_value.to_string())]);
}
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
let content_type = resp
.headers()
.get("content-type")
.and_then(|v| v.to_str().ok())
.unwrap_or("application/octet-stream");
let content_type = super::ContentType::from(content_type);
if !status.is_client_error() && !status.is_server_error() {
let content = resp.text().await?;
match content_type {
ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yInfraAttributeValuesOut`"))),
ContentType::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`")))),
}
} else {
let content = resp.text().await?;
let entity: Option<GetO11yStatefulsetsAttributeValuesError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Returns the collected usage statistics for the caller's org, as the stats reporter aggregates them — a map whose keys are the reporter's own counter names. Callers need the viewer role; the runtime's own gate enforces it.
pub async fn get_o11y_stats(configuration: &configuration::Configuration, ) -> Result<models::O11yPeriodO11yOrgStatsOut, Error<GetO11yStatsError>> {
let uri_str = format!("{}/v1/o11y/stats", configuration.base_path);
let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
let content_type = resp
.headers()
.get("content-type")
.and_then(|v| v.to_str().ok())
.unwrap_or("application/octet-stream");
let content_type = super::ContentType::from(content_type);
if !status.is_client_error() && !status.is_server_error() {
let content = resp.text().await?;
match content_type {
ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yOrgStatsOut`"))),
ContentType::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`")))),
}
} else {
let content = resp.text().await?;
let entity: Option<GetO11yStatsError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Reports whether a product's service is live: an in-cluster health probe with its measured latency, fused with the per-replica up inventory. Infra health is not tenant-partitioned — a service is up or down for everyone — so any validated caller is served, but an unvalidated one is refused. A product with no backing workload answers down/unknown-service without probing anything; a malformed slug is a 400.
pub async fn get_o11y_status(configuration: &configuration::Configuration, product: Option<&str>) -> Result<models::O11yPeriodStatusResult, Error<GetO11yStatusError>> {
// add a prefix to parameters to efficiently prevent name collisions
let p_product = product;
let uri_str = format!("{}/v1/o11y/status", configuration.base_path);
let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
if let Some(ref param_value) = p_product {
req_builder = req_builder.query(&[("product", ¶m_value.to_string())]);
}
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
let content_type = resp
.headers()
.get("content-type")
.and_then(|v| v.to_str().ok())
.unwrap_or("application/octet-stream");
let content_type = super::ContentType::from(content_type);
if !status.is_client_error() && !status.is_server_error() {
let content = resp.text().await?;
match content_type {
ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodStatusResult`"))),
ContentType::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`")))),
}
} else {
let content = resp.text().await?;
let entity: Option<GetO11yStatusError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Reports whether the platform is up. It returns the public status document: the incidents currently open against Hanzo's own services, derived from the fleet health probes, plus the address of the human status page. No authentication is required and no tenant data is involved — the answer is the same for every caller. A service that fails its health probe becomes one incident naming that service. When the availability source itself cannot be read the endpoint answers 503 rather than an empty incident list, because \"we cannot tell\" and \"everything is fine\" are different answers and only one of them is true.
pub async fn get_o11y_summary(configuration: &configuration::Configuration, ) -> Result<models::O11yPeriodStatusSummary, Error<GetO11ySummaryError>> {
let uri_str = format!("{}/v1/o11y/summary", configuration.base_path);
let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
let content_type = resp
.headers()
.get("content-type")
.and_then(|v| v.to_str().ok())
.unwrap_or("application/octet-stream");
let content_type = super::ContentType::from(content_type);
if !status.is_client_error() && !status.is_server_error() {
let content = resp.text().await?;
match content_type {
ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodStatusSummary`"))),
ContentType::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`")))),
}
} else {
let content = resp.text().await?;
let entity: Option<GetO11ySummaryError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Lists the caller org's recent traces — one row per trace with its span count and wall-clock duration, most recently active first. This is the trace SEARCH: it is where a trace id comes from, and the spans behind any row are then read from GET /v1/o11y/traces/{traceId}. Every row belongs to the caller's own org — the tenant is the validated principal, never an input, and there is no administrator widening, because a trace list is a tenant's records rather than a rollup over them. An unreachable telemetry store answers 503 rather than an empty page, because \"no traces\" and \"cannot see the traces\" are different facts and only one of them is about the caller's system.
pub async fn get_o11y_traces(configuration: &configuration::Configuration, range: Option<i32>, limit: Option<i32>, min_duration_ms: Option<i32>) -> Result<models::O11yPeriodTracesOut, Error<GetO11yTracesError>> {
// add a prefix to parameters to efficiently prevent name collisions
let p_range = range;
let p_limit = limit;
let p_min_duration_ms = min_duration_ms;
let uri_str = format!("{}/v1/o11y/traces", configuration.base_path);
let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
if let Some(ref param_value) = p_range {
req_builder = req_builder.query(&[("range", ¶m_value.to_string())]);
}
if let Some(ref param_value) = p_limit {
req_builder = req_builder.query(&[("limit", ¶m_value.to_string())]);
}
if let Some(ref param_value) = p_min_duration_ms {
req_builder = req_builder.query(&[("minDurationMs", ¶m_value.to_string())]);
}
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
let content_type = resp
.headers()
.get("content-type")
.and_then(|v| v.to_str().ok())
.unwrap_or("application/octet-stream");
let content_type = super::ContentType::from(content_type);
if !status.is_client_error() && !status.is_server_error() {
let content = resp.text().await?;
match content_type {
ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodTracesOut`"))),
ContentType::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`")))),
}
} else {
let content = resp.text().await?;
let entity: Option<GetO11yTracesError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Returns ingestion usage counts bucketed over the requested window, optionally narrowed to one service. Callers need the viewer role; the runtime's own gate enforces it.
pub async fn get_o11y_usage(configuration: &configuration::Configuration, start: &str, end: &str, step: Option<i32>, service: Option<&str>) -> Result<Vec<models::O11yPeriodO11yUsageItem>, Error<GetO11yUsageError>> {
// add a prefix to parameters to efficiently prevent name collisions
let p_start = start;
let p_end = end;
let p_step = step;
let p_service = service;
let uri_str = format!("{}/v1/o11y/usage", configuration.base_path);
let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
req_builder = req_builder.query(&[("start", &p_start.to_string())]);
req_builder = req_builder.query(&[("end", &p_end.to_string())]);
if let Some(ref param_value) = p_step {
req_builder = req_builder.query(&[("step", ¶m_value.to_string())]);
}
if let Some(ref param_value) = p_service {
req_builder = req_builder.query(&[("service", ¶m_value.to_string())]);
}
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
let content_type = resp
.headers()
.get("content-type")
.and_then(|v| v.to_str().ok())
.unwrap_or("application/octet-stream");
let content_type = super::ContentType::from(content_type);
if !status.is_client_error() && !status.is_server_error() {
let content = resp.text().await?;
match content_type {
ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::O11yPeriodO11yUsageItem>`"))),
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>`")))),
}
} else {
let content = resp.text().await?;
let entity: Option<GetO11yUsageError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Reports the running build: its version, whether an enterprise edition is present (\"N\" in this build), and whether first-user setup has completed. Open by design; the runtime's own gate is OpenAccess.
pub async fn get_o11y_version(configuration: &configuration::Configuration, ) -> Result<models::O11yPeriodO11yVersionOut, Error<GetO11yVersionError>> {
let uri_str = format!("{}/v1/o11y/version", configuration.base_path);
let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
let content_type = resp
.headers()
.get("content-type")
.and_then(|v| v.to_str().ok())
.unwrap_or("application/octet-stream");
let content_type = super::ContentType::from(content_type);
if !status.is_client_error() && !status.is_server_error() {
let content = resp.text().await?;
match content_type {
ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yVersionOut`"))),
ContentType::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`")))),
}
} else {
let content = resp.text().await?;
let entity: Option<GetO11yVersionError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Returns one org-scoped preference, by name. Admin gate.
pub async fn get_org_preference(configuration: &configuration::Configuration, name: &str) -> Result<models::O11yPeriodO11yPreferenceOut, Error<GetOrgPreferenceError>> {
// add a prefix to parameters to efficiently prevent name collisions
let p_name = name;
let uri_str = format!("{}/v1/o11y/org/preferences/{name}", configuration.base_path, name=crate::apis::urlencode(p_name));
let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
let content_type = resp
.headers()
.get("content-type")
.and_then(|v| v.to_str().ok())
.unwrap_or("application/octet-stream");
let content_type = super::ContentType::from(content_type);
if !status.is_client_error() && !status.is_server_error() {
let content = resp.text().await?;
match content_type {
ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yPreferenceOut`"))),
ContentType::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`")))),
}
} else {
let content = resp.text().await?;
let entity: Option<GetOrgPreferenceError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Returns the overall firing/inactive windows for a rule, for the posted query range. Viewer gate.
pub 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>> {
// add a prefix to parameters to efficiently prevent name collisions
let p_id = id;
let p_o11y_period_o11y_rule_history_query_in = o11y_period_o11y_rule_history_query_in;
let uri_str = format!("{}/v1/o11y/rules/{id}/history/overall_status", configuration.base_path, id=crate::apis::urlencode(p_id));
let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
req_builder = req_builder.json(&p_o11y_period_o11y_rule_history_query_in);
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
let content_type = resp
.headers()
.get("content-type")
.and_then(|v| v.to_str().ok())
.unwrap_or("application/octet-stream");
let content_type = super::ContentType::from(content_type);
if !status.is_client_error() && !status.is_server_error() {
let content = resp.text().await?;
match content_type {
ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yOverallStateTransitionsOut`"))),
ContentType::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`")))),
}
} else {
let content = resp.text().await?;
let entity: Option<GetOverallStateTransitionsError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Returns the public-sharing config for a dashboard. Callers need the admin role; the runtime's own gate enforces it.
pub async fn get_public_dashboard(configuration: &configuration::Configuration, id: &str) -> Result<models::O11yPeriodO11yPublicDashboardOut, Error<GetPublicDashboardError>> {
// add a prefix to parameters to efficiently prevent name collisions
let p_id = id;
let uri_str = format!("{}/v1/o11y/dashboards/{id}/public", configuration.base_path, id=crate::apis::urlencode(p_id));
let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
let content_type = resp
.headers()
.get("content-type")
.and_then(|v| v.to_str().ok())
.unwrap_or("application/octet-stream");
let content_type = super::ContentType::from(content_type);
if !status.is_client_error() && !status.is_server_error() {
let content = resp.text().await?;
match content_type {
ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yPublicDashboardOut`"))),
ContentType::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`")))),
}
} else {
let content = resp.text().await?;
let entity: Option<GetPublicDashboardError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Returns the sanitized dashboard data for public access — the read a shared dashboard's public page makes. Anonymous, scoped to the public dashboard's read scope; the runtime's own gate enforces it.
pub async fn get_public_dashboard_data(configuration: &configuration::Configuration, id: &str) -> Result<models::O11yPeriodO11yPublicDashboardDataOut, Error<GetPublicDashboardDataError>> {
// add a prefix to parameters to efficiently prevent name collisions
let p_id = id;
let uri_str = format!("{}/v1/o11y/public/dashboards/{id}", configuration.base_path, id=crate::apis::urlencode(p_id));
let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
let content_type = resp
.headers()
.get("content-type")
.and_then(|v| v.to_str().ok())
.unwrap_or("application/octet-stream");
let content_type = super::ContentType::from(content_type);
if !status.is_client_error() && !status.is_server_error() {
let content = resp.text().await?;
match content_type {
ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yPublicDashboardDataOut`"))),
ContentType::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`")))),
}
} else {
let content = resp.text().await?;
let entity: Option<GetPublicDashboardDataError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Returns the query-range result for one widget of a public dashboard. When the share fixes its own time range the caller's startTime/endTime are ignored; otherwise they bound the window as millisecond epochs. Anonymous, scoped to the public dashboard's read scope; the runtime's own gate enforces it.
pub 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>> {
// add a prefix to parameters to efficiently prevent name collisions
let p_id = id;
let p_idx = idx;
let p_start_time = start_time;
let p_end_time = end_time;
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));
let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
if let Some(ref param_value) = p_start_time {
req_builder = req_builder.query(&[("startTime", ¶m_value.to_string())]);
}
if let Some(ref param_value) = p_end_time {
req_builder = req_builder.query(&[("endTime", ¶m_value.to_string())]);
}
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
let content_type = resp
.headers()
.get("content-type")
.and_then(|v| v.to_str().ok())
.unwrap_or("application/octet-stream");
let content_type = super::ContentType::from(content_type);
if !status.is_client_error() && !status.is_server_error() {
let content = resp.text().await?;
match content_type {
ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yWidgetQueryRangeOut`"))),
ContentType::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`")))),
}
} else {
let content = resp.text().await?;
let entity: Option<GetPublicDashboardWidgetQueryRangeError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Returns the org's quick filters for every signal — the attribute shortlists its explorers offer as one-click filters. Viewer gate.
pub async fn get_quick_filters(configuration: &configuration::Configuration, ) -> Result<models::O11yPeriodO11yQuickFiltersOut, Error<GetQuickFiltersError>> {
let uri_str = format!("{}/v1/o11y/orgs/me/filters", configuration.base_path);
let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
let content_type = resp
.headers()
.get("content-type")
.and_then(|v| v.to_str().ok())
.unwrap_or("application/octet-stream");
let content_type = super::ContentType::from(content_type);
if !status.is_client_error() && !status.is_server_error() {
let content = resp.text().await?;
match content_type {
ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yQuickFiltersOut`"))),
ContentType::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`")))),
}
} else {
let content = resp.text().await?;
let entity: Option<GetQuickFiltersError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Returns the reset-password token a user already has; absent one, the answer is a not-found rather than a fresh token. Admin gate.
pub async fn get_reset_password_token(configuration: &configuration::Configuration, id: &str) -> Result<models::O11yPeriodO11yResetTokenOut, Error<GetResetPasswordTokenError>> {
// add a prefix to parameters to efficiently prevent name collisions
let p_id = id;
let uri_str = format!("{}/v1/o11y/users/{id}/reset_password_tokens", configuration.base_path, id=crate::apis::urlencode(p_id));
let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
let content_type = resp
.headers()
.get("content-type")
.and_then(|v| v.to_str().ok())
.unwrap_or("application/octet-stream");
let content_type = super::ContentType::from(content_type);
if !status.is_client_error() && !status.is_server_error() {
let content = resp.text().await?;
match content_type {
ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yResetTokenOut`"))),
ContentType::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`")))),
}
} else {
let content = resp.text().await?;
let entity: Option<GetResetPasswordTokenError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Returns a user's password-reset token, creating one if none is live. Deprecated in favor of the reset_password_tokens pair, which separates reading from minting. Admin gate.
pub async fn get_reset_password_token_deprecated(configuration: &configuration::Configuration, id: &str) -> Result<models::O11yPeriodO11yResetTokenOut, Error<GetResetPasswordTokenDeprecatedError>> {
// add a prefix to parameters to efficiently prevent name collisions
let p_id = id;
let uri_str = format!("{}/v1/o11y/getResetPasswordToken/{id}", configuration.base_path, id=crate::apis::urlencode(p_id));
let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
let content_type = resp
.headers()
.get("content-type")
.and_then(|v| v.to_str().ok())
.unwrap_or("application/octet-stream");
let content_type = super::ContentType::from(content_type);
if !status.is_client_error() && !status.is_server_error() {
let content = resp.text().await?;
match content_type {
ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yResetTokenOut`"))),
ContentType::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`")))),
}
} else {
let content = resp.text().await?;
let entity: Option<GetResetPasswordTokenDeprecatedError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Returns one role with the transaction groups it grants.
pub async fn get_role(configuration: &configuration::Configuration, id: &str) -> Result<models::O11yPeriodO11yRoleOut, Error<GetRoleError>> {
// add a prefix to parameters to efficiently prevent name collisions
let p_id = id;
let uri_str = format!("{}/v1/o11y/roles/{id}", configuration.base_path, id=crate::apis::urlencode(p_id));
let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
let content_type = resp
.headers()
.get("content-type")
.and_then(|v| v.to_str().ok())
.unwrap_or("application/octet-stream");
let content_type = super::ContentType::from(content_type);
if !status.is_client_error() && !status.is_server_error() {
let content = resp.text().await?;
match content_type {
ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yRoleOut`"))),
ContentType::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`")))),
}
} else {
let content = resp.text().await?;
let entity: Option<GetRoleError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Returns every role one org member holds, by user id. Admin gate.
pub async fn get_roles_by_user_id(configuration: &configuration::Configuration, id: &str) -> Result<models::O11yPeriodO11yRolesOut, Error<GetRolesByUserIdError>> {
// add a prefix to parameters to efficiently prevent name collisions
let p_id = id;
let uri_str = format!("{}/v1/o11y/users/{id}/roles", configuration.base_path, id=crate::apis::urlencode(p_id));
let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
let content_type = resp
.headers()
.get("content-type")
.and_then(|v| v.to_str().ok())
.unwrap_or("application/octet-stream");
let content_type = super::ContentType::from(content_type);
if !status.is_client_error() && !status.is_server_error() {
let content = resp.text().await?;
match content_type {
ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yRolesOut`"))),
ContentType::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`")))),
}
} else {
let content = resp.text().await?;
let entity: Option<GetRolesByUserIdError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Returns one route policy, by id. Viewer gate.
pub async fn get_route_policy_by_id(configuration: &configuration::Configuration, id: &str) -> Result<models::O11yPeriodO11yRoutePolicyOut, Error<GetRoutePolicyByIdError>> {
// add a prefix to parameters to efficiently prevent name collisions
let p_id = id;
let uri_str = format!("{}/v1/o11y/route_policies/{id}", configuration.base_path, id=crate::apis::urlencode(p_id));
let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
let content_type = resp
.headers()
.get("content-type")
.and_then(|v| v.to_str().ok())
.unwrap_or("application/octet-stream");
let content_type = super::ContentType::from(content_type);
if !status.is_client_error() && !status.is_server_error() {
let content = resp.text().await?;
match content_type {
ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yRoutePolicyOut`"))),
ContentType::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`")))),
}
} else {
let content = resp.text().await?;
let entity: Option<GetRoutePolicyByIdError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Returns one alert rule with its evaluation state, by id. Viewer gate.
pub async fn get_rule_by_id(configuration: &configuration::Configuration, id: &str) -> Result<models::O11yPeriodO11yRuleOut, Error<GetRuleByIdError>> {
// add a prefix to parameters to efficiently prevent name collisions
let p_id = id;
let uri_str = format!("{}/v1/o11y/rules/{id}", configuration.base_path, id=crate::apis::urlencode(p_id));
let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
let content_type = resp
.headers()
.get("content-type")
.and_then(|v| v.to_str().ok())
.unwrap_or("application/octet-stream");
let content_type = super::ContentType::from(content_type);
if !status.is_client_error() && !status.is_server_error() {
let content = resp.text().await?;
match content_type {
ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yRuleOut`"))),
ContentType::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`")))),
}
} else {
let content = resp.text().await?;
let entity: Option<GetRuleByIdError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Returns the distinct label keys present in a rule's history entries over the selected range, for building history filters. Viewer gate.
pub 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>> {
// add a prefix to parameters to efficiently prevent name collisions
let p_id = id;
let p_start_unix_milli = start_unix_milli;
let p_end_unix_milli = end_unix_milli;
let p_search_text = search_text;
let p_limit = limit;
let uri_str = format!("{}/v1/o11y/rules/{id}/history/filter_keys", configuration.base_path, id=crate::apis::urlencode(p_id));
let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
if let Some(ref param_value) = p_start_unix_milli {
req_builder = req_builder.query(&[("startUnixMilli", ¶m_value.to_string())]);
}
if let Some(ref param_value) = p_end_unix_milli {
req_builder = req_builder.query(&[("endUnixMilli", ¶m_value.to_string())]);
}
if let Some(ref param_value) = p_search_text {
req_builder = req_builder.query(&[("searchText", ¶m_value.to_string())]);
}
if let Some(ref param_value) = p_limit {
req_builder = req_builder.query(&[("limit", ¶m_value.to_string())]);
}
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
let content_type = resp
.headers()
.get("content-type")
.and_then(|v| v.to_str().ok())
.unwrap_or("application/octet-stream");
let content_type = super::ContentType::from(content_type);
if !status.is_client_error() && !status.is_server_error() {
let content = resp.text().await?;
match content_type {
ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yRuleHistoryFilterKeysOut`"))),
ContentType::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`")))),
}
} else {
let content = resp.text().await?;
let entity: Option<GetRuleHistoryFilterKeysError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Returns the distinct values a given label key has taken across a rule's history entries. Viewer gate.
pub 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>> {
// add a prefix to parameters to efficiently prevent name collisions
let p_id = id;
let p_name = name;
let p_start_unix_milli = start_unix_milli;
let p_end_unix_milli = end_unix_milli;
let p_search_text = search_text;
let p_limit = limit;
let p_existing_query = existing_query;
let uri_str = format!("{}/v1/o11y/rules/{id}/history/filter_values", configuration.base_path, id=crate::apis::urlencode(p_id));
let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
if let Some(ref param_value) = p_start_unix_milli {
req_builder = req_builder.query(&[("startUnixMilli", ¶m_value.to_string())]);
}
if let Some(ref param_value) = p_end_unix_milli {
req_builder = req_builder.query(&[("endUnixMilli", ¶m_value.to_string())]);
}
if let Some(ref param_value) = p_search_text {
req_builder = req_builder.query(&[("searchText", ¶m_value.to_string())]);
}
if let Some(ref param_value) = p_limit {
req_builder = req_builder.query(&[("limit", ¶m_value.to_string())]);
}
req_builder = req_builder.query(&[("name", &p_name.to_string())]);
if let Some(ref param_value) = p_existing_query {
req_builder = req_builder.query(&[("existingQuery", ¶m_value.to_string())]);
}
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
let content_type = resp
.headers()
.get("content-type")
.and_then(|v| v.to_str().ok())
.unwrap_or("application/octet-stream");
let content_type = super::ContentType::from(content_type);
if !status.is_client_error() && !status.is_server_error() {
let content = resp.text().await?;
match content_type {
ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yRuleHistoryFilterValuesOut`"))),
ContentType::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`")))),
}
} else {
let content = resp.text().await?;
let entity: Option<GetRuleHistoryFilterValuesError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Returns the overall firing/inactive intervals for a rule over the selected range. Viewer gate.
pub async fn get_rule_history_overall_status(configuration: &configuration::Configuration, id: &str, start: Option<i32>, end: Option<i32>) -> Result<models::O11yPeriodO11yRuleHistoryOverallStatusOut, Error<GetRuleHistoryOverallStatusError>> {
// add a prefix to parameters to efficiently prevent name collisions
let p_id = id;
let p_start = start;
let p_end = end;
let uri_str = format!("{}/v1/o11y/rules/{id}/history/overall_status", configuration.base_path, id=crate::apis::urlencode(p_id));
let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
if let Some(ref param_value) = p_start {
req_builder = req_builder.query(&[("start", ¶m_value.to_string())]);
}
if let Some(ref param_value) = p_end {
req_builder = req_builder.query(&[("end", ¶m_value.to_string())]);
}
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
let content_type = resp
.headers()
.get("content-type")
.and_then(|v| v.to_str().ok())
.unwrap_or("application/octet-stream");
let content_type = super::ContentType::from(content_type);
if !status.is_client_error() && !status.is_server_error() {
let content = resp.text().await?;
match content_type {
ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yRuleHistoryOverallStatusOut`"))),
ContentType::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`")))),
}
} else {
let content = resp.text().await?;
let entity: Option<GetRuleHistoryOverallStatusError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Returns trigger and resolution statistics for a rule over the selected time range, current window against the prior one. Viewer gate.
pub async fn get_rule_history_stats(configuration: &configuration::Configuration, id: &str, start: Option<i32>, end: Option<i32>) -> Result<models::O11yPeriodO11yRuleHistoryStatsOut, Error<GetRuleHistoryStatsError>> {
// add a prefix to parameters to efficiently prevent name collisions
let p_id = id;
let p_start = start;
let p_end = end;
let uri_str = format!("{}/v1/o11y/rules/{id}/history/stats", configuration.base_path, id=crate::apis::urlencode(p_id));
let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
if let Some(ref param_value) = p_start {
req_builder = req_builder.query(&[("start", ¶m_value.to_string())]);
}
if let Some(ref param_value) = p_end {
req_builder = req_builder.query(&[("end", ¶m_value.to_string())]);
}
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
let content_type = resp
.headers()
.get("content-type")
.and_then(|v| v.to_str().ok())
.unwrap_or("application/octet-stream");
let content_type = super::ContentType::from(content_type);
if !status.is_client_error() && !status.is_server_error() {
let content = resp.text().await?;
match content_type {
ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yRuleHistoryStatsOut`"))),
ContentType::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`")))),
}
} else {
let content = resp.text().await?;
let entity: Option<GetRuleHistoryStatsError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Returns paginated timeline entries for a rule's state transitions, filterable by state and a label expression, cursor-paginated. Viewer gate.
pub 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>> {
// add a prefix to parameters to efficiently prevent name collisions
let p_id = id;
let p_start = start;
let p_end = end;
let p_state = state;
let p_filter_expression = filter_expression;
let p_limit = limit;
let p_order = order;
let p_cursor = cursor;
let uri_str = format!("{}/v1/o11y/rules/{id}/history/timeline", configuration.base_path, id=crate::apis::urlencode(p_id));
let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
if let Some(ref param_value) = p_start {
req_builder = req_builder.query(&[("start", ¶m_value.to_string())]);
}
if let Some(ref param_value) = p_end {
req_builder = req_builder.query(&[("end", ¶m_value.to_string())]);
}
if let Some(ref param_value) = p_state {
req_builder = req_builder.query(&[("state", ¶m_value.to_string())]);
}
if let Some(ref param_value) = p_filter_expression {
req_builder = req_builder.query(&[("filterExpression", ¶m_value.to_string())]);
}
if let Some(ref param_value) = p_limit {
req_builder = req_builder.query(&[("limit", ¶m_value.to_string())]);
}
if let Some(ref param_value) = p_order {
req_builder = req_builder.query(&[("order", ¶m_value.to_string())]);
}
if let Some(ref param_value) = p_cursor {
req_builder = req_builder.query(&[("cursor", ¶m_value.to_string())]);
}
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
let content_type = resp
.headers()
.get("content-type")
.and_then(|v| v.to_str().ok())
.unwrap_or("application/octet-stream");
let content_type = super::ContentType::from(content_type);
if !status.is_client_error() && !status.is_server_error() {
let content = resp.text().await?;
match content_type {
ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yRuleHistoryTimelineOut`"))),
ContentType::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`")))),
}
} else {
let content = resp.text().await?;
let entity: Option<GetRuleHistoryTimelineError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Returns the label combinations that contributed most to a rule firing over the selected range. Viewer gate.
pub async fn get_rule_history_top_contributors(configuration: &configuration::Configuration, id: &str, start: Option<i32>, end: Option<i32>) -> Result<models::O11yPeriodO11yRuleHistoryContributorsOut, Error<GetRuleHistoryTopContributorsError>> {
// add a prefix to parameters to efficiently prevent name collisions
let p_id = id;
let p_start = start;
let p_end = end;
let uri_str = format!("{}/v1/o11y/rules/{id}/history/top_contributors", configuration.base_path, id=crate::apis::urlencode(p_id));
let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
if let Some(ref param_value) = p_start {
req_builder = req_builder.query(&[("start", ¶m_value.to_string())]);
}
if let Some(ref param_value) = p_end {
req_builder = req_builder.query(&[("end", ¶m_value.to_string())]);
}
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
let content_type = resp
.headers()
.get("content-type")
.and_then(|v| v.to_str().ok())
.unwrap_or("application/octet-stream");
let content_type = super::ContentType::from(content_type);
if !status.is_client_error() && !status.is_server_error() {
let content = resp.text().await?;
match content_type {
ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yRuleHistoryContributorsOut`"))),
ContentType::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`")))),
}
} else {
let content = resp.text().await?;
let entity: Option<GetRuleHistoryTopContributorsError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Returns a rule's state-transition timeline for the posted query range, each entry carrying its related-logs or related-traces link. Viewer gate.
pub 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>> {
// add a prefix to parameters to efficiently prevent name collisions
let p_id = id;
let p_o11y_period_o11y_rule_history_query_in = o11y_period_o11y_rule_history_query_in;
let uri_str = format!("{}/v1/o11y/rules/{id}/history/timeline", configuration.base_path, id=crate::apis::urlencode(p_id));
let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
req_builder = req_builder.json(&p_o11y_period_o11y_rule_history_query_in);
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
let content_type = resp
.headers()
.get("content-type")
.and_then(|v| v.to_str().ok())
.unwrap_or("application/octet-stream");
let content_type = super::ContentType::from(content_type);
if !status.is_client_error() && !status.is_server_error() {
let content = resp.text().await?;
match content_type {
ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yRuleStateTimelineOut`"))),
ContentType::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`")))),
}
} else {
let content = resp.text().await?;
let entity: Option<GetRuleStateHistoryError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Returns the label combinations that contributed most to a rule firing, for the posted query range. Viewer gate.
pub 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>> {
// add a prefix to parameters to efficiently prevent name collisions
let p_id = id;
let p_o11y_period_o11y_rule_history_query_in = o11y_period_o11y_rule_history_query_in;
let uri_str = format!("{}/v1/o11y/rules/{id}/history/top_contributors", configuration.base_path, id=crate::apis::urlencode(p_id));
let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
req_builder = req_builder.json(&p_o11y_period_o11y_rule_history_query_in);
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
let content_type = resp
.headers()
.get("content-type")
.and_then(|v| v.to_str().ok())
.unwrap_or("application/octet-stream");
let content_type = super::ContentType::from(content_type);
if !status.is_client_error() && !status.is_server_error() {
let content = resp.text().await?;
match content_type {
ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yRuleStateContributorsOut`"))),
ContentType::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`")))),
}
} else {
let content = resp.text().await?;
let entity: Option<GetRuleStateHistoryTopContributorsError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Returns trigger and resolution statistics for a rule, current window against the prior one, for the posted query range. Viewer gate.
pub async fn get_rule_stats(configuration: &configuration::Configuration, id: &str, o11y_period_o11y_rule_history_query_in: models::O11yPeriodO11yRuleHistoryQueryIn) -> Result<models::O11yPeriodO11yRuleStatsOut, Error<GetRuleStatsError>> {
// add a prefix to parameters to efficiently prevent name collisions
let p_id = id;
let p_o11y_period_o11y_rule_history_query_in = o11y_period_o11y_rule_history_query_in;
let uri_str = format!("{}/v1/o11y/rules/{id}/history/stats", configuration.base_path, id=crate::apis::urlencode(p_id));
let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
req_builder = req_builder.json(&p_o11y_period_o11y_rule_history_query_in);
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
let content_type = resp
.headers()
.get("content-type")
.and_then(|v| v.to_str().ok())
.unwrap_or("application/octet-stream");
let content_type = super::ContentType::from(content_type);
if !status.is_client_error() && !status.is_server_error() {
let content = resp.text().await?;
match content_type {
ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yRuleStatsOut`"))),
ContentType::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`")))),
}
} else {
let content = resp.text().await?;
let entity: Option<GetRuleStatsError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Returns one service the given provider can collect from, by service id, optionally scoped to one cloud integration. Admin gate.
pub async fn get_service(configuration: &configuration::Configuration, cloud_provider: &str, service_id: &str, cloud_integration_id: Option<&str>) -> Result<models::O11yPeriodO11yServiceOut, Error<GetServiceError>> {
// add a prefix to parameters to efficiently prevent name collisions
let p_cloud_provider = cloud_provider;
let p_service_id = service_id;
let p_cloud_integration_id = cloud_integration_id;
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));
let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
if let Some(ref param_value) = p_cloud_integration_id {
req_builder = req_builder.query(&[("cloud_integration_id", ¶m_value.to_string())]);
}
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
let content_type = resp
.headers()
.get("content-type")
.and_then(|v| v.to_str().ok())
.unwrap_or("application/octet-stream");
let content_type = super::ContentType::from(content_type);
if !status.is_client_error() && !status.is_server_error() {
let content = resp.text().await?;
match content_type {
ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yServiceOut`"))),
ContentType::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`")))),
}
} else {
let content = resp.text().await?;
let entity: Option<GetServiceError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Returns one service account with the roles it holds.
pub async fn get_service_account(configuration: &configuration::Configuration, id: &str) -> Result<models::O11yPeriodO11yServiceAccountOut, Error<GetServiceAccountError>> {
// add a prefix to parameters to efficiently prevent name collisions
let p_id = id;
let uri_str = format!("{}/v1/o11y/service_accounts/{id}", configuration.base_path, id=crate::apis::urlencode(p_id));
let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
let content_type = resp
.headers()
.get("content-type")
.and_then(|v| v.to_str().ok())
.unwrap_or("application/octet-stream");
let content_type = super::ContentType::from(content_type);
if !status.is_client_error() && !status.is_server_error() {
let content = resp.text().await?;
match content_type {
ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yServiceAccountOut`"))),
ContentType::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`")))),
}
} else {
let content = resp.text().await?;
let entity: Option<GetServiceAccountError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Lists the roles a service account holds.
pub async fn get_service_account_roles(configuration: &configuration::Configuration, id: &str) -> Result<models::O11yPeriodO11yServiceAccountRolesOut, Error<GetServiceAccountRolesError>> {
// add a prefix to parameters to efficiently prevent name collisions
let p_id = id;
let uri_str = format!("{}/v1/o11y/service_accounts/{id}/roles", configuration.base_path, id=crate::apis::urlencode(p_id));
let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
let content_type = resp
.headers()
.get("content-type")
.and_then(|v| v.to_str().ok())
.unwrap_or("application/octet-stream");
let content_type = super::ContentType::from(content_type);
if !status.is_client_error() && !status.is_server_error() {
let content = resp.text().await?;
match content_type {
ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yServiceAccountRolesOut`"))),
ContentType::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`")))),
}
} else {
let content = resp.text().await?;
let entity: Option<GetServiceAccountRolesError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Tells a sign-in page what an email address can do: which orgs the address belongs to and, per org, which password and SSO routes are open to it. Unauthenticated: it runs before any session exists.
pub async fn get_session_context(configuration: &configuration::Configuration, email: Option<&str>, r#ref: Option<&str>) -> Result<models::O11yPeriodO11ySessionContextOut, Error<GetSessionContextError>> {
// add a prefix to parameters to efficiently prevent name collisions
let p_email = email;
let p_ref = r#ref;
let uri_str = format!("{}/v1/o11y/sessions/context", configuration.base_path);
let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
if let Some(ref param_value) = p_email {
req_builder = req_builder.query(&[("email", ¶m_value.to_string())]);
}
if let Some(ref param_value) = p_ref {
req_builder = req_builder.query(&[("ref", ¶m_value.to_string())]);
}
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
let content_type = resp
.headers()
.get("content-type")
.and_then(|v| v.to_str().ok())
.unwrap_or("application/octet-stream");
let content_type = super::ContentType::from(content_type);
if !status.is_client_error() && !status.is_server_error() {
let content = resp.text().await?;
match content_type {
ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11ySessionContextOut`"))),
ContentType::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`")))),
}
} else {
let content = resp.text().await?;
let entity: Option<GetSessionContextError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Returns the org's quick filters for one signal — traces, logs, metrics, exceptions or api_monitoring. Viewer gate.
pub async fn get_signal_filters(configuration: &configuration::Configuration, signal: &str) -> Result<models::O11yPeriodO11ySignalFiltersOut, Error<GetSignalFiltersError>> {
// add a prefix to parameters to efficiently prevent name collisions
let p_signal = signal;
let uri_str = format!("{}/v1/o11y/orgs/me/filters/{signal}", configuration.base_path, signal=crate::apis::urlencode(p_signal));
let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
let content_type = resp
.headers()
.get("content-type")
.and_then(|v| v.to_str().ok())
.unwrap_or("application/octet-stream");
let content_type = super::ContentType::from(content_type);
if !status.is_client_error() && !status.is_server_error() {
let content = resp.text().await?;
match content_type {
ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11ySignalFiltersOut`"))),
ContentType::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`")))),
}
} else {
let content = resp.text().await?;
let entity: Option<GetSignalFiltersError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Computes span aggregations over one trace — span count, duration or share of execution time — grouped by the resource field each aggregation names. Callers need the viewer role; the runtime's own gate enforces it.
pub async fn get_trace_aggregations(configuration: &configuration::Configuration, trace_id: &str, o11y_period_o11y_trace_aggregations_in: models::O11yPeriodO11yTraceAggregationsIn) -> Result<models::O11yPeriodO11yTraceAggregationsOut, Error<GetTraceAggregationsError>> {
// add a prefix to parameters to efficiently prevent name collisions
let p_trace_id = trace_id;
let p_o11y_period_o11y_trace_aggregations_in = o11y_period_o11y_trace_aggregations_in;
let uri_str = format!("{}/v1/o11y/traces/{traceId}/aggregations", configuration.base_path, traceId=crate::apis::urlencode(p_trace_id));
let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
req_builder = req_builder.json(&p_o11y_period_o11y_trace_aggregations_in);
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
let content_type = resp
.headers()
.get("content-type")
.and_then(|v| v.to_str().ok())
.unwrap_or("application/octet-stream");
let content_type = super::ContentType::from(content_type);
if !status.is_client_error() && !status.is_server_error() {
let content = resp.text().await?;
match content_type {
ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yTraceAggregationsOut`"))),
ContentType::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`")))),
}
} else {
let content = resp.text().await?;
let entity: Option<GetTraceAggregationsError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Returns the trace field catalog: the span fields already selected as indexed columns, and the interesting ones seen in the data that could be. Callers need the viewer role; the runtime's own gate enforces it.
pub async fn get_trace_fields(configuration: &configuration::Configuration, ) -> Result<models::O11yPeriodO11yFieldCatalogOut, Error<GetTraceFieldsError>> {
let uri_str = format!("{}/v1/o11y/traces/fields", configuration.base_path);
let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
let content_type = resp
.headers()
.get("content-type")
.and_then(|v| v.to_str().ok())
.unwrap_or("application/octet-stream");
let content_type = super::ContentType::from(content_type);
if !status.is_client_error() && !status.is_server_error() {
let content = resp.text().await?;
match content_type {
ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yFieldCatalogOut`"))),
ContentType::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`")))),
}
} else {
let content = resp.text().await?;
let entity: Option<GetTraceFieldsError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Returns one funnel with its steps. Callers need the viewer role; the runtime's own gate enforces it.
pub async fn get_trace_funnel(configuration: &configuration::Configuration, funnel_id: &str) -> Result<models::O11yPeriodO11yFunnelOut, Error<GetTraceFunnelError>> {
// add a prefix to parameters to efficiently prevent name collisions
let p_funnel_id = funnel_id;
let uri_str = format!("{}/v1/o11y/trace-funnels/{funnel_id}", configuration.base_path, funnel_id=crate::apis::urlencode(p_funnel_id));
let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
let content_type = resp
.headers()
.get("content-type")
.and_then(|v| v.to_str().ok())
.unwrap_or("application/octet-stream");
let content_type = super::ContentType::from(content_type);
if !status.is_client_error() && !status.is_server_error() {
let content = resp.text().await?;
match content_type {
ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yFunnelOut`"))),
ContentType::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`")))),
}
} else {
let content = resp.text().await?;
let entity: Option<GetTraceFunnelError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Returns the errored traces through a step transition of a saved funnel — the entry point for \"why is this step failing\".
pub 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>> {
// add a prefix to parameters to efficiently prevent name collisions
let p_funnel_id = funnel_id;
let p_o11y_period_o11y_funnel_step_window_in = o11y_period_o11y_funnel_step_window_in;
let uri_str = format!("{}/v1/o11y/trace-funnels/{funnel_id}/analytics/error-traces", configuration.base_path, funnel_id=crate::apis::urlencode(p_funnel_id));
let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
req_builder = req_builder.json(&p_o11y_period_o11y_funnel_step_window_in);
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
let content_type = resp
.headers()
.get("content-type")
.and_then(|v| v.to_str().ok())
.unwrap_or("application/octet-stream");
let content_type = super::ContentType::from(content_type);
if !status.is_client_error() && !status.is_server_error() {
let content = resp.text().await?;
match content_type {
ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yFunnelRowsOut`"))),
ContentType::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`")))),
}
} else {
let content = resp.text().await?;
let entity: Option<GetTraceFunnelErrorTracesError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Returns a saved funnel's conversion overview over a window: how many entered, how many converted, the rate and the latency.
pub 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>> {
// add a prefix to parameters to efficiently prevent name collisions
let p_funnel_id = funnel_id;
let p_o11y_period_o11y_funnel_step_window_in = o11y_period_o11y_funnel_step_window_in;
let uri_str = format!("{}/v1/o11y/trace-funnels/{funnel_id}/analytics/overview", configuration.base_path, funnel_id=crate::apis::urlencode(p_funnel_id));
let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
req_builder = req_builder.json(&p_o11y_period_o11y_funnel_step_window_in);
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
let content_type = resp
.headers()
.get("content-type")
.and_then(|v| v.to_str().ok())
.unwrap_or("application/octet-stream");
let content_type = super::ContentType::from(content_type);
if !status.is_client_error() && !status.is_server_error() {
let content = resp.text().await?;
match content_type {
ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yFunnelRowsOut`"))),
ContentType::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`")))),
}
} else {
let content = resp.text().await?;
let entity: Option<GetTraceFunnelOverviewError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Returns the slowest traces through a step transition of a saved funnel — the entry point for \"why is this step slow\".
pub 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>> {
// add a prefix to parameters to efficiently prevent name collisions
let p_funnel_id = funnel_id;
let p_o11y_period_o11y_funnel_step_window_in = o11y_period_o11y_funnel_step_window_in;
let uri_str = format!("{}/v1/o11y/trace-funnels/{funnel_id}/analytics/slow-traces", configuration.base_path, funnel_id=crate::apis::urlencode(p_funnel_id));
let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
req_builder = req_builder.json(&p_o11y_period_o11y_funnel_step_window_in);
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
let content_type = resp
.headers()
.get("content-type")
.and_then(|v| v.to_str().ok())
.unwrap_or("application/octet-stream");
let content_type = super::ContentType::from(content_type);
if !status.is_client_error() && !status.is_server_error() {
let content = resp.text().await?;
match content_type {
ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yFunnelRowsOut`"))),
ContentType::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`")))),
}
} else {
let content = resp.text().await?;
let entity: Option<GetTraceFunnelSlowTracesError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Returns a saved funnel's per-step metrics over a window — the counts and latencies at each step, in step order.
pub 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>> {
// add a prefix to parameters to efficiently prevent name collisions
let p_funnel_id = funnel_id;
let p_o11y_period_o11y_funnel_window_in = o11y_period_o11y_funnel_window_in;
let uri_str = format!("{}/v1/o11y/trace-funnels/{funnel_id}/analytics/steps", configuration.base_path, funnel_id=crate::apis::urlencode(p_funnel_id));
let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
req_builder = req_builder.json(&p_o11y_period_o11y_funnel_window_in);
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
let content_type = resp
.headers()
.get("content-type")
.and_then(|v| v.to_str().ok())
.unwrap_or("application/octet-stream");
let content_type = super::ContentType::from(content_type);
if !status.is_client_error() && !status.is_server_error() {
let content = resp.text().await?;
match content_type {
ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yFunnelRowsOut`"))),
ContentType::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`")))),
}
} else {
let content = resp.text().await?;
let entity: Option<GetTraceFunnelStepMetricsError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Returns the conversion between two named steps of a saved funnel — the step-to-step drill-down behind the overview.
pub 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>> {
// add a prefix to parameters to efficiently prevent name collisions
let p_funnel_id = funnel_id;
let p_o11y_period_o11y_funnel_step_window_in = o11y_period_o11y_funnel_step_window_in;
let uri_str = format!("{}/v1/o11y/trace-funnels/{funnel_id}/analytics/steps/overview", configuration.base_path, funnel_id=crate::apis::urlencode(p_funnel_id));
let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
req_builder = req_builder.json(&p_o11y_period_o11y_funnel_step_window_in);
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
let content_type = resp
.headers()
.get("content-type")
.and_then(|v| v.to_str().ok())
.unwrap_or("application/octet-stream");
let content_type = super::ContentType::from(content_type);
if !status.is_client_error() && !status.is_server_error() {
let content = resp.text().await?;
match content_type {
ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yFunnelRowsOut`"))),
ContentType::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`")))),
}
} else {
let content = resp.text().await?;
let entity: Option<GetTraceFunnelStepOverviewError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Returns one org member together with every role they hold, by user id. Admin gate.
pub async fn get_user(configuration: &configuration::Configuration, id: &str) -> Result<models::O11yPeriodO11yUserWithRolesOut, Error<GetUserError>> {
// add a prefix to parameters to efficiently prevent name collisions
let p_id = id;
let uri_str = format!("{}/v1/o11y/users/{id}", configuration.base_path, id=crate::apis::urlencode(p_id));
let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
let content_type = resp
.headers()
.get("content-type")
.and_then(|v| v.to_str().ok())
.unwrap_or("application/octet-stream");
let content_type = super::ContentType::from(content_type);
if !status.is_client_error() && !status.is_server_error() {
let content = resp.text().await?;
match content_type {
ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yUserWithRolesOut`"))),
ContentType::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`")))),
}
} else {
let content = resp.text().await?;
let entity: Option<GetUserError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Returns one org member with their single legacy role, by user id. Admins may read anyone; a non-admin only themselves (the runtime's self-access gate).
pub async fn get_user_deprecated(configuration: &configuration::Configuration, id: &str) -> Result<models::O11yPeriodO11yDeprecatedUserOut, Error<GetUserDeprecatedError>> {
// add a prefix to parameters to efficiently prevent name collisions
let p_id = id;
let uri_str = format!("{}/v1/o11y/user/{id}", configuration.base_path, id=crate::apis::urlencode(p_id));
let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
let content_type = resp
.headers()
.get("content-type")
.and_then(|v| v.to_str().ok())
.unwrap_or("application/octet-stream");
let content_type = super::ContentType::from(content_type);
if !status.is_client_error() && !status.is_server_error() {
let content = resp.text().await?;
match content_type {
ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yDeprecatedUserOut`"))),
ContentType::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`")))),
}
} else {
let content = resp.text().await?;
let entity: Option<GetUserDeprecatedError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Returns one preference of the calling user, by name. Viewer gate.
pub async fn get_user_preference(configuration: &configuration::Configuration, name: &str) -> Result<models::O11yPeriodO11yPreferenceOut, Error<GetUserPreferenceError>> {
// add a prefix to parameters to efficiently prevent name collisions
let p_name = name;
let uri_str = format!("{}/v1/o11y/user/preferences/{name}", configuration.base_path, name=crate::apis::urlencode(p_name));
let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
let content_type = resp
.headers()
.get("content-type")
.and_then(|v| v.to_str().ok())
.unwrap_or("application/octet-stream");
let content_type = super::ContentType::from(content_type);
if !status.is_client_error() && !status.is_server_error() {
let content = resp.text().await?;
match content_type {
ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yPreferenceOut`"))),
ContentType::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`")))),
}
} else {
let content = resp.text().await?;
let entity: Option<GetUserPreferenceError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Returns every org member holding a role, by role id. Admin gate.
pub async fn get_users_by_role_id(configuration: &configuration::Configuration, id: &str) -> Result<models::O11yPeriodO11yUsersOut, Error<GetUsersByRoleIdError>> {
// add a prefix to parameters to efficiently prevent name collisions
let p_id = id;
let uri_str = format!("{}/v1/o11y/roles/{id}/users", configuration.base_path, id=crate::apis::urlencode(p_id));
let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
let content_type = resp
.headers()
.get("content-type")
.and_then(|v| v.to_str().ok())
.unwrap_or("application/octet-stream");
let content_type = super::ContentType::from(content_type);
if !status.is_client_error() && !status.is_server_error() {
let content = resp.text().await?;
match content_type {
ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yUsersOut`"))),
ContentType::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`")))),
}
} else {
let content = resp.text().await?;
let entity: Option<GetUsersByRoleIdError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Returns a trace's waterfall: every span when the trace is small enough, a capped window around the selected span when it is not, with the uncollapsed subtrees the caller asked to keep open. Callers need the viewer role; the runtime's own gate enforces it.
pub async fn get_waterfall_v4(configuration: &configuration::Configuration, trace_id: &str, o11y_period_o11y_trace_waterfall_in: models::O11yPeriodO11yTraceWaterfallIn) -> Result<models::O11yPeriodO11yTraceWaterfallOut, Error<GetWaterfallV4Error>> {
// add a prefix to parameters to efficiently prevent name collisions
let p_trace_id = trace_id;
let p_o11y_period_o11y_trace_waterfall_in = o11y_period_o11y_trace_waterfall_in;
let uri_str = format!("{}/v1/o11y/traces/{traceId}/waterfall", configuration.base_path, traceId=crate::apis::urlencode(p_trace_id));
let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
req_builder = req_builder.json(&p_o11y_period_o11y_trace_waterfall_in);
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
let content_type = resp
.headers()
.get("content-type")
.and_then(|v| v.to_str().ok())
.unwrap_or("application/octet-stream");
let content_type = super::ContentType::from(content_type);
if !status.is_client_error() && !status.is_server_error() {
let content = resp.text().await?;
match content_type {
ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yTraceWaterfallOut`"))),
ContentType::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`")))),
}
} else {
let content = resp.text().await?;
let entity: Option<GetWaterfallV4Error> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Returns one metric's raw time series over a window of at most thirty minutes — each series with its labels and timestamp/value pairs.
pub async fn inspect_metrics(configuration: &configuration::Configuration, o11y_period_o11y_metric_inspect_in: models::O11yPeriodO11yMetricInspectIn) -> Result<models::O11yPeriodO11yMetricInspectOut, Error<InspectMetricsError>> {
// add a prefix to parameters to efficiently prevent name collisions
let p_o11y_period_o11y_metric_inspect_in = o11y_period_o11y_metric_inspect_in;
let uri_str = format!("{}/v1/o11y/metrics/inspect", configuration.base_path);
let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
req_builder = req_builder.json(&p_o11y_period_o11y_metric_inspect_in);
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
let content_type = resp
.headers()
.get("content-type")
.and_then(|v| v.to_str().ok())
.unwrap_or("application/octet-stream");
let content_type = super::ContentType::from(content_type);
if !status.is_client_error() && !status.is_server_error() {
let content = resp.text().await?;
match content_type {
ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yMetricInspectOut`"))),
ContentType::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`")))),
}
} else {
let content = resp.text().await?;
let entity: Option<InspectMetricsError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Installs an integration into the caller's org from its id and configuration, answering with the installed catalog item. Viewer gate.
pub async fn install_integration(configuration: &configuration::Configuration, o11y_period_install_integration_request: models::O11yPeriodInstallIntegrationRequest) -> Result<models::O11yPeriodO11yInstallOut, Error<InstallIntegrationError>> {
// add a prefix to parameters to efficiently prevent name collisions
let p_o11y_period_install_integration_request = o11y_period_install_integration_request;
let uri_str = format!("{}/v1/o11y/integrations/install", configuration.base_path);
let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
req_builder = req_builder.json(&p_o11y_period_install_integration_request);
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
let content_type = resp
.headers()
.get("content-type")
.and_then(|v| v.to_str().ok())
.unwrap_or("application/octet-stream");
let content_type = super::ContentType::from(content_type);
if !status.is_client_error() && !status.is_server_error() {
let content = resp.text().await?;
match content_type {
ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yInstallOut`"))),
ContentType::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`")))),
}
} else {
let content = resp.text().await?;
let entity: Option<InstallIntegrationError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Lists the services metadata for one connected account of the given provider, by account id. Admin gate.
pub async fn list_account_services_metadata(configuration: &configuration::Configuration, cloud_provider: &str, id: &str) -> Result<models::O11yPeriodO11yServicesMetadataOut, Error<ListAccountServicesMetadataError>> {
// add a prefix to parameters to efficiently prevent name collisions
let p_cloud_provider = cloud_provider;
let p_id = id;
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));
let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
let content_type = resp
.headers()
.get("content-type")
.and_then(|v| v.to_str().ok())
.unwrap_or("application/octet-stream");
let content_type = super::ContentType::from(content_type);
if !status.is_client_error() && !status.is_server_error() {
let content = resp.text().await?;
match content_type {
ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yServicesMetadataOut`"))),
ContentType::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`")))),
}
} else {
let content = resp.text().await?;
let entity: Option<ListAccountServicesMetadataError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Lists the cloud-integration accounts connected for the given provider. Admin gate.
pub async fn list_accounts(configuration: &configuration::Configuration, cloud_provider: &str) -> Result<models::O11yPeriodO11yAccountsOut, Error<ListAccountsError>> {
// add a prefix to parameters to efficiently prevent name collisions
let p_cloud_provider = cloud_provider;
let uri_str = format!("{}/v1/o11y/cloud_integrations/{cloud_provider}/accounts", configuration.base_path, cloud_provider=crate::apis::urlencode(p_cloud_provider));
let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
let content_type = resp
.headers()
.get("content-type")
.and_then(|v| v.to_str().ok())
.unwrap_or("application/octet-stream");
let content_type = super::ContentType::from(content_type);
if !status.is_client_error() && !status.is_server_error() {
let content = resp.text().await?;
match content_type {
ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yAccountsOut`"))),
ContentType::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`")))),
}
} else {
let content = resp.text().await?;
let entity: Option<ListAccountsError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Lists the org's auth domains — the email domains whose SSO configuration this org owns. Admin gate.
pub async fn list_auth_domains(configuration: &configuration::Configuration, ) -> Result<models::O11yPeriodO11yAuthDomainsOut, Error<ListAuthDomainsError>> {
let uri_str = format!("{}/v1/o11y/domains", configuration.base_path);
let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
let content_type = resp
.headers()
.get("content-type")
.and_then(|v| v.to_str().ok())
.unwrap_or("application/octet-stream");
let content_type = super::ContentType::from(content_type);
if !status.is_client_error() && !status.is_server_error() {
let content = resp.text().await?;
match content_type {
ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yAuthDomainsOut`"))),
ContentType::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`")))),
}
} else {
let content = resp.text().await?;
let entity: Option<ListAuthDomainsError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Lists the org's notification channels. Viewer gate.
pub async fn list_channels(configuration: &configuration::Configuration, ) -> Result<models::O11yPeriodO11yChannelsOut, Error<ListChannelsError>> {
let uri_str = format!("{}/v1/o11y/channels", configuration.base_path);
let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
let content_type = resp
.headers()
.get("content-type")
.and_then(|v| v.to_str().ok())
.unwrap_or("application/octet-stream");
let content_type = super::ContentType::from(content_type);
if !status.is_client_error() && !status.is_server_error() {
let content = resp.text().await?;
match content_type {
ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yChannelsOut`"))),
ContentType::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`")))),
}
} else {
let content = resp.text().await?;
let entity: Option<ListChannelsError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Returns every saved view in the calling user's org. Saved views are shared org-wide. Callers need the viewer role; the runtime's own gate enforces it.
pub async fn list_dashboard_views(configuration: &configuration::Configuration, ) -> Result<models::O11yPeriodO11yDashboardViewListOut, Error<ListDashboardViewsError>> {
let uri_str = format!("{}/v1/o11y/dashboard_views", configuration.base_path);
let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
let content_type = resp
.headers()
.get("content-type")
.and_then(|v| v.to_str().ok())
.unwrap_or("application/octet-stream");
let content_type = super::ContentType::from(content_type);
if !status.is_client_error() && !status.is_server_error() {
let content = resp.text().await?;
match content_type {
ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yDashboardViewListOut`"))),
ContentType::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`")))),
}
} else {
let content = resp.text().await?;
let entity: Option<ListDashboardViewsError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Is dashboardListV2 personalized for the calling user: each dashboard carries the caller's pinned state, and pinned dashboards float to the top of the requested ordering. Supports the same filter DSL, sort, order and pagination. Callers need the viewer role; the runtime's own gate enforces it.
pub 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>> {
// add a prefix to parameters to efficiently prevent name collisions
let p_query = query;
let p_sort = sort;
let p_order = order;
let p_limit = limit;
let p_offset = offset;
let uri_str = format!("{}/v1/o11y/users/me/dashboards", configuration.base_path);
let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
if let Some(ref param_value) = p_query {
req_builder = req_builder.query(&[("query", ¶m_value.to_string())]);
}
if let Some(ref param_value) = p_sort {
req_builder = req_builder.query(&[("sort", ¶m_value.to_string())]);
}
if let Some(ref param_value) = p_order {
req_builder = req_builder.query(&[("order", ¶m_value.to_string())]);
}
if let Some(ref param_value) = p_limit {
req_builder = req_builder.query(&[("limit", ¶m_value.to_string())]);
}
if let Some(ref param_value) = p_offset {
req_builder = req_builder.query(&[("offset", ¶m_value.to_string())]);
}
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
let content_type = resp
.headers()
.get("content-type")
.and_then(|v| v.to_str().ok())
.unwrap_or("application/octet-stream");
let content_type = super::ContentType::from(content_type);
if !status.is_client_error() && !status.is_server_error() {
let content = resp.text().await?;
match content_type {
ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yDashboardListForUserOut`"))),
ContentType::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`")))),
}
} else {
let content = resp.text().await?;
let entity: Option<ListDashboardsForUserV2Error> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Returns a page of v2-shape dashboards for the org. This is the pure, user-independent list — it carries no pin state; use dashboardListForUserV2 for the personalized, pin-aware list. Supports a filter DSL (query), sort (updated_at/created_at/name), order (asc/desc), and offset-based pagination (limit/offset). Callers need the viewer role; the runtime's own gate enforces it.
pub 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>> {
// add a prefix to parameters to efficiently prevent name collisions
let p_query = query;
let p_sort = sort;
let p_order = order;
let p_limit = limit;
let p_offset = offset;
let uri_str = format!("{}/v1/o11y/dashboards", configuration.base_path);
let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
if let Some(ref param_value) = p_query {
req_builder = req_builder.query(&[("query", ¶m_value.to_string())]);
}
if let Some(ref param_value) = p_sort {
req_builder = req_builder.query(&[("sort", ¶m_value.to_string())]);
}
if let Some(ref param_value) = p_order {
req_builder = req_builder.query(&[("order", ¶m_value.to_string())]);
}
if let Some(ref param_value) = p_limit {
req_builder = req_builder.query(&[("limit", ¶m_value.to_string())]);
}
if let Some(ref param_value) = p_offset {
req_builder = req_builder.query(&[("offset", ¶m_value.to_string())]);
}
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
let content_type = resp
.headers()
.get("content-type")
.and_then(|v| v.to_str().ok())
.unwrap_or("application/octet-stream");
let content_type = super::ContentType::from(content_type);
if !status.is_client_error() && !status.is_server_error() {
let content = resp.text().await?;
match content_type {
ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yDashboardListOut`"))),
ContentType::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`")))),
}
} else {
let content = resp.text().await?;
let entity: Option<ListDashboardsV2Error> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Lists all planned maintenance windows, optionally narrowed to the active ones or the recurring ones. Viewer gate.
pub async fn list_downtime_schedules(configuration: &configuration::Configuration, active: Option<&str>, recurring: Option<&str>) -> Result<models::O11yPeriodO11yDowntimeSchedulesOut, Error<ListDowntimeSchedulesError>> {
// add a prefix to parameters to efficiently prevent name collisions
let p_active = active;
let p_recurring = recurring;
let uri_str = format!("{}/v1/o11y/downtime_schedules", configuration.base_path);
let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
if let Some(ref param_value) = p_active {
req_builder = req_builder.query(&[("active", ¶m_value.to_string())]);
}
if let Some(ref param_value) = p_recurring {
req_builder = req_builder.query(&[("recurring", ¶m_value.to_string())]);
}
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
let content_type = resp
.headers()
.get("content-type")
.and_then(|v| v.to_str().ok())
.unwrap_or("application/octet-stream");
let content_type = super::ContentType::from(content_type);
if !status.is_client_error() && !status.is_server_error() {
let content = resp.text().await?;
match content_type {
ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yDowntimeSchedulesOut`"))),
ContentType::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`")))),
}
} else {
let content = resp.text().await?;
let entity: Option<ListDowntimeSchedulesError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Lists the available integrations and whether each is installed in the caller's org, optionally narrowed to installed or not-installed. Viewer gate.
pub async fn list_integrations(configuration: &configuration::Configuration, is_installed: Option<&str>) -> Result<models::O11yPeriodO11yIntegrationsListOut, Error<ListIntegrationsError>> {
// add a prefix to parameters to efficiently prevent name collisions
let p_is_installed = is_installed;
let uri_str = format!("{}/v1/o11y/integrations", configuration.base_path);
let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
if let Some(ref param_value) = p_is_installed {
req_builder = req_builder.query(&[("is_installed", ¶m_value.to_string())]);
}
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
let content_type = resp
.headers()
.get("content-type")
.and_then(|v| v.to_str().ok())
.unwrap_or("application/octet-stream");
let content_type = super::ContentType::from(content_type);
if !status.is_client_error() && !status.is_server_error() {
let content = resp.text().await?;
match content_type {
ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yIntegrationsListOut`"))),
ContentType::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`")))),
}
} else {
let content = resp.text().await?;
let entity: Option<ListIntegrationsError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Lists human annotations on traces and observations, optionally scoped to one review queue. Callers need the viewer role; the runtime's own gate enforces it.
pub 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>> {
// add a prefix to parameters to efficiently prevent name collisions
let p_trace_id = trace_id;
let p_queue = queue;
let p_status = status;
let p_offset = offset;
let p_limit = limit;
let uri_str = format!("{}/v1/o11y/llm/annotation", configuration.base_path);
let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
if let Some(ref param_value) = p_trace_id {
req_builder = req_builder.query(&[("traceId", ¶m_value.to_string())]);
}
if let Some(ref param_value) = p_queue {
req_builder = req_builder.query(&[("queue", ¶m_value.to_string())]);
}
if let Some(ref param_value) = p_status {
req_builder = req_builder.query(&[("status", ¶m_value.to_string())]);
}
if let Some(ref param_value) = p_offset {
req_builder = req_builder.query(&[("offset", ¶m_value.to_string())]);
}
if let Some(ref param_value) = p_limit {
req_builder = req_builder.query(&[("limit", ¶m_value.to_string())]);
}
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
let content_type = resp
.headers()
.get("content-type")
.and_then(|v| v.to_str().ok())
.unwrap_or("application/octet-stream");
let content_type = super::ContentType::from(content_type);
if !status.is_client_error() && !status.is_server_error() {
let content = resp.text().await?;
match content_type {
ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yLlmAnnotationsOut`"))),
ContentType::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`")))),
}
} else {
let content = resp.text().await?;
let entity: Option<ListLlmAnnotationsError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Lists gen_ai spans as LLM observations — each an LLM call with its model, token counts, cost and latency projected from gen_ai.* attributes, newest first, over the query window. Callers need the viewer role; the runtime's own gate enforces it, and scopes the read to the caller's validated tenant.
pub 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>> {
// add a prefix to parameters to efficiently prevent name collisions
let p_start = start;
let p_end = end;
let p_trace_id = trace_id;
let p_session_id = session_id;
let p_user_id = user_id;
let p_name = name;
let p_model = model;
let p_offset = offset;
let p_limit = limit;
let uri_str = format!("{}/v1/o11y/llm/observations", configuration.base_path);
let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
if let Some(ref param_value) = p_start {
req_builder = req_builder.query(&[("start", ¶m_value.to_string())]);
}
if let Some(ref param_value) = p_end {
req_builder = req_builder.query(&[("end", ¶m_value.to_string())]);
}
if let Some(ref param_value) = p_trace_id {
req_builder = req_builder.query(&[("traceId", ¶m_value.to_string())]);
}
if let Some(ref param_value) = p_session_id {
req_builder = req_builder.query(&[("sessionId", ¶m_value.to_string())]);
}
if let Some(ref param_value) = p_user_id {
req_builder = req_builder.query(&[("userId", ¶m_value.to_string())]);
}
if let Some(ref param_value) = p_name {
req_builder = req_builder.query(&[("name", ¶m_value.to_string())]);
}
if let Some(ref param_value) = p_model {
req_builder = req_builder.query(&[("model", ¶m_value.to_string())]);
}
if let Some(ref param_value) = p_offset {
req_builder = req_builder.query(&[("offset", ¶m_value.to_string())]);
}
if let Some(ref param_value) = p_limit {
req_builder = req_builder.query(&[("limit", ¶m_value.to_string())]);
}
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
let content_type = resp
.headers()
.get("content-type")
.and_then(|v| v.to_str().ok())
.unwrap_or("application/octet-stream");
let content_type = super::ContentType::from(content_type);
if !status.is_client_error() && !status.is_server_error() {
let content = resp.text().await?;
match content_type {
ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yLlmObservationsOut`"))),
ContentType::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`")))),
}
} else {
let content = resp.text().await?;
let entity: Option<ListLlmObservationsError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Returns the LLM pricing rules for the caller's org, with pagination and an optional search and override filter. Callers need the viewer role; the runtime's own gate enforces it.
pub 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>> {
// add a prefix to parameters to efficiently prevent name collisions
let p_q = q;
let p_is_override = is_override;
let p_offset = offset;
let p_limit = limit;
let uri_str = format!("{}/v1/o11y/llm_pricing_rules", configuration.base_path);
let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
if let Some(ref param_value) = p_q {
req_builder = req_builder.query(&[("q", ¶m_value.to_string())]);
}
if let Some(ref param_value) = p_is_override {
req_builder = req_builder.query(&[("isOverride", ¶m_value.to_string())]);
}
if let Some(ref param_value) = p_offset {
req_builder = req_builder.query(&[("offset", ¶m_value.to_string())]);
}
if let Some(ref param_value) = p_limit {
req_builder = req_builder.query(&[("limit", ¶m_value.to_string())]);
}
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
let content_type = resp
.headers()
.get("content-type")
.and_then(|v| v.to_str().ok())
.unwrap_or("application/octet-stream");
let content_type = super::ContentType::from(content_type);
if !status.is_client_error() && !status.is_server_error() {
let content = resp.text().await?;
match content_type {
ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yLlmPricingRulesOut`"))),
ContentType::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`")))),
}
} else {
let content = resp.text().await?;
let entity: Option<ListLlmPricingRulesError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Lists eval scores and human-feedback signals attached to traces and observations, newest first. Callers need the viewer role; the runtime's own gate enforces it.
pub 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>> {
// add a prefix to parameters to efficiently prevent name collisions
let p_trace_id = trace_id;
let p_observation_id = observation_id;
let p_name = name;
let p_source = source;
let p_offset = offset;
let p_limit = limit;
let uri_str = format!("{}/v1/o11y/llm/scores", configuration.base_path);
let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
if let Some(ref param_value) = p_trace_id {
req_builder = req_builder.query(&[("traceId", ¶m_value.to_string())]);
}
if let Some(ref param_value) = p_observation_id {
req_builder = req_builder.query(&[("observationId", ¶m_value.to_string())]);
}
if let Some(ref param_value) = p_name {
req_builder = req_builder.query(&[("name", ¶m_value.to_string())]);
}
if let Some(ref param_value) = p_source {
req_builder = req_builder.query(&[("source", ¶m_value.to_string())]);
}
if let Some(ref param_value) = p_offset {
req_builder = req_builder.query(&[("offset", ¶m_value.to_string())]);
}
if let Some(ref param_value) = p_limit {
req_builder = req_builder.query(&[("limit", ¶m_value.to_string())]);
}
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
let content_type = resp
.headers()
.get("content-type")
.and_then(|v| v.to_str().ok())
.unwrap_or("application/octet-stream");
let content_type = super::ContentType::from(content_type);
if !status.is_client_error() && !status.is_server_error() {
let content = resp.text().await?;
match content_type {
ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yLlmScoresOut`"))),
ContentType::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`")))),
}
} else {
let content = resp.text().await?;
let entity: Option<ListLlmScoresError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Lists conversations — gen_ai spans grouped by session.id, with their trace and observation counts, tokens and cost. Callers need the viewer role; the runtime's own gate enforces it.
pub 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>> {
// add a prefix to parameters to efficiently prevent name collisions
let p_start = start;
let p_end = end;
let p_trace_id = trace_id;
let p_session_id = session_id;
let p_user_id = user_id;
let p_name = name;
let p_model = model;
let p_offset = offset;
let p_limit = limit;
let uri_str = format!("{}/v1/o11y/llm/sessions", configuration.base_path);
let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
if let Some(ref param_value) = p_start {
req_builder = req_builder.query(&[("start", ¶m_value.to_string())]);
}
if let Some(ref param_value) = p_end {
req_builder = req_builder.query(&[("end", ¶m_value.to_string())]);
}
if let Some(ref param_value) = p_trace_id {
req_builder = req_builder.query(&[("traceId", ¶m_value.to_string())]);
}
if let Some(ref param_value) = p_session_id {
req_builder = req_builder.query(&[("sessionId", ¶m_value.to_string())]);
}
if let Some(ref param_value) = p_user_id {
req_builder = req_builder.query(&[("userId", ¶m_value.to_string())]);
}
if let Some(ref param_value) = p_name {
req_builder = req_builder.query(&[("name", ¶m_value.to_string())]);
}
if let Some(ref param_value) = p_model {
req_builder = req_builder.query(&[("model", ¶m_value.to_string())]);
}
if let Some(ref param_value) = p_offset {
req_builder = req_builder.query(&[("offset", ¶m_value.to_string())]);
}
if let Some(ref param_value) = p_limit {
req_builder = req_builder.query(&[("limit", ¶m_value.to_string())]);
}
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
let content_type = resp
.headers()
.get("content-type")
.and_then(|v| v.to_str().ok())
.unwrap_or("application/octet-stream");
let content_type = super::ContentType::from(content_type);
if !status.is_client_error() && !status.is_server_error() {
let content = resp.text().await?;
match content_type {
ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yLlmSessionsOut`"))),
ContentType::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`")))),
}
} else {
let content = resp.text().await?;
let entity: Option<ListLlmSessionsError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Lists LLM traces — gen_ai spans grouped by trace_id, with cost, tokens and latency rolled up across each trace. Callers need the viewer role; the runtime's own gate enforces it.
pub 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>> {
// add a prefix to parameters to efficiently prevent name collisions
let p_start = start;
let p_end = end;
let p_trace_id = trace_id;
let p_session_id = session_id;
let p_user_id = user_id;
let p_name = name;
let p_model = model;
let p_offset = offset;
let p_limit = limit;
let uri_str = format!("{}/v1/o11y/llm/traces", configuration.base_path);
let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
if let Some(ref param_value) = p_start {
req_builder = req_builder.query(&[("start", ¶m_value.to_string())]);
}
if let Some(ref param_value) = p_end {
req_builder = req_builder.query(&[("end", ¶m_value.to_string())]);
}
if let Some(ref param_value) = p_trace_id {
req_builder = req_builder.query(&[("traceId", ¶m_value.to_string())]);
}
if let Some(ref param_value) = p_session_id {
req_builder = req_builder.query(&[("sessionId", ¶m_value.to_string())]);
}
if let Some(ref param_value) = p_user_id {
req_builder = req_builder.query(&[("userId", ¶m_value.to_string())]);
}
if let Some(ref param_value) = p_name {
req_builder = req_builder.query(&[("name", ¶m_value.to_string())]);
}
if let Some(ref param_value) = p_model {
req_builder = req_builder.query(&[("model", ¶m_value.to_string())]);
}
if let Some(ref param_value) = p_offset {
req_builder = req_builder.query(&[("offset", ¶m_value.to_string())]);
}
if let Some(ref param_value) = p_limit {
req_builder = req_builder.query(&[("limit", ¶m_value.to_string())]);
}
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
let content_type = resp
.headers()
.get("content-type")
.and_then(|v| v.to_str().ok())
.unwrap_or("application/octet-stream");
let content_type = super::ContentType::from(content_type);
if !status.is_client_error() && !status.is_server_error() {
let content = resp.text().await?;
match content_type {
ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yLlmTracesOut`"))),
ContentType::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`")))),
}
} else {
let content = resp.text().await?;
let entity: Option<ListLlmTracesError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Lists end users — gen_ai spans grouped by user.id, with their session, trace and observation counts, tokens and cost. Callers need the viewer role; the runtime's own gate enforces it.
pub 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>> {
// add a prefix to parameters to efficiently prevent name collisions
let p_start = start;
let p_end = end;
let p_trace_id = trace_id;
let p_session_id = session_id;
let p_user_id = user_id;
let p_name = name;
let p_model = model;
let p_offset = offset;
let p_limit = limit;
let uri_str = format!("{}/v1/o11y/llm/users", configuration.base_path);
let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
if let Some(ref param_value) = p_start {
req_builder = req_builder.query(&[("start", ¶m_value.to_string())]);
}
if let Some(ref param_value) = p_end {
req_builder = req_builder.query(&[("end", ¶m_value.to_string())]);
}
if let Some(ref param_value) = p_trace_id {
req_builder = req_builder.query(&[("traceId", ¶m_value.to_string())]);
}
if let Some(ref param_value) = p_session_id {
req_builder = req_builder.query(&[("sessionId", ¶m_value.to_string())]);
}
if let Some(ref param_value) = p_user_id {
req_builder = req_builder.query(&[("userId", ¶m_value.to_string())]);
}
if let Some(ref param_value) = p_name {
req_builder = req_builder.query(&[("name", ¶m_value.to_string())]);
}
if let Some(ref param_value) = p_model {
req_builder = req_builder.query(&[("model", ¶m_value.to_string())]);
}
if let Some(ref param_value) = p_offset {
req_builder = req_builder.query(&[("offset", ¶m_value.to_string())]);
}
if let Some(ref param_value) = p_limit {
req_builder = req_builder.query(&[("limit", ¶m_value.to_string())]);
}
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
let content_type = resp
.headers()
.get("content-type")
.and_then(|v| v.to_str().ok())
.unwrap_or("application/octet-stream");
let content_type = super::ContentType::from(content_type);
if !status.is_client_error() && !status.is_server_error() {
let content = resp.text().await?;
match content_type {
ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yLlmUsersOut`"))),
ContentType::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`")))),
}
} else {
let content = resp.text().await?;
let entity: Option<ListLlmUsersError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Lists the org's metric volume-control (label reduction) rules, pageable and sortable by name, volume or recency.
pub 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>> {
// add a prefix to parameters to efficiently prevent name collisions
let p_order_by = order_by;
let p_order = order;
let p_search = search;
let p_metric_name = metric_name;
let p_offset = offset;
let p_limit = limit;
let uri_str = format!("{}/v1/o11y/metric_reduction_rules", configuration.base_path);
let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
if let Some(ref param_value) = p_order_by {
req_builder = req_builder.query(&[("orderBy", ¶m_value.to_string())]);
}
if let Some(ref param_value) = p_order {
req_builder = req_builder.query(&[("order", ¶m_value.to_string())]);
}
if let Some(ref param_value) = p_search {
req_builder = req_builder.query(&[("search", ¶m_value.to_string())]);
}
if let Some(ref param_value) = p_metric_name {
req_builder = req_builder.query(&[("metricName", ¶m_value.to_string())]);
}
if let Some(ref param_value) = p_offset {
req_builder = req_builder.query(&[("offset", ¶m_value.to_string())]);
}
if let Some(ref param_value) = p_limit {
req_builder = req_builder.query(&[("limit", ¶m_value.to_string())]);
}
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
let content_type = resp
.headers()
.get("content-type")
.and_then(|v| v.to_str().ok())
.unwrap_or("application/octet-stream");
let content_type = super::ContentType::from(content_type);
if !status.is_client_error() && !status.is_server_error() {
let content = resp.text().await?;
match content_type {
ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yReductionRuleListOut`"))),
ContentType::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`")))),
}
} else {
let content = resp.text().await?;
let entity: Option<ListMetricReductionRulesError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Lists the distinct metric names seen in a time range, each with its description, type, unit, temporality and monotonicity.
pub 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>> {
// add a prefix to parameters to efficiently prevent name collisions
let p_start = start;
let p_end = end;
let p_limit = limit;
let p_search_text = search_text;
let p_source = source;
let uri_str = format!("{}/v1/o11y/metrics", configuration.base_path);
let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
if let Some(ref param_value) = p_start {
req_builder = req_builder.query(&[("start", ¶m_value.to_string())]);
}
if let Some(ref param_value) = p_end {
req_builder = req_builder.query(&[("end", ¶m_value.to_string())]);
}
if let Some(ref param_value) = p_limit {
req_builder = req_builder.query(&[("limit", ¶m_value.to_string())]);
}
if let Some(ref param_value) = p_search_text {
req_builder = req_builder.query(&[("searchText", ¶m_value.to_string())]);
}
if let Some(ref param_value) = p_source {
req_builder = req_builder.query(&[("source", ¶m_value.to_string())]);
}
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
let content_type = resp
.headers()
.get("content-type")
.and_then(|v| v.to_str().ok())
.unwrap_or("application/octet-stream");
let content_type = super::ContentType::from(content_type);
if !status.is_client_error() && !status.is_server_error() {
let content = resp.text().await?;
match content_type {
ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yMetricListOut`"))),
ContentType::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`")))),
}
} else {
let content = resp.text().await?;
let entity: Option<ListMetricsError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Lists every org-scoped preference, each with its current and default value. Admin gate.
pub async fn list_org_preferences(configuration: &configuration::Configuration, ) -> Result<models::O11yPeriodO11yPreferencesOut, Error<ListOrgPreferencesError>> {
let uri_str = format!("{}/v1/o11y/org/preferences", configuration.base_path);
let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
let content_type = resp
.headers()
.get("content-type")
.and_then(|v| v.to_str().ok())
.unwrap_or("application/octet-stream");
let content_type = super::ContentType::from(content_type);
if !status.is_client_error() && !status.is_server_error() {
let content = resp.text().await?;
match content_type {
ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yPreferencesOut`"))),
ContentType::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`")))),
}
} else {
let content = resp.text().await?;
let entity: Option<ListOrgPreferencesError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Lists every role in the caller's org — the managed ones the platform seeds and the custom ones its admins created.
pub async fn list_roles(configuration: &configuration::Configuration, ) -> Result<models::O11yPeriodO11yRolesOut, Error<ListRolesError>> {
let uri_str = format!("{}/v1/o11y/roles", configuration.base_path);
let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
let content_type = resp
.headers()
.get("content-type")
.and_then(|v| v.to_str().ok())
.unwrap_or("application/octet-stream");
let content_type = super::ContentType::from(content_type);
if !status.is_client_error() && !status.is_server_error() {
let content = resp.text().await?;
match content_type {
ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yRolesOut`"))),
ContentType::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`")))),
}
} else {
let content = resp.text().await?;
let entity: Option<ListRolesError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Lists all alert rules with their current evaluation state. Viewer gate.
pub async fn list_rules(configuration: &configuration::Configuration, ) -> Result<models::O11yPeriodO11yRulesOut, Error<ListRulesError>> {
let uri_str = format!("{}/v1/o11y/rules", configuration.base_path);
let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
let content_type = resp
.headers()
.get("content-type")
.and_then(|v| v.to_str().ok())
.unwrap_or("application/octet-stream");
let content_type = super::ContentType::from(content_type);
if !status.is_client_error() && !status.is_server_error() {
let content = resp.text().await?;
match content_type {
ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yRulesOut`"))),
ContentType::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`")))),
}
} else {
let content = resp.text().await?;
let entity: Option<ListRulesError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Lists a service account's API keys — metadata only, never the secrets.
pub async fn list_service_account_keys(configuration: &configuration::Configuration, id: &str) -> Result<models::O11yPeriodO11yApiKeysOut, Error<ListServiceAccountKeysError>> {
// add a prefix to parameters to efficiently prevent name collisions
let p_id = id;
let uri_str = format!("{}/v1/o11y/service_accounts/{id}/keys", configuration.base_path, id=crate::apis::urlencode(p_id));
let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
let content_type = resp
.headers()
.get("content-type")
.and_then(|v| v.to_str().ok())
.unwrap_or("application/octet-stream");
let content_type = super::ContentType::from(content_type);
if !status.is_client_error() && !status.is_server_error() {
let content = resp.text().await?;
match content_type {
ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yApiKeysOut`"))),
ContentType::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`")))),
}
} else {
let content = resp.text().await?;
let entity: Option<ListServiceAccountKeysError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Lists the caller's org's service accounts.
pub async fn list_service_accounts(configuration: &configuration::Configuration, ) -> Result<models::O11yPeriodO11yServiceAccountsOut, Error<ListServiceAccountsError>> {
let uri_str = format!("{}/v1/o11y/service_accounts", configuration.base_path);
let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
let content_type = resp
.headers()
.get("content-type")
.and_then(|v| v.to_str().ok())
.unwrap_or("application/octet-stream");
let content_type = super::ContentType::from(content_type);
if !status.is_client_error() && !status.is_server_error() {
let content = resp.text().await?;
match content_type {
ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yServiceAccountsOut`"))),
ContentType::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`")))),
}
} else {
let content = resp.text().await?;
let entity: Option<ListServiceAccountsError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Lists the services the given provider can collect from, optionally scoped to one cloud integration. Admin gate.
pub async fn list_services_metadata(configuration: &configuration::Configuration, cloud_provider: &str, cloud_integration_id: Option<&str>) -> Result<models::O11yPeriodO11yServicesMetadataOut, Error<ListServicesMetadataError>> {
// add a prefix to parameters to efficiently prevent name collisions
let p_cloud_provider = cloud_provider;
let p_cloud_integration_id = cloud_integration_id;
let uri_str = format!("{}/v1/o11y/cloud_integrations/{cloud_provider}/services", configuration.base_path, cloud_provider=crate::apis::urlencode(p_cloud_provider));
let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
if let Some(ref param_value) = p_cloud_integration_id {
req_builder = req_builder.query(&[("cloud_integration_id", ¶m_value.to_string())]);
}
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
let content_type = resp
.headers()
.get("content-type")
.and_then(|v| v.to_str().ok())
.unwrap_or("application/octet-stream");
let content_type = super::ContentType::from(content_type);
if !status.is_client_error() && !status.is_server_error() {
let content = resp.text().await?;
match content_type {
ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yServicesMetadataOut`"))),
ContentType::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`")))),
}
} else {
let content = resp.text().await?;
let entity: Option<ListServicesMetadataError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Lists the caller's org's mapping groups, optionally only the enabled ones. Callers need the viewer role; the runtime's own gate enforces it.
pub async fn list_span_mapper_groups(configuration: &configuration::Configuration, enabled: Option<bool>) -> Result<models::O11yPeriodO11ySpanMapperGroupsOut, Error<ListSpanMapperGroupsError>> {
// add a prefix to parameters to efficiently prevent name collisions
let p_enabled = enabled;
let uri_str = format!("{}/v1/o11y/span_mapper_groups", configuration.base_path);
let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
if let Some(ref param_value) = p_enabled {
req_builder = req_builder.query(&[("enabled", ¶m_value.to_string())]);
}
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
let content_type = resp
.headers()
.get("content-type")
.and_then(|v| v.to_str().ok())
.unwrap_or("application/octet-stream");
let content_type = super::ContentType::from(content_type);
if !status.is_client_error() && !status.is_server_error() {
let content = resp.text().await?;
match content_type {
ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11ySpanMapperGroupsOut`"))),
ContentType::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`")))),
}
} else {
let content = resp.text().await?;
let entity: Option<ListSpanMapperGroupsError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Lists the mappers belonging to one group, in the order they are applied. Callers need the viewer role; the runtime's own gate enforces it.
pub async fn list_span_mappers(configuration: &configuration::Configuration, group_id: &str) -> Result<models::O11yPeriodO11ySpanMappersOut, Error<ListSpanMappersError>> {
// add a prefix to parameters to efficiently prevent name collisions
let p_group_id = group_id;
let uri_str = format!("{}/v1/o11y/span_mapper_groups/{groupId}/span_mappers", configuration.base_path, groupId=crate::apis::urlencode(p_group_id));
let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
let content_type = resp
.headers()
.get("content-type")
.and_then(|v| v.to_str().ok())
.unwrap_or("application/octet-stream");
let content_type = super::ContentType::from(content_type);
if !status.is_client_error() && !status.is_server_error() {
let content = resp.text().await?;
match content_type {
ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11ySpanMappersOut`"))),
ContentType::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`")))),
}
} else {
let content = resp.text().await?;
let entity: Option<ListSpanMappersError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Lists the caller's org's funnels, each with its steps and who last touched it. Callers need the viewer role; the runtime's own gate enforces it.
pub async fn list_trace_funnels(configuration: &configuration::Configuration, ) -> Result<models::O11yPeriodO11yFunnelsOut, Error<ListTraceFunnelsError>> {
let uri_str = format!("{}/v1/o11y/trace-funnels/list", configuration.base_path);
let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
let content_type = resp
.headers()
.get("content-type")
.and_then(|v| v.to_str().ok())
.unwrap_or("application/octet-stream");
let content_type = super::ContentType::from(content_type);
if !status.is_client_error() && !status.is_server_error() {
let content = resp.text().await?;
match content_type {
ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yFunnelsOut`"))),
ContentType::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`")))),
}
} else {
let content = resp.text().await?;
let entity: Option<ListTraceFunnelsError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Lists every preference of the calling user, each with its current and default value. Viewer gate.
pub async fn list_user_preferences(configuration: &configuration::Configuration, ) -> Result<models::O11yPeriodO11yPreferencesOut, Error<ListUserPreferencesError>> {
let uri_str = format!("{}/v1/o11y/user/preferences", configuration.base_path);
let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
let content_type = resp
.headers()
.get("content-type")
.and_then(|v| v.to_str().ok())
.unwrap_or("application/octet-stream");
let content_type = super::ContentType::from(content_type);
if !status.is_client_error() && !status.is_server_error() {
let content = resp.text().await?;
match content_type {
ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yPreferencesOut`"))),
ContentType::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`")))),
}
} else {
let content = resp.text().await?;
let entity: Option<ListUserPreferencesError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Lists the caller's org members. Admin gate.
pub async fn list_users(configuration: &configuration::Configuration, ) -> Result<models::O11yPeriodO11yUsersOut, Error<ListUsersError>> {
let uri_str = format!("{}/v1/o11y/users", configuration.base_path);
let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
let content_type = resp
.headers()
.get("content-type")
.and_then(|v| v.to_str().ok())
.unwrap_or("application/octet-stream");
let content_type = super::ContentType::from(content_type);
if !status.is_client_error() && !status.is_server_error() {
let content = resp.text().await?;
match content_type {
ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yUsersOut`"))),
ContentType::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`")))),
}
} else {
let content = resp.text().await?;
let entity: Option<ListUsersError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Lists the org's members with their single legacy role. Deprecated in favor of listUsers, which answers without the role. Admin gate.
pub async fn list_users_deprecated(configuration: &configuration::Configuration, ) -> Result<models::O11yPeriodO11yDeprecatedUsersOut, Error<ListUsersDeprecatedError>> {
let uri_str = format!("{}/v1/o11y/user", configuration.base_path);
let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
let content_type = resp
.headers()
.get("content-type")
.and_then(|v| v.to_str().ok())
.unwrap_or("application/octet-stream");
let content_type = super::ContentType::from(content_type);
if !status.is_client_error() && !status.is_server_error() {
let content = resp.text().await?;
match content_type {
ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yDeprecatedUsersOut`"))),
ContentType::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`")))),
}
} else {
let content = resp.text().await?;
let entity: Option<ListUsersDeprecatedError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Locks a v2-shape dashboard. Only the dashboard's creator or an org admin may lock or unlock. Callers need the editor role; the runtime's own gate enforces it.
pub async fn lock_dashboard_v2(configuration: &configuration::Configuration, id: &str) -> Result<(), Error<LockDashboardV2Error>> {
// add a prefix to parameters to efficiently prevent name collisions
let p_id = id;
let uri_str = format!("{}/v1/o11y/dashboards/{id}/lock", configuration.base_path, id=crate::apis::urlencode(p_id));
let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str);
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
if !status.is_client_error() && !status.is_server_error() {
Ok(())
} else {
let content = resp.text().await?;
let entity: Option<LockDashboardV2Error> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Applies an RFC 6902 JSON Patch to a v2-shape dashboard. The patch is applied against the postable view (metadata, spec, tags), so individual panels, queries, variables, layouts or tags can be updated without re-sending the rest. Apply is lenient — remove on a missing path is a no-op and add creates any missing parent objects — and the result is still validated. Locked dashboards are rejected. The request body is the bare JSON Patch operations array. Callers need the editor role; the runtime's own gate enforces it.
pub async fn patch_dashboard_v2(configuration: &configuration::Configuration, id: &str, o11y_period_o11y_dashboard_patch_in: models::O11yPeriodO11yDashboardPatchIn) -> Result<models::O11yPeriodO11yDashboardOut, Error<PatchDashboardV2Error>> {
// add a prefix to parameters to efficiently prevent name collisions
let p_id = id;
let p_o11y_period_o11y_dashboard_patch_in = o11y_period_o11y_dashboard_patch_in;
let uri_str = format!("{}/v1/o11y/dashboards/{id}", configuration.base_path, id=crate::apis::urlencode(p_id));
let mut req_builder = configuration.client.request(reqwest::Method::PATCH, &uri_str);
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
req_builder = req_builder.json(&p_o11y_period_o11y_dashboard_patch_in);
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
let content_type = resp
.headers()
.get("content-type")
.and_then(|v| v.to_str().ok())
.unwrap_or("application/octet-stream");
let content_type = super::ContentType::from(content_type);
if !status.is_client_error() && !status.is_server_error() {
let content = resp.text().await?;
match content_type {
ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yDashboardOut`"))),
ContentType::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`")))),
}
} else {
let content = resp.text().await?;
let entity: Option<PatchDashboardV2Error> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Changes a review queue's name, description or score-config set. A field the request omits is left alone. A name another queue in the same project already uses is a 409; a queue id belonging to another org is a 404.
pub async fn patch_o11y_reviews_by_id(configuration: &configuration::Configuration, id: &str, o11y_period_update_queue_in: models::O11yPeriodUpdateQueueIn) -> Result<models::O11yPeriodAnnQueueView, Error<PatchO11yReviewsByIdError>> {
// add a prefix to parameters to efficiently prevent name collisions
let p_id = id;
let p_o11y_period_update_queue_in = o11y_period_update_queue_in;
let uri_str = format!("{}/v1/o11y/reviews/{id}", configuration.base_path, id=crate::apis::urlencode(p_id));
let mut req_builder = configuration.client.request(reqwest::Method::PATCH, &uri_str);
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
req_builder = req_builder.json(&p_o11y_period_update_queue_in);
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
let content_type = resp
.headers()
.get("content-type")
.and_then(|v| v.to_str().ok())
.unwrap_or("application/octet-stream");
let content_type = super::ContentType::from(content_type);
if !status.is_client_error() && !status.is_server_error() {
let content = resp.text().await?;
match content_type {
ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodAnnQueueView`"))),
ContentType::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`")))),
}
} else {
let content = resp.text().await?;
let entity: Option<PatchO11yReviewsByIdError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Moves one queue item between PENDING and COMPLETED and sets its assignee. Completing an item stamps its completedAt. An item that exists under a different queue answers the same 404 an unknown item does, and so does a queue belonging to another org.
pub 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>> {
// add a prefix to parameters to efficiently prevent name collisions
let p_id = id;
let p_item_id = item_id;
let p_o11y_period_update_item_in = o11y_period_update_item_in;
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));
let mut req_builder = configuration.client.request(reqwest::Method::PATCH, &uri_str);
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
req_builder = req_builder.json(&p_o11y_period_update_item_in);
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
let content_type = resp
.headers()
.get("content-type")
.and_then(|v| v.to_str().ok())
.unwrap_or("application/octet-stream");
let content_type = super::ContentType::from(content_type);
if !status.is_client_error() && !status.is_server_error() {
let content = resp.text().await?;
match content_type {
ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodAnnItemView`"))),
ContentType::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`")))),
}
} else {
let content = resp.text().await?;
let entity: Option<PatchO11yReviewsByIdItemsByItemidError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Applies a partial update to an alert rule, by id, answering with the stored rule — the common toggle for enabling or muting a rule. Editor gate.
pub async fn patch_rule_by_id(configuration: &configuration::Configuration, id: &str, body: Option<serde_json::Value>) -> Result<models::O11yPeriodO11yRuleOut, Error<PatchRuleByIdError>> {
// add a prefix to parameters to efficiently prevent name collisions
let p_id = id;
let p_body = body;
let uri_str = format!("{}/v1/o11y/rules/{id}", configuration.base_path, id=crate::apis::urlencode(p_id));
let mut req_builder = configuration.client.request(reqwest::Method::PATCH, &uri_str);
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
req_builder = req_builder.json(&p_body);
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
let content_type = resp
.headers()
.get("content-type")
.and_then(|v| v.to_str().ok())
.unwrap_or("application/octet-stream");
let content_type = super::ContentType::from(content_type);
if !status.is_client_error() && !status.is_server_error() {
let content = resp.text().await?;
match content_type {
ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yRuleOut`"))),
ContentType::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`")))),
}
} else {
let content = resp.text().await?;
let entity: Option<PatchRuleByIdError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Pins a dashboard for the calling user. A user can pin at most ten dashboards; pinning at the limit refuses with the runtime's conflict. Re-pinning an already-pinned dashboard is a no-op success. Pinning mutates only the caller's pin list, not the dashboard, so a viewer may pin what a viewer may read. Callers need the viewer role; the runtime's own gate enforces it.
pub async fn pin_dashboard_v2(configuration: &configuration::Configuration, id: &str) -> Result<(), Error<PinDashboardV2Error>> {
// add a prefix to parameters to efficiently prevent name collisions
let p_id = id;
let uri_str = format!("{}/v1/o11y/users/me/dashboards/{id}/pins", configuration.base_path, id=crate::apis::urlencode(p_id));
let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str);
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
if !status.is_client_error() && !status.is_server_error() {
Ok(())
} else {
let content = resp.text().await?;
let entity: Option<PinDashboardV2Error> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Records one Alertmanager webhook delivery and pages the on-call. Each alert prints an `ALERT-RECEIVED` line and joins the replay ring, then the batch is carried out of the process by the egress chain: the org's KMS-custodied Slack bot token first (the ONE product Slack egress, not a second webhook credential), falling back to a plain POST to `CLOUD_ALERTS_WEBHOOK_URL` — which needs no Slack connection and so works in exactly the state that silences the first. Resolved notifications page too: \"it recovered\" is the half of an incident people are actually waiting for. THE STATUS CODE REPORTS DELIVERY, NOT ARRIVAL. 200 `ok` means an egress accepted the batch. If none did — including when none is configured at all — it answers **503** naming the failure, so Alertmanager retries and counts it in `alertmanager_notifications_failed_total`. An alert nobody could be told about must never answer the same way as one that was delivered. A body that will not parse is still recorded (with empty fields) rather than rejected: the delivery happened, which is the fact being recorded, and a 400 would make Alertmanager retry a malformed payload forever. The receiver segment is Alertmanager's own receiver name, a parameter rather than a hand-listed route because the receiver set is config, not code.
pub async fn post_o11y_alerts_by_receiver(configuration: &configuration::Configuration, receiver: &str) -> Result<(), Error<PostO11yAlertsByReceiverError>> {
// add a prefix to parameters to efficiently prevent name collisions
let p_receiver = receiver;
let uri_str = format!("{}/v1/o11y/alerts/{receiver}", configuration.base_path, receiver=crate::apis::urlencode(p_receiver));
let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
if !status.is_client_error() && !status.is_server_error() {
Ok(())
} else {
let content = resp.text().await?;
let entity: Option<PostO11yAlertsByReceiverError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Accepts an application/x-sentry-envelope frame from a Sentry SDK — the batched wire format carrying events, sessions and attachments — and ingests it against the project named in the path. THE /api/ SEGMENT IS NOT OURS TO NAME. An SDK appends its own fixed /api/<project>/envelope/ suffix to whatever DSN it is given, so this address is the SDK's, received verbatim. We receive this shape; we do not publish it. The clean spelling of the same wire is /v1/event/{project}/envelope/. AUTHENTICATED BY THE DSN PUBLIC KEY, never a Hanzo session, and therefore exempt from the principal gate: the ingest verifier checks the key in constant time, fails closed, and derives the org from it. A keyless submission is a 401 from that verifier — not a 403 from the gate, and not a 404 — which is how you tell the hops apart. The exemption is matched by method plus prefix plus suffix, never a bare prefix, so no read is reachable through it.
pub async fn post_o11y_api_by_project_id_envelope(configuration: &configuration::Configuration, project_id: &str) -> Result<(), Error<PostO11yApiByProjectIdEnvelopeError>> {
// add a prefix to parameters to efficiently prevent name collisions
let p_project_id = project_id;
let uri_str = format!("{}/v1/o11y/api/{project_id}/envelope/", configuration.base_path, project_id=crate::apis::urlencode(p_project_id));
let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
if !status.is_client_error() && !status.is_server_error() {
Ok(())
} else {
let content = resp.text().await?;
let entity: Option<PostO11yApiByProjectIdEnvelopeError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// The legacy single-event form of the envelope ingest: one JSON event rather than a framed batch, kept because SDKs in the field still send it. Same address ownership and same authentication as the envelope route — the /api/ segment is the SDK's, the DSN public key is the credential, the principal gate does not apply, and a keyless submission is a 401 from the ingest verifier.
pub async fn post_o11y_api_by_project_id_store(configuration: &configuration::Configuration, project_id: &str) -> Result<(), Error<PostO11yApiByProjectIdStoreError>> {
// add a prefix to parameters to efficiently prevent name collisions
let p_project_id = project_id;
let uri_str = format!("{}/v1/o11y/api/{project_id}/store/", configuration.base_path, project_id=crate::apis::urlencode(p_project_id));
let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
if !status.is_client_error() && !status.is_server_error() {
Ok(())
} else {
let content = resp.text().await?;
let entity: Option<PostO11yApiByProjectIdStoreError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Reads the attribute-value request from the body rather than off the query string — the spelling the newer builder uses to send its filters alongside the request. Callers need the viewer role; the runtime's own gate enforces it.
pub async fn post_o11y_auto_complete_attribute_values(configuration: &configuration::Configuration, o11y_period_filter_attribute_value_request: models::O11yPeriodFilterAttributeValueRequest) -> Result<models::O11yPeriodO11yAttributeValuesOut, Error<PostO11yAutoCompleteAttributeValuesError>> {
// add a prefix to parameters to efficiently prevent name collisions
let p_o11y_period_filter_attribute_value_request = o11y_period_filter_attribute_value_request;
let uri_str = format!("{}/v1/o11y/auto_complete/attribute_values", configuration.base_path);
let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
req_builder = req_builder.json(&p_o11y_period_filter_attribute_value_request);
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
let content_type = resp
.headers()
.get("content-type")
.and_then(|v| v.to_str().ok())
.unwrap_or("application/octet-stream");
let content_type = super::ContentType::from(content_type);
if !status.is_client_error() && !status.is_server_error() {
let content = resp.text().await?;
match content_type {
ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yAttributeValuesOut`"))),
ContentType::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`")))),
}
} else {
let content = resp.text().await?;
let entity: Option<PostO11yAutoCompleteAttributeValuesError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Lists Kubernetes clusters over a time range, each with its CPU and memory usage against allocatable capacity and its attributes; filterable, groupable and paginated.
pub async fn post_o11y_clusters_list(configuration: &configuration::Configuration, o11y_period_cluster_list_request: models::O11yPeriodClusterListRequest) -> Result<models::O11yPeriodO11yClusterListOut, Error<PostO11yClustersListError>> {
// add a prefix to parameters to efficiently prevent name collisions
let p_o11y_period_cluster_list_request = o11y_period_cluster_list_request;
let uri_str = format!("{}/v1/o11y/clusters/list", configuration.base_path);
let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
req_builder = req_builder.json(&p_o11y_period_cluster_list_request);
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
let content_type = resp
.headers()
.get("content-type")
.and_then(|v| v.to_str().ok())
.unwrap_or("application/octet-stream");
let content_type = super::ContentType::from(content_type);
if !status.is_client_error() && !status.is_server_error() {
let content = resp.text().await?;
match content_type {
ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yClusterListOut`"))),
ContentType::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`")))),
}
} else {
let content = resp.text().await?;
let entity: Option<PostO11yClustersListError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// The assertion consumer service: the identity provider POSTs its signed assertion here, and a valid one establishes the session and answers 303 to the console. A redirect, not a value, so it is not a typed operation. UNAUTHENTICATED by necessity and authenticated in fact by the assertion's signature, which is checked against the configured provider before any session exists.
pub async fn post_o11y_complete_saml(configuration: &configuration::Configuration, ) -> Result<(), Error<PostO11yCompleteSamlError>> {
let uri_str = format!("{}/v1/o11y/complete/saml", configuration.base_path);
let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
if !status.is_client_error() && !status.is_server_error() {
Ok(())
} else {
let content = resp.text().await?;
let entity: Option<PostO11yCompleteSamlError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Counts the grouped exceptions in the query window for the caller's org. Callers need the viewer role; the runtime's own gate enforces it.
pub async fn post_o11y_counterrors(configuration: &configuration::Configuration, o11y_period_o11y_errors_count_in: models::O11yPeriodO11yErrorsCountIn) -> Result<i32, Error<PostO11yCounterrorsError>> {
// add a prefix to parameters to efficiently prevent name collisions
let p_o11y_period_o11y_errors_count_in = o11y_period_o11y_errors_count_in;
let uri_str = format!("{}/v1/o11y/countErrors", configuration.base_path);
let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
req_builder = req_builder.json(&p_o11y_period_o11y_errors_count_in);
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
let content_type = resp
.headers()
.get("content-type")
.and_then(|v| v.to_str().ok())
.unwrap_or("application/octet-stream");
let content_type = super::ContentType::from(content_type);
if !status.is_client_error() && !status.is_server_error() {
let content = resp.text().await?;
match content_type {
ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `i32`"))),
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`")))),
}
} else {
let content = resp.text().await?;
let entity: Option<PostO11yCounterrorsError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Lists Kubernetes daemonsets over a time range, each with the CPU and memory its pods used against request and limit, desired and available node counts, restarts and attributes; filterable, groupable and paginated.
pub async fn post_o11y_daemonsets_list(configuration: &configuration::Configuration, o11y_period_daemon_set_list_request: models::O11yPeriodDaemonSetListRequest) -> Result<models::O11yPeriodO11yDaemonSetListOut, Error<PostO11yDaemonsetsListError>> {
// add a prefix to parameters to efficiently prevent name collisions
let p_o11y_period_daemon_set_list_request = o11y_period_daemon_set_list_request;
let uri_str = format!("{}/v1/o11y/daemonsets/list", configuration.base_path);
let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
req_builder = req_builder.json(&p_o11y_period_daemon_set_list_request);
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
let content_type = resp
.headers()
.get("content-type")
.and_then(|v| v.to_str().ok())
.unwrap_or("application/octet-stream");
let content_type = super::ContentType::from(content_type);
if !status.is_client_error() && !status.is_server_error() {
let content = resp.text().await?;
match content_type {
ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yDaemonSetListOut`"))),
ContentType::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`")))),
}
} else {
let content = resp.text().await?;
let entity: Option<PostO11yDaemonsetsListError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Returns the service dependency graph over the requested window: every parent→child edge observed, with call and error rates and latency percentiles per edge. Callers need the viewer role; the runtime's own gate enforces it.
pub async fn post_o11y_dependency_graph(configuration: &configuration::Configuration, o11y_period_o11y_dependency_graph_in: models::O11yPeriodO11yDependencyGraphIn) -> Result<Vec<models::O11yPeriodO11yDependency>, Error<PostO11yDependencyGraphError>> {
// add a prefix to parameters to efficiently prevent name collisions
let p_o11y_period_o11y_dependency_graph_in = o11y_period_o11y_dependency_graph_in;
let uri_str = format!("{}/v1/o11y/dependency_graph", configuration.base_path);
let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
req_builder = req_builder.json(&p_o11y_period_o11y_dependency_graph_in);
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
let content_type = resp
.headers()
.get("content-type")
.and_then(|v| v.to_str().ok())
.unwrap_or("application/octet-stream");
let content_type = super::ContentType::from(content_type);
if !status.is_client_error() && !status.is_server_error() {
let content = resp.text().await?;
match content_type {
ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::O11yPeriodO11yDependency>`"))),
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>`")))),
}
} else {
let content = resp.text().await?;
let entity: Option<PostO11yDependencyGraphError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Lists Kubernetes deployments over a time range, each with the CPU and memory its pods used against request and limit, desired and available replica counts, restarts and attributes; filterable, groupable and paginated.
pub async fn post_o11y_deployments_list(configuration: &configuration::Configuration, o11y_period_deployment_list_request: models::O11yPeriodDeploymentListRequest) -> Result<models::O11yPeriodO11yDeploymentListOut, Error<PostO11yDeploymentsListError>> {
// add a prefix to parameters to efficiently prevent name collisions
let p_o11y_period_deployment_list_request = o11y_period_deployment_list_request;
let uri_str = format!("{}/v1/o11y/deployments/list", configuration.base_path);
let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
req_builder = req_builder.json(&p_o11y_period_deployment_list_request);
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
let content_type = resp
.headers()
.get("content-type")
.and_then(|v| v.to_str().ok())
.unwrap_or("application/octet-stream");
let content_type = super::ContentType::from(content_type);
if !status.is_client_error() && !status.is_server_error() {
let content = resp.text().await?;
match content_type {
ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yDeploymentListOut`"))),
ContentType::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`")))),
}
} else {
let content = resp.text().await?;
let entity: Option<PostO11yDeploymentsListError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Changes an issue's lifecycle — resolve, ignore, reopen or assign — and returns the updated issue. Fields left unset are left unchanged. Callers need the editor role; the runtime's own gate enforces it.
pub 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>> {
// add a prefix to parameters to efficiently prevent name collisions
let p_id = id;
let p_o11y_period_o11y_error_update_issue_in = o11y_period_o11y_error_update_issue_in;
let uri_str = format!("{}/v1/o11y/errortracking/issues/{id}", configuration.base_path, id=crate::apis::urlencode(p_id));
let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
req_builder = req_builder.json(&p_o11y_period_o11y_error_update_issue_in);
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
let content_type = resp
.headers()
.get("content-type")
.and_then(|v| v.to_str().ok())
.unwrap_or("application/octet-stream");
let content_type = super::ContentType::from(content_type);
if !status.is_client_error() && !status.is_server_error() {
let content = resp.text().await?;
match content_type {
ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yErrorIssueOut`"))),
ContentType::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`")))),
}
} else {
let content = resp.text().await?;
let entity: Option<PostO11yErrortrackingIssuesByIdError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Records one product-analytics event for the signed-in user — a track event with a name and free-form attributes. Callers need the viewer role; the runtime's own gate enforces it.
pub async fn post_o11y_event(configuration: &configuration::Configuration, o11y_period_o11y_event_in: models::O11yPeriodO11yEventIn) -> Result<models::O11yPeriodO11yMessage, Error<PostO11yEventError>> {
// add a prefix to parameters to efficiently prevent name collisions
let p_o11y_period_o11y_event_in = o11y_period_o11y_event_in;
let uri_str = format!("{}/v1/o11y/event", configuration.base_path);
let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
req_builder = req_builder.json(&p_o11y_period_o11y_event_in);
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
let content_type = resp
.headers()
.get("content-type")
.and_then(|v| v.to_str().ok())
.unwrap_or("application/octet-stream");
let content_type = super::ContentType::from(content_type);
if !status.is_client_error() && !status.is_server_error() {
let content = resp.text().await?;
match content_type {
ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yMessage`"))),
ContentType::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`")))),
}
} else {
let content = resp.text().await?;
let entity: Option<PostO11yEventError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Saves a new explorer view for the caller's org and returns its id. Callers need the editor role; the runtime's own gate enforces it.
pub async fn post_o11y_explorer_views(configuration: &configuration::Configuration, o11y_period_saved_view: models::O11yPeriodSavedView) -> Result<models::O11yPeriodO11ySavedViewCreateOut, Error<PostO11yExplorerViewsError>> {
// add a prefix to parameters to efficiently prevent name collisions
let p_o11y_period_saved_view = o11y_period_saved_view;
let uri_str = format!("{}/v1/o11y/explorer/views", configuration.base_path);
let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
req_builder = req_builder.json(&p_o11y_period_saved_view);
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
let content_type = resp
.headers()
.get("content-type")
.and_then(|v| v.to_str().ok())
.unwrap_or("application/octet-stream");
let content_type = super::ContentType::from(content_type);
if !status.is_client_error() && !status.is_server_error() {
let content = resp.text().await?;
match content_type {
ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11ySavedViewCreateOut`"))),
ContentType::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`")))),
}
} else {
let content = resp.text().await?;
let entity: Option<PostO11yExplorerViewsError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Runs a query and returns its rows as a downloadable CSV or JSONL attachment, chunked, with a trailer that says whether the export completed — so a truncated download is detectable rather than silently short. The answer is a file, not a value, which is why it is not a typed operation: the body is neither JSON nor bounded. Use the query operations when you want rows in a response. A validated, org-scoped principal is required and the export carries that principal's own tenant only.
pub async fn post_o11y_export_raw_data(configuration: &configuration::Configuration, ) -> Result<(), Error<PostO11yExportRawDataError>> {
let uri_str = format!("{}/v1/o11y/export_raw_data", configuration.base_path);
let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
if !status.is_client_error() && !status.is_server_error() {
Ok(())
} else {
let content = resp.text().await?;
let entity: Option<PostO11yExportRawDataError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Lists monitored hosts over a time range, each with its CPU, memory, I/O wait and 15-minute load, whether it is actively reporting, its OS and its attributes; filterable, groupable and paginated. The answer also says whether any host metrics were received at all and which clusters and nodes sent them, so an empty page is distinguishable from a fleet that never reported.
pub async fn post_o11y_hosts_list(configuration: &configuration::Configuration, o11y_period_host_list_request: models::O11yPeriodHostListRequest) -> Result<models::O11yPeriodO11yHostListOut, Error<PostO11yHostsListError>> {
// add a prefix to parameters to efficiently prevent name collisions
let p_o11y_period_host_list_request = o11y_period_host_list_request;
let uri_str = format!("{}/v1/o11y/hosts/list", configuration.base_path);
let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
req_builder = req_builder.json(&p_o11y_period_host_list_request);
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
let content_type = resp
.headers()
.get("content-type")
.and_then(|v| v.to_str().ok())
.unwrap_or("application/octet-stream");
let content_type = super::ContentType::from(content_type);
if !status.is_client_error() && !status.is_server_error() {
let content = resp.text().await?;
match content_type {
ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yHostListOut`"))),
ContentType::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`")))),
}
} else {
let content = resp.text().await?;
let entity: Option<PostO11yHostsListError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Lists Kubernetes clusters with CPU and memory usage against allocatable capacity summed over their nodes, plus per-group node readiness and pod phase counts. Rows answer as 'list' under the default k8s.cluster.name grouping or 'grouped_list' under a custom groupBy; a metric with no data in the window answers -1. Filterable by expression, orderable by usage or allocatable, paginated by offset and limit.
pub async fn post_o11y_infra_monitoring_clusters(configuration: &configuration::Configuration, o11y_period_postable_clusters: models::O11yPeriodPostableClusters) -> Result<models::O11yPeriodO11yInfraClustersOut, Error<PostO11yInfraMonitoringClustersError>> {
// add a prefix to parameters to efficiently prevent name collisions
let p_o11y_period_postable_clusters = o11y_period_postable_clusters;
let uri_str = format!("{}/v1/o11y/infra_monitoring/clusters", configuration.base_path);
let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
req_builder = req_builder.json(&p_o11y_period_postable_clusters);
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
let content_type = resp
.headers()
.get("content-type")
.and_then(|v| v.to_str().ok())
.unwrap_or("application/octet-stream");
let content_type = super::ContentType::from(content_type);
if !status.is_client_error() && !status.is_server_error() {
let content = resp.text().await?;
match content_type {
ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yInfraClustersOut`"))),
ContentType::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`")))),
}
} else {
let content = resp.text().await?;
let entity: Option<PostO11yInfraMonitoringClustersError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Lists Kubernetes daemonsets with the CPU and memory their pods used against request and limit, the latest desired and current scheduled NODE counts (node counts, not pod counts), and per-group pod phase counts. Rows answer as 'list' under the default k8s.daemonset.name grouping or 'grouped_list' under a custom groupBy; a metric with no data in the window answers -1. Filterable by expression, orderable by the pod metrics or the node counts, paginated by offset and limit.
pub async fn post_o11y_infra_monitoring_daemonsets(configuration: &configuration::Configuration, o11y_period_postable_daemon_sets: models::O11yPeriodPostableDaemonSets) -> Result<models::O11yPeriodO11yInfraDaemonSetsOut, Error<PostO11yInfraMonitoringDaemonsetsError>> {
// add a prefix to parameters to efficiently prevent name collisions
let p_o11y_period_postable_daemon_sets = o11y_period_postable_daemon_sets;
let uri_str = format!("{}/v1/o11y/infra_monitoring/daemonsets", configuration.base_path);
let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
req_builder = req_builder.json(&p_o11y_period_postable_daemon_sets);
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
let content_type = resp
.headers()
.get("content-type")
.and_then(|v| v.to_str().ok())
.unwrap_or("application/octet-stream");
let content_type = super::ContentType::from(content_type);
if !status.is_client_error() && !status.is_server_error() {
let content = resp.text().await?;
match content_type {
ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yInfraDaemonSetsOut`"))),
ContentType::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`")))),
}
} else {
let content = resp.text().await?;
let entity: Option<PostO11yInfraMonitoringDaemonsetsError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Lists Kubernetes deployments with the CPU and memory their pods used against request and limit, the latest desired and available replica counts, and per-group pod phase counts. Rows answer as 'list' under the default k8s.deployment.name grouping or 'grouped_list' under a custom groupBy; a metric with no data in the window answers -1. Filterable by expression, orderable by the pod metrics or the replica counts, paginated by offset and limit.
pub async fn post_o11y_infra_monitoring_deployments(configuration: &configuration::Configuration, o11y_period_postable_deployments: models::O11yPeriodPostableDeployments) -> Result<models::O11yPeriodO11yInfraDeploymentsOut, Error<PostO11yInfraMonitoringDeploymentsError>> {
// add a prefix to parameters to efficiently prevent name collisions
let p_o11y_period_postable_deployments = o11y_period_postable_deployments;
let uri_str = format!("{}/v1/o11y/infra_monitoring/deployments", configuration.base_path);
let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
req_builder = req_builder.json(&p_o11y_period_postable_deployments);
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
let content_type = resp
.headers()
.get("content-type")
.and_then(|v| v.to_str().ok())
.unwrap_or("application/octet-stream");
let content_type = super::ContentType::from(content_type);
if !status.is_client_error() && !status.is_server_error() {
let content = resp.text().await?;
match content_type {
ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yInfraDeploymentsOut`"))),
ContentType::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`")))),
}
} else {
let content = resp.text().await?;
let entity: Option<PostO11yInfraMonitoringDeploymentsError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Lists hosts with key infrastructure metrics — CPU, memory, I/O wait and disk usage percentages and 15-minute load — plus an active/inactive status from whether the host reported in the last ten minutes. Rows answer as 'list' under the default host.name grouping or 'grouped_list' under a custom groupBy; a metric with no data in the window answers -1. Filterable by expression and by status, orderable by any of the five metrics, paginated by offset and limit.
pub async fn post_o11y_infra_monitoring_hosts(configuration: &configuration::Configuration, o11y_period_postable_hosts: models::O11yPeriodPostableHosts) -> Result<models::O11yPeriodO11yInfraHostsOut, Error<PostO11yInfraMonitoringHostsError>> {
// add a prefix to parameters to efficiently prevent name collisions
let p_o11y_period_postable_hosts = o11y_period_postable_hosts;
let uri_str = format!("{}/v1/o11y/infra_monitoring/hosts", configuration.base_path);
let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
req_builder = req_builder.json(&p_o11y_period_postable_hosts);
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
let content_type = resp
.headers()
.get("content-type")
.and_then(|v| v.to_str().ok())
.unwrap_or("application/octet-stream");
let content_type = super::ContentType::from(content_type);
if !status.is_client_error() && !status.is_server_error() {
let content = resp.text().await?;
match content_type {
ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yInfraHostsOut`"))),
ContentType::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`")))),
}
} else {
let content = resp.text().await?;
let entity: Option<PostO11yInfraMonitoringHostsError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Lists Kubernetes jobs with the CPU and memory their pods used against request and limit, the latest desired-successful, active, failed and successful pod counters, and per-group pod phase counts — the phase counts are current state while the counters are cumulative over the job's life. Rows answer as 'list' under the default k8s.job.name grouping or 'grouped_list' under a custom groupBy; a metric with no data in the window answers -1. Filterable by expression, orderable by the pod metrics or the job counters, paginated by offset and limit.
pub async fn post_o11y_infra_monitoring_jobs(configuration: &configuration::Configuration, o11y_period_postable_jobs: models::O11yPeriodPostableJobs) -> Result<models::O11yPeriodO11yInfraJobsOut, Error<PostO11yInfraMonitoringJobsError>> {
// add a prefix to parameters to efficiently prevent name collisions
let p_o11y_period_postable_jobs = o11y_period_postable_jobs;
let uri_str = format!("{}/v1/o11y/infra_monitoring/jobs", configuration.base_path);
let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
req_builder = req_builder.json(&p_o11y_period_postable_jobs);
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
let content_type = resp
.headers()
.get("content-type")
.and_then(|v| v.to_str().ok())
.unwrap_or("application/octet-stream");
let content_type = super::ContentType::from(content_type);
if !status.is_client_error() && !status.is_server_error() {
let content = resp.text().await?;
match content_type {
ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yInfraJobsOut`"))),
ContentType::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`")))),
}
} else {
let content = resp.text().await?;
let entity: Option<PostO11yInfraMonitoringJobsError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Lists Kubernetes namespaces with the CPU and memory their pods used and per-group pod phase counts. Rows answer as 'list' under the default k8s.namespace.name grouping or 'grouped_list' under a custom groupBy, aggregating pods either way; a metric with no data in the window answers -1. Filterable by expression, orderable by cpu or memory, paginated by offset and limit.
pub async fn post_o11y_infra_monitoring_namespaces(configuration: &configuration::Configuration, o11y_period_postable_namespaces: models::O11yPeriodPostableNamespaces) -> Result<models::O11yPeriodO11yInfraNamespacesOut, Error<PostO11yInfraMonitoringNamespacesError>> {
// add a prefix to parameters to efficiently prevent name collisions
let p_o11y_period_postable_namespaces = o11y_period_postable_namespaces;
let uri_str = format!("{}/v1/o11y/infra_monitoring/namespaces", configuration.base_path);
let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
req_builder = req_builder.json(&p_o11y_period_postable_namespaces);
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
let content_type = resp
.headers()
.get("content-type")
.and_then(|v| v.to_str().ok())
.unwrap_or("application/octet-stream");
let content_type = super::ContentType::from(content_type);
if !status.is_client_error() && !status.is_server_error() {
let content = resp.text().await?;
match content_type {
ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yInfraNamespacesOut`"))),
ContentType::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`")))),
}
} else {
let content = resp.text().await?;
let entity: Option<PostO11yInfraMonitoringNamespacesError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Lists Kubernetes nodes with CPU and memory usage against allocatable capacity, per-group readiness counts and per-group phase counts for the pods scheduled on them. Rows answer as 'list' under the default k8s.node.name grouping (each row one node with its readiness condition) or 'grouped_list' under a custom groupBy; a metric with no data in the window answers -1. Filterable by expression, orderable by usage or allocatable, paginated by offset and limit.
pub async fn post_o11y_infra_monitoring_nodes(configuration: &configuration::Configuration, o11y_period_postable_nodes: models::O11yPeriodPostableNodes) -> Result<models::O11yPeriodO11yInfraNodesOut, Error<PostO11yInfraMonitoringNodesError>> {
// add a prefix to parameters to efficiently prevent name collisions
let p_o11y_period_postable_nodes = o11y_period_postable_nodes;
let uri_str = format!("{}/v1/o11y/infra_monitoring/nodes", configuration.base_path);
let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
req_builder = req_builder.json(&p_o11y_period_postable_nodes);
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
let content_type = resp
.headers()
.get("content-type")
.and_then(|v| v.to_str().ok())
.unwrap_or("application/octet-stream");
let content_type = super::ContentType::from(content_type);
if !status.is_client_error() && !status.is_server_error() {
let content = resp.text().await?;
match content_type {
ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yInfraNodesOut`"))),
ContentType::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`")))),
}
} else {
let content = resp.text().await?;
let entity: Option<PostO11yInfraMonitoringNodesError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Lists Kubernetes pods with CPU and memory usage against request and limit, the pod's phase and its age, plus its namespace, node, owning workload and cluster attributes. Rows answer as 'list' under the default k8s.pod.uid grouping (each row one pod) or 'grouped_list' under a custom groupBy (each row aggregating its pods with per-phase counts); a metric with no data in the window answers -1. Filterable by expression, orderable by the six pod metrics, paginated by offset and limit.
pub async fn post_o11y_infra_monitoring_pods(configuration: &configuration::Configuration, o11y_period_postable_pods: models::O11yPeriodPostablePods) -> Result<models::O11yPeriodO11yInfraPodsOut, Error<PostO11yInfraMonitoringPodsError>> {
// add a prefix to parameters to efficiently prevent name collisions
let p_o11y_period_postable_pods = o11y_period_postable_pods;
let uri_str = format!("{}/v1/o11y/infra_monitoring/pods", configuration.base_path);
let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
req_builder = req_builder.json(&p_o11y_period_postable_pods);
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
let content_type = resp
.headers()
.get("content-type")
.and_then(|v| v.to_str().ok())
.unwrap_or("application/octet-stream");
let content_type = super::ContentType::from(content_type);
if !status.is_client_error() && !status.is_server_error() {
let content = resp.text().await?;
match content_type {
ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yInfraPodsOut`"))),
ContentType::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`")))),
}
} else {
let content = resp.text().await?;
let entity: Option<PostO11yInfraMonitoringPodsError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Lists Kubernetes persistent volume claims with available, capacity and used bytes and inode counts, plus the claim's pod, namespace, node, statefulset and cluster attributes. Rows answer as 'list' under the default k8s.persistentvolumeclaim.name grouping or 'grouped_list' under a custom groupBy; a metric with no data in the window answers -1. Filterable by expression, orderable by the six volume metrics, paginated by offset and limit.
pub async fn post_o11y_infra_monitoring_pvcs(configuration: &configuration::Configuration, o11y_period_postable_volumes: models::O11yPeriodPostableVolumes) -> Result<models::O11yPeriodO11yInfraVolumesOut, Error<PostO11yInfraMonitoringPvcsError>> {
// add a prefix to parameters to efficiently prevent name collisions
let p_o11y_period_postable_volumes = o11y_period_postable_volumes;
let uri_str = format!("{}/v1/o11y/infra_monitoring/pvcs", configuration.base_path);
let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
req_builder = req_builder.json(&p_o11y_period_postable_volumes);
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
let content_type = resp
.headers()
.get("content-type")
.and_then(|v| v.to_str().ok())
.unwrap_or("application/octet-stream");
let content_type = super::ContentType::from(content_type);
if !status.is_client_error() && !status.is_server_error() {
let content = resp.text().await?;
match content_type {
ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yInfraVolumesOut`"))),
ContentType::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`")))),
}
} else {
let content = resp.text().await?;
let entity: Option<PostO11yInfraMonitoringPvcsError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Lists Kubernetes statefulsets with the CPU and memory their pods used against request and limit, the latest desired and current replica counts, and per-group pod phase counts. Rows answer as 'list' under the default k8s.statefulset.name grouping or 'grouped_list' under a custom groupBy; a metric with no data in the window answers -1. Filterable by expression, orderable by the pod metrics or the replica counts, paginated by offset and limit.
pub async fn post_o11y_infra_monitoring_statefulsets(configuration: &configuration::Configuration, o11y_period_postable_stateful_sets: models::O11yPeriodPostableStatefulSets) -> Result<models::O11yPeriodO11yInfraStatefulSetsOut, Error<PostO11yInfraMonitoringStatefulsetsError>> {
// add a prefix to parameters to efficiently prevent name collisions
let p_o11y_period_postable_stateful_sets = o11y_period_postable_stateful_sets;
let uri_str = format!("{}/v1/o11y/infra_monitoring/statefulsets", configuration.base_path);
let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
req_builder = req_builder.json(&p_o11y_period_postable_stateful_sets);
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
let content_type = resp
.headers()
.get("content-type")
.and_then(|v| v.to_str().ok())
.unwrap_or("application/octet-stream");
let content_type = super::ContentType::from(content_type);
if !status.is_client_error() && !status.is_server_error() {
let content = resp.text().await?;
match content_type {
ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yInfraStatefulSetsOut`"))),
ContentType::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`")))),
}
} else {
let content = resp.text().await?;
let entity: Option<PostO11yInfraMonitoringStatefulsetsError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Lists Kubernetes jobs over a time range, each with the CPU and memory its pods used against request and limit, desired-successful, active, failed and successful pod counts, restarts and attributes; filterable, groupable and paginated.
pub async fn post_o11y_jobs_list(configuration: &configuration::Configuration, o11y_period_job_list_request: models::O11yPeriodJobListRequest) -> Result<models::O11yPeriodO11yJobListOut, Error<PostO11yJobsListError>> {
// add a prefix to parameters to efficiently prevent name collisions
let p_o11y_period_job_list_request = o11y_period_job_list_request;
let uri_str = format!("{}/v1/o11y/jobs/list", configuration.base_path);
let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
req_builder = req_builder.json(&p_o11y_period_job_list_request);
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
let content_type = resp
.headers()
.get("content-type")
.and_then(|v| v.to_str().ok())
.unwrap_or("application/octet-stream");
let content_type = super::ContentType::from(content_type);
if !status.is_client_error() && !status.is_server_error() {
let content = resp.text().await?;
match content_type {
ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yJobListOut`"))),
ContentType::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`")))),
}
} else {
let content = resp.text().await?;
let entity: Option<PostO11yJobsListError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Lists the grouped exceptions in the query window — each an exception type with its message, count, service and first/last-seen — for the caller's org. Callers need the viewer role; the runtime's own gate enforces it.
pub async fn post_o11y_listerrors(configuration: &configuration::Configuration, o11y_period_o11y_errors_list_in: models::O11yPeriodO11yErrorsListIn) -> Result<Vec<models::O11yPeriodO11yListError>, Error<PostO11yListerrorsError>> {
// add a prefix to parameters to efficiently prevent name collisions
let p_o11y_period_o11y_errors_list_in = o11y_period_o11y_errors_list_in;
let uri_str = format!("{}/v1/o11y/listErrors", configuration.base_path);
let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
req_builder = req_builder.json(&p_o11y_period_o11y_errors_list_in);
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
let content_type = resp
.headers()
.get("content-type")
.and_then(|v| v.to_str().ok())
.unwrap_or("application/octet-stream");
let content_type = super::ContentType::from(content_type);
if !status.is_client_error() && !status.is_server_error() {
let content = resp.text().await?;
match content_type {
ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::O11yPeriodO11yListError>`"))),
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>`")))),
}
} else {
let content = resp.text().await?;
let entity: Option<PostO11yListerrorsError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Changes how one log field is stored — selects or deselects it as a materialized column and tunes its index — and echoes the setting back. Callers need the editor role; the runtime's own gate enforces it.
pub async fn post_o11y_logs_fields(configuration: &configuration::Configuration, o11y_period_o11y_field_setting: models::O11yPeriodO11yFieldSetting) -> Result<models::O11yPeriodO11yFieldSetting, Error<PostO11yLogsFieldsError>> {
// add a prefix to parameters to efficiently prevent name collisions
let p_o11y_period_o11y_field_setting = o11y_period_o11y_field_setting;
let uri_str = format!("{}/v1/o11y/logs/fields", configuration.base_path);
let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
req_builder = req_builder.json(&p_o11y_period_o11y_field_setting);
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
let content_type = resp
.headers()
.get("content-type")
.and_then(|v| v.to_str().ok())
.unwrap_or("application/octet-stream");
let content_type = super::ContentType::from(content_type);
if !status.is_client_error() && !status.is_server_error() {
let content = resp.text().await?;
match content_type {
ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yFieldSetting`"))),
ContentType::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`")))),
}
} else {
let content = resp.text().await?;
let entity: Option<PostO11yLogsFieldsError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Saves the given log parsing pipelines as the new config version for the caller's org and starts deploying it. The set REPLACES the current one: a pipeline left out of the request is dropped from the new version, and an empty set drops them all. Callers need the editor role; the runtime's own gate enforces it.
pub async fn post_o11y_logs_pipelines(configuration: &configuration::Configuration, o11y_period_o11y_log_pipeline_create_in: models::O11yPeriodO11yLogPipelineCreateIn) -> Result<models::O11yPeriodO11yLogPipelinesOut, Error<PostO11yLogsPipelinesError>> {
// add a prefix to parameters to efficiently prevent name collisions
let p_o11y_period_o11y_log_pipeline_create_in = o11y_period_o11y_log_pipeline_create_in;
let uri_str = format!("{}/v1/o11y/logs/pipelines", configuration.base_path);
let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
req_builder = req_builder.json(&p_o11y_period_o11y_log_pipeline_create_in);
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
let content_type = resp
.headers()
.get("content-type")
.and_then(|v| v.to_str().ok())
.unwrap_or("application/octet-stream");
let content_type = super::ContentType::from(content_type);
if !status.is_client_error() && !status.is_server_error() {
let content = resp.text().await?;
match content_type {
ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yLogPipelinesOut`"))),
ContentType::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`")))),
}
} else {
let content = resp.text().await?;
let entity: Option<PostO11yLogsPipelinesError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Runs the given log parsing pipelines over the given sample records without saving anything, and returns the transformed records plus whatever the collector logged while simulating them. Callers need the viewer role; the runtime's own gate enforces it.
pub async fn post_o11y_logs_pipelines_preview(configuration: &configuration::Configuration, o11y_period_o11y_log_pipeline_preview_in: models::O11yPeriodO11yLogPipelinePreviewIn) -> Result<models::O11yPeriodO11yLogPipelinePreviewOut, Error<PostO11yLogsPipelinesPreviewError>> {
// add a prefix to parameters to efficiently prevent name collisions
let p_o11y_period_o11y_log_pipeline_preview_in = o11y_period_o11y_log_pipeline_preview_in;
let uri_str = format!("{}/v1/o11y/logs/pipelines/preview", configuration.base_path);
let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
req_builder = req_builder.json(&p_o11y_period_o11y_log_pipeline_preview_in);
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
let content_type = resp
.headers()
.get("content-type")
.and_then(|v| v.to_str().ok())
.unwrap_or("application/octet-stream");
let content_type = super::ContentType::from(content_type);
if !status.is_client_error() && !status.is_server_error() {
let content = resp.text().await?;
match content_type {
ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yLogPipelinePreviewOut`"))),
ContentType::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`")))),
}
} else {
let content = resp.text().await?;
let entity: Option<PostO11yLogsPipelinesPreviewError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Promotes and indexes log body paths: each named path is lifted out of the JSON body into its own column, with the indexes the caller asked for. Paths must start with \"body.\". Callers need the editor role; the runtime's own gate enforces it.
pub async fn post_o11y_logs_promote_paths(configuration: &configuration::Configuration, o11y_period_o11y_log_promote_path: Vec<models::O11yPeriodO11yLogPromotePath>) -> Result<models::O11yPeriodO11yLogPromoteOut, Error<PostO11yLogsPromotePathsError>> {
// add a prefix to parameters to efficiently prevent name collisions
let p_o11y_period_o11y_log_promote_path = o11y_period_o11y_log_promote_path;
let uri_str = format!("{}/v1/o11y/logs/promote_paths", configuration.base_path);
let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
req_builder = req_builder.json(&p_o11y_period_o11y_log_promote_path);
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
let content_type = resp
.headers()
.get("content-type")
.and_then(|v| v.to_str().ok())
.unwrap_or("application/octet-stream");
let content_type = super::ContentType::from(content_type);
if !status.is_client_error() && !status.is_server_error() {
let content = resp.text().await?;
match content_type {
ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yLogPromoteOut`"))),
ContentType::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`")))),
}
} else {
let content = resp.text().await?;
let entity: Option<PostO11yLogsPromotePathsError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Returns the consumer side of a consumer-lag view: the consumer groups reading the topic/partition named in variables, with their throughput and latency over the window.
pub 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>> {
// add a prefix to parameters to efficiently prevent name collisions
let p_o11y_period_o11y_queue_in = o11y_period_o11y_queue_in;
let uri_str = format!("{}/v1/o11y/messaging-queues/kafka/consumer-lag/consumer-details", configuration.base_path);
let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
req_builder = req_builder.json(&p_o11y_period_o11y_queue_in);
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
let content_type = resp
.headers()
.get("content-type")
.and_then(|v| v.to_str().ok())
.unwrap_or("application/octet-stream");
let content_type = super::ContentType::from(content_type);
if !status.is_client_error() && !status.is_server_error() {
let content = resp.text().await?;
match content_type {
ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yQueryRangeOut`"))),
ContentType::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`")))),
}
} else {
let content = resp.text().await?;
let entity: Option<PostO11yMessagingQueuesKafkaConsumerLagConsumerDetailsError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Returns consumer network latency correlated per client: a throughput pass over the window finds the consumer clients, then their fetch latency joins in as a latency column per client/instance/service.
pub 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>> {
// add a prefix to parameters to efficiently prevent name collisions
let p_o11y_period_o11y_queue_in = o11y_period_o11y_queue_in;
let uri_str = format!("{}/v1/o11y/messaging-queues/kafka/consumer-lag/network-latency", configuration.base_path);
let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
req_builder = req_builder.json(&p_o11y_period_o11y_queue_in);
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
let content_type = resp
.headers()
.get("content-type")
.and_then(|v| v.to_str().ok())
.unwrap_or("application/octet-stream");
let content_type = super::ContentType::from(content_type);
if !status.is_client_error() && !status.is_server_error() {
let content = resp.text().await?;
match content_type {
ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yQueryRangeOut`"))),
ContentType::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`")))),
}
} else {
let content = resp.text().await?;
let entity: Option<PostO11yMessagingQueuesKafkaConsumerLagNetworkLatencyError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Returns the producer side of a consumer-lag view: the producers writing to the topic/partition named in variables, with their throughput and latency over the window.
pub 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>> {
// add a prefix to parameters to efficiently prevent name collisions
let p_o11y_period_o11y_queue_in = o11y_period_o11y_queue_in;
let uri_str = format!("{}/v1/o11y/messaging-queues/kafka/consumer-lag/producer-details", configuration.base_path);
let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
req_builder = req_builder.json(&p_o11y_period_o11y_queue_in);
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
let content_type = resp
.headers()
.get("content-type")
.and_then(|v| v.to_str().ok())
.unwrap_or("application/octet-stream");
let content_type = super::ContentType::from(content_type);
if !status.is_client_error() && !status.is_server_error() {
let content = resp.text().await?;
match content_type {
ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yQueryRangeOut`"))),
ContentType::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`")))),
}
} else {
let content = resp.text().await?;
let entity: Option<PostO11yMessagingQueuesKafkaConsumerLagProducerDetailsError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Checks whether the spans the Kafka consumer views need are arriving, row for row like producersOnboarding.
pub async fn post_o11y_messaging_queues_kafka_onboarding_consumers(configuration: &configuration::Configuration, o11y_period_o11y_queue_in: models::O11yPeriodO11yQueueIn) -> Result<models::O11yPeriodO11yQueueChecksOut, Error<PostO11yMessagingQueuesKafkaOnboardingConsumersError>> {
// add a prefix to parameters to efficiently prevent name collisions
let p_o11y_period_o11y_queue_in = o11y_period_o11y_queue_in;
let uri_str = format!("{}/v1/o11y/messaging-queues/kafka/onboarding/consumers", configuration.base_path);
let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
req_builder = req_builder.json(&p_o11y_period_o11y_queue_in);
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
let content_type = resp
.headers()
.get("content-type")
.and_then(|v| v.to_str().ok())
.unwrap_or("application/octet-stream");
let content_type = super::ContentType::from(content_type);
if !status.is_client_error() && !status.is_server_error() {
let content = resp.text().await?;
match content_type {
ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yQueueChecksOut`"))),
ContentType::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`")))),
}
} else {
let content = resp.text().await?;
let entity: Option<PostO11yMessagingQueuesKafkaOnboardingConsumersError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Checks whether Kafka's own metrics — consumer lag and partition telemetry — are arriving, so the lag views can be lit up.
pub async fn post_o11y_messaging_queues_kafka_onboarding_kafka(configuration: &configuration::Configuration, o11y_period_o11y_queue_in: models::O11yPeriodO11yQueueIn) -> Result<models::O11yPeriodO11yQueueChecksOut, Error<PostO11yMessagingQueuesKafkaOnboardingKafkaError>> {
// add a prefix to parameters to efficiently prevent name collisions
let p_o11y_period_o11y_queue_in = o11y_period_o11y_queue_in;
let uri_str = format!("{}/v1/o11y/messaging-queues/kafka/onboarding/kafka", configuration.base_path);
let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
req_builder = req_builder.json(&p_o11y_period_o11y_queue_in);
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
let content_type = resp
.headers()
.get("content-type")
.and_then(|v| v.to_str().ok())
.unwrap_or("application/octet-stream");
let content_type = super::ContentType::from(content_type);
if !status.is_client_error() && !status.is_server_error() {
let content = resp.text().await?;
match content_type {
ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yQueueChecksOut`"))),
ContentType::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`")))),
}
} else {
let content = resp.text().await?;
let entity: Option<PostO11yMessagingQueuesKafkaOnboardingKafkaError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Checks whether the spans the Kafka producer views need are arriving — one row per required span attribute, with a pass/fail status and, on failure, what is missing from the instrumentation.
pub async fn post_o11y_messaging_queues_kafka_onboarding_producers(configuration: &configuration::Configuration, o11y_period_o11y_queue_in: models::O11yPeriodO11yQueueIn) -> Result<models::O11yPeriodO11yQueueChecksOut, Error<PostO11yMessagingQueuesKafkaOnboardingProducersError>> {
// add a prefix to parameters to efficiently prevent name collisions
let p_o11y_period_o11y_queue_in = o11y_period_o11y_queue_in;
let uri_str = format!("{}/v1/o11y/messaging-queues/kafka/onboarding/producers", configuration.base_path);
let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
req_builder = req_builder.json(&p_o11y_period_o11y_queue_in);
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
let content_type = resp
.headers()
.get("content-type")
.and_then(|v| v.to_str().ok())
.unwrap_or("application/octet-stream");
let content_type = super::ContentType::from(content_type);
if !status.is_client_error() && !status.is_server_error() {
let content = resp.text().await?;
match content_type {
ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yQueueChecksOut`"))),
ContentType::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`")))),
}
} else {
let content = resp.text().await?;
let entity: Option<PostO11yMessagingQueuesKafkaOnboardingProducersError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Returns the consumer-group latency detail for the topic and partition named in the request's variables.
pub 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>> {
// add a prefix to parameters to efficiently prevent name collisions
let p_o11y_period_o11y_queue_in = o11y_period_o11y_queue_in;
let uri_str = format!("{}/v1/o11y/messaging-queues/kafka/partition-latency/consumer", configuration.base_path);
let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
req_builder = req_builder.json(&p_o11y_period_o11y_queue_in);
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
let content_type = resp
.headers()
.get("content-type")
.and_then(|v| v.to_str().ok())
.unwrap_or("application/octet-stream");
let content_type = super::ContentType::from(content_type);
if !status.is_client_error() && !status.is_server_error() {
let content = resp.text().await?;
match content_type {
ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yQueryRangeOut`"))),
ContentType::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`")))),
}
} else {
let content = resp.text().await?;
let entity: Option<PostO11yMessagingQueuesKafkaPartitionLatencyConsumerError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Returns the per-partition latency overview for the window — each topic/partition with its throughput and latency profile.
pub 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>> {
// add a prefix to parameters to efficiently prevent name collisions
let p_o11y_period_o11y_queue_in = o11y_period_o11y_queue_in;
let uri_str = format!("{}/v1/o11y/messaging-queues/kafka/partition-latency/overview", configuration.base_path);
let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
req_builder = req_builder.json(&p_o11y_period_o11y_queue_in);
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
let content_type = resp
.headers()
.get("content-type")
.and_then(|v| v.to_str().ok())
.unwrap_or("application/octet-stream");
let content_type = super::ContentType::from(content_type);
if !status.is_client_error() && !status.is_server_error() {
let content = resp.text().await?;
match content_type {
ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yQueryRangeOut`"))),
ContentType::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`")))),
}
} else {
let content = resp.text().await?;
let entity: Option<PostO11yMessagingQueuesKafkaPartitionLatencyOverviewError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Correlates producer and consumer spans over the evaluation window (eval_time bounds the scan) and returns the pairings with their end-to-end delay — the check that messages produced are being consumed.
pub async fn post_o11y_messaging_queues_kafka_span_evaluation(configuration: &configuration::Configuration, o11y_period_o11y_queue_in: models::O11yPeriodO11yQueueIn) -> Result<models::O11yPeriodO11yQueryRangeOut, Error<PostO11yMessagingQueuesKafkaSpanEvaluationError>> {
// add a prefix to parameters to efficiently prevent name collisions
let p_o11y_period_o11y_queue_in = o11y_period_o11y_queue_in;
let uri_str = format!("{}/v1/o11y/messaging-queues/kafka/span/evaluation", configuration.base_path);
let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
req_builder = req_builder.json(&p_o11y_period_o11y_queue_in);
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
let content_type = resp
.headers()
.get("content-type")
.and_then(|v| v.to_str().ok())
.unwrap_or("application/octet-stream");
let content_type = super::ContentType::from(content_type);
if !status.is_client_error() && !status.is_server_error() {
let content = resp.text().await?;
match content_type {
ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yQueryRangeOut`"))),
ContentType::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`")))),
}
} else {
let content = resp.text().await?;
let entity: Option<PostO11yMessagingQueuesKafkaSpanEvaluationError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Returns the consumer topic-throughput overview for the window — what each consumer group read, per topic.
pub 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>> {
// add a prefix to parameters to efficiently prevent name collisions
let p_o11y_period_o11y_queue_in = o11y_period_o11y_queue_in;
let uri_str = format!("{}/v1/o11y/messaging-queues/kafka/topic-throughput/consumer", configuration.base_path);
let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
req_builder = req_builder.json(&p_o11y_period_o11y_queue_in);
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
let content_type = resp
.headers()
.get("content-type")
.and_then(|v| v.to_str().ok())
.unwrap_or("application/octet-stream");
let content_type = super::ContentType::from(content_type);
if !status.is_client_error() && !status.is_server_error() {
let content = resp.text().await?;
match content_type {
ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yQueryRangeOut`"))),
ContentType::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`")))),
}
} else {
let content = resp.text().await?;
let entity: Option<PostO11yMessagingQueuesKafkaTopicThroughputConsumerError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Breaks one consumer topic's throughput down using the topic and service named in variables.
pub 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>> {
// add a prefix to parameters to efficiently prevent name collisions
let p_o11y_period_o11y_queue_in = o11y_period_o11y_queue_in;
let uri_str = format!("{}/v1/o11y/messaging-queues/kafka/topic-throughput/consumer-details", configuration.base_path);
let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
req_builder = req_builder.json(&p_o11y_period_o11y_queue_in);
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
let content_type = resp
.headers()
.get("content-type")
.and_then(|v| v.to_str().ok())
.unwrap_or("application/octet-stream");
let content_type = super::ContentType::from(content_type);
if !status.is_client_error() && !status.is_server_error() {
let content = resp.text().await?;
match content_type {
ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yQueryRangeOut`"))),
ContentType::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`")))),
}
} else {
let content = resp.text().await?;
let entity: Option<PostO11yMessagingQueuesKafkaTopicThroughputConsumerDetailsError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Returns the producer topic-throughput overview for the window — what each producer service wrote, per topic.
pub 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>> {
// add a prefix to parameters to efficiently prevent name collisions
let p_o11y_period_o11y_queue_in = o11y_period_o11y_queue_in;
let uri_str = format!("{}/v1/o11y/messaging-queues/kafka/topic-throughput/producer", configuration.base_path);
let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
req_builder = req_builder.json(&p_o11y_period_o11y_queue_in);
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
let content_type = resp
.headers()
.get("content-type")
.and_then(|v| v.to_str().ok())
.unwrap_or("application/octet-stream");
let content_type = super::ContentType::from(content_type);
if !status.is_client_error() && !status.is_server_error() {
let content = resp.text().await?;
match content_type {
ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yQueryRangeOut`"))),
ContentType::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`")))),
}
} else {
let content = resp.text().await?;
let entity: Option<PostO11yMessagingQueuesKafkaTopicThroughputProducerError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Breaks one producer topic's throughput down using the topic and service named in variables.
pub 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>> {
// add a prefix to parameters to efficiently prevent name collisions
let p_o11y_period_o11y_queue_in = o11y_period_o11y_queue_in;
let uri_str = format!("{}/v1/o11y/messaging-queues/kafka/topic-throughput/producer-details", configuration.base_path);
let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
req_builder = req_builder.json(&p_o11y_period_o11y_queue_in);
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
let content_type = resp
.headers()
.get("content-type")
.and_then(|v| v.to_str().ok())
.unwrap_or("application/octet-stream");
let content_type = super::ContentType::from(content_type);
if !status.is_client_error() && !status.is_server_error() {
let content = resp.text().await?;
match content_type {
ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yQueryRangeOut`"))),
ContentType::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`")))),
}
} else {
let content = resp.text().await?;
let entity: Option<PostO11yMessagingQueuesKafkaTopicThroughputProducerDetailsError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Lists the messaging destinations observed in the window — one row per queue/destination/service combination with its throughput and latency columns. Filters narrow by queue system, destination, service or any span attribute.
pub async fn post_o11y_messaging_queues_queue_overview(configuration: &configuration::Configuration, o11y_period_o11y_queue_list_in: models::O11yPeriodO11yQueueListIn) -> Result<models::O11yPeriodO11yQueueRowsOut, Error<PostO11yMessagingQueuesQueueOverviewError>> {
// add a prefix to parameters to efficiently prevent name collisions
let p_o11y_period_o11y_queue_list_in = o11y_period_o11y_queue_list_in;
let uri_str = format!("{}/v1/o11y/messaging-queues/queue-overview", configuration.base_path);
let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
req_builder = req_builder.json(&p_o11y_period_o11y_queue_list_in);
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
let content_type = resp
.headers()
.get("content-type")
.and_then(|v| v.to_str().ok())
.unwrap_or("application/octet-stream");
let content_type = super::ContentType::from(content_type);
if !status.is_client_error() && !status.is_server_error() {
let content = resp.text().await?;
match content_type {
ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yQueueRowsOut`"))),
ContentType::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`")))),
}
} else {
let content = resp.text().await?;
let entity: Option<PostO11yMessagingQueuesQueueOverviewError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Lists Kubernetes namespaces over a time range, each with the CPU and memory its pods used, their phase counts and its attributes; filterable, groupable and paginated.
pub async fn post_o11y_namespaces_list(configuration: &configuration::Configuration, o11y_period_namespace_list_request: models::O11yPeriodNamespaceListRequest) -> Result<models::O11yPeriodO11yNamespaceListOut, Error<PostO11yNamespacesListError>> {
// add a prefix to parameters to efficiently prevent name collisions
let p_o11y_period_namespace_list_request = o11y_period_namespace_list_request;
let uri_str = format!("{}/v1/o11y/namespaces/list", configuration.base_path);
let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
req_builder = req_builder.json(&p_o11y_period_namespace_list_request);
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
let content_type = resp
.headers()
.get("content-type")
.and_then(|v| v.to_str().ok())
.unwrap_or("application/octet-stream");
let content_type = super::ContentType::from(content_type);
if !status.is_client_error() && !status.is_server_error() {
let content = resp.text().await?;
match content_type {
ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yNamespaceListOut`"))),
ContentType::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`")))),
}
} else {
let content = resp.text().await?;
let entity: Option<PostO11yNamespacesListError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Lists Kubernetes nodes over a time range, each with its CPU and memory usage against allocatable capacity, readiness condition counts and attributes; filterable, groupable and paginated.
pub async fn post_o11y_nodes_list(configuration: &configuration::Configuration, o11y_period_node_list_request: models::O11yPeriodNodeListRequest) -> Result<models::O11yPeriodO11yNodeListOut, Error<PostO11yNodesListError>> {
// add a prefix to parameters to efficiently prevent name collisions
let p_o11y_period_node_list_request = o11y_period_node_list_request;
let uri_str = format!("{}/v1/o11y/nodes/list", configuration.base_path);
let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
req_builder = req_builder.json(&p_o11y_period_node_list_request);
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
let content_type = resp
.headers()
.get("content-type")
.and_then(|v| v.to_str().ok())
.unwrap_or("application/octet-stream");
let content_type = super::ContentType::from(content_type);
if !status.is_client_error() && !status.is_server_error() {
let content = resp.text().await?;
match content_type {
ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yNodeListOut`"))),
ContentType::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`")))),
}
} else {
let content = resp.text().await?;
let entity: Option<PostO11yNodesListError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Lists Kubernetes pods over a time range, each with its CPU and memory usage against request and limit, restart count, phase counts and attributes; filterable, groupable and paginated.
pub async fn post_o11y_pods_list(configuration: &configuration::Configuration, o11y_period_pod_list_request: models::O11yPeriodPodListRequest) -> Result<models::O11yPeriodO11yPodListOut, Error<PostO11yPodsListError>> {
// add a prefix to parameters to efficiently prevent name collisions
let p_o11y_period_pod_list_request = o11y_period_pod_list_request;
let uri_str = format!("{}/v1/o11y/pods/list", configuration.base_path);
let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
req_builder = req_builder.json(&p_o11y_period_pod_list_request);
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
let content_type = resp
.headers()
.get("content-type")
.and_then(|v| v.to_str().ok())
.unwrap_or("application/octet-stream");
let content_type = super::ContentType::from(content_type);
if !status.is_client_error() && !status.is_server_error() {
let content = resp.text().await?;
match content_type {
ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yPodListOut`"))),
ContentType::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`")))),
}
} else {
let content = resp.text().await?;
let entity: Option<PostO11yPodsListError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Lists monitored processes over a time range, each with its name, PID, command line and CPU and memory usage; filterable, groupable and paginated.
pub async fn post_o11y_processes_list(configuration: &configuration::Configuration, o11y_period_process_list_request: models::O11yPeriodProcessListRequest) -> Result<models::O11yPeriodO11yProcessListOut, Error<PostO11yProcessesListError>> {
// add a prefix to parameters to efficiently prevent name collisions
let p_o11y_period_process_list_request = o11y_period_process_list_request;
let uri_str = format!("{}/v1/o11y/processes/list", configuration.base_path);
let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
req_builder = req_builder.json(&p_o11y_period_process_list_request);
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
let content_type = resp
.headers()
.get("content-type")
.and_then(|v| v.to_str().ok())
.unwrap_or("application/octet-stream");
let content_type = super::ContentType::from(content_type);
if !status.is_client_error() && !status.is_server_error() {
let content = resp.text().await?;
match content_type {
ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yProcessListOut`"))),
ContentType::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`")))),
}
} else {
let content = resp.text().await?;
let entity: Option<PostO11yProcessesListError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Lists Kubernetes persistent volume claims over a time range, each with its available, capacity and used bytes, inode counts and attributes; filterable, groupable and paginated.
pub async fn post_o11y_pvcs_list(configuration: &configuration::Configuration, o11y_period_volume_list_request: models::O11yPeriodVolumeListRequest) -> Result<models::O11yPeriodO11yPvcListOut, Error<PostO11yPvcsListError>> {
// add a prefix to parameters to efficiently prevent name collisions
let p_o11y_period_volume_list_request = o11y_period_volume_list_request;
let uri_str = format!("{}/v1/o11y/pvcs/list", configuration.base_path);
let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
req_builder = req_builder.json(&p_o11y_period_volume_list_request);
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
let content_type = resp
.headers()
.get("content-type")
.and_then(|v| v.to_str().ok())
.unwrap_or("application/octet-stream");
let content_type = super::ContentType::from(content_type);
if !status.is_client_error() && !status.is_server_error() {
let content = resp.text().await?;
match content_type {
ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yPvcListOut`"))),
ContentType::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`")))),
}
} else {
let content = resp.text().await?;
let entity: Option<PostO11yPvcsListError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Analyzes a query and extracts the metric names it reads and the columns it groups by. Callers need the viewer role; the runtime's own gate enforces it.
pub async fn post_o11y_query_filter_analyze(configuration: &configuration::Configuration, o11y_period_o11y_analyze_in: models::O11yPeriodO11yAnalyzeIn) -> Result<models::O11yPeriodO11yAnalyzeOut, Error<PostO11yQueryFilterAnalyzeError>> {
// add a prefix to parameters to efficiently prevent name collisions
let p_o11y_period_o11y_analyze_in = o11y_period_o11y_analyze_in;
let uri_str = format!("{}/v1/o11y/query_filter/analyze", configuration.base_path);
let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
req_builder = req_builder.json(&p_o11y_period_o11y_analyze_in);
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
let content_type = resp
.headers()
.get("content-type")
.and_then(|v| v.to_str().ok())
.unwrap_or("application/octet-stream");
let content_type = super::ContentType::from(content_type);
if !status.is_client_error() && !status.is_server_error() {
let content = resp.text().await?;
match content_type {
ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yAnalyzeOut`"))),
ContentType::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`")))),
}
} else {
let content = resp.text().await?;
let entity: Option<PostO11yQueryFilterAnalyzeError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Executes a composite query over a time range: builder queries over traces, logs and metrics, formulas, trace operators, PromQL and Datastore SQL, answering time series, scalars or raw records as the request type asks. Callers need the viewer role; the runtime's own gate enforces it.
pub async fn post_o11y_query_range(configuration: &configuration::Configuration, o11y_period_query_range_request: models::O11yPeriodQueryRangeRequest) -> Result<models::O11yPeriodO11yQueryRangeOut, Error<PostO11yQueryRangeError>> {
// add a prefix to parameters to efficiently prevent name collisions
let p_o11y_period_query_range_request = o11y_period_query_range_request;
let uri_str = format!("{}/v1/o11y/query_range", configuration.base_path);
let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
req_builder = req_builder.json(&p_o11y_period_query_range_request);
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
let content_type = resp
.headers()
.get("content-type")
.and_then(|v| v.to_str().ok())
.unwrap_or("application/octet-stream");
let content_type = super::ContentType::from(content_type);
if !status.is_client_error() && !status.is_server_error() {
let content = resp.text().await?;
match content_type {
ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yQueryRangeOut`"))),
ContentType::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`")))),
}
} else {
let content = resp.text().await?;
let entity: Option<PostO11yQueryRangeError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Parses a builder query and echoes it back normalized to the v3 shape — the endpoint the UI uses to canonicalize a query without running it. Callers need the viewer role; the runtime's own gate enforces it.
pub async fn post_o11y_query_range_format(configuration: &configuration::Configuration, o11y_period_query_range_params_v3: models::O11yPeriodQueryRangeParamsV3) -> Result<models::O11yPeriodO11yQueryRangeFormatOut, Error<PostO11yQueryRangeFormatError>> {
// add a prefix to parameters to efficiently prevent name collisions
let p_o11y_period_query_range_params_v3 = o11y_period_query_range_params_v3;
let uri_str = format!("{}/v1/o11y/query_range/format", configuration.base_path);
let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
req_builder = req_builder.json(&p_o11y_period_query_range_params_v3);
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
let content_type = resp
.headers()
.get("content-type")
.and_then(|v| v.to_str().ok())
.unwrap_or("application/octet-stream");
let content_type = super::ContentType::from(content_type);
if !status.is_client_error() && !status.is_server_error() {
let content = resp.text().await?;
match content_type {
ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yQueryRangeFormatOut`"))),
ContentType::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`")))),
}
} else {
let content = resp.text().await?;
let entity: Option<PostO11yQueryRangeFormatError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Validates a composite query and renders the Datastore statements it would run WITHOUT executing it — a dry run for agentic and tooling use. verbose=false trades the rendered SQL and EXPLAIN for a lightweight per-query verdict. Callers need the viewer role; the runtime's own gate enforces it.
pub async fn post_o11y_query_range_preview(configuration: &configuration::Configuration, o11y_period_o11y_query_range_preview_in: models::O11yPeriodO11yQueryRangePreviewIn) -> Result<models::O11yPeriodO11yQueryRangePreviewOut, Error<PostO11yQueryRangePreviewError>> {
// add a prefix to parameters to efficiently prevent name collisions
let p_o11y_period_o11y_query_range_preview_in = o11y_period_o11y_query_range_preview_in;
let uri_str = format!("{}/v1/o11y/query_range/preview", configuration.base_path);
let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
req_builder = req_builder.json(&p_o11y_period_o11y_query_range_preview_in);
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
let content_type = resp
.headers()
.get("content-type")
.and_then(|v| v.to_str().ok())
.unwrap_or("application/octet-stream");
let content_type = super::ContentType::from(content_type);
if !status.is_client_error() && !status.is_server_error() {
let content = resp.text().await?;
match content_type {
ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yQueryRangePreviewOut`"))),
ContentType::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`")))),
}
} else {
let content = resp.text().await?;
let entity: Option<PostO11yQueryRangePreviewError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Creates the FIRST organization and its admin user. It is open by design — there is nobody to be signed in as yet — and refuses once setup has completed, after which new users arrive by invitation only. Open by design; the runtime's own gate is OpenAccess.
pub async fn post_o11y_register(configuration: &configuration::Configuration, o11y_period_o11y_register_in: models::O11yPeriodO11yRegisterIn) -> Result<models::O11yPeriodO11yRegisterOut, Error<PostO11yRegisterError>> {
// add a prefix to parameters to efficiently prevent name collisions
let p_o11y_period_o11y_register_in = o11y_period_o11y_register_in;
let uri_str = format!("{}/v1/o11y/register", configuration.base_path);
let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
req_builder = req_builder.json(&p_o11y_period_o11y_register_in);
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
let content_type = resp
.headers()
.get("content-type")
.and_then(|v| v.to_str().ok())
.unwrap_or("application/octet-stream");
let content_type = super::ContentType::from(content_type);
if !status.is_client_error() && !status.is_server_error() {
let content = resp.text().await?;
match content_type {
ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yRegisterOut`"))),
ContentType::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`")))),
}
} else {
let content = resp.text().await?;
let entity: Option<PostO11yRegisterError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Creates a human-review queue in the caller's org and project. A name already used by another queue in the same project is a 409.
pub async fn post_o11y_reviews(configuration: &configuration::Configuration, o11y_period_create_queue_req: models::O11yPeriodCreateQueueReq) -> Result<models::O11yPeriodAnnQueueView, Error<PostO11yReviewsError>> {
// add a prefix to parameters to efficiently prevent name collisions
let p_o11y_period_create_queue_req = o11y_period_create_queue_req;
let uri_str = format!("{}/v1/o11y/reviews", configuration.base_path);
let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
req_builder = req_builder.json(&p_o11y_period_create_queue_req);
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
let content_type = resp
.headers()
.get("content-type")
.and_then(|v| v.to_str().ok())
.unwrap_or("application/octet-stream");
let content_type = super::ContentType::from(content_type);
if !status.is_client_error() && !status.is_server_error() {
let content = resp.text().await?;
match content_type {
ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodAnnQueueView`"))),
ContentType::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`")))),
}
} else {
let content = resp.text().await?;
let entity: Option<PostO11yReviewsError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Enqueues traces, observations or sessions on a review queue. Each item names exactly one object, either by traceId / observationId / sessionId or by objectType plus objectId; every item enters PENDING. A queue id belonging to another org is a 404.
pub 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>> {
// add a prefix to parameters to efficiently prevent name collisions
let p_id = id;
let p_o11y_period_add_items_in = o11y_period_add_items_in;
let uri_str = format!("{}/v1/o11y/reviews/{id}/items", configuration.base_path, id=crate::apis::urlencode(p_id));
let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
req_builder = req_builder.json(&p_o11y_period_add_items_in);
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
let content_type = resp
.headers()
.get("content-type")
.and_then(|v| v.to_str().ok())
.unwrap_or("application/octet-stream");
let content_type = super::ContentType::from(content_type);
if !status.is_client_error() && !status.is_server_error() {
let content = resp.text().await?;
match content_type {
ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodAnnItemsCreated`"))),
ContentType::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`")))),
}
} else {
let content = resp.text().await?;
let entity: Option<PostO11yReviewsByIdItemsError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Aggregates a project's captured errors into a table — the caller names the filters, the groupings and the aggregations, and gets back the columns and rows they asked for. The project is mandatory and is checked against the caller's own org before it scopes anything, so a project id belonging to someone else reads as absent rather than as data.
pub async fn post_o11y_sentinel_discover(configuration: &configuration::Configuration, o11y_period_o11y_discover_in: models::O11yPeriodO11yDiscoverIn) -> Result<models::O11yPeriodO11yDiscoverOut, Error<PostO11ySentinelDiscoverError>> {
// add a prefix to parameters to efficiently prevent name collisions
let p_o11y_period_o11y_discover_in = o11y_period_o11y_discover_in;
let uri_str = format!("{}/v1/o11y/sentinel/discover", configuration.base_path);
let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
req_builder = req_builder.json(&p_o11y_period_o11y_discover_in);
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
let content_type = resp
.headers()
.get("content-type")
.and_then(|v| v.to_str().ok())
.unwrap_or("application/octet-stream");
let content_type = super::ContentType::from(content_type);
if !status.is_client_error() && !status.is_server_error() {
let content = resp.text().await?;
match content_type {
ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yDiscoverOut`"))),
ContentType::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`")))),
}
} else {
let content = resp.text().await?;
let entity: Option<PostO11ySentinelDiscoverError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Creates a Sentry project under the caller's org and returns it, DSN included. Only the name, and optionally a slug and platform, are the caller's to set; the org, id and key are server-assigned. Callers need the editor role; the runtime's own gate enforces it.
pub async fn post_o11y_sentinel_projects(configuration: &configuration::Configuration, o11y_period_o11y_sentry_postable_project: models::O11yPeriodO11ySentryPostableProject) -> Result<models::O11yPeriodO11ySentryProjectOut, Error<PostO11ySentinelProjectsError>> {
// add a prefix to parameters to efficiently prevent name collisions
let p_o11y_period_o11y_sentry_postable_project = o11y_period_o11y_sentry_postable_project;
let uri_str = format!("{}/v1/o11y/sentinel/projects", configuration.base_path);
let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
req_builder = req_builder.json(&p_o11y_period_o11y_sentry_postable_project);
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
let content_type = resp
.headers()
.get("content-type")
.and_then(|v| v.to_str().ok())
.unwrap_or("application/octet-stream");
let content_type = super::ContentType::from(content_type);
if !status.is_client_error() && !status.is_server_error() {
let content = resp.text().await?;
match content_type {
ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11ySentryProjectOut`"))),
ContentType::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`")))),
}
} else {
let content = resp.text().await?;
let entity: Option<PostO11ySentinelProjectsError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Rotates a project's DSN key — bumping its rotation watermark so keys below it stop verifying — and returns the project with its new DSN. Callers need the editor role; the runtime's own gate enforces it.
pub async fn post_o11y_sentinel_projects_by_id_keys_rotate(configuration: &configuration::Configuration, id: &str) -> Result<models::O11yPeriodO11ySentryProjectOut, Error<PostO11ySentinelProjectsByIdKeysRotateError>> {
// add a prefix to parameters to efficiently prevent name collisions
let p_id = id;
let uri_str = format!("{}/v1/o11y/sentinel/projects/{id}/keys/rotate", configuration.base_path, id=crate::apis::urlencode(p_id));
let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
let content_type = resp
.headers()
.get("content-type")
.and_then(|v| v.to_str().ok())
.unwrap_or("application/octet-stream");
let content_type = super::ContentType::from(content_type);
if !status.is_client_error() && !status.is_server_error() {
let content = resp.text().await?;
match content_type {
ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11ySentryProjectOut`"))),
ContentType::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`")))),
}
} else {
let content = resp.text().await?;
let entity: Option<PostO11ySentinelProjectsByIdKeysRotateError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Returns one service's entry-point operations with the same latency and error profile topOperations reports.
pub async fn post_o11y_service_entry_point_operations(configuration: &configuration::Configuration, o11y_period_o11y_operations_in: models::O11yPeriodO11yOperationsIn) -> Result<models::O11yPeriodO11yOperationsOut, Error<PostO11yServiceEntryPointOperationsError>> {
// add a prefix to parameters to efficiently prevent name collisions
let p_o11y_period_o11y_operations_in = o11y_period_o11y_operations_in;
let uri_str = format!("{}/v1/o11y/service/entry_point_operations", configuration.base_path);
let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
req_builder = req_builder.json(&p_o11y_period_o11y_operations_in);
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
let content_type = resp
.headers()
.get("content-type")
.and_then(|v| v.to_str().ok())
.unwrap_or("application/octet-stream");
let content_type = super::ContentType::from(content_type);
if !status.is_client_error() && !status.is_server_error() {
let content = resp.text().await?;
match content_type {
ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yOperationsOut`"))),
ContentType::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`")))),
}
} else {
let content = resp.text().await?;
let entity: Option<PostO11yServiceEntryPointOperationsError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Maps each service to its entry-point span names — for the one service named in the request, or for every service when none is.
pub 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>> {
// add a prefix to parameters to efficiently prevent name collisions
let p_o11y_period_o11y_top_level_ops_in = o11y_period_o11y_top_level_ops_in;
let uri_str = format!("{}/v1/o11y/service/top_level_operations", configuration.base_path);
let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
req_builder = req_builder.json(&p_o11y_period_o11y_top_level_ops_in);
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
let content_type = resp
.headers()
.get("content-type")
.and_then(|v| v.to_str().ok())
.unwrap_or("application/octet-stream");
let content_type = super::ContentType::from(content_type);
if !status.is_client_error() && !status.is_server_error() {
let content = resp.text().await?;
match content_type {
ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
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>>`"))),
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>>`")))),
}
} else {
let content = resp.text().await?;
let entity: Option<PostO11yServiceTopLevelOperationsError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Returns one service's heaviest operations in the window, each with p50/p95/p99 latency, how often it ran and how often it errored.
pub async fn post_o11y_service_top_operations(configuration: &configuration::Configuration, o11y_period_o11y_operations_in: models::O11yPeriodO11yOperationsIn) -> Result<models::O11yPeriodO11yOperationsOut, Error<PostO11yServiceTopOperationsError>> {
// add a prefix to parameters to efficiently prevent name collisions
let p_o11y_period_o11y_operations_in = o11y_period_o11y_operations_in;
let uri_str = format!("{}/v1/o11y/service/top_operations", configuration.base_path);
let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
req_builder = req_builder.json(&p_o11y_period_o11y_operations_in);
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
let content_type = resp
.headers()
.get("content-type")
.and_then(|v| v.to_str().ok())
.unwrap_or("application/octet-stream");
let content_type = super::ContentType::from(content_type);
if !status.is_client_error() && !status.is_server_error() {
let content = resp.text().await?;
match content_type {
ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yOperationsOut`"))),
ContentType::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`")))),
}
} else {
let content = resp.text().await?;
let entity: Option<PostO11yServiceTopOperationsError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Lists the instrumented services seen in the window, each with the request profile of its entry-point spans: p99 and average latency, call and error rates, and the entry-point operations the numbers were computed over.
pub async fn post_o11y_services(configuration: &configuration::Configuration, o11y_period_o11y_services_in: models::O11yPeriodO11yServicesIn) -> Result<models::O11yPeriodO11yServicesOut, Error<PostO11yServicesError>> {
// add a prefix to parameters to efficiently prevent name collisions
let p_o11y_period_o11y_services_in = o11y_period_o11y_services_in;
let uri_str = format!("{}/v1/o11y/services", configuration.base_path);
let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
req_builder = req_builder.json(&p_o11y_period_o11y_services_in);
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
let content_type = resp
.headers()
.get("content-type")
.and_then(|v| v.to_str().ok())
.unwrap_or("application/octet-stream");
let content_type = super::ContentType::from(content_type);
if !status.is_client_error() && !status.is_server_error() {
let content = resp.text().await?;
match content_type {
ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yServicesOut`"))),
ContentType::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`")))),
}
} else {
let content = resp.text().await?;
let entity: Option<PostO11yServicesError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Sets one service's apdex threshold and the status codes excluded from its score. Admin only, as the mux tree has always gated it (AdminAccess); the runtime's own gate enforces it.
pub async fn post_o11y_settings_apdex(configuration: &configuration::Configuration, o11y_period_o11y_apdex_set_in: models::O11yPeriodO11yApdexSetIn) -> Result<models::O11yPeriodO11yApdexSetOut, Error<PostO11ySettingsApdexError>> {
// add a prefix to parameters to efficiently prevent name collisions
let p_o11y_period_o11y_apdex_set_in = o11y_period_o11y_apdex_set_in;
let uri_str = format!("{}/v1/o11y/settings/apdex", configuration.base_path);
let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
req_builder = req_builder.json(&p_o11y_period_o11y_apdex_set_in);
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
let content_type = resp
.headers()
.get("content-type")
.and_then(|v| v.to_str().ok())
.unwrap_or("application/octet-stream");
let content_type = super::ContentType::from(content_type);
if !status.is_client_error() && !status.is_server_error() {
let content = resp.text().await?;
match content_type {
ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yApdexSetOut`"))),
ContentType::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`")))),
}
} else {
let content = resp.text().await?;
let entity: Option<PostO11ySettingsApdexError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Sets the org's retention policy for one signal: the default TTL in days, ordered per-label retention rules, and optional cold-storage settings. Admin only, as the mux tree has always gated it (AdminAccess); the runtime's own gate enforces it.
pub async fn post_o11y_settings_ttl(configuration: &configuration::Configuration, o11y_period_o11y_retention_set_in: models::O11yPeriodO11yRetentionSetIn) -> Result<models::O11yPeriodO11yRetentionSetOut, Error<PostO11ySettingsTtlError>> {
// add a prefix to parameters to efficiently prevent name collisions
let p_o11y_period_o11y_retention_set_in = o11y_period_o11y_retention_set_in;
let uri_str = format!("{}/v1/o11y/settings/ttl", configuration.base_path);
let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
req_builder = req_builder.json(&p_o11y_period_o11y_retention_set_in);
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
let content_type = resp
.headers()
.get("content-type")
.and_then(|v| v.to_str().ok())
.unwrap_or("application/octet-stream");
let content_type = super::ContentType::from(content_type);
if !status.is_client_error() && !status.is_server_error() {
let content = resp.text().await?;
match content_type {
ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yRetentionSetOut`"))),
ContentType::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`")))),
}
} else {
let content = resp.text().await?;
let entity: Option<PostO11ySettingsTtlError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Places one span's duration among its peers: the p50/p90/p99 durations of like spans, and the percentile the given duration lands at. Callers need the viewer role; the runtime's own gate enforces it.
pub async fn post_o11y_span_percentile(configuration: &configuration::Configuration, o11y_period_o11y_span_percentile_in: models::O11yPeriodO11ySpanPercentileIn) -> Result<models::O11yPeriodO11ySpanPercentileOut, Error<PostO11ySpanPercentileError>> {
// add a prefix to parameters to efficiently prevent name collisions
let p_o11y_period_o11y_span_percentile_in = o11y_period_o11y_span_percentile_in;
let uri_str = format!("{}/v1/o11y/span_percentile", configuration.base_path);
let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
req_builder = req_builder.json(&p_o11y_period_o11y_span_percentile_in);
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
let content_type = resp
.headers()
.get("content-type")
.and_then(|v| v.to_str().ok())
.unwrap_or("application/octet-stream");
let content_type = super::ContentType::from(content_type);
if !status.is_client_error() && !status.is_server_error() {
let content = resp.text().await?;
match content_type {
ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11ySpanPercentileOut`"))),
ContentType::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`")))),
}
} else {
let content = resp.text().await?;
let entity: Option<PostO11ySpanPercentileError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Lists Kubernetes statefulsets over a time range, each with the CPU and memory its pods used against request and limit, desired and available replica counts, restarts and attributes; filterable, groupable and paginated.
pub async fn post_o11y_statefulsets_list(configuration: &configuration::Configuration, o11y_period_stateful_set_list_request: models::O11yPeriodStatefulSetListRequest) -> Result<models::O11yPeriodO11yStatefulSetListOut, Error<PostO11yStatefulsetsListError>> {
// add a prefix to parameters to efficiently prevent name collisions
let p_o11y_period_stateful_set_list_request = o11y_period_stateful_set_list_request;
let uri_str = format!("{}/v1/o11y/statefulsets/list", configuration.base_path);
let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
req_builder = req_builder.json(&p_o11y_period_stateful_set_list_request);
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
let content_type = resp
.headers()
.get("content-type")
.and_then(|v| v.to_str().ok())
.unwrap_or("application/octet-stream");
let content_type = super::ContentType::from(content_type);
if !status.is_client_error() && !status.is_server_error() {
let content = resp.text().await?;
match content_type {
ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yStatefulSetListOut`"))),
ContentType::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`")))),
}
} else {
let content = resp.text().await?;
let entity: Option<PostO11yStatefulsetsListError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Substitutes a query's variables and returns the resolved request, without running it — what a dashboard does before it queries. Callers need the viewer role; the runtime's own gate enforces it.
pub async fn post_o11y_substitute_vars(configuration: &configuration::Configuration, o11y_period_query_range_request: models::O11yPeriodQueryRangeRequest) -> Result<models::O11yPeriodO11ySubstituteVarsOut, Error<PostO11ySubstituteVarsError>> {
// add a prefix to parameters to efficiently prevent name collisions
let p_o11y_period_query_range_request = o11y_period_query_range_request;
let uri_str = format!("{}/v1/o11y/substitute_vars", configuration.base_path);
let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
req_builder = req_builder.json(&p_o11y_period_query_range_request);
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
let content_type = resp
.headers()
.get("content-type")
.and_then(|v| v.to_str().ok())
.unwrap_or("application/octet-stream");
let content_type = super::ContentType::from(content_type);
if !status.is_client_error() && !status.is_server_error() {
let content = resp.text().await?;
match content_type {
ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11ySubstituteVarsOut`"))),
ContentType::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`")))),
}
} else {
let content = resp.text().await?;
let entity: Option<PostO11ySubstituteVarsError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Returns one external domain's endpoint-level breakdown — each endpoint with its rate, error and latency columns over the window.
pub async fn post_o11y_third_party_apis_overview_domain(configuration: &configuration::Configuration, o11y_period_o11y_domains_in: models::O11yPeriodO11yDomainsIn) -> Result<models::O11yPeriodO11yDomainsOut, Error<PostO11yThirdPartyApisOverviewDomainError>> {
// add a prefix to parameters to efficiently prevent name collisions
let p_o11y_period_o11y_domains_in = o11y_period_o11y_domains_in;
let uri_str = format!("{}/v1/o11y/third-party-apis/overview/domain", configuration.base_path);
let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
req_builder = req_builder.json(&p_o11y_period_o11y_domains_in);
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
let content_type = resp
.headers()
.get("content-type")
.and_then(|v| v.to_str().ok())
.unwrap_or("application/octet-stream");
let content_type = super::ContentType::from(content_type);
if !status.is_client_error() && !status.is_server_error() {
let content = resp.text().await?;
match content_type {
ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yDomainsOut`"))),
ContentType::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`")))),
}
} else {
let content = resp.text().await?;
let entity: Option<PostO11yThirdPartyApisOverviewDomainError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Lists the external domains the instrumented services call, with request rate, error percentage and latency per domain. Rows whose domain is a bare IP address are dropped unless show_ip asks for them.
pub async fn post_o11y_third_party_apis_overview_list(configuration: &configuration::Configuration, o11y_period_o11y_domains_in: models::O11yPeriodO11yDomainsIn) -> Result<models::O11yPeriodO11yDomainsOut, Error<PostO11yThirdPartyApisOverviewListError>> {
// add a prefix to parameters to efficiently prevent name collisions
let p_o11y_period_o11y_domains_in = o11y_period_o11y_domains_in;
let uri_str = format!("{}/v1/o11y/third-party-apis/overview/list", configuration.base_path);
let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
req_builder = req_builder.json(&p_o11y_period_o11y_domains_in);
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
let content_type = resp
.headers()
.get("content-type")
.and_then(|v| v.to_str().ok())
.unwrap_or("application/octet-stream");
let content_type = super::ContentType::from(content_type);
if !status.is_client_error() && !status.is_server_error() {
let content = resp.text().await?;
match content_type {
ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yDomainsOut`"))),
ContentType::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`")))),
}
} else {
let content = resp.text().await?;
let entity: Option<PostO11yThirdPartyApisOverviewListError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Evaluates a dashboard variable query and returns the values the variable may take. Callers need the viewer role; the runtime's own gate enforces it.
pub async fn post_o11y_variables_query(configuration: &configuration::Configuration, o11y_period_o11y_dashboard_vars_in: models::O11yPeriodO11yDashboardVarsIn) -> Result<models::O11yPeriodO11yDashboardVarsOut, Error<PostO11yVariablesQueryError>> {
// add a prefix to parameters to efficiently prevent name collisions
let p_o11y_period_o11y_dashboard_vars_in = o11y_period_o11y_dashboard_vars_in;
let uri_str = format!("{}/v1/o11y/variables/query", configuration.base_path);
let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
req_builder = req_builder.json(&p_o11y_period_o11y_dashboard_vars_in);
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
let content_type = resp
.headers()
.get("content-type")
.and_then(|v| v.to_str().ok())
.unwrap_or("application/octet-stream");
let content_type = super::ContentType::from(content_type);
if !status.is_client_error() && !status.is_server_error() {
let content = resp.text().await?;
match content_type {
ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yDashboardVarsOut`"))),
ContentType::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`")))),
}
} else {
let content = resp.text().await?;
let entity: Option<PostO11yVariablesQueryError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Estimates the series reduction and the dashboards and alerts a candidate volume-control rule would touch, without persisting it.
pub async fn preview_metric_reduction_rule(configuration: &configuration::Configuration, o11y_period_o11y_reduction_rule_preview_in: models::O11yPeriodO11yReductionRulePreviewIn) -> Result<models::O11yPeriodO11yReductionRulePreviewOut, Error<PreviewMetricReductionRuleError>> {
// add a prefix to parameters to efficiently prevent name collisions
let p_o11y_period_o11y_reduction_rule_preview_in = o11y_period_o11y_reduction_rule_preview_in;
let uri_str = format!("{}/v1/o11y/metric_reduction_rules/preview", configuration.base_path);
let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
req_builder = req_builder.json(&p_o11y_period_o11y_reduction_rule_preview_in);
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
let content_type = resp
.headers()
.get("content-type")
.and_then(|v| v.to_str().ok())
.unwrap_or("application/octet-stream");
let content_type = super::ContentType::from(content_type);
if !status.is_client_error() && !status.is_server_error() {
let content = resp.text().await?;
match content_type {
ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yReductionRulePreviewOut`"))),
ContentType::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`")))),
}
} else {
let content = resp.text().await?;
let entity: Option<PreviewMetricReductionRuleError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Records the deployment's host in Zeus, overwriting any prior one. Admin gate.
pub async fn put_host(configuration: &configuration::Configuration, o11y_period_postable_host: models::O11yPeriodPostableHost) -> Result<(), Error<PutHostError>> {
// add a prefix to parameters to efficiently prevent name collisions
let p_o11y_period_postable_host = o11y_period_postable_host;
let uri_str = format!("{}/v1/o11y/zeus/hosts", configuration.base_path);
let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str);
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
req_builder = req_builder.json(&p_o11y_period_postable_host);
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
if !status.is_client_error() && !status.is_server_error() {
Ok(())
} else {
let content = resp.text().await?;
let entity: Option<PutHostError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Replaces one saved explorer view by id with the given view and echoes it back. Callers need the editor role; the runtime's own gate enforces it.
pub 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>> {
// add a prefix to parameters to efficiently prevent name collisions
let p_view_id = view_id;
let p_o11y_period_o11y_saved_view_update_in = o11y_period_o11y_saved_view_update_in;
let uri_str = format!("{}/v1/o11y/explorer/views/{viewId}", configuration.base_path, viewId=crate::apis::urlencode(p_view_id));
let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str);
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
req_builder = req_builder.json(&p_o11y_period_o11y_saved_view_update_in);
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
let content_type = resp
.headers()
.get("content-type")
.and_then(|v| v.to_str().ok())
.unwrap_or("application/octet-stream");
let content_type = super::ContentType::from(content_type);
if !status.is_client_error() && !status.is_server_error() {
let content = resp.text().await?;
match content_type {
ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11ySavedViewOut`"))),
ContentType::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`")))),
}
} else {
let content = resp.text().await?;
let entity: Option<PutO11yExplorerViewsByViewidError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Changes an issue's lifecycle — resolve, ignore, reopen or assign — and returns the updated issue. Fields left unset are left unchanged. Callers need the editor role; the runtime's own gate enforces it.
pub 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>> {
// add a prefix to parameters to efficiently prevent name collisions
let p_id = id;
let p_o11y_period_o11y_sentry_update_issue_in = o11y_period_o11y_sentry_update_issue_in;
let uri_str = format!("{}/v1/o11y/sentinel/issues/{id}", configuration.base_path, id=crate::apis::urlencode(p_id));
let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str);
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
req_builder = req_builder.json(&p_o11y_period_o11y_sentry_update_issue_in);
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
let content_type = resp
.headers()
.get("content-type")
.and_then(|v| v.to_str().ok())
.unwrap_or("application/octet-stream");
let content_type = super::ContentType::from(content_type);
if !status.is_client_error() && !status.is_server_error() {
let content = resp.text().await?;
match content_type {
ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yErrorIssueOut`"))),
ContentType::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`")))),
}
} else {
let content = resp.text().await?;
let entity: Option<PutO11ySentinelIssuesByIdError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Records the deployment's profile in Zeus — how the team uses observability today and what they plan — overwriting any prior one. Admin gate.
pub async fn put_profile(configuration: &configuration::Configuration, o11y_period_postable_profile: models::O11yPeriodPostableProfile) -> Result<(), Error<PutProfileError>> {
// add a prefix to parameters to efficiently prevent name collisions
let p_o11y_period_postable_profile = o11y_period_postable_profile;
let uri_str = format!("{}/v1/o11y/zeus/profiles", configuration.base_path);
let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str);
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
req_builder = req_builder.json(&p_o11y_period_postable_profile);
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
if !status.is_client_error() && !status.is_server_error() {
Ok(())
} else {
let content = resp.text().await?;
let entity: Option<PutProfileError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Takes a role away from one org member, by user id and role id — someone else, never the caller. Admin gate.
pub async fn remove_user_role_by_user_id_and_role_id(configuration: &configuration::Configuration, id: &str, role_id: &str) -> Result<(), Error<RemoveUserRoleByUserIdAndRoleIdError>> {
// add a prefix to parameters to efficiently prevent name collisions
let p_id = id;
let p_role_id = role_id;
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));
let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str);
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
if !status.is_client_error() && !status.is_server_error() {
Ok(())
} else {
let content = resp.text().await?;
let entity: Option<RemoveUserRoleByUserIdAndRoleIdError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Sets a new password for whoever the reset token was minted for, consuming the token. Unauthenticated: the token is the proof.
pub async fn reset_password(configuration: &configuration::Configuration, o11y_period_o11y_reset_password_in: models::O11yPeriodO11yResetPasswordIn) -> Result<(), Error<ResetPasswordError>> {
// add a prefix to parameters to efficiently prevent name collisions
let p_o11y_period_o11y_reset_password_in = o11y_period_o11y_reset_password_in;
let uri_str = format!("{}/v1/o11y/resetPassword", configuration.base_path);
let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
req_builder = req_builder.json(&p_o11y_period_o11y_reset_password_in);
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
if !status.is_client_error() && !status.is_server_error() {
Ok(())
} else {
let content = resp.text().await?;
let entity: Option<ResetPasswordError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Revokes an API key. Revocation is immediate and permanent.
pub async fn revoke_service_account_key(configuration: &configuration::Configuration, id: &str, fid: &str) -> Result<(), Error<RevokeServiceAccountKeyError>> {
// add a prefix to parameters to efficiently prevent name collisions
let p_id = id;
let p_fid = fid;
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));
let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str);
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
if !status.is_client_error() && !status.is_server_error() {
Ok(())
} else {
let content = resp.text().await?;
let entity: Option<RevokeServiceAccountKeyError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Exchanges a refresh token for a fresh token pair, retiring the old pair. The access token being rotated identifies the session.
pub async fn rotate_session(configuration: &configuration::Configuration, o11y_period_o11y_rotate_session_in: models::O11yPeriodO11yRotateSessionIn) -> Result<models::O11yPeriodO11yTokenOut, Error<RotateSessionError>> {
// add a prefix to parameters to efficiently prevent name collisions
let p_o11y_period_o11y_rotate_session_in = o11y_period_o11y_rotate_session_in;
let uri_str = format!("{}/v1/o11y/sessions/rotate", configuration.base_path);
let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
req_builder = req_builder.json(&p_o11y_period_o11y_rotate_session_in);
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
let content_type = resp
.headers()
.get("content-type")
.and_then(|v| v.to_str().ok())
.unwrap_or("application/octet-stream");
let content_type = super::ContentType::from(content_type);
if !status.is_client_error() && !status.is_server_error() {
let content = resp.text().await?;
match content_type {
ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yTokenOut`"))),
ContentType::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`")))),
}
} else {
let content = resp.text().await?;
let entity: Option<RotateSessionError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Lists the workspace's ingestion keys whose name matches the search, paginated. Editor gate.
pub async fn search_ingestion_keys(configuration: &configuration::Configuration, name: Option<&str>, page: Option<i32>, per_page: Option<i32>) -> Result<models::O11yPeriodO11yIngestionKeysOut, Error<SearchIngestionKeysError>> {
// add a prefix to parameters to efficiently prevent name collisions
let p_name = name;
let p_page = page;
let p_per_page = per_page;
let uri_str = format!("{}/v1/o11y/gateway/ingestion_keys/search", configuration.base_path);
let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
if let Some(ref param_value) = p_name {
req_builder = req_builder.query(&[("name", ¶m_value.to_string())]);
}
if let Some(ref param_value) = p_page {
req_builder = req_builder.query(&[("page", ¶m_value.to_string())]);
}
if let Some(ref param_value) = p_per_page {
req_builder = req_builder.query(&[("per_page", ¶m_value.to_string())]);
}
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
let content_type = resp
.headers()
.get("content-type")
.and_then(|v| v.to_str().ok())
.unwrap_or("application/octet-stream");
let content_type = super::ContentType::from(content_type);
if !status.is_client_error() && !status.is_server_error() {
let content = resp.text().await?;
match content_type {
ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yIngestionKeysOut`"))),
ContentType::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`")))),
}
} else {
let content = resp.text().await?;
let entity: Option<SearchIngestionKeysError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Returns one trace's spans as a column/row table, optionally centred on a span and walked a fixed number of levels up and down from it — the read the trace explorer opens a trace with. Callers need the viewer role; the runtime's own gate enforces it.
pub 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>> {
// add a prefix to parameters to efficiently prevent name collisions
let p_trace_id = trace_id;
let p_span_id = span_id;
let p_level_up = level_up;
let p_level_down = level_down;
let p_span_render_limit = span_render_limit;
let uri_str = format!("{}/v1/o11y/traces/{traceId}", configuration.base_path, traceId=crate::apis::urlencode(p_trace_id));
let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
if let Some(ref param_value) = p_span_id {
req_builder = req_builder.query(&[("spanId", ¶m_value.to_string())]);
}
if let Some(ref param_value) = p_level_up {
req_builder = req_builder.query(&[("levelUp", ¶m_value.to_string())]);
}
if let Some(ref param_value) = p_level_down {
req_builder = req_builder.query(&[("levelDown", ¶m_value.to_string())]);
}
if let Some(ref param_value) = p_span_render_limit {
req_builder = req_builder.query(&[("spanRenderLimit", ¶m_value.to_string())]);
}
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
let content_type = resp
.headers()
.get("content-type")
.and_then(|v| v.to_str().ok())
.unwrap_or("application/octet-stream");
let content_type = super::ContentType::from(content_type);
if !status.is_client_error() && !status.is_server_error() {
let content = resp.text().await?;
match content_type {
ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::O11yPeriodO11yTraceSpanWindow>`"))),
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>`")))),
}
} else {
let content = resp.text().await?;
let entity: Option<SearchTracesError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Assigns a role, by role name, to one org member — someone else, never the caller. Admin gate.
pub 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>> {
// add a prefix to parameters to efficiently prevent name collisions
let p_id = id;
let p_o11y_period_o11y_set_role_in = o11y_period_o11y_set_role_in;
let uri_str = format!("{}/v1/o11y/users/{id}/roles", configuration.base_path, id=crate::apis::urlencode(p_id));
let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
req_builder = req_builder.json(&p_o11y_period_o11y_set_role_in);
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
let content_type = resp
.headers()
.get("content-type")
.and_then(|v| v.to_str().ok())
.unwrap_or("application/octet-stream");
let content_type = super::ContentType::from(content_type);
if !status.is_client_error() && !status.is_server_error() {
let content = resp.text().await?;
match content_type {
ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yAck`"))),
ContentType::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`")))),
}
} else {
let content = resp.text().await?;
let entity: Option<SetRoleByUserIdError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Sends a test notification to the posted receiver. Editor gate.
pub async fn test_channel(configuration: &configuration::Configuration, o11y_period_alertmanagertypes_period_receiver: models::O11yPeriodAlertmanagertypesPeriodReceiver) -> Result<(), Error<TestChannelError>> {
// add a prefix to parameters to efficiently prevent name collisions
let p_o11y_period_alertmanagertypes_period_receiver = o11y_period_alertmanagertypes_period_receiver;
let uri_str = format!("{}/v1/o11y/channels/test", configuration.base_path);
let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
req_builder = req_builder.json(&p_o11y_period_alertmanagertypes_period_receiver);
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
if !status.is_client_error() && !status.is_server_error() {
Ok(())
} else {
let content = resp.text().await?;
let entity: Option<TestChannelError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Sends a test notification to the posted receiver. The legacy path; prefer /channels/test. Editor gate.
pub async fn test_channel_deprecated(configuration: &configuration::Configuration, o11y_period_alertmanagertypes_period_receiver: models::O11yPeriodAlertmanagertypesPeriodReceiver) -> Result<(), Error<TestChannelDeprecatedError>> {
// add a prefix to parameters to efficiently prevent name collisions
let p_o11y_period_alertmanagertypes_period_receiver = o11y_period_alertmanagertypes_period_receiver;
let uri_str = format!("{}/v1/o11y/testChannel", configuration.base_path);
let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
req_builder = req_builder.json(&p_o11y_period_alertmanagertypes_period_receiver);
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
if !status.is_client_error() && !status.is_server_error() {
Ok(())
} else {
let content = resp.text().await?;
let entity: Option<TestChannelDeprecatedError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Fires a test notification for a rule definition without saving it, answering with how many series would alert. Editor gate.
pub async fn test_rule(configuration: &configuration::Configuration, body: Option<serde_json::Value>) -> Result<models::O11yPeriodO11yTestRuleOut, Error<TestRuleError>> {
// add a prefix to parameters to efficiently prevent name collisions
let p_body = body;
let uri_str = format!("{}/v1/o11y/rules/test", configuration.base_path);
let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
req_builder = req_builder.json(&p_body);
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
let content_type = resp
.headers()
.get("content-type")
.and_then(|v| v.to_str().ok())
.unwrap_or("application/octet-stream");
let content_type = super::ContentType::from(content_type);
if !status.is_client_error() && !status.is_server_error() {
let content = resp.text().await?;
match content_type {
ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yTestRuleOut`"))),
ContentType::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`")))),
}
} else {
let content = resp.text().await?;
let entity: Option<TestRuleError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Fires a test notification for the posted rule definition and answers with how many series alerted and a status message. The legacy path; prefer /rules/test. Editor gate.
pub async fn test_rule_notification(configuration: &configuration::Configuration, body: Option<serde_json::Value>) -> Result<models::O11yPeriodO11yTestNotificationOut, Error<TestRuleNotificationError>> {
// add a prefix to parameters to efficiently prevent name collisions
let p_body = body;
let uri_str = format!("{}/v1/o11y/testRule", configuration.base_path);
let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
req_builder = req_builder.json(&p_body);
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
let content_type = resp
.headers()
.get("content-type")
.and_then(|v| v.to_str().ok())
.unwrap_or("application/octet-stream");
let content_type = super::ContentType::from(content_type);
if !status.is_client_error() && !status.is_server_error() {
let content = resp.text().await?;
match content_type {
ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yTestNotificationOut`"))),
ContentType::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`")))),
}
} else {
let content = resp.text().await?;
let entity: Option<TestRuleNotificationError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Removes an integration from the caller's org by id. Viewer gate.
pub async fn uninstall_integration(configuration: &configuration::Configuration, o11y_period_uninstall_integration_request: models::O11yPeriodUninstallIntegrationRequest) -> Result<models::O11yPeriodO11yIntegrationAck, Error<UninstallIntegrationError>> {
// add a prefix to parameters to efficiently prevent name collisions
let p_o11y_period_uninstall_integration_request = o11y_period_uninstall_integration_request;
let uri_str = format!("{}/v1/o11y/integrations/uninstall", configuration.base_path);
let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
req_builder = req_builder.json(&p_o11y_period_uninstall_integration_request);
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
let content_type = resp
.headers()
.get("content-type")
.and_then(|v| v.to_str().ok())
.unwrap_or("application/octet-stream");
let content_type = super::ContentType::from(content_type);
if !status.is_client_error() && !status.is_server_error() {
let content = resp.text().await?;
match content_type {
ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yIntegrationAck`"))),
ContentType::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`")))),
}
} else {
let content = resp.text().await?;
let entity: Option<UninstallIntegrationError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Unlocks a v2-shape dashboard. Only the dashboard's creator or an org admin may lock or unlock. Callers need the editor role; the runtime's own gate enforces it.
pub async fn unlock_dashboard_v2(configuration: &configuration::Configuration, id: &str) -> Result<(), Error<UnlockDashboardV2Error>> {
// add a prefix to parameters to efficiently prevent name collisions
let p_id = id;
let uri_str = format!("{}/v1/o11y/dashboards/{id}/lock", configuration.base_path, id=crate::apis::urlencode(p_id));
let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str);
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
if !status.is_client_error() && !status.is_server_error() {
Ok(())
} else {
let content = resp.text().await?;
let entity: Option<UnlockDashboardV2Error> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Removes the caller's pin for a dashboard. Idempotent — unpinning a dashboard that was not pinned still succeeds. Callers need the viewer role; the runtime's own gate enforces it.
pub async fn unpin_dashboard_v2(configuration: &configuration::Configuration, id: &str) -> Result<(), Error<UnpinDashboardV2Error>> {
// add a prefix to parameters to efficiently prevent name collisions
let p_id = id;
let uri_str = format!("{}/v1/o11y/users/me/dashboards/{id}/pins", configuration.base_path, id=crate::apis::urlencode(p_id));
let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str);
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
if !status.is_client_error() && !status.is_server_error() {
Ok(())
} else {
let content = resp.text().await?;
let entity: Option<UnpinDashboardV2Error> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Changes a connected account's configuration for the given provider, by id. Admin gate.
pub async fn update_account(configuration: &configuration::Configuration, cloud_provider: &str, id: &str, o11y_period_o11y_update_account_in: models::O11yPeriodO11yUpdateAccountIn) -> Result<(), Error<UpdateAccountError>> {
// add a prefix to parameters to efficiently prevent name collisions
let p_cloud_provider = cloud_provider;
let p_id = id;
let p_o11y_period_o11y_update_account_in = o11y_period_o11y_update_account_in;
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));
let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str);
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
req_builder = req_builder.json(&p_o11y_period_o11y_update_account_in);
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
if !status.is_client_error() && !status.is_server_error() {
Ok(())
} else {
let content = resp.text().await?;
let entity: Option<UpdateAccountError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Replaces one auth domain's SSO configuration, by id. Admin gate.
pub async fn update_auth_domain(configuration: &configuration::Configuration, id: &str, o11y_period_o11y_updatable_auth_domain: models::O11yPeriodO11yUpdatableAuthDomain) -> Result<(), Error<UpdateAuthDomainError>> {
// add a prefix to parameters to efficiently prevent name collisions
let p_id = id;
let p_o11y_period_o11y_updatable_auth_domain = o11y_period_o11y_updatable_auth_domain;
let uri_str = format!("{}/v1/o11y/domains/{id}", configuration.base_path, id=crate::apis::urlencode(p_id));
let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str);
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
req_builder = req_builder.json(&p_o11y_period_o11y_updatable_auth_domain);
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
if !status.is_client_error() && !status.is_server_error() {
Ok(())
} else {
let content = resp.text().await?;
let entity: Option<UpdateAuthDomainError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Replaces a notification channel's receiver, by id. Admin gate.
pub async fn update_channel_by_id(configuration: &configuration::Configuration, id: &str, o11y_period_o11y_channel_update_in: models::O11yPeriodO11yChannelUpdateIn) -> Result<(), Error<UpdateChannelByIdError>> {
// add a prefix to parameters to efficiently prevent name collisions
let p_id = id;
let p_o11y_period_o11y_channel_update_in = o11y_period_o11y_channel_update_in;
let uri_str = format!("{}/v1/o11y/channels/{id}", configuration.base_path, id=crate::apis::urlencode(p_id));
let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str);
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
req_builder = req_builder.json(&p_o11y_period_o11y_channel_update_in);
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
if !status.is_client_error() && !status.is_server_error() {
Ok(())
} else {
let content = resp.text().await?;
let entity: Option<UpdateChannelByIdError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Updates a v2-shape dashboard's metadata, spec and tag set. The name is immutable and locked dashboards are rejected. Callers need the editor role; the runtime's own gate enforces it.
pub async fn update_dashboard_v2(configuration: &configuration::Configuration, id: &str, o11y_period_o11y_dashboard_update_in: models::O11yPeriodO11yDashboardUpdateIn) -> Result<models::O11yPeriodO11yDashboardOut, Error<UpdateDashboardV2Error>> {
// add a prefix to parameters to efficiently prevent name collisions
let p_id = id;
let p_o11y_period_o11y_dashboard_update_in = o11y_period_o11y_dashboard_update_in;
let uri_str = format!("{}/v1/o11y/dashboards/{id}", configuration.base_path, id=crate::apis::urlencode(p_id));
let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str);
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
req_builder = req_builder.json(&p_o11y_period_o11y_dashboard_update_in);
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
let content_type = resp
.headers()
.get("content-type")
.and_then(|v| v.to_str().ok())
.unwrap_or("application/octet-stream");
let content_type = super::ContentType::from(content_type);
if !status.is_client_error() && !status.is_server_error() {
let content = resp.text().await?;
match content_type {
ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yDashboardOut`"))),
ContentType::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`")))),
}
} else {
let content = resp.text().await?;
let entity: Option<UpdateDashboardV2Error> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Replaces a saved view's name and data. Saved views are shared org-wide. Callers need the editor role; the runtime's own gate enforces it.
pub async fn update_dashboard_view(configuration: &configuration::Configuration, id: &str, o11y_period_o11y_dashboard_view_update_in: models::O11yPeriodO11yDashboardViewUpdateIn) -> Result<models::O11yPeriodO11yDashboardViewOut, Error<UpdateDashboardViewError>> {
// add a prefix to parameters to efficiently prevent name collisions
let p_id = id;
let p_o11y_period_o11y_dashboard_view_update_in = o11y_period_o11y_dashboard_view_update_in;
let uri_str = format!("{}/v1/o11y/dashboard_views/{id}", configuration.base_path, id=crate::apis::urlencode(p_id));
let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str);
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
req_builder = req_builder.json(&p_o11y_period_o11y_dashboard_view_update_in);
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
let content_type = resp
.headers()
.get("content-type")
.and_then(|v| v.to_str().ok())
.unwrap_or("application/octet-stream");
let content_type = super::ContentType::from(content_type);
if !status.is_client_error() && !status.is_server_error() {
let content = resp.text().await?;
match content_type {
ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yDashboardViewOut`"))),
ContentType::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`")))),
}
} else {
let content = resp.text().await?;
let entity: Option<UpdateDashboardViewError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Replaces a planned maintenance window, by id. Editor gate.
pub async fn update_downtime_schedule_by_id(configuration: &configuration::Configuration, id: &str, o11y_period_o11y_downtime_update_in: models::O11yPeriodO11yDowntimeUpdateIn) -> Result<(), Error<UpdateDowntimeScheduleByIdError>> {
// add a prefix to parameters to efficiently prevent name collisions
let p_id = id;
let p_o11y_period_o11y_downtime_update_in = o11y_period_o11y_downtime_update_in;
let uri_str = format!("{}/v1/o11y/downtime_schedules/{id}", configuration.base_path, id=crate::apis::urlencode(p_id));
let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str);
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
req_builder = req_builder.json(&p_o11y_period_o11y_downtime_update_in);
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
if !status.is_client_error() && !status.is_server_error() {
Ok(())
} else {
let content = resp.text().await?;
let entity: Option<UpdateDowntimeScheduleByIdError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Changes an ingestion key, by id. Editor gate.
pub async fn update_ingestion_key(configuration: &configuration::Configuration, key_id: &str, o11y_period_o11y_update_ingestion_key_in: models::O11yPeriodO11yUpdateIngestionKeyIn) -> Result<(), Error<UpdateIngestionKeyError>> {
// add a prefix to parameters to efficiently prevent name collisions
let p_key_id = key_id;
let p_o11y_period_o11y_update_ingestion_key_in = o11y_period_o11y_update_ingestion_key_in;
let uri_str = format!("{}/v1/o11y/gateway/ingestion_keys/{keyId}", configuration.base_path, keyId=crate::apis::urlencode(p_key_id));
let mut req_builder = configuration.client.request(reqwest::Method::PATCH, &uri_str);
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
req_builder = req_builder.json(&p_o11y_period_o11y_update_ingestion_key_in);
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
if !status.is_client_error() && !status.is_server_error() {
Ok(())
} else {
let content = resp.text().await?;
let entity: Option<UpdateIngestionKeyError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Changes an ingestion key limit, by limit id. Editor gate.
pub async fn update_ingestion_key_limit(configuration: &configuration::Configuration, limit_id: &str, o11y_period_o11y_update_limit_in: models::O11yPeriodO11yUpdateLimitIn) -> Result<(), Error<UpdateIngestionKeyLimitError>> {
// add a prefix to parameters to efficiently prevent name collisions
let p_limit_id = limit_id;
let p_o11y_period_o11y_update_limit_in = o11y_period_o11y_update_limit_in;
let uri_str = format!("{}/v1/o11y/gateway/ingestion_keys/limits/{limitId}", configuration.base_path, limitId=crate::apis::urlencode(p_limit_id));
let mut req_builder = configuration.client.request(reqwest::Method::PATCH, &uri_str);
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
req_builder = req_builder.json(&p_o11y_period_o11y_update_limit_in);
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
if !status.is_client_error() && !status.is_server_error() {
Ok(())
} else {
let content = resp.text().await?;
let entity: Option<UpdateIngestionKeyLimitError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Updates one metric's metadata — description, type, unit, temporality, monotonicity — and answers with the bare success envelope.
pub async fn update_metric_metadata(configuration: &configuration::Configuration, o11y_period_o11y_metric_metadata_save_in: models::O11yPeriodO11yMetricMetadataSaveIn) -> Result<models::O11yPeriodO11yMetricAckOut, Error<UpdateMetricMetadataError>> {
// add a prefix to parameters to efficiently prevent name collisions
let p_o11y_period_o11y_metric_metadata_save_in = o11y_period_o11y_metric_metadata_save_in;
let uri_str = format!("{}/v1/o11y/metrics/metadata", configuration.base_path);
let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
req_builder = req_builder.json(&p_o11y_period_o11y_metric_metadata_save_in);
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
let content_type = resp
.headers()
.get("content-type")
.and_then(|v| v.to_str().ok())
.unwrap_or("application/octet-stream");
let content_type = super::ContentType::from(content_type);
if !status.is_client_error() && !status.is_server_error() {
let content = resp.text().await?;
match content_type {
ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yMetricAckOut`"))),
ContentType::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`")))),
}
} else {
let content = resp.text().await?;
let entity: Option<UpdateMetricMetadataError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Updates the match type and labels of a volume-control rule by its id; the metric name is immutable.
pub 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>> {
// add a prefix to parameters to efficiently prevent name collisions
let p_id = id;
let p_o11y_period_o11y_reduction_rule_save_in = o11y_period_o11y_reduction_rule_save_in;
let uri_str = format!("{}/v1/o11y/metric_reduction_rules/{id}", configuration.base_path, id=crate::apis::urlencode(p_id));
let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str);
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
req_builder = req_builder.json(&p_o11y_period_o11y_reduction_rule_save_in);
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
let content_type = resp
.headers()
.get("content-type")
.and_then(|v| v.to_str().ok())
.unwrap_or("application/octet-stream");
let content_type = super::ContentType::from(content_type);
if !status.is_client_error() && !status.is_server_error() {
let content = resp.text().await?;
match content_type {
ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yReductionRuleOut`"))),
ContentType::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`")))),
}
} else {
let content = resp.text().await?;
let entity: Option<UpdateMetricReductionRuleByIdError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Rewrites the caller's own organization record — display name, name, alias — always addressed as \"me\", never by id. Admin gate.
pub async fn update_my_organization(configuration: &configuration::Configuration, o11y_period_o11y_organization: models::O11yPeriodO11yOrganization) -> Result<(), Error<UpdateMyOrganizationError>> {
// add a prefix to parameters to efficiently prevent name collisions
let p_o11y_period_o11y_organization = o11y_period_o11y_organization;
let uri_str = format!("{}/v1/o11y/orgs/me", configuration.base_path);
let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str);
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
req_builder = req_builder.json(&p_o11y_period_o11y_organization);
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
if !status.is_client_error() && !status.is_server_error() {
Ok(())
} else {
let content = resp.text().await?;
let entity: Option<UpdateMyOrganizationError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Replaces the calling user's password, refusing when the old one does not match. Open to any authenticated caller.
pub async fn update_my_password(configuration: &configuration::Configuration, o11y_period_o11y_change_password_in: models::O11yPeriodO11yChangePasswordIn) -> Result<(), Error<UpdateMyPasswordError>> {
// add a prefix to parameters to efficiently prevent name collisions
let p_o11y_period_o11y_change_password_in = o11y_period_o11y_change_password_in;
let uri_str = format!("{}/v1/o11y/users/me/factor_password", configuration.base_path);
let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str);
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
req_builder = req_builder.json(&p_o11y_period_o11y_change_password_in);
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
if !status.is_client_error() && !status.is_server_error() {
Ok(())
} else {
let content = resp.text().await?;
let entity: Option<UpdateMyPasswordError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Renames the calling service account.
pub async fn update_my_service_account(configuration: &configuration::Configuration, o11y_period_o11y_my_service_account_update_in: models::O11yPeriodO11yMyServiceAccountUpdateIn) -> Result<(), Error<UpdateMyServiceAccountError>> {
// add a prefix to parameters to efficiently prevent name collisions
let p_o11y_period_o11y_my_service_account_update_in = o11y_period_o11y_my_service_account_update_in;
let uri_str = format!("{}/v1/o11y/service_accounts/me", configuration.base_path);
let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str);
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
req_builder = req_builder.json(&p_o11y_period_o11y_my_service_account_update_in);
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
if !status.is_client_error() && !status.is_server_error() {
Ok(())
} else {
let content = resp.text().await?;
let entity: Option<UpdateMyServiceAccountError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Renames the calling user. Open to any authenticated caller.
pub async fn update_my_user_v2(configuration: &configuration::Configuration, o11y_period_o11y_updatable_user: models::O11yPeriodO11yUpdatableUser) -> Result<(), Error<UpdateMyUserV2Error>> {
// add a prefix to parameters to efficiently prevent name collisions
let p_o11y_period_o11y_updatable_user = o11y_period_o11y_updatable_user;
let uri_str = format!("{}/v1/o11y/users/me", configuration.base_path);
let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str);
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
req_builder = req_builder.json(&p_o11y_period_o11y_updatable_user);
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
if !status.is_client_error() && !status.is_server_error() {
Ok(())
} else {
let content = resp.text().await?;
let entity: Option<UpdateMyUserV2Error> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Sets one org-scoped preference, by name. Admin gate.
pub async fn update_org_preference(configuration: &configuration::Configuration, name: &str, o11y_period_o11y_updatable_preference: models::O11yPeriodO11yUpdatablePreference) -> Result<(), Error<UpdateOrgPreferenceError>> {
// add a prefix to parameters to efficiently prevent name collisions
let p_name = name;
let p_o11y_period_o11y_updatable_preference = o11y_period_o11y_updatable_preference;
let uri_str = format!("{}/v1/o11y/org/preferences/{name}", configuration.base_path, name=crate::apis::urlencode(p_name));
let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str);
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
req_builder = req_builder.json(&p_o11y_period_o11y_updatable_preference);
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
if !status.is_client_error() && !status.is_server_error() {
Ok(())
} else {
let content = resp.text().await?;
let entity: Option<UpdateOrgPreferenceError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Updates the public-sharing config for a dashboard. Callers need the admin role; the runtime's own gate enforces it.
pub async fn update_public_dashboard(configuration: &configuration::Configuration, id: &str, o11y_period_o11y_public_dashboard_write_in: models::O11yPeriodO11yPublicDashboardWriteIn) -> Result<(), Error<UpdatePublicDashboardError>> {
// add a prefix to parameters to efficiently prevent name collisions
let p_id = id;
let p_o11y_period_o11y_public_dashboard_write_in = o11y_period_o11y_public_dashboard_write_in;
let uri_str = format!("{}/v1/o11y/dashboards/{id}/public", configuration.base_path, id=crate::apis::urlencode(p_id));
let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str);
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
req_builder = req_builder.json(&p_o11y_period_o11y_public_dashboard_write_in);
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
if !status.is_client_error() && !status.is_server_error() {
Ok(())
} else {
let content = resp.text().await?;
let entity: Option<UpdatePublicDashboardError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Replaces the org's quick filters for one signal with the attribute list given. Admin gate.
pub async fn update_quick_filters(configuration: &configuration::Configuration, o11y_period_o11y_updatable_quick_filters: models::O11yPeriodO11yUpdatableQuickFilters) -> Result<(), Error<UpdateQuickFiltersError>> {
// add a prefix to parameters to efficiently prevent name collisions
let p_o11y_period_o11y_updatable_quick_filters = o11y_period_o11y_updatable_quick_filters;
let uri_str = format!("{}/v1/o11y/orgs/me/filters", configuration.base_path);
let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str);
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
req_builder = req_builder.json(&p_o11y_period_o11y_updatable_quick_filters);
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
if !status.is_client_error() && !status.is_server_error() {
Ok(())
} else {
let content = resp.text().await?;
let entity: Option<UpdateQuickFiltersError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Replaces a custom role's description and transaction groups. Both fields are mandatory — send an empty string or an empty array to clear one — and managed roles cannot be edited.
pub async fn update_role(configuration: &configuration::Configuration, id: &str, o11y_period_o11y_role_update_in: models::O11yPeriodO11yRoleUpdateIn) -> Result<(), Error<UpdateRoleError>> {
// add a prefix to parameters to efficiently prevent name collisions
let p_id = id;
let p_o11y_period_o11y_role_update_in = o11y_period_o11y_role_update_in;
let uri_str = format!("{}/v1/o11y/roles/{id}", configuration.base_path, id=crate::apis::urlencode(p_id));
let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str);
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
req_builder = req_builder.json(&p_o11y_period_o11y_role_update_in);
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
if !status.is_client_error() && !status.is_server_error() {
Ok(())
} else {
let content = resp.text().await?;
let entity: Option<UpdateRoleError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Replaces a route policy, by id, answering with the stored policy. Admin gate.
pub async fn update_route_policy(configuration: &configuration::Configuration, id: &str, o11y_period_o11y_route_policy_update_in: models::O11yPeriodO11yRoutePolicyUpdateIn) -> Result<models::O11yPeriodO11yRoutePolicyOut, Error<UpdateRoutePolicyError>> {
// add a prefix to parameters to efficiently prevent name collisions
let p_id = id;
let p_o11y_period_o11y_route_policy_update_in = o11y_period_o11y_route_policy_update_in;
let uri_str = format!("{}/v1/o11y/route_policies/{id}", configuration.base_path, id=crate::apis::urlencode(p_id));
let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str);
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
req_builder = req_builder.json(&p_o11y_period_o11y_route_policy_update_in);
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
let content_type = resp
.headers()
.get("content-type")
.and_then(|v| v.to_str().ok())
.unwrap_or("application/octet-stream");
let content_type = super::ContentType::from(content_type);
if !status.is_client_error() && !status.is_server_error() {
let content = resp.text().await?;
match content_type {
ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yRoutePolicyOut`"))),
ContentType::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`")))),
}
} else {
let content = resp.text().await?;
let entity: Option<UpdateRoutePolicyError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Replaces an alert rule's definition, by id. Editor gate.
pub async fn update_rule_by_id(configuration: &configuration::Configuration, id: &str, body: Option<serde_json::Value>) -> Result<(), Error<UpdateRuleByIdError>> {
// add a prefix to parameters to efficiently prevent name collisions
let p_id = id;
let p_body = body;
let uri_str = format!("{}/v1/o11y/rules/{id}", configuration.base_path, id=crate::apis::urlencode(p_id));
let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str);
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
req_builder = req_builder.json(&p_body);
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
if !status.is_client_error() && !status.is_server_error() {
Ok(())
} else {
let content = resp.text().await?;
let entity: Option<UpdateRuleByIdError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Changes a service's configuration for one connected account of the given provider, by account id and service id. Admin gate.
pub 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>> {
// add a prefix to parameters to efficiently prevent name collisions
let p_cloud_provider = cloud_provider;
let p_id = id;
let p_service_id = service_id;
let p_o11y_period_o11y_update_service_in = o11y_period_o11y_update_service_in;
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));
let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str);
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
req_builder = req_builder.json(&p_o11y_period_o11y_update_service_in);
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
if !status.is_client_error() && !status.is_server_error() {
Ok(())
} else {
let content = resp.text().await?;
let entity: Option<UpdateServiceError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Renames a service account.
pub async fn update_service_account(configuration: &configuration::Configuration, id: &str, o11y_period_o11y_service_account_update_in: models::O11yPeriodO11yServiceAccountUpdateIn) -> Result<(), Error<UpdateServiceAccountError>> {
// add a prefix to parameters to efficiently prevent name collisions
let p_id = id;
let p_o11y_period_o11y_service_account_update_in = o11y_period_o11y_service_account_update_in;
let uri_str = format!("{}/v1/o11y/service_accounts/{id}", configuration.base_path, id=crate::apis::urlencode(p_id));
let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str);
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
req_builder = req_builder.json(&p_o11y_period_o11y_service_account_update_in);
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
if !status.is_client_error() && !status.is_server_error() {
Ok(())
} else {
let content = resp.text().await?;
let entity: Option<UpdateServiceAccountError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Renames an API key or moves its expiry.
pub 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>> {
// add a prefix to parameters to efficiently prevent name collisions
let p_id = id;
let p_fid = fid;
let p_o11y_period_o11y_api_key_update_in = o11y_period_o11y_api_key_update_in;
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));
let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str);
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
req_builder = req_builder.json(&p_o11y_period_o11y_api_key_update_in);
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
if !status.is_client_error() && !status.is_server_error() {
Ok(())
} else {
let content = resp.text().await?;
let entity: Option<UpdateServiceAccountKeyError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Changes a mapper's field context, config or enabled state. Every field is optional and only the ones sent are applied. Callers need the admin role; the runtime's own gate enforces it.
pub 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>> {
// add a prefix to parameters to efficiently prevent name collisions
let p_group_id = group_id;
let p_mapper_id = mapper_id;
let p_o11y_period_o11y_span_mapper_update_in = o11y_period_o11y_span_mapper_update_in;
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));
let mut req_builder = configuration.client.request(reqwest::Method::PATCH, &uri_str);
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
req_builder = req_builder.json(&p_o11y_period_o11y_span_mapper_update_in);
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
if !status.is_client_error() && !status.is_server_error() {
Ok(())
} else {
let content = resp.text().await?;
let entity: Option<UpdateSpanMapperError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Changes a group's name, condition or enabled state. Every field is optional and only the ones sent are applied. Callers need the admin role; the runtime's own gate enforces it.
pub 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>> {
// add a prefix to parameters to efficiently prevent name collisions
let p_group_id = group_id;
let p_o11y_period_o11y_span_mapper_group_update_in = o11y_period_o11y_span_mapper_group_update_in;
let uri_str = format!("{}/v1/o11y/span_mapper_groups/{groupId}", configuration.base_path, groupId=crate::apis::urlencode(p_group_id));
let mut req_builder = configuration.client.request(reqwest::Method::PATCH, &uri_str);
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
req_builder = req_builder.json(&p_o11y_period_o11y_span_mapper_group_update_in);
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
if !status.is_client_error() && !status.is_server_error() {
Ok(())
} else {
let content = resp.text().await?;
let entity: Option<UpdateSpanMapperGroupError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Changes how one span field is stored — selects or deselects it as a materialized column and tunes its index — and echoes the setting back. Callers need the editor role; the runtime's own gate enforces it.
pub async fn update_trace_field(configuration: &configuration::Configuration, o11y_period_o11y_field_setting: models::O11yPeriodO11yFieldSetting) -> Result<models::O11yPeriodO11yFieldSetting, Error<UpdateTraceFieldError>> {
// add a prefix to parameters to efficiently prevent name collisions
let p_o11y_period_o11y_field_setting = o11y_period_o11y_field_setting;
let uri_str = format!("{}/v1/o11y/traces/fields", configuration.base_path);
let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
req_builder = req_builder.json(&p_o11y_period_o11y_field_setting);
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
let content_type = resp
.headers()
.get("content-type")
.and_then(|v| v.to_str().ok())
.unwrap_or("application/octet-stream");
let content_type = super::ContentType::from(content_type);
if !status.is_client_error() && !status.is_server_error() {
let content = resp.text().await?;
match content_type {
ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yFieldSetting`"))),
ContentType::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`")))),
}
} else {
let content = resp.text().await?;
let entity: Option<UpdateTraceFieldError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Renames a funnel or rewrites its description, answering the funnel as it now stands. Callers need the editor role; the runtime's own gate enforces it.
pub async fn update_trace_funnel(configuration: &configuration::Configuration, funnel_id: &str, o11y_period_o11y_funnel_update_in: models::O11yPeriodO11yFunnelUpdateIn) -> Result<models::O11yPeriodO11yFunnelOut, Error<UpdateTraceFunnelError>> {
// add a prefix to parameters to efficiently prevent name collisions
let p_funnel_id = funnel_id;
let p_o11y_period_o11y_funnel_update_in = o11y_period_o11y_funnel_update_in;
let uri_str = format!("{}/v1/o11y/trace-funnels/{funnel_id}", configuration.base_path, funnel_id=crate::apis::urlencode(p_funnel_id));
let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str);
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
req_builder = req_builder.json(&p_o11y_period_o11y_funnel_update_in);
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
let content_type = resp
.headers()
.get("content-type")
.and_then(|v| v.to_str().ok())
.unwrap_or("application/octet-stream");
let content_type = super::ContentType::from(content_type);
if !status.is_client_error() && !status.is_server_error() {
let content = resp.text().await?;
match content_type {
ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yFunnelOut`"))),
ContentType::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`")))),
}
} else {
let content = resp.text().await?;
let entity: Option<UpdateTraceFunnelError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Replaces a funnel's steps — the funnel is named in the body rather than the path — and answers the funnel as it now stands. A name or description sent alongside is applied too; an empty one leaves it as it was. Callers need the editor role; the runtime's own gate enforces it.
pub async fn update_trace_funnel_steps(configuration: &configuration::Configuration, o11y_period_o11y_funnel_steps_update_in: models::O11yPeriodO11yFunnelStepsUpdateIn) -> Result<models::O11yPeriodO11yFunnelOut, Error<UpdateTraceFunnelStepsError>> {
// add a prefix to parameters to efficiently prevent name collisions
let p_o11y_period_o11y_funnel_steps_update_in = o11y_period_o11y_funnel_steps_update_in;
let uri_str = format!("{}/v1/o11y/trace-funnels/steps/update", configuration.base_path);
let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str);
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
req_builder = req_builder.json(&p_o11y_period_o11y_funnel_steps_update_in);
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
let content_type = resp
.headers()
.get("content-type")
.and_then(|v| v.to_str().ok())
.unwrap_or("application/octet-stream");
let content_type = super::ContentType::from(content_type);
if !status.is_client_error() && !status.is_server_error() {
let content = resp.text().await?;
match content_type {
ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yFunnelOut`"))),
ContentType::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`")))),
}
} else {
let content = resp.text().await?;
let entity: Option<UpdateTraceFunnelStepsError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Renames one org member, by user id — someone else, never the caller, who renames themselves through updateMyUser. Admin gate.
pub async fn update_user(configuration: &configuration::Configuration, id: &str, o11y_period_o11y_user_update: models::O11yPeriodO11yUserUpdate) -> Result<(), Error<UpdateUserError>> {
// add a prefix to parameters to efficiently prevent name collisions
let p_id = id;
let p_o11y_period_o11y_user_update = o11y_period_o11y_user_update;
let uri_str = format!("{}/v1/o11y/users/{id}", configuration.base_path, id=crate::apis::urlencode(p_id));
let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str);
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
req_builder = req_builder.json(&p_o11y_period_o11y_user_update);
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
if !status.is_client_error() && !status.is_server_error() {
Ok(())
} else {
let content = resp.text().await?;
let entity: Option<UpdateUserError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Renames one org member and may move their legacy role, answering with the updated record. Admins may update anyone; a non-admin only themselves (the runtime's self-access gate).
pub async fn update_user_deprecated(configuration: &configuration::Configuration, id: &str, o11y_period_o11y_deprecated_user_update: models::O11yPeriodO11yDeprecatedUserUpdate) -> Result<models::O11yPeriodO11yDeprecatedUserOut, Error<UpdateUserDeprecatedError>> {
// add a prefix to parameters to efficiently prevent name collisions
let p_id = id;
let p_o11y_period_o11y_deprecated_user_update = o11y_period_o11y_deprecated_user_update;
let uri_str = format!("{}/v1/o11y/user/{id}", configuration.base_path, id=crate::apis::urlencode(p_id));
let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str);
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
req_builder = req_builder.json(&p_o11y_period_o11y_deprecated_user_update);
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
let content_type = resp
.headers()
.get("content-type")
.and_then(|v| v.to_str().ok())
.unwrap_or("application/octet-stream");
let content_type = super::ContentType::from(content_type);
if !status.is_client_error() && !status.is_server_error() {
let content = resp.text().await?;
match content_type {
ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yDeprecatedUserOut`"))),
ContentType::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`")))),
}
} else {
let content = resp.text().await?;
let entity: Option<UpdateUserDeprecatedError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Sets one preference of the calling user, by name. Viewer gate.
pub async fn update_user_preference(configuration: &configuration::Configuration, name: &str, o11y_period_o11y_updatable_preference: models::O11yPeriodO11yUpdatablePreference) -> Result<(), Error<UpdateUserPreferenceError>> {
// add a prefix to parameters to efficiently prevent name collisions
let p_name = name;
let p_o11y_period_o11y_updatable_preference = o11y_period_o11y_updatable_preference;
let uri_str = format!("{}/v1/o11y/user/preferences/{name}", configuration.base_path, name=crate::apis::urlencode(p_name));
let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str);
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
req_builder = req_builder.json(&p_o11y_period_o11y_updatable_preference);
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
if !status.is_client_error() && !status.is_server_error() {
Ok(())
} else {
let content = resp.text().await?;
let entity: Option<UpdateUserPreferenceError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Lists the traces that match a funnel described inline — the builder's \"try this\" before anything is saved.
pub async fn validate_draft_funnel_traces(configuration: &configuration::Configuration, o11y_period_o11y_draft_funnel_in: models::O11yPeriodO11yDraftFunnelIn) -> Result<models::O11yPeriodO11yFunnelRowsOut, Error<ValidateDraftFunnelTracesError>> {
// add a prefix to parameters to efficiently prevent name collisions
let p_o11y_period_o11y_draft_funnel_in = o11y_period_o11y_draft_funnel_in;
let uri_str = format!("{}/v1/o11y/trace-funnels/analytics/validate", configuration.base_path);
let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
req_builder = req_builder.json(&p_o11y_period_o11y_draft_funnel_in);
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
let content_type = resp
.headers()
.get("content-type")
.and_then(|v| v.to_str().ok())
.unwrap_or("application/octet-stream");
let content_type = super::ContentType::from(content_type);
if !status.is_client_error() && !status.is_server_error() {
let content = resp.text().await?;
match content_type {
ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yFunnelRowsOut`"))),
ContentType::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`")))),
}
} else {
let content = resp.text().await?;
let entity: Option<ValidateDraftFunnelTracesError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Lists the traces that match a saved funnel over a window — the read that answers \"is this funnel finding anything at all\".
pub 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>> {
// add a prefix to parameters to efficiently prevent name collisions
let p_funnel_id = funnel_id;
let p_o11y_period_o11y_funnel_window_in = o11y_period_o11y_funnel_window_in;
let uri_str = format!("{}/v1/o11y/trace-funnels/{funnel_id}/analytics/validate", configuration.base_path, funnel_id=crate::apis::urlencode(p_funnel_id));
let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
req_builder = req_builder.json(&p_o11y_period_o11y_funnel_window_in);
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
let content_type = resp
.headers()
.get("content-type")
.and_then(|v| v.to_str().ok())
.unwrap_or("application/octet-stream");
let content_type = super::ContentType::from(content_type);
if !status.is_client_error() && !status.is_server_error() {
let content = resp.text().await?;
match content_type {
ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::O11yPeriodO11yFunnelRowsOut`"))),
ContentType::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`")))),
}
} else {
let content = resp.text().await?;
let entity: Option<ValidateTraceFunnelTracesError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}
/// Checks that a reset-password token exists and has not expired, without consuming it. Unauthenticated: the token is the proof.
pub async fn verify_reset_password_token(configuration: &configuration::Configuration, o11y_period_o11y_reset_token_ref: models::O11yPeriodO11yResetTokenRef) -> Result<(), Error<VerifyResetPasswordTokenError>> {
// add a prefix to parameters to efficiently prevent name collisions
let p_o11y_period_o11y_reset_token_ref = o11y_period_o11y_reset_token_ref;
let uri_str = format!("{}/v1/o11y/reset_password_tokens/verify", configuration.base_path);
let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref token) = configuration.bearer_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
req_builder = req_builder.json(&p_o11y_period_o11y_reset_token_ref);
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;
let status = resp.status();
if !status.is_client_error() && !status.is_server_error() {
Ok(())
} else {
let content = resp.text().await?;
let entity: Option<VerifyResetPasswordTokenError> = serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent { status, content, entity }))
}
}