1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
#[derive(Debug, PartialEq, Serialize, Deserialize)]
pub struct Service {
#[serde(rename = "name")]
pub name: String,
#[serde(rename = "id")]
pub id: String,
#[serde(rename = "description")]
pub description: String,
#[serde(rename = "tags", skip_serializing_if = "Option::is_none")]
pub tags: Option<Vec<String>>,
#[serde(rename = "requires", skip_serializing_if = "Option::is_none")]
pub requires: Option<Requires>,
#[serde(rename = "bindable")]
pub bindable: bool,
#[serde(rename = "metadata", skip_serializing_if = "Option::is_none")]
pub metadata: Option<serde_json::Value>,
#[serde(rename = "dashboard_client", skip_serializing_if = "Option::is_none")]
pub dashboard_client: Option<crate::models::DashboardClient>,
#[serde(rename = "plan_updateable", skip_serializing_if = "Option::is_none")]
pub plan_updateable: Option<bool>,
#[serde(rename = "plans")]
pub plans: Vec<crate::models::Plan>,
#[serde(rename = "extensions", skip_serializing_if = "Option::is_none")]
pub extensions: Option<Vec<crate::models::Extension>>,
}
impl Service {
pub fn new(
name: String,
id: String,
description: String,
bindable: bool,
plans: Vec<crate::models::Plan>,
) -> Service {
Service {
name: name,
id: id,
description: description,
tags: None,
requires: None,
bindable: bindable,
metadata: None,
dashboard_client: None,
plan_updateable: None,
plans: plans,
extensions: None,
}
}
}
#[derive(Debug, PartialEq, Serialize, Deserialize)]
pub enum Requires {
#[serde(rename = "syslog_drain")]
SyslogDrain,
#[serde(rename = "route_forwarding")]
RouteForwarding,
#[serde(rename = "volume_mount")]
VolumeMount,
}