use super::{
namespace::Namespace,
upath::UPath,
table::Table,
entry::Entry4,
};
use serde::{Deserialize, Serialize};
use aptos_openapi_link::impl_poem_type;
impl_poem_type!(Manifest4, "object", ());
#[derive(Clone, Debug, Deserialize, Serialize)]
pub struct Manifest4 {
_namespace: Namespace,
table: Table,
path: Option<UPath>,
}
impl Manifest4 {
pub async fn new(_namespace: Namespace, table: Table, path: Option<UPath>) -> Self {
Manifest4 {
_namespace,
table,
path,
}
}
pub fn to_string(&self) -> String {
if self.path.is_some() {
format!("Manifest4({})^{}", self.path.as_ref().unwrap().to_string(), self._namespace.to_string())
} else {
format!("Manifest4({})^{}", self.table.to_string(), self._namespace.to_string())
}
}
pub async fn entry_from_key(_entry: &str) -> Option<Entry4> {
unimplemented!()
}
pub async fn entry_keys(&self) -> Vec<String> {
unimplemented!()
}
pub async fn entry_objects(&self) -> Vec<Entry4> {
unimplemented!()
}
}