Skip to main content

fastly_api/models/
draft_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/// DraftDiff : The differences between the draft and active versions of a routing config.
9
10
11
12#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
13pub struct DraftDiff {
14    /// Paths that exist in the draft but not in the active version.
15    #[serde(rename = "added", skip_serializing_if = "Option::is_none")]
16    pub added: Option<Vec<crate::models::PathWithRules>>,
17    /// Paths that exist in the active version but not in the draft.
18    #[serde(rename = "deleted", skip_serializing_if = "Option::is_none")]
19    pub deleted: Option<Vec<crate::models::PathWithRules>>,
20    /// Paths that exist in both versions but have changed.
21    #[serde(rename = "modified", skip_serializing_if = "Option::is_none")]
22    pub modified: Option<Vec<crate::models::PathChange>>,
23}
24
25impl DraftDiff {
26    /// The differences between the draft and active versions of a routing config.
27    pub fn new() -> DraftDiff {
28        DraftDiff {
29            added: None,
30            deleted: None,
31            modified: None,
32        }
33    }
34}
35
36