use crate::models;
use serde::{Deserialize, Serialize};
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct ServiceAccountSummaryResponse {
#[serde(rename = "created_at")]
pub created_at: String,
#[serde(rename = "display_name", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
pub display_name: Option<Option<String>>,
#[serde(rename = "id")]
pub id: uuid::Uuid,
#[serde(rename = "is_active")]
pub is_active: bool,
#[serde(rename = "token_count")]
pub token_count: i64,
#[serde(rename = "updated_at")]
pub updated_at: String,
#[serde(rename = "username")]
pub username: String,
}
impl ServiceAccountSummaryResponse {
pub fn new(created_at: String, id: uuid::Uuid, is_active: bool, token_count: i64, updated_at: String, username: String) -> ServiceAccountSummaryResponse {
ServiceAccountSummaryResponse {
created_at,
display_name: None,
id,
is_active,
token_count,
updated_at,
username,
}
}
}