fastly_api/models/
vcl_diff.rs

1/*
2 * Fastly API
3 *
4 * Via the Fastly API you can perform any of the operations that are possible within the management console,  including creating services, domains, and backends, configuring rules or uploading your own application code, as well as account operations such as user administration and billing reports. The API is organized into collections of endpoints that allow manipulation of objects related to Fastly services and accounts. For the most accurate and up-to-date API reference content, visit our [Developer Hub](https://www.fastly.com/documentation/reference/api/) 
5 *
6 */
7
8
9
10
11#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
12pub struct VclDiff {
13    /// The version number of the service to which changes in the generated VCL are being compared.
14    #[serde(rename = "from", skip_serializing_if = "Option::is_none")]
15    pub from: Option<i32>,
16    /// The version number of the service from which changes in the generated VCL are being compared.
17    #[serde(rename = "to", skip_serializing_if = "Option::is_none")]
18    pub to: Option<i32>,
19    /// The format in which compared VCL changes are being returned in.
20    #[serde(rename = "format", skip_serializing_if = "Option::is_none")]
21    pub format: Option<Format>,
22    /// The differences between two specified versions.
23    #[serde(rename = "diff", skip_serializing_if = "Option::is_none")]
24    pub diff: Option<String>,
25}
26
27impl VclDiff {
28    pub fn new() -> VclDiff {
29        VclDiff {
30            from: None,
31            to: None,
32            format: None,
33            diff: None,
34        }
35    }
36}
37
38/// The format in which compared VCL changes are being returned in.
39#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
40pub enum Format {
41    #[serde(rename = "text")]
42    Text,
43    #[serde(rename = "html")]
44    Html,
45    #[serde(rename = "html_simple")]
46    HtmlSimple,
47}
48
49impl Default for Format {
50    fn default() -> Format {
51        Self::Text
52    }
53}
54