fastly_api/models/
acl_entry_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 AclEntryResponse {
13    /// Whether to negate the match. Useful primarily when creating individual exceptions to larger subnets.
14    #[serde(rename = "negated", skip_serializing_if = "Option::is_none")]
15    pub negated: Option<Negated>,
16    /// A freeform descriptive note.
17    #[serde(rename = "comment", skip_serializing_if = "Option::is_none")]
18    pub comment: Option<String>,
19    /// An IP address.
20    #[serde(rename = "ip", skip_serializing_if = "Option::is_none")]
21    pub ip: Option<String>,
22    /// Number of bits for the subnet mask applied to the IP address. For IPv4 addresses, a value of 32 represents the smallest subnet mask (1 address), 24 represents a class C subnet mask (256 addresses), 16 represents a class B subnet mask (65k addresses), and 8 is class A subnet mask (16m addresses). If not provided, no mask is applied.
23    #[serde(rename = "subnet", skip_serializing_if = "Option::is_none")]
24    pub subnet: Option<i32>,
25    /// Date and time in ISO 8601 format.
26    #[serde(rename = "created_at", skip_serializing_if = "Option::is_none")]
27    pub created_at: Option<String>,
28    /// Date and time in ISO 8601 format.
29    #[serde(rename = "deleted_at", skip_serializing_if = "Option::is_none")]
30    pub deleted_at: Option<String>,
31    /// Date and time in ISO 8601 format.
32    #[serde(rename = "updated_at", skip_serializing_if = "Option::is_none")]
33    pub updated_at: Option<String>,
34    #[serde(rename = "acl_id", skip_serializing_if = "Option::is_none")]
35    pub acl_id: Option<Box<String>>,
36    #[serde(rename = "id", skip_serializing_if = "Option::is_none")]
37    pub id: Option<Box<String>>,
38    #[serde(rename = "service_id", skip_serializing_if = "Option::is_none")]
39    pub service_id: Option<Box<String>>,
40}
41
42impl AclEntryResponse {
43    pub fn new() -> AclEntryResponse {
44        AclEntryResponse {
45            negated: None,
46            comment: None,
47            ip: None,
48            subnet: None,
49            created_at: None,
50            deleted_at: None,
51            updated_at: None,
52            acl_id: None,
53            id: None,
54            service_id: None,
55        }
56    }
57}
58
59/// Whether to negate the match. Useful primarily when creating individual exceptions to larger subnets.
60#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
61pub enum Negated {
62    #[serde(rename = "0")]
63    NegatedDisable,
64    #[serde(rename = "1")]
65    NegatedEnable,
66}
67
68impl Default for Negated {
69    fn default() -> Negated {
70        Self::NegatedDisable
71    }
72}
73