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)]
15pub struct ResourceType {
16    #[serde(rename = "schemas", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
17    pub schemas: Option<Option<Vec<String>>>,
18    #[serde(rename = "id")]
19    pub id: String,
20    #[serde(rename = "name")]
21    pub name: String,
22    #[serde(rename = "endpoint")]
23    pub endpoint: String,
24    #[serde(rename = "description")]
25    pub description: String,
26    #[serde(rename = "schema")]
27    pub schema: String,
28    #[serde(rename = "schemaExtensions")]
29    pub schema_extensions: Vec<models::SchemaExtension>,
30    #[serde(rename = "meta")]
31    pub meta: models::ResourceMeta,
32}
33
34impl ResourceType {
35    pub fn new(id: String, name: String, endpoint: String, description: String, schema: String, schema_extensions: Vec<models::SchemaExtension>, meta: models::ResourceMeta) -> ResourceType {
36        ResourceType {
37            schemas: None,
38            id,
39            name,
40            endpoint,
41            description,
42            schema,
43            schema_extensions,
44            meta,
45        }
46    }
47}
48