Skip to main content

exoscale_rs/models/
create_model_request.rs

1/*
2 * Exoscale API
3 *
4 * Infrastructure automation API, allowing programmatic access to all Exoscale products and services.
5 *
6 * The version of the OpenAPI document: 2.0.0
7 * Contact: support@exoscale.com
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 CreateModelRequest {
16    /// Model name
17    #[serde(rename = "name")]
18    pub name: String,
19    /// Huggingface Token
20    #[serde(rename = "huggingface-token", skip_serializing_if = "Option::is_none")]
21    pub huggingface_token: Option<String>,
22}
23
24impl CreateModelRequest {
25    /// AI model
26    pub fn new(name: String) -> CreateModelRequest {
27        CreateModelRequest {
28            name,
29            huggingface_token: None,
30        }
31    }
32}
33