use crate::models;
use serde::{Deserialize, Serialize};
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct ConnectionResponse {
#[serde(rename = "auth_type")]
pub auth_type: String,
#[serde(rename = "created_at")]
pub created_at: String,
#[serde(rename = "id")]
pub id: uuid::Uuid,
#[serde(rename = "name")]
pub name: String,
#[serde(rename = "source_type")]
pub source_type: String,
#[serde(rename = "url")]
pub url: String,
#[serde(rename = "verified_at", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
pub verified_at: Option<Option<String>>,
}
impl ConnectionResponse {
pub fn new(auth_type: String, created_at: String, id: uuid::Uuid, name: String, source_type: String, url: String) -> ConnectionResponse {
ConnectionResponse {
auth_type,
created_at,
id,
name,
source_type,
url,
verified_at: None,
}
}
}