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