fastly_api/models/
network_protect_rule_response.rs1#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
13pub struct NetworkProtectRuleResponse {
14 #[serde(rename = "ip_protocol")]
15 pub ip_protocol: crate::models::NetworkProtectRuleIpProtocol,
16 #[serde(rename = "source_prefix_list_id")]
18 pub source_prefix_list_id: String,
19 #[serde(rename = "destination_ip_address")]
21 pub destination_ip_address: String,
22 #[serde(rename = "source_ports")]
23 pub source_ports: Box<crate::models::NetworkProtectRuleSourcePorts>,
24 #[serde(rename = "destination_ports")]
25 pub destination_ports: Box<crate::models::NetworkProtectRuleDestinationPorts>,
26 #[serde(rename = "created_at", skip_serializing_if = "Option::is_none")]
28 pub created_at: Option<String>,
29 #[serde(rename = "updated_at", skip_serializing_if = "Option::is_none")]
31 pub updated_at: Option<String>,
32}
33
34impl NetworkProtectRuleResponse {
35 pub fn new(ip_protocol: crate::models::NetworkProtectRuleIpProtocol, source_prefix_list_id: String, destination_ip_address: String, source_ports: crate::models::NetworkProtectRuleSourcePorts, destination_ports: crate::models::NetworkProtectRuleDestinationPorts) -> NetworkProtectRuleResponse {
37 NetworkProtectRuleResponse {
38 ip_protocol,
39 source_prefix_list_id,
40 destination_ip_address,
41 source_ports: Box::new(source_ports),
42 destination_ports: Box::new(destination_ports),
43 created_at: None,
44 updated_at: None,
45 }
46 }
47}
48
49