langfuse_client/models/
create_prompt_request_one_of.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 CreatePromptRequestOneOf {
16    #[serde(rename = "name")]
17    pub name: String,
18    #[serde(rename = "prompt")]
19    pub prompt: Vec<models::ChatMessage>,
20    #[serde(rename = "config", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
21    pub config: Option<Option<serde_json::Value>>,
22    /// List of deployment labels of this prompt version.
23    #[serde(rename = "labels", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
24    pub labels: Option<Option<Vec<String>>>,
25    /// List of tags to apply to all versions of this prompt.
26    #[serde(rename = "tags", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
27    pub tags: Option<Option<Vec<String>>>,
28    /// Commit message for this prompt version.
29    #[serde(rename = "commitMessage", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
30    pub commit_message: Option<Option<String>>,
31    #[serde(rename = "type")]
32    pub r#type: Type,
33}
34
35impl CreatePromptRequestOneOf {
36    pub fn new(name: String, prompt: Vec<models::ChatMessage>, r#type: Type) -> CreatePromptRequestOneOf {
37        CreatePromptRequestOneOf {
38            name,
39            prompt,
40            config: None,
41            labels: None,
42            tags: None,
43            commit_message: None,
44            r#type,
45        }
46    }
47}
48/// 
49#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
50pub enum Type {
51    #[serde(rename = "chat")]
52    Chat,
53}
54
55impl Default for Type {
56    fn default() -> Type {
57        Self::Chat
58    }
59}
60