fastly_api/models/
customer.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 Customer {
13    /// The alphanumeric string representing the primary billing contact.
14    #[serde(rename = "billing_contact_id", skip_serializing_if = "Option::is_none")]
15    pub billing_contact_id: Option<String>,
16    /// Customer's current network revenue type.
17    #[serde(rename = "billing_network_type", skip_serializing_if = "Option::is_none")]
18    pub billing_network_type: Option<BillingNetworkType>,
19    /// Used for adding purchased orders to customer's account.
20    #[serde(rename = "billing_ref", skip_serializing_if = "Option::is_none")]
21    pub billing_ref: Option<String>,
22    /// Whether this customer can view or edit wordpress.
23    #[serde(rename = "can_configure_wordpress", skip_serializing_if = "Option::is_none")]
24    pub can_configure_wordpress: Option<bool>,
25    /// Whether this customer can reset passwords.
26    #[serde(rename = "can_reset_passwords", skip_serializing_if = "Option::is_none")]
27    pub can_reset_passwords: Option<bool>,
28    /// Whether this customer can upload VCL.
29    #[serde(rename = "can_upload_vcl", skip_serializing_if = "Option::is_none")]
30    pub can_upload_vcl: Option<bool>,
31    /// Specifies whether 2FA is forced or not forced on the customer account. Logs out non-2FA users once 2FA is force enabled.
32    #[serde(rename = "force_2fa", skip_serializing_if = "Option::is_none")]
33    pub force_2fa: Option<bool>,
34    /// Specifies whether SSO is forced or not forced on the customer account.
35    #[serde(rename = "force_sso", skip_serializing_if = "Option::is_none")]
36    pub force_sso: Option<bool>,
37    /// Specifies whether the account has access or does not have access to the account panel.
38    #[serde(rename = "has_account_panel", skip_serializing_if = "Option::is_none")]
39    pub has_account_panel: Option<bool>,
40    /// Specifies whether the account has access or does not have access to the improved events.
41    #[serde(rename = "has_improved_events", skip_serializing_if = "Option::is_none")]
42    pub has_improved_events: Option<bool>,
43    /// Whether this customer can view or edit the SSL config.
44    #[serde(rename = "has_improved_ssl_config", skip_serializing_if = "Option::is_none")]
45    pub has_improved_ssl_config: Option<bool>,
46    /// Specifies whether the account has enabled or not enabled openstack logging.
47    #[serde(rename = "has_openstack_logging", skip_serializing_if = "Option::is_none")]
48    pub has_openstack_logging: Option<bool>,
49    /// Specifies whether the account can edit PCI for a service.
50    #[serde(rename = "has_pci", skip_serializing_if = "Option::is_none")]
51    pub has_pci: Option<bool>,
52    /// Specifies whether PCI passwords are required for the account.
53    #[serde(rename = "has_pci_passwords", skip_serializing_if = "Option::is_none")]
54    pub has_pci_passwords: Option<bool>,
55    /// The range of IP addresses authorized to access the customer account.
56    #[serde(rename = "ip_whitelist", skip_serializing_if = "Option::is_none")]
57    pub ip_whitelist: Option<String>,
58    /// The alphanumeric string identifying the account's legal contact.
59    #[serde(rename = "legal_contact_id", skip_serializing_if = "Option::is_none")]
60    pub legal_contact_id: Option<String>,
61    /// The name of the customer, generally the company name.
62    #[serde(rename = "name", skip_serializing_if = "Option::is_none")]
63    pub name: Option<String>,
64    /// The alphanumeric string identifying the account owner.
65    #[serde(rename = "owner_id", skip_serializing_if = "Option::is_none")]
66    pub owner_id: Option<String>,
67    /// The phone number associated with the account.
68    #[serde(rename = "phone_number", skip_serializing_if = "Option::is_none")]
69    pub phone_number: Option<String>,
70    /// The postal address associated with the account.
71    #[serde(rename = "postal_address", skip_serializing_if = "Option::is_none")]
72    pub postal_address: Option<String>,
73    /// The pricing plan this customer is under.
74    #[serde(rename = "pricing_plan", skip_serializing_if = "Option::is_none")]
75    pub pricing_plan: Option<String>,
76    /// The alphanumeric string identifying the pricing plan.
77    #[serde(rename = "pricing_plan_id", skip_serializing_if = "Option::is_none")]
78    pub pricing_plan_id: Option<String>,
79    /// The alphanumeric string identifying the account's security contact.
80    #[serde(rename = "security_contact_id", skip_serializing_if = "Option::is_none")]
81    pub security_contact_id: Option<String>,
82    /// The alphanumeric string identifying the account's technical contact.
83    #[serde(rename = "technical_contact_id", skip_serializing_if = "Option::is_none")]
84    pub technical_contact_id: Option<String>,
85}
86
87impl Customer {
88    pub fn new() -> Customer {
89        Customer {
90            billing_contact_id: None,
91            billing_network_type: None,
92            billing_ref: None,
93            can_configure_wordpress: None,
94            can_reset_passwords: None,
95            can_upload_vcl: None,
96            force_2fa: None,
97            force_sso: None,
98            has_account_panel: None,
99            has_improved_events: None,
100            has_improved_ssl_config: None,
101            has_openstack_logging: None,
102            has_pci: None,
103            has_pci_passwords: None,
104            ip_whitelist: None,
105            legal_contact_id: None,
106            name: None,
107            owner_id: None,
108            phone_number: None,
109            postal_address: None,
110            pricing_plan: None,
111            pricing_plan_id: None,
112            security_contact_id: None,
113            technical_contact_id: None,
114        }
115    }
116}
117
118/// Customer's current network revenue type.
119#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
120pub enum BillingNetworkType {
121    #[serde(rename = "public")]
122    Public,
123    #[serde(rename = "private")]
124    Private,
125}
126
127impl Default for BillingNetworkType {
128    fn default() -> BillingNetworkType {
129        Self::Public
130    }
131}
132