fastly_api/models/arc_virtual_key_response_extra.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 ArcVirtualKeyResponseExtra {
13 /// The unique identifier of the virtual key.
14 #[serde(rename = "id")]
15 pub id: String,
16 /// The type of the resource.
17 #[serde(rename = "type")]
18 pub _type: String,
19 /// The ID of the user who created the key.
20 #[serde(rename = "user_id")]
21 pub user_id: String,
22 /// The display name of the user who created the key.
23 #[serde(rename = "created_by", skip_serializing_if = "Option::is_none")]
24 pub created_by: Option<String>,
25 /// The date and time the key was last used to make a request, in RFC 3339 format. `null` if the key has never been used.
26 #[serde(rename = "last_used_at", skip_serializing_if = "Option::is_none")]
27 pub last_used_at: Option<String>,
28 /// The date and time the key was deleted, in RFC 3339 format. `null` unless the key was deleted and `include_deleted` was used to retrieve it.
29 #[serde(rename = "deleted_at", skip_serializing_if = "Option::is_none")]
30 pub deleted_at: Option<String>,
31 /// The date and time the key was created, in RFC 3339 format.
32 #[serde(rename = "created_at")]
33 pub created_at: String,
34 /// The date and time the key was last updated, in RFC 3339 format.
35 #[serde(rename = "updated_at")]
36 pub updated_at: String,
37 /// Whether a spend limit is enabled for this key.
38 #[serde(rename = "spend_limit_enabled", skip_serializing_if = "Option::is_none")]
39 pub spend_limit_enabled: Option<bool>,
40 /// The date and time `spend_limit_enabled` was last set to `true`, in RFC 3339 format. `null` if the spend limit has never been enabled. This timestamp is not cleared when `spend_limit_enabled` is later set back to `false`, so it can be non-null even when the spend limit is currently disabled.
41 #[serde(rename = "spend_limit_enabled_on", skip_serializing_if = "Option::is_none")]
42 pub spend_limit_enabled_on: Option<String>,
43}
44
45impl ArcVirtualKeyResponseExtra {
46 pub fn new(id: String, _type: String, user_id: String, created_at: String, updated_at: String) -> ArcVirtualKeyResponseExtra {
47 ArcVirtualKeyResponseExtra {
48 id,
49 _type,
50 user_id,
51 created_by: None,
52 last_used_at: None,
53 deleted_at: None,
54 created_at,
55 updated_at,
56 spend_limit_enabled: None,
57 spend_limit_enabled_on: None,
58 }
59 }
60}
61
62