fastly_api/models/
logging_logentries_response.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 LoggingLogentriesResponse {
13    /// The name for the real-time logging configuration.
14    #[serde(rename = "name", skip_serializing_if = "Option::is_none")]
15    pub name: Option<String>,
16    /// Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. 
17    #[serde(rename = "placement", skip_serializing_if = "Option::is_none")]
18    pub placement: Option<Placement>,
19    /// The name of an existing condition in the configured endpoint, or leave blank to always execute.
20    #[serde(rename = "response_condition", skip_serializing_if = "Option::is_none")]
21    pub response_condition: Option<String>,
22    /// A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/).
23    #[serde(rename = "format", skip_serializing_if = "Option::is_none")]
24    pub format: Option<String>,
25    /// The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global.
26    #[serde(rename = "log_processing_region", skip_serializing_if = "Option::is_none")]
27    pub log_processing_region: Option<LogProcessingRegion>,
28    /// The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. 
29    #[serde(rename = "format_version", skip_serializing_if = "Option::is_none")]
30    pub format_version: Option<FormatVersion>,
31    /// The port number.
32    #[serde(rename = "port", skip_serializing_if = "Option::is_none")]
33    pub port: Option<i32>,
34    /// Use token based authentication.
35    #[serde(rename = "token", skip_serializing_if = "Option::is_none")]
36    pub token: Option<String>,
37    #[serde(rename = "use_tls", skip_serializing_if = "Option::is_none")]
38    pub use_tls: Option<crate::models::LoggingUseTlsString>,
39    /// The region to which to stream logs.
40    #[serde(rename = "region", skip_serializing_if = "Option::is_none")]
41    pub region: Option<Region>,
42    /// Date and time in ISO 8601 format.
43    #[serde(rename = "created_at", skip_serializing_if = "Option::is_none")]
44    pub created_at: Option<String>,
45    /// Date and time in ISO 8601 format.
46    #[serde(rename = "deleted_at", skip_serializing_if = "Option::is_none")]
47    pub deleted_at: Option<String>,
48    /// Date and time in ISO 8601 format.
49    #[serde(rename = "updated_at", skip_serializing_if = "Option::is_none")]
50    pub updated_at: Option<String>,
51    #[serde(rename = "service_id", skip_serializing_if = "Option::is_none")]
52    pub service_id: Option<Box<String>>,
53    #[serde(rename = "version", skip_serializing_if = "Option::is_none")]
54    pub version: Option<Box<String>>,
55}
56
57impl LoggingLogentriesResponse {
58    pub fn new() -> LoggingLogentriesResponse {
59        LoggingLogentriesResponse {
60            name: None,
61            placement: None,
62            response_condition: None,
63            format: None,
64            log_processing_region: None,
65            format_version: None,
66            port: None,
67            token: None,
68            use_tls: None,
69            region: None,
70            created_at: None,
71            deleted_at: None,
72            updated_at: None,
73            service_id: None,
74            version: None,
75        }
76    }
77}
78
79/// Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. 
80#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
81pub enum Placement {
82    #[serde(rename = "none")]
83    None,
84    #[serde(rename = "null")]
85    Null,
86}
87
88impl Default for Placement {
89    fn default() -> Placement {
90        Self::None
91    }
92}
93/// The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global.
94#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
95pub enum LogProcessingRegion {
96    #[serde(rename = "none")]
97    None,
98    #[serde(rename = "eu")]
99    Eu,
100    #[serde(rename = "us")]
101    Us,
102}
103
104impl Default for LogProcessingRegion {
105    fn default() -> LogProcessingRegion {
106        Self::None
107    }
108}
109/// The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. 
110#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
111pub enum FormatVersion {
112    #[serde(rename = "1")]
113    V1,
114    #[serde(rename = "2")]
115    V2,
116}
117
118impl Default for FormatVersion {
119    fn default() -> FormatVersion {
120        Self::V1
121    }
122}
123/// The region to which to stream logs.
124#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
125pub enum Region {
126    #[serde(rename = "US")]
127    US,
128    #[serde(rename = "US-2")]
129    US2,
130    #[serde(rename = "US-3")]
131    US3,
132    #[serde(rename = "EU")]
133    EU,
134    #[serde(rename = "CA")]
135    CA,
136    #[serde(rename = "AU")]
137    AU,
138    #[serde(rename = "AP")]
139    AP,
140}
141
142impl Default for Region {
143    fn default() -> Region {
144        Self::US
145    }
146}
147