langfuse_client/models/
resource_type.rs

1/*
2 * langfuse
3 *
4 * ## 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 - Postman collection: https://cloud.langfuse.com/generated/postman/collection.json
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)]
15#[cfg_attr(feature="bon", derive(bon::Builder))]
16pub struct ResourceType {
17    #[serde(rename = "schemas", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
18    pub schemas: Option<Option<Vec<String>>>,
19    #[serde(rename = "id")]
20    pub id: String,
21    #[serde(rename = "name")]
22    pub name: String,
23    #[serde(rename = "endpoint")]
24    pub endpoint: String,
25    #[serde(rename = "description")]
26    pub description: String,
27    #[serde(rename = "schema")]
28    pub schema: String,
29    #[serde(rename = "schemaExtensions")]
30    pub schema_extensions: Vec<models::SchemaExtension>,
31    #[serde(rename = "meta")]
32    pub meta: models::ResourceMeta,
33}
34
35impl ResourceType {
36    pub fn new(id: String, name: String, endpoint: String, description: String, schema: String, schema_extensions: Vec<models::SchemaExtension>, meta: models::ResourceMeta) -> ResourceType {
37        ResourceType {
38            schemas: None,
39            id,
40            name,
41            endpoint,
42            description,
43            schema,
44            schema_extensions,
45            meta,
46        }
47    }
48}
49