fastly_api/models/
customer_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 CustomerResponse {
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    /// Date and time in ISO 8601 format.
86    #[serde(rename = "created_at", skip_serializing_if = "Option::is_none")]
87    pub created_at: Option<String>,
88    /// Date and time in ISO 8601 format.
89    #[serde(rename = "deleted_at", skip_serializing_if = "Option::is_none")]
90    pub deleted_at: Option<String>,
91    /// Date and time in ISO 8601 format.
92    #[serde(rename = "updated_at", skip_serializing_if = "Option::is_none")]
93    pub updated_at: Option<String>,
94    #[serde(rename = "id", skip_serializing_if = "Option::is_none")]
95    pub id: Option<Box<String>>,
96}
97
98impl CustomerResponse {
99    pub fn new() -> CustomerResponse {
100        CustomerResponse {
101            billing_contact_id: None,
102            billing_network_type: None,
103            billing_ref: None,
104            can_configure_wordpress: None,
105            can_reset_passwords: None,
106            can_upload_vcl: None,
107            force_2fa: None,
108            force_sso: None,
109            has_account_panel: None,
110            has_improved_events: None,
111            has_improved_ssl_config: None,
112            has_openstack_logging: None,
113            has_pci: None,
114            has_pci_passwords: None,
115            ip_whitelist: None,
116            legal_contact_id: None,
117            name: None,
118            owner_id: None,
119            phone_number: None,
120            postal_address: None,
121            pricing_plan: None,
122            pricing_plan_id: None,
123            security_contact_id: None,
124            technical_contact_id: None,
125            created_at: None,
126            deleted_at: None,
127            updated_at: None,
128            id: None,
129        }
130    }
131}
132
133/// Customer's current network revenue type.
134#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
135pub enum BillingNetworkType {
136    #[serde(rename = "public")]
137    Public,
138    #[serde(rename = "private")]
139    Private,
140}
141
142impl Default for BillingNetworkType {
143    fn default() -> BillingNetworkType {
144        Self::Public
145    }
146}
147