render_api/model/
service.rs

1
2use serde::{Serialize, Deserialize};
3#[derive(Debug, Clone, Serialize, Deserialize, Default)]
4#[serde(rename_all = "camelCase")]
5pub struct Service {
6    pub auto_deploy: String,
7    #[serde(default)]
8    pub branch: Option<String>,
9    #[serde(default)]
10    pub image_path: Option<String>,
11    pub created_at: String,
12    pub id: String,
13    pub name: String,
14    pub notify_on_fail: String,
15    pub owner_id: String,
16    #[serde(default)]
17    pub repo: Option<String>,
18    pub slug: String,
19    pub suspended: String,
20    pub suspenders: Vec<String>,
21    #[serde(rename = "type")]
22    pub type_: String,
23    pub updated_at: String,
24}
25impl std::fmt::Display for Service {
26    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
27        write!(f, "{}", serde_json::to_string(self).unwrap())
28    }
29}