Skip to main content

mistral_openapi_client/models/
wandb_integration.rs

1/*
2 * Mistral AI API
3 *
4 * Our Chat Completion and Embeddings APIs specification. Create your account on [La Plateforme](https://console.mistral.ai) to get access and read the [docs](https://docs.mistral.ai) to learn how to use it.
5 *
6 * The version of the OpenAPI document: 1.0.0
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 WandbIntegration {
16    #[serde(rename = "type", skip_serializing_if = "Option::is_none")]
17    pub r#type: Option<Type>,
18    /// The name of the project that the new run will be created under.
19    #[serde(rename = "project")]
20    pub project: String,
21    #[serde(rename = "name", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
22    pub name: Option<Option<String>>,
23    /// The WandB API key to use for authentication.
24    #[serde(rename = "api_key")]
25    pub api_key: String,
26    #[serde(rename = "run_name", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
27    pub run_name: Option<Option<String>>,
28}
29
30impl WandbIntegration {
31    pub fn new(project: String, api_key: String) -> WandbIntegration {
32        WandbIntegration {
33            r#type: None,
34            project,
35            name: None,
36            api_key,
37            run_name: None,
38        }
39    }
40}
41/// 
42#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
43pub enum Type {
44    #[serde(rename = "wandb")]
45    Wandb,
46}
47
48impl Default for Type {
49    fn default() -> Type {
50        Self::Wandb
51    }
52}
53