redfish_codegen/models/allow_deny/v1_0_0/
allow_deny.rs

1// Generated by redfish-codegen. Do not modify.
2
3use crate::models;
4
5/// The AllowDeny schema represents a set of allow or deny configurations.
6#[derive(Clone, Debug, serde::Deserialize, serde::Serialize)]
7#[derive(derivative::Derivative)]
8#[derivative(Default)]
9pub struct AllowDeny {
10    #[serde(rename = "@odata.context")]
11    #[serde(skip_deserializing)]
12    #[serde(default, skip_serializing_if = "Option::is_none")]
13    pub odata_context: Option<models::odata_v4::Context>,
14    #[serde(rename = "@odata.etag")]
15    #[serde(skip_deserializing)]
16    #[serde(default, skip_serializing_if = "Option::is_none")]
17    pub odata_etag: Option<models::odata_v4::Etag>,
18    #[serde(rename = "@odata.id")]
19    #[serde(skip_deserializing)]
20    pub odata_id: models::odata_v4::Id,
21    #[serde(rename = "@odata.type")]
22    #[serde(skip_deserializing)]
23    #[derivative(Default(value = "models::odata_v4::Type(\"#AllowDeny.v1_0_0.AllowDeny\".to_string())"))]
24    pub odata_type: models::odata_v4::Type,
25    #[serde(rename = "Actions")]
26    #[serde(default, skip_serializing_if = "Option::is_none")]
27    pub actions: Option<models::allow_deny::v1_0_0::Actions>,
28    #[serde(rename = "AllowType")]
29    #[serde(default, skip_serializing_if = "Option::is_none")]
30    pub allow_type: Option<models::allow_deny::v1_0_0::AllowType>,
31    #[serde(rename = "Description")]
32    #[serde(default, skip_serializing_if = "Option::is_none")]
33    pub description: Option<models::resource::Description>,
34    /// The TCP, UDP, or other destination port to which this rule begins to application, inclusive.
35    #[serde(rename = "DestinationPortLower")]
36    #[serde(default, skip_serializing_if = "Option::is_none")]
37    pub destination_port_lower: Option<i64>,
38    /// The TCP, UDP, or other destination port to which this rule ends application, inclusive.
39    #[serde(rename = "DestinationPortUpper")]
40    #[serde(default, skip_serializing_if = "Option::is_none")]
41    pub destination_port_upper: Option<i64>,
42    #[serde(rename = "Direction")]
43    #[serde(default, skip_serializing_if = "Option::is_none")]
44    pub direction: Option<models::allow_deny::v1_0_0::DataDirection>,
45    /// The IANA protocol number to which this permission applies.  For TCP, this is `6`.  For UDP, this is `17`.
46    #[serde(rename = "IANAProtocolNumber")]
47    #[serde(default, skip_serializing_if = "Option::is_none")]
48    pub iana_protocol_number: Option<i64>,
49    /// The lower IP address to which this permission applies.
50    #[serde(rename = "IPAddressLower")]
51    #[serde(default, skip_serializing_if = "Option::is_none")]
52    pub ip_address_lower: Option<String>,
53    #[serde(rename = "IPAddressType")]
54    #[serde(default, skip_serializing_if = "Option::is_none")]
55    pub ip_address_type: Option<models::allow_deny::v1_0_0::IPAddressType>,
56    /// The upper IP address to which this permission applies.
57    #[serde(rename = "IPAddressUpper")]
58    #[serde(default, skip_serializing_if = "Option::is_none")]
59    pub ip_address_upper: Option<String>,
60    #[serde(rename = "Id")]
61    #[serde(skip_deserializing)]
62    pub id: models::resource::Id,
63    #[serde(rename = "Name")]
64    #[serde(skip_deserializing)]
65    pub name: models::resource::Name,
66    #[serde(rename = "Oem")]
67    #[serde(default, skip_serializing_if = "Option::is_none")]
68    pub oem: Option<models::resource::Oem>,
69    /// The TCP, UDP, or other source port to which this rule begins application, inclusive.
70    #[serde(rename = "SourcePortLower")]
71    #[serde(default, skip_serializing_if = "Option::is_none")]
72    pub source_port_lower: Option<i64>,
73    /// The TCP, UDP or other source port to which this rule ends application, inclusive.
74    #[serde(rename = "SourcePortUpper")]
75    #[serde(default, skip_serializing_if = "Option::is_none")]
76    pub source_port_upper: Option<i64>,
77    /// Indicates if this is a permission that only applies to stateful connection.
78    #[serde(rename = "StatefulSession")]
79    #[serde(default, skip_serializing_if = "Option::is_none")]
80    pub stateful_session: Option<bool>,
81}
82
83impl crate::Metadata<'static> for AllowDeny {
84    const JSON_SCHEMA: &'static str = "AllowDeny.v1_0_0.json";
85}