Skip to main content

langfuse_client_base/models/
unstable_topic_assignment_status.rs

1#![allow(deprecated)]
2/*
3 * server
4 *
5 * ## Real-time data  The only real-time path to get tracing data is to ingest via OpenTelemetry (`POST /api/public/otel/v1/traces`) and retrieve via Observations API v2 (`GET /api/public/v2/observations`) and Metrics API v2 (`GET /api/public/v2/metrics`). Other public API write and read endpoints can delay data by about 10 minutes. Direct OpenTelemetry exporters must send the `x-langfuse-ingestion-version: 4` header; current Python and JS SDKs already do. See the [Public API docs](https://langfuse.com/docs/api-and-data-platform/features/public-api) and [real-time ingestion](https://langfuse.com/integrations/native/opentelemetry.md#real-time-ingestion).  ## Authentication  Authenticate with the API using [Basic Auth](https://en.wikipedia.org/wiki/Basic_access_authentication), get API keys in the project settings:  - username: Langfuse Public Key - password: Langfuse Secret Key  ## Exports  - OpenAPI spec: https://cloud.langfuse.com/generated/api/openapi.yml - Self-hosted deployments: interactive API reference at `/api/docs` and OpenAPI spec at `/api/openapi.yaml`
6 *
7 * The version of the OpenAPI document:
8 *
9 * Generated by: https://openapi-generator.tech
10 */
11
12use serde::{Deserialize, Serialize};
13
14#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
15pub enum UnstableTopicAssignmentStatus {
16    #[serde(rename = "assigned")]
17    Assigned,
18    #[serde(rename = "outlier")]
19    Outlier,
20
21    /// A value this client does not know. It is not kept: this serializes as `"unknown"`, which the API does not list.
22    #[serde(rename = "unknown", other)]
23    Unknown,
24}
25
26impl std::fmt::Display for UnstableTopicAssignmentStatus {
27    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
28        match self {
29            Self::Assigned => write!(f, "assigned"),
30            Self::Outlier => write!(f, "outlier"),
31            Self::Unknown => write!(f, "unknown"),
32        }
33    }
34}
35
36impl crate::models::validation::Validate for UnstableTopicAssignmentStatus {
37    fn validate_into(
38        &self,
39        _path: &crate::models::validation::Path<'_>,
40        _errors: &mut Vec<crate::models::validation::ValidationError>,
41    ) {
42    }
43}
44
45impl ::std::str::FromStr for UnstableTopicAssignmentStatus {
46    type Err = crate::models::ParseEnumError;
47
48    fn from_str(value: &str) -> ::std::result::Result<Self, crate::models::ParseEnumError> {
49        match value {
50            "assigned" => Ok(Self::Assigned),
51            "outlier" => Ok(Self::Outlier),
52            _ => Err(crate::models::ParseEnumError::new(
53                "UnstableTopicAssignmentStatus",
54                value,
55            )),
56        }
57    }
58}
59
60impl ::std::convert::TryFrom<&str> for UnstableTopicAssignmentStatus {
61    type Error = crate::models::ParseEnumError;
62
63    fn try_from(value: &str) -> ::std::result::Result<Self, crate::models::ParseEnumError> {
64        value.parse()
65    }
66}
67
68impl ::std::convert::TryFrom<&::std::string::String> for UnstableTopicAssignmentStatus {
69    type Error = crate::models::ParseEnumError;
70
71    fn try_from(
72        value: &::std::string::String,
73    ) -> ::std::result::Result<Self, crate::models::ParseEnumError> {
74        value.parse()
75    }
76}
77
78impl ::std::convert::TryFrom<::std::string::String> for UnstableTopicAssignmentStatus {
79    type Error = crate::models::ParseEnumError;
80
81    fn try_from(
82        value: ::std::string::String,
83    ) -> ::std::result::Result<Self, crate::models::ParseEnumError> {
84        value.parse()
85    }
86}