Skip to main content

langfuse_client_base/models/
service_provider_config.rs

1/*
2 * server
3 *
4 * ## 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`
5 *
6 * The version of the OpenAPI document:
7 *
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize, bon::Builder)]
15pub struct ServiceProviderConfig {
16    #[serde(rename = "schemas")]
17    pub schemas: Vec<String>,
18    #[serde(rename = "documentationUri")]
19    pub documentation_uri: String,
20    #[serde(rename = "patch")]
21    pub patch: Box<models::ScimFeatureSupport>,
22    #[serde(rename = "bulk")]
23    pub bulk: Box<models::BulkConfig>,
24    #[serde(rename = "filter")]
25    pub filter: Box<models::FilterConfig>,
26    #[serde(rename = "changePassword")]
27    pub change_password: Box<models::ScimFeatureSupport>,
28    #[serde(rename = "sort")]
29    pub sort: Box<models::ScimFeatureSupport>,
30    #[serde(rename = "etag")]
31    pub etag: Box<models::ScimFeatureSupport>,
32    #[serde(rename = "authenticationSchemes")]
33    pub authentication_schemes: Vec<models::AuthenticationScheme>,
34    #[serde(rename = "meta")]
35    pub meta: Box<models::ResourceMeta>,
36}
37
38impl ServiceProviderConfig {
39    pub fn new(
40        schemas: Vec<String>,
41        documentation_uri: String,
42        patch: models::ScimFeatureSupport,
43        bulk: models::BulkConfig,
44        filter: models::FilterConfig,
45        change_password: models::ScimFeatureSupport,
46        sort: models::ScimFeatureSupport,
47        etag: models::ScimFeatureSupport,
48        authentication_schemes: Vec<models::AuthenticationScheme>,
49        meta: models::ResourceMeta,
50    ) -> ServiceProviderConfig {
51        ServiceProviderConfig {
52            schemas,
53            documentation_uri,
54            patch: Box::new(patch),
55            bulk: Box::new(bulk),
56            filter: Box::new(filter),
57            change_password: Box::new(change_password),
58            sort: Box::new(sort),
59            etag: Box::new(etag),
60            authentication_schemes,
61            meta: Box::new(meta),
62        }
63    }
64}