redis_cloud/models/
account.rs

1//! Account-related data models
2
3use serde::{Deserialize, Serialize};
4use serde_json::Value;
5
6/// Account response wrapper
7#[derive(Debug, Clone, Serialize, Deserialize)]
8pub struct AccountResponse {
9    pub account: CloudAccount,
10}
11
12/// Cloud account information
13#[derive(Debug, Clone, Serialize, Deserialize)]
14pub struct CloudAccount {
15    pub id: u32,
16    pub name: String,
17    #[serde(rename = "createdTimestamp")]
18    pub created_at: Option<String>,
19    #[serde(rename = "updatedTimestamp")]
20    pub updated_at: Option<String>,
21    pub key: Option<AccountKey>,
22
23    #[serde(flatten)]
24    pub extra: Value,
25}
26
27#[derive(Debug, Clone, Serialize, Deserialize)]
28pub struct AccountKey {
29    pub name: String,
30    #[serde(rename = "accountId")]
31    pub account_id: Option<u32>,
32    #[serde(rename = "createdTimestamp")]
33    pub created_at: Option<String>,
34    #[serde(rename = "updatedTimestamp")]
35    pub updated_at: Option<String>,
36    #[serde(flatten)]
37    pub extra: Value,
38}