fastly_api/models/
service_create.rs1#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
12pub struct ServiceCreate {
13 #[serde(rename = "comment", skip_serializing_if = "Option::is_none")]
15 pub comment: Option<String>,
16 #[serde(rename = "name", skip_serializing_if = "Option::is_none")]
18 pub name: Option<String>,
19 #[serde(rename = "customer_id", skip_serializing_if = "Option::is_none")]
21 pub customer_id: Option<String>,
22 #[serde(rename = "type", skip_serializing_if = "Option::is_none")]
24 pub _type: Option<Type>,
25}
26
27impl ServiceCreate {
28 pub fn new() -> ServiceCreate {
29 ServiceCreate {
30 comment: None,
31 name: None,
32 customer_id: None,
33 _type: None,
34 }
35 }
36}
37
38#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
40pub enum Type {
41 #[serde(rename = "vcl")]
42 Vcl,
43 #[serde(rename = "wasm")]
44 Wasm,
45}
46
47impl Default for Type {
48 fn default() -> Type {
49 Self::Vcl
50 }
51}
52