langfuse_client/models/
api_key_summary.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/// ApiKeySummary : Summary of an API key
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct ApiKeySummary {
17    #[serde(rename = "id")]
18    pub id: String,
19    #[serde(rename = "createdAt")]
20    pub created_at: String,
21    #[serde(rename = "expiresAt", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
22    pub expires_at: Option<Option<String>>,
23    #[serde(rename = "lastUsedAt", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
24    pub last_used_at: Option<Option<String>>,
25    #[serde(rename = "note", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
26    pub note: Option<Option<String>>,
27    #[serde(rename = "publicKey")]
28    pub public_key: String,
29    #[serde(rename = "displaySecretKey")]
30    pub display_secret_key: String,
31}
32
33impl ApiKeySummary {
34    /// Summary of an API key
35    pub fn new(id: String, created_at: String, public_key: String, display_secret_key: String) -> ApiKeySummary {
36        ApiKeySummary {
37            id,
38            created_at,
39            expires_at: None,
40            last_used_at: None,
41            note: None,
42            public_key,
43            display_secret_key,
44        }
45    }
46}
47