fastly_api/models/
tls_subscription_response_attributes.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 TlsSubscriptionResponseAttributes {
13    /// Date and time in ISO 8601 format.
14    #[serde(rename = "created_at", skip_serializing_if = "Option::is_none")]
15    pub created_at: Option<String>,
16    /// Date and time in ISO 8601 format.
17    #[serde(rename = "deleted_at", skip_serializing_if = "Option::is_none")]
18    pub deleted_at: Option<String>,
19    /// Date and time in ISO 8601 format.
20    #[serde(rename = "updated_at", skip_serializing_if = "Option::is_none")]
21    pub updated_at: Option<String>,
22    /// The current state of your subscription.
23    #[serde(rename = "state", skip_serializing_if = "Option::is_none")]
24    pub state: Option<State>,
25    /// Subscription has an active order
26    #[serde(rename = "has_active_order", skip_serializing_if = "Option::is_none")]
27    pub has_active_order: Option<bool>,
28}
29
30impl TlsSubscriptionResponseAttributes {
31    pub fn new() -> TlsSubscriptionResponseAttributes {
32        TlsSubscriptionResponseAttributes {
33            created_at: None,
34            deleted_at: None,
35            updated_at: None,
36            state: None,
37            has_active_order: None,
38        }
39    }
40}
41
42/// The current state of your subscription.
43#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
44pub enum State {
45    #[serde(rename = "pending")]
46    Pending,
47    #[serde(rename = "processing")]
48    Processing,
49    #[serde(rename = "issued")]
50    Issued,
51    #[serde(rename = "renewing")]
52    Renewing,
53    #[serde(rename = "failed")]
54    Failed,
55}
56
57impl Default for State {
58    fn default() -> State {
59        Self::Pending
60    }
61}
62