Skip to main content

fastly_api/models/
network_protect_network_create.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/// NetworkProtectNetworkCreate : Attributes accepted when creating a network.
9
10
11
12#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
13pub struct NetworkProtectNetworkCreate {
14    /// Optional descriptive text for the network. This metadata does not change traffic handling. Null clears it on update.
15    #[serde(rename = "description", skip_serializing_if = "Option::is_none")]
16    pub description: Option<String>,
17    /// A human-readable name, unique within the customer.
18    #[serde(rename = "name")]
19    pub name: String,
20    /// The CIDR block to protect, masked to its network address. It cannot be changed after creation.
21    #[serde(rename = "prefix")]
22    pub prefix: String,
23    /// Custom rule-set attachment is unavailable. Omit this value or send an empty string to use the backend-assigned default rule set.
24    #[serde(rename = "rule_set_id", skip_serializing_if = "Option::is_none")]
25    pub rule_set_id: Option<String>,
26    /// Complete endpoint policy configuration. A network has at most one policy per region and may have no policies.
27    #[serde(rename = "endpoint_policies", skip_serializing_if = "Option::is_none")]
28    pub endpoint_policies: Option<Vec<crate::models::NetworkProtectEndpointPolicy>>,
29}
30
31impl NetworkProtectNetworkCreate {
32    /// Attributes accepted when creating a network.
33    pub fn new(name: String, prefix: String) -> NetworkProtectNetworkCreate {
34        NetworkProtectNetworkCreate {
35            description: None,
36            name,
37            prefix,
38            rule_set_id: None,
39            endpoint_policies: None,
40        }
41    }
42}
43
44