fastly_api/models/
logging_cloudfiles_additional.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 LoggingCloudfilesAdditional {
13    /// Your Cloud Files account access key.
14    #[serde(rename = "access_key", skip_serializing_if = "Option::is_none")]
15    pub access_key: Option<String>,
16    /// The name of your Cloud Files container.
17    #[serde(rename = "bucket_name", skip_serializing_if = "Option::is_none")]
18    pub bucket_name: Option<String>,
19    /// The path to upload logs to.
20    #[serde(rename = "path", skip_serializing_if = "Option::is_none")]
21    pub path: Option<String>,
22    /// The region to stream logs to.
23    #[serde(rename = "region", skip_serializing_if = "Option::is_none")]
24    pub region: Option<Region>,
25    /// A PGP public key that Fastly will use to encrypt your log files before writing them to disk.
26    #[serde(rename = "public_key", skip_serializing_if = "Option::is_none")]
27    pub public_key: Option<String>,
28    /// The username for your Cloud Files account.
29    #[serde(rename = "user", skip_serializing_if = "Option::is_none")]
30    pub user: Option<String>,
31}
32
33impl LoggingCloudfilesAdditional {
34    pub fn new() -> LoggingCloudfilesAdditional {
35        LoggingCloudfilesAdditional {
36            access_key: None,
37            bucket_name: None,
38            path: None,
39            region: None,
40            public_key: None,
41            user: None,
42        }
43    }
44}
45
46/// The region to stream logs to.
47#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
48pub enum Region {
49    #[serde(rename = "DFW")]
50    DFW,
51    #[serde(rename = "ORD")]
52    ORD,
53    #[serde(rename = "IAD")]
54    IAD,
55    #[serde(rename = "LON")]
56    LON,
57    #[serde(rename = "SYD")]
58    SYD,
59    #[serde(rename = "HKG")]
60    HKG,
61    #[serde(rename = "null")]
62    Null,
63}
64
65impl Default for Region {
66    fn default() -> Region {
67        Self::DFW
68    }
69}
70