Skip to main content

fastly_api/models/
routing_config_state.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/// RoutingConfigState : The current state of the routing config's versions.
9
10use std::fmt;
11
12/// The current state of the routing config's versions.
13#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
14pub enum RoutingConfigState {
15    #[serde(rename = "draft-only")]
16    StateDraftOnly,
17    #[serde(rename = "active")]
18    StateActive,
19    #[serde(rename = "active-with-draft")]
20    StateActiveWithDraft,
21
22}
23
24impl fmt::Display for RoutingConfigState {
25    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
26        match self {
27            Self::StateDraftOnly => write!(f, "{}", "draft-only"),
28            Self::StateActive => write!(f, "{}", "active"),
29            Self::StateActiveWithDraft => write!(f, "{}", "active-with-draft"),
30        }
31    }
32}
33
34impl Default for RoutingConfigState {
35    fn default() -> RoutingConfigState {
36        Self::StateDraftOnly
37    }
38}
39
40
41
42