fastly_api/models/
version_detail_settings.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/// VersionDetailSettings : List of default settings for this service.
9
10
11
12#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
13pub struct VersionDetailSettings {
14    /// The default host name for the version.
15    #[serde(rename = "general.default_host", skip_serializing_if = "Option::is_none")]
16    pub general_default_host: Option<String>,
17    /// The default time-to-live (TTL) for the version.
18    #[serde(rename = "general.default_ttl", skip_serializing_if = "Option::is_none")]
19    pub general_default_ttl: Option<i32>,
20    /// Enables serving a stale object if there is an error.
21    #[serde(rename = "general.stale_if_error", skip_serializing_if = "Option::is_none")]
22    pub general_stale_if_error: Option<bool>,
23    /// The default time-to-live (TTL) for serving the stale object for the version.
24    #[serde(rename = "general.stale_if_error_ttl", skip_serializing_if = "Option::is_none")]
25    pub general_stale_if_error_ttl: Option<i32>,
26}
27
28impl VersionDetailSettings {
29    /// List of default settings for this service.
30    pub fn new() -> VersionDetailSettings {
31        VersionDetailSettings {
32            general_default_host: None,
33            general_default_ttl: None,
34            general_stale_if_error: None,
35            general_stale_if_error_ttl: None,
36        }
37    }
38}
39
40