#[allow(unused_imports)]
use alloc::collections::BTreeMap;
#[allow(unused_imports)]
use core::marker::PhantomData;
use jacquard_common::CowStr;
#[allow(unused_imports)]
use jacquard_common::deps::codegen::unicode_segmentation::UnicodeSegmentation;
use jacquard_common::types::string::{AtUri, Cid, Datetime};
use jacquard_common::types::value::Data;
use jacquard_derive::{IntoStatic, lexicon, open_union};
use jacquard_lexicon::lexicon::LexiconDoc;
use jacquard_lexicon::schema::LexiconSchema;
#[allow(unused_imports)]
use jacquard_lexicon::validation::{ConstraintError, ValidationPath};
use serde::{Serialize, Deserialize};
use crate::app_bsky::feed::BlockedAuthor;
use crate::app_bsky::feed::GeneratorView;
use crate::app_bsky::graph::ListView;
use crate::app_bsky::graph::StarterPackViewBasic;
use crate::app_bsky::labeler::LabelerView;
use crate::com_atproto::label::Label;
use crate::com_atproto::repo::strong_ref::StrongRef;
use crate::sh_weaver::actor::ProfileDataViewBasic;
use crate::sh_weaver::embed::images;
use crate::sh_weaver::embed::record_with_media;
use crate::sh_weaver::embed::records;
use crate::sh_weaver::embed::video;
#[lexicon]
#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic)]
#[serde(rename_all = "camelCase")]
pub struct Records<'a> {
#[serde(borrow)]
pub records: Vec<records::RecordEmbed<'a>>,
}
#[lexicon]
#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic)]
#[serde(rename_all = "camelCase")]
pub struct RecordEmbed<'a> {
#[serde(skip_serializing_if = "Option::is_none")]
#[serde(borrow)]
pub name: Option<CowStr<'a>>,
#[serde(borrow)]
pub record: StrongRef<'a>,
}
#[lexicon]
#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic)]
#[serde(rename_all = "camelCase")]
pub struct RecordEmbedView<'a> {
#[serde(skip_serializing_if = "Option::is_none")]
#[serde(borrow)]
pub name: Option<CowStr<'a>>,
#[serde(borrow)]
pub record_view: RecordEmbedViewRecordView<'a>,
}
#[open_union]
#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic)]
#[serde(tag = "$type", bound(deserialize = "'de: 'a"))]
pub enum RecordEmbedViewRecordView<'a> {
#[serde(rename = "sh.weaver.embed.records#view")]
View(Box<records::View<'a>>),
#[serde(rename = "sh.weaver.embed.images#view")]
ImagesView(Box<images::View<'a>>),
#[serde(rename = "sh.weaver.embed.recordWithMedia#view")]
RecordWithMediaView(Box<record_with_media::View<'a>>),
#[serde(rename = "sh.weaver.embed.video#view")]
VideoView(Box<video::View<'a>>),
}
#[lexicon]
#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic)]
#[serde(rename_all = "camelCase")]
pub struct View<'a> {
#[serde(borrow)]
pub record: ViewUnionRecord<'a>,
}
#[open_union]
#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic)]
#[serde(tag = "$type", bound(deserialize = "'de: 'a"))]
pub enum ViewUnionRecord<'a> {
#[serde(rename = "sh.weaver.embed.records#viewRecord")]
ViewRecord(Box<records::ViewRecord<'a>>),
#[serde(rename = "sh.weaver.embed.records#viewNotFound")]
ViewNotFound(Box<records::ViewNotFound<'a>>),
#[serde(rename = "sh.weaver.embed.records#viewBlocked")]
ViewBlocked(Box<records::ViewBlocked<'a>>),
#[serde(rename = "sh.weaver.embed.records#viewDetached")]
ViewDetached(Box<records::ViewDetached<'a>>),
#[serde(rename = "app.bsky.feed.defs#generatorView")]
GeneratorView(Box<GeneratorView<'a>>),
#[serde(rename = "app.bsky.graph.defs#listView")]
ListView(Box<ListView<'a>>),
#[serde(rename = "app.bsky.labeler.defs#labelerView")]
LabelerView(Box<LabelerView<'a>>),
#[serde(rename = "app.bsky.graph.defs#starterPackViewBasic")]
StarterPackViewBasic(Box<StarterPackViewBasic<'a>>),
}
#[lexicon]
#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic)]
#[serde(rename_all = "camelCase")]
pub struct ViewBlocked<'a> {
#[serde(borrow)]
pub author: BlockedAuthor<'a>,
pub blocked: bool,
#[serde(borrow)]
pub uri: AtUri<'a>,
}
#[lexicon]
#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic)]
#[serde(rename_all = "camelCase")]
pub struct ViewDetached<'a> {
pub detached: bool,
#[serde(borrow)]
pub uri: AtUri<'a>,
}
#[lexicon]
#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic)]
#[serde(rename_all = "camelCase")]
pub struct ViewNotFound<'a> {
pub not_found: bool,
#[serde(borrow)]
pub uri: AtUri<'a>,
}
#[lexicon]
#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic)]
#[serde(rename_all = "camelCase")]
pub struct ViewRecord<'a> {
#[serde(borrow)]
pub author: ProfileDataViewBasic<'a>,
#[serde(borrow)]
pub cid: Cid<'a>,
#[serde(skip_serializing_if = "Option::is_none")]
#[serde(borrow)]
pub embeds: Option<Vec<records::RecordEmbedView<'a>>>,
pub indexed_at: Datetime,
#[serde(skip_serializing_if = "Option::is_none")]
#[serde(borrow)]
pub labels: Option<Vec<Label<'a>>>,
#[serde(skip_serializing_if = "Option::is_none")]
pub like_count: Option<i64>,
#[serde(skip_serializing_if = "Option::is_none")]
pub quote_count: Option<i64>,
#[serde(skip_serializing_if = "Option::is_none")]
pub reply_count: Option<i64>,
#[serde(skip_serializing_if = "Option::is_none")]
pub repost_count: Option<i64>,
#[serde(borrow)]
pub uri: AtUri<'a>,
#[serde(borrow)]
pub value: Data<'a>,
}
impl<'a> LexiconSchema for Records<'a> {
fn nsid() -> &'static str {
"sh.weaver.embed.records"
}
fn def_name() -> &'static str {
"main"
}
fn lexicon_doc() -> LexiconDoc<'static> {
lexicon_doc_sh_weaver_embed_records()
}
fn validate(&self) -> Result<(), ConstraintError> {
{
let value = &self.records;
#[allow(unused_comparisons)]
if value.len() > 48usize {
return Err(ConstraintError::MaxLength {
path: ValidationPath::from_field("records"),
max: 48usize,
actual: value.len(),
});
}
}
Ok(())
}
}
impl<'a> LexiconSchema for RecordEmbed<'a> {
fn nsid() -> &'static str {
"sh.weaver.embed.records"
}
fn def_name() -> &'static str {
"recordEmbed"
}
fn lexicon_doc() -> LexiconDoc<'static> {
lexicon_doc_sh_weaver_embed_records()
}
fn validate(&self) -> Result<(), ConstraintError> {
if let Some(ref value) = self.name {
#[allow(unused_comparisons)]
if <str>::len(value.as_ref()) > 128usize {
return Err(ConstraintError::MaxLength {
path: ValidationPath::from_field("name"),
max: 128usize,
actual: <str>::len(value.as_ref()),
});
}
}
Ok(())
}
}
impl<'a> LexiconSchema for RecordEmbedView<'a> {
fn nsid() -> &'static str {
"sh.weaver.embed.records"
}
fn def_name() -> &'static str {
"recordEmbedView"
}
fn lexicon_doc() -> LexiconDoc<'static> {
lexicon_doc_sh_weaver_embed_records()
}
fn validate(&self) -> Result<(), ConstraintError> {
if let Some(ref value) = self.name {
#[allow(unused_comparisons)]
if <str>::len(value.as_ref()) > 128usize {
return Err(ConstraintError::MaxLength {
path: ValidationPath::from_field("name"),
max: 128usize,
actual: <str>::len(value.as_ref()),
});
}
}
Ok(())
}
}
impl<'a> LexiconSchema for View<'a> {
fn nsid() -> &'static str {
"sh.weaver.embed.records"
}
fn def_name() -> &'static str {
"view"
}
fn lexicon_doc() -> LexiconDoc<'static> {
lexicon_doc_sh_weaver_embed_records()
}
fn validate(&self) -> Result<(), ConstraintError> {
Ok(())
}
}
impl<'a> LexiconSchema for ViewBlocked<'a> {
fn nsid() -> &'static str {
"sh.weaver.embed.records"
}
fn def_name() -> &'static str {
"viewBlocked"
}
fn lexicon_doc() -> LexiconDoc<'static> {
lexicon_doc_sh_weaver_embed_records()
}
fn validate(&self) -> Result<(), ConstraintError> {
Ok(())
}
}
impl<'a> LexiconSchema for ViewDetached<'a> {
fn nsid() -> &'static str {
"sh.weaver.embed.records"
}
fn def_name() -> &'static str {
"viewDetached"
}
fn lexicon_doc() -> LexiconDoc<'static> {
lexicon_doc_sh_weaver_embed_records()
}
fn validate(&self) -> Result<(), ConstraintError> {
Ok(())
}
}
impl<'a> LexiconSchema for ViewNotFound<'a> {
fn nsid() -> &'static str {
"sh.weaver.embed.records"
}
fn def_name() -> &'static str {
"viewNotFound"
}
fn lexicon_doc() -> LexiconDoc<'static> {
lexicon_doc_sh_weaver_embed_records()
}
fn validate(&self) -> Result<(), ConstraintError> {
Ok(())
}
}
impl<'a> LexiconSchema for ViewRecord<'a> {
fn nsid() -> &'static str {
"sh.weaver.embed.records"
}
fn def_name() -> &'static str {
"viewRecord"
}
fn lexicon_doc() -> LexiconDoc<'static> {
lexicon_doc_sh_weaver_embed_records()
}
fn validate(&self) -> Result<(), ConstraintError> {
Ok(())
}
}
pub mod records_state {
pub use crate::builder_types::{Set, Unset, IsSet, IsUnset};
#[allow(unused)]
use ::core::marker::PhantomData;
mod sealed {
pub trait Sealed {}
}
pub trait State: sealed::Sealed {
type Records;
}
pub struct Empty(());
impl sealed::Sealed for Empty {}
impl State for Empty {
type Records = Unset;
}
pub struct SetRecords<S: State = Empty>(PhantomData<fn() -> S>);
impl<S: State> sealed::Sealed for SetRecords<S> {}
impl<S: State> State for SetRecords<S> {
type Records = Set<members::records>;
}
#[allow(non_camel_case_types)]
pub mod members {
pub struct records(());
}
}
pub struct RecordsBuilder<'a, S: records_state::State> {
_state: PhantomData<fn() -> S>,
_fields: (Option<Vec<records::RecordEmbed<'a>>>,),
_lifetime: PhantomData<&'a ()>,
}
impl<'a> Records<'a> {
pub fn new() -> RecordsBuilder<'a, records_state::Empty> {
RecordsBuilder::new()
}
}
impl<'a> RecordsBuilder<'a, records_state::Empty> {
pub fn new() -> Self {
RecordsBuilder {
_state: PhantomData,
_fields: (None,),
_lifetime: PhantomData,
}
}
}
impl<'a, S> RecordsBuilder<'a, S>
where
S: records_state::State,
S::Records: records_state::IsUnset,
{
pub fn records(
mut self,
value: impl Into<Vec<records::RecordEmbed<'a>>>,
) -> RecordsBuilder<'a, records_state::SetRecords<S>> {
self._fields.0 = Option::Some(value.into());
RecordsBuilder {
_state: PhantomData,
_fields: self._fields,
_lifetime: PhantomData,
}
}
}
impl<'a, S> RecordsBuilder<'a, S>
where
S: records_state::State,
S::Records: records_state::IsSet,
{
pub fn build(self) -> Records<'a> {
Records {
records: self._fields.0.unwrap(),
extra_data: Default::default(),
}
}
pub fn build_with_data(
self,
extra_data: BTreeMap<jacquard_common::deps::smol_str::SmolStr, Data<'a>>,
) -> Records<'a> {
Records {
records: self._fields.0.unwrap(),
extra_data: Some(extra_data),
}
}
}
fn lexicon_doc_sh_weaver_embed_records() -> LexiconDoc<'static> {
#[allow(unused_imports)]
use jacquard_common::{CowStr, deps::smol_str::SmolStr, types::blob::MimeType};
use jacquard_lexicon::lexicon::*;
use alloc::collections::BTreeMap;
LexiconDoc {
lexicon: Lexicon::Lexicon1,
id: CowStr::new_static("sh.weaver.embed.records"),
defs: {
let mut map = BTreeMap::new();
map.insert(
SmolStr::new_static("main"),
LexUserType::Object(LexObject {
required: Some(vec![SmolStr::new_static("records")]),
properties: {
#[allow(unused_mut)]
let mut map = BTreeMap::new();
map.insert(
SmolStr::new_static("records"),
LexObjectProperty::Array(LexArray {
items: LexArrayItem::Ref(LexRef {
r#ref: CowStr::new_static("#recordEmbed"),
..Default::default()
}),
max_length: Some(48usize),
..Default::default()
}),
);
map
},
..Default::default()
}),
);
map.insert(
SmolStr::new_static("recordEmbed"),
LexUserType::Object(LexObject {
required: Some(vec![SmolStr::new_static("record")]),
properties: {
#[allow(unused_mut)]
let mut map = BTreeMap::new();
map.insert(
SmolStr::new_static("name"),
LexObjectProperty::String(LexString {
max_length: Some(128usize),
..Default::default()
}),
);
map.insert(
SmolStr::new_static("record"),
LexObjectProperty::Ref(LexRef {
r#ref: CowStr::new_static("com.atproto.repo.strongRef"),
..Default::default()
}),
);
map
},
..Default::default()
}),
);
map.insert(
SmolStr::new_static("recordEmbedView"),
LexUserType::Object(LexObject {
required: Some(vec![SmolStr::new_static("recordView")]),
properties: {
#[allow(unused_mut)]
let mut map = BTreeMap::new();
map.insert(
SmolStr::new_static("name"),
LexObjectProperty::String(LexString {
max_length: Some(128usize),
..Default::default()
}),
);
map.insert(
SmolStr::new_static("recordView"),
LexObjectProperty::Union(LexRefUnion {
refs: vec![
CowStr::new_static("sh.weaver.embed.records#view"),
CowStr::new_static("sh.weaver.embed.images#view"),
CowStr::new_static("sh.weaver.embed.recordWithMedia#view"),
CowStr::new_static("sh.weaver.embed.video#view")
],
..Default::default()
}),
);
map
},
..Default::default()
}),
);
map.insert(
SmolStr::new_static("view"),
LexUserType::Object(LexObject {
required: Some(vec![SmolStr::new_static("record")]),
properties: {
#[allow(unused_mut)]
let mut map = BTreeMap::new();
map.insert(
SmolStr::new_static("record"),
LexObjectProperty::Union(LexRefUnion {
refs: vec![
CowStr::new_static("#viewRecord"),
CowStr::new_static("#viewNotFound"),
CowStr::new_static("#viewBlocked"),
CowStr::new_static("#viewDetached"),
CowStr::new_static("app.bsky.feed.defs#generatorView"),
CowStr::new_static("app.bsky.graph.defs#listView"),
CowStr::new_static("app.bsky.labeler.defs#labelerView"),
CowStr::new_static("app.bsky.graph.defs#starterPackViewBasic")
],
..Default::default()
}),
);
map
},
..Default::default()
}),
);
map.insert(
SmolStr::new_static("viewBlocked"),
LexUserType::Object(LexObject {
required: Some(
vec![
SmolStr::new_static("uri"), SmolStr::new_static("blocked"),
SmolStr::new_static("author")
],
),
properties: {
#[allow(unused_mut)]
let mut map = BTreeMap::new();
map.insert(
SmolStr::new_static("author"),
LexObjectProperty::Ref(LexRef {
r#ref: CowStr::new_static(
"app.bsky.feed.defs#blockedAuthor",
),
..Default::default()
}),
);
map.insert(
SmolStr::new_static("blocked"),
LexObjectProperty::Boolean(LexBoolean {
..Default::default()
}),
);
map.insert(
SmolStr::new_static("uri"),
LexObjectProperty::String(LexString {
format: Some(LexStringFormat::AtUri),
..Default::default()
}),
);
map
},
..Default::default()
}),
);
map.insert(
SmolStr::new_static("viewDetached"),
LexUserType::Object(LexObject {
required: Some(
vec![SmolStr::new_static("uri"), SmolStr::new_static("detached")],
),
properties: {
#[allow(unused_mut)]
let mut map = BTreeMap::new();
map.insert(
SmolStr::new_static("detached"),
LexObjectProperty::Boolean(LexBoolean {
..Default::default()
}),
);
map.insert(
SmolStr::new_static("uri"),
LexObjectProperty::String(LexString {
format: Some(LexStringFormat::AtUri),
..Default::default()
}),
);
map
},
..Default::default()
}),
);
map.insert(
SmolStr::new_static("viewNotFound"),
LexUserType::Object(LexObject {
required: Some(
vec![SmolStr::new_static("uri"), SmolStr::new_static("notFound")],
),
properties: {
#[allow(unused_mut)]
let mut map = BTreeMap::new();
map.insert(
SmolStr::new_static("notFound"),
LexObjectProperty::Boolean(LexBoolean {
..Default::default()
}),
);
map.insert(
SmolStr::new_static("uri"),
LexObjectProperty::String(LexString {
format: Some(LexStringFormat::AtUri),
..Default::default()
}),
);
map
},
..Default::default()
}),
);
map.insert(
SmolStr::new_static("viewRecord"),
LexUserType::Object(LexObject {
required: Some(
vec![
SmolStr::new_static("uri"), SmolStr::new_static("cid"),
SmolStr::new_static("author"), SmolStr::new_static("value"),
SmolStr::new_static("indexedAt")
],
),
properties: {
#[allow(unused_mut)]
let mut map = BTreeMap::new();
map.insert(
SmolStr::new_static("author"),
LexObjectProperty::Ref(LexRef {
r#ref: CowStr::new_static(
"sh.weaver.actor.defs#profileDataViewBasic",
),
..Default::default()
}),
);
map.insert(
SmolStr::new_static("cid"),
LexObjectProperty::String(LexString {
format: Some(LexStringFormat::Cid),
..Default::default()
}),
);
map.insert(
SmolStr::new_static("embeds"),
LexObjectProperty::Array(LexArray {
items: LexArrayItem::Ref(LexRef {
r#ref: CowStr::new_static("#recordEmbedView"),
..Default::default()
}),
..Default::default()
}),
);
map.insert(
SmolStr::new_static("indexedAt"),
LexObjectProperty::String(LexString {
format: Some(LexStringFormat::Datetime),
..Default::default()
}),
);
map.insert(
SmolStr::new_static("labels"),
LexObjectProperty::Array(LexArray {
items: LexArrayItem::Ref(LexRef {
r#ref: CowStr::new_static("com.atproto.label.defs#label"),
..Default::default()
}),
..Default::default()
}),
);
map.insert(
SmolStr::new_static("likeCount"),
LexObjectProperty::Integer(LexInteger {
..Default::default()
}),
);
map.insert(
SmolStr::new_static("quoteCount"),
LexObjectProperty::Integer(LexInteger {
..Default::default()
}),
);
map.insert(
SmolStr::new_static("replyCount"),
LexObjectProperty::Integer(LexInteger {
..Default::default()
}),
);
map.insert(
SmolStr::new_static("repostCount"),
LexObjectProperty::Integer(LexInteger {
..Default::default()
}),
);
map.insert(
SmolStr::new_static("uri"),
LexObjectProperty::String(LexString {
format: Some(LexStringFormat::AtUri),
..Default::default()
}),
);
map.insert(
SmolStr::new_static("value"),
LexObjectProperty::Unknown(LexUnknown {
..Default::default()
}),
);
map
},
..Default::default()
}),
);
map
},
..Default::default()
}
}
pub mod record_embed_state {
pub use crate::builder_types::{Set, Unset, IsSet, IsUnset};
#[allow(unused)]
use ::core::marker::PhantomData;
mod sealed {
pub trait Sealed {}
}
pub trait State: sealed::Sealed {
type Record;
}
pub struct Empty(());
impl sealed::Sealed for Empty {}
impl State for Empty {
type Record = Unset;
}
pub struct SetRecord<S: State = Empty>(PhantomData<fn() -> S>);
impl<S: State> sealed::Sealed for SetRecord<S> {}
impl<S: State> State for SetRecord<S> {
type Record = Set<members::record>;
}
#[allow(non_camel_case_types)]
pub mod members {
pub struct record(());
}
}
pub struct RecordEmbedBuilder<'a, S: record_embed_state::State> {
_state: PhantomData<fn() -> S>,
_fields: (Option<CowStr<'a>>, Option<StrongRef<'a>>),
_lifetime: PhantomData<&'a ()>,
}
impl<'a> RecordEmbed<'a> {
pub fn new() -> RecordEmbedBuilder<'a, record_embed_state::Empty> {
RecordEmbedBuilder::new()
}
}
impl<'a> RecordEmbedBuilder<'a, record_embed_state::Empty> {
pub fn new() -> Self {
RecordEmbedBuilder {
_state: PhantomData,
_fields: (None, None),
_lifetime: PhantomData,
}
}
}
impl<'a, S: record_embed_state::State> RecordEmbedBuilder<'a, S> {
pub fn name(mut self, value: impl Into<Option<CowStr<'a>>>) -> Self {
self._fields.0 = value.into();
self
}
pub fn maybe_name(mut self, value: Option<CowStr<'a>>) -> Self {
self._fields.0 = value;
self
}
}
impl<'a, S> RecordEmbedBuilder<'a, S>
where
S: record_embed_state::State,
S::Record: record_embed_state::IsUnset,
{
pub fn record(
mut self,
value: impl Into<StrongRef<'a>>,
) -> RecordEmbedBuilder<'a, record_embed_state::SetRecord<S>> {
self._fields.1 = Option::Some(value.into());
RecordEmbedBuilder {
_state: PhantomData,
_fields: self._fields,
_lifetime: PhantomData,
}
}
}
impl<'a, S> RecordEmbedBuilder<'a, S>
where
S: record_embed_state::State,
S::Record: record_embed_state::IsSet,
{
pub fn build(self) -> RecordEmbed<'a> {
RecordEmbed {
name: self._fields.0,
record: self._fields.1.unwrap(),
extra_data: Default::default(),
}
}
pub fn build_with_data(
self,
extra_data: BTreeMap<jacquard_common::deps::smol_str::SmolStr, Data<'a>>,
) -> RecordEmbed<'a> {
RecordEmbed {
name: self._fields.0,
record: self._fields.1.unwrap(),
extra_data: Some(extra_data),
}
}
}
pub mod record_embed_view_state {
pub use crate::builder_types::{Set, Unset, IsSet, IsUnset};
#[allow(unused)]
use ::core::marker::PhantomData;
mod sealed {
pub trait Sealed {}
}
pub trait State: sealed::Sealed {
type RecordView;
}
pub struct Empty(());
impl sealed::Sealed for Empty {}
impl State for Empty {
type RecordView = Unset;
}
pub struct SetRecordView<S: State = Empty>(PhantomData<fn() -> S>);
impl<S: State> sealed::Sealed for SetRecordView<S> {}
impl<S: State> State for SetRecordView<S> {
type RecordView = Set<members::record_view>;
}
#[allow(non_camel_case_types)]
pub mod members {
pub struct record_view(());
}
}
pub struct RecordEmbedViewBuilder<'a, S: record_embed_view_state::State> {
_state: PhantomData<fn() -> S>,
_fields: (Option<CowStr<'a>>, Option<RecordEmbedViewRecordView<'a>>),
_lifetime: PhantomData<&'a ()>,
}
impl<'a> RecordEmbedView<'a> {
pub fn new() -> RecordEmbedViewBuilder<'a, record_embed_view_state::Empty> {
RecordEmbedViewBuilder::new()
}
}
impl<'a> RecordEmbedViewBuilder<'a, record_embed_view_state::Empty> {
pub fn new() -> Self {
RecordEmbedViewBuilder {
_state: PhantomData,
_fields: (None, None),
_lifetime: PhantomData,
}
}
}
impl<'a, S: record_embed_view_state::State> RecordEmbedViewBuilder<'a, S> {
pub fn name(mut self, value: impl Into<Option<CowStr<'a>>>) -> Self {
self._fields.0 = value.into();
self
}
pub fn maybe_name(mut self, value: Option<CowStr<'a>>) -> Self {
self._fields.0 = value;
self
}
}
impl<'a, S> RecordEmbedViewBuilder<'a, S>
where
S: record_embed_view_state::State,
S::RecordView: record_embed_view_state::IsUnset,
{
pub fn record_view(
mut self,
value: impl Into<RecordEmbedViewRecordView<'a>>,
) -> RecordEmbedViewBuilder<'a, record_embed_view_state::SetRecordView<S>> {
self._fields.1 = Option::Some(value.into());
RecordEmbedViewBuilder {
_state: PhantomData,
_fields: self._fields,
_lifetime: PhantomData,
}
}
}
impl<'a, S> RecordEmbedViewBuilder<'a, S>
where
S: record_embed_view_state::State,
S::RecordView: record_embed_view_state::IsSet,
{
pub fn build(self) -> RecordEmbedView<'a> {
RecordEmbedView {
name: self._fields.0,
record_view: self._fields.1.unwrap(),
extra_data: Default::default(),
}
}
pub fn build_with_data(
self,
extra_data: BTreeMap<jacquard_common::deps::smol_str::SmolStr, Data<'a>>,
) -> RecordEmbedView<'a> {
RecordEmbedView {
name: self._fields.0,
record_view: self._fields.1.unwrap(),
extra_data: Some(extra_data),
}
}
}
pub mod view_state {
pub use crate::builder_types::{Set, Unset, IsSet, IsUnset};
#[allow(unused)]
use ::core::marker::PhantomData;
mod sealed {
pub trait Sealed {}
}
pub trait State: sealed::Sealed {
type Record;
}
pub struct Empty(());
impl sealed::Sealed for Empty {}
impl State for Empty {
type Record = Unset;
}
pub struct SetRecord<S: State = Empty>(PhantomData<fn() -> S>);
impl<S: State> sealed::Sealed for SetRecord<S> {}
impl<S: State> State for SetRecord<S> {
type Record = Set<members::record>;
}
#[allow(non_camel_case_types)]
pub mod members {
pub struct record(());
}
}
pub struct ViewBuilder<'a, S: view_state::State> {
_state: PhantomData<fn() -> S>,
_fields: (Option<ViewUnionRecord<'a>>,),
_lifetime: PhantomData<&'a ()>,
}
impl<'a> View<'a> {
pub fn new() -> ViewBuilder<'a, view_state::Empty> {
ViewBuilder::new()
}
}
impl<'a> ViewBuilder<'a, view_state::Empty> {
pub fn new() -> Self {
ViewBuilder {
_state: PhantomData,
_fields: (None,),
_lifetime: PhantomData,
}
}
}
impl<'a, S> ViewBuilder<'a, S>
where
S: view_state::State,
S::Record: view_state::IsUnset,
{
pub fn record(
mut self,
value: impl Into<ViewUnionRecord<'a>>,
) -> ViewBuilder<'a, view_state::SetRecord<S>> {
self._fields.0 = Option::Some(value.into());
ViewBuilder {
_state: PhantomData,
_fields: self._fields,
_lifetime: PhantomData,
}
}
}
impl<'a, S> ViewBuilder<'a, S>
where
S: view_state::State,
S::Record: view_state::IsSet,
{
pub fn build(self) -> View<'a> {
View {
record: self._fields.0.unwrap(),
extra_data: Default::default(),
}
}
pub fn build_with_data(
self,
extra_data: BTreeMap<jacquard_common::deps::smol_str::SmolStr, Data<'a>>,
) -> View<'a> {
View {
record: self._fields.0.unwrap(),
extra_data: Some(extra_data),
}
}
}
pub mod view_blocked_state {
pub use crate::builder_types::{Set, Unset, IsSet, IsUnset};
#[allow(unused)]
use ::core::marker::PhantomData;
mod sealed {
pub trait Sealed {}
}
pub trait State: sealed::Sealed {
type Author;
type Uri;
type Blocked;
}
pub struct Empty(());
impl sealed::Sealed for Empty {}
impl State for Empty {
type Author = Unset;
type Uri = Unset;
type Blocked = Unset;
}
pub struct SetAuthor<S: State = Empty>(PhantomData<fn() -> S>);
impl<S: State> sealed::Sealed for SetAuthor<S> {}
impl<S: State> State for SetAuthor<S> {
type Author = Set<members::author>;
type Uri = S::Uri;
type Blocked = S::Blocked;
}
pub struct SetUri<S: State = Empty>(PhantomData<fn() -> S>);
impl<S: State> sealed::Sealed for SetUri<S> {}
impl<S: State> State for SetUri<S> {
type Author = S::Author;
type Uri = Set<members::uri>;
type Blocked = S::Blocked;
}
pub struct SetBlocked<S: State = Empty>(PhantomData<fn() -> S>);
impl<S: State> sealed::Sealed for SetBlocked<S> {}
impl<S: State> State for SetBlocked<S> {
type Author = S::Author;
type Uri = S::Uri;
type Blocked = Set<members::blocked>;
}
#[allow(non_camel_case_types)]
pub mod members {
pub struct author(());
pub struct uri(());
pub struct blocked(());
}
}
pub struct ViewBlockedBuilder<'a, S: view_blocked_state::State> {
_state: PhantomData<fn() -> S>,
_fields: (Option<BlockedAuthor<'a>>, Option<bool>, Option<AtUri<'a>>),
_lifetime: PhantomData<&'a ()>,
}
impl<'a> ViewBlocked<'a> {
pub fn new() -> ViewBlockedBuilder<'a, view_blocked_state::Empty> {
ViewBlockedBuilder::new()
}
}
impl<'a> ViewBlockedBuilder<'a, view_blocked_state::Empty> {
pub fn new() -> Self {
ViewBlockedBuilder {
_state: PhantomData,
_fields: (None, None, None),
_lifetime: PhantomData,
}
}
}
impl<'a, S> ViewBlockedBuilder<'a, S>
where
S: view_blocked_state::State,
S::Author: view_blocked_state::IsUnset,
{
pub fn author(
mut self,
value: impl Into<BlockedAuthor<'a>>,
) -> ViewBlockedBuilder<'a, view_blocked_state::SetAuthor<S>> {
self._fields.0 = Option::Some(value.into());
ViewBlockedBuilder {
_state: PhantomData,
_fields: self._fields,
_lifetime: PhantomData,
}
}
}
impl<'a, S> ViewBlockedBuilder<'a, S>
where
S: view_blocked_state::State,
S::Blocked: view_blocked_state::IsUnset,
{
pub fn blocked(
mut self,
value: impl Into<bool>,
) -> ViewBlockedBuilder<'a, view_blocked_state::SetBlocked<S>> {
self._fields.1 = Option::Some(value.into());
ViewBlockedBuilder {
_state: PhantomData,
_fields: self._fields,
_lifetime: PhantomData,
}
}
}
impl<'a, S> ViewBlockedBuilder<'a, S>
where
S: view_blocked_state::State,
S::Uri: view_blocked_state::IsUnset,
{
pub fn uri(
mut self,
value: impl Into<AtUri<'a>>,
) -> ViewBlockedBuilder<'a, view_blocked_state::SetUri<S>> {
self._fields.2 = Option::Some(value.into());
ViewBlockedBuilder {
_state: PhantomData,
_fields: self._fields,
_lifetime: PhantomData,
}
}
}
impl<'a, S> ViewBlockedBuilder<'a, S>
where
S: view_blocked_state::State,
S::Author: view_blocked_state::IsSet,
S::Uri: view_blocked_state::IsSet,
S::Blocked: view_blocked_state::IsSet,
{
pub fn build(self) -> ViewBlocked<'a> {
ViewBlocked {
author: self._fields.0.unwrap(),
blocked: self._fields.1.unwrap(),
uri: self._fields.2.unwrap(),
extra_data: Default::default(),
}
}
pub fn build_with_data(
self,
extra_data: BTreeMap<jacquard_common::deps::smol_str::SmolStr, Data<'a>>,
) -> ViewBlocked<'a> {
ViewBlocked {
author: self._fields.0.unwrap(),
blocked: self._fields.1.unwrap(),
uri: self._fields.2.unwrap(),
extra_data: Some(extra_data),
}
}
}
pub mod view_detached_state {
pub use crate::builder_types::{Set, Unset, IsSet, IsUnset};
#[allow(unused)]
use ::core::marker::PhantomData;
mod sealed {
pub trait Sealed {}
}
pub trait State: sealed::Sealed {
type Uri;
type Detached;
}
pub struct Empty(());
impl sealed::Sealed for Empty {}
impl State for Empty {
type Uri = Unset;
type Detached = Unset;
}
pub struct SetUri<S: State = Empty>(PhantomData<fn() -> S>);
impl<S: State> sealed::Sealed for SetUri<S> {}
impl<S: State> State for SetUri<S> {
type Uri = Set<members::uri>;
type Detached = S::Detached;
}
pub struct SetDetached<S: State = Empty>(PhantomData<fn() -> S>);
impl<S: State> sealed::Sealed for SetDetached<S> {}
impl<S: State> State for SetDetached<S> {
type Uri = S::Uri;
type Detached = Set<members::detached>;
}
#[allow(non_camel_case_types)]
pub mod members {
pub struct uri(());
pub struct detached(());
}
}
pub struct ViewDetachedBuilder<'a, S: view_detached_state::State> {
_state: PhantomData<fn() -> S>,
_fields: (Option<bool>, Option<AtUri<'a>>),
_lifetime: PhantomData<&'a ()>,
}
impl<'a> ViewDetached<'a> {
pub fn new() -> ViewDetachedBuilder<'a, view_detached_state::Empty> {
ViewDetachedBuilder::new()
}
}
impl<'a> ViewDetachedBuilder<'a, view_detached_state::Empty> {
pub fn new() -> Self {
ViewDetachedBuilder {
_state: PhantomData,
_fields: (None, None),
_lifetime: PhantomData,
}
}
}
impl<'a, S> ViewDetachedBuilder<'a, S>
where
S: view_detached_state::State,
S::Detached: view_detached_state::IsUnset,
{
pub fn detached(
mut self,
value: impl Into<bool>,
) -> ViewDetachedBuilder<'a, view_detached_state::SetDetached<S>> {
self._fields.0 = Option::Some(value.into());
ViewDetachedBuilder {
_state: PhantomData,
_fields: self._fields,
_lifetime: PhantomData,
}
}
}
impl<'a, S> ViewDetachedBuilder<'a, S>
where
S: view_detached_state::State,
S::Uri: view_detached_state::IsUnset,
{
pub fn uri(
mut self,
value: impl Into<AtUri<'a>>,
) -> ViewDetachedBuilder<'a, view_detached_state::SetUri<S>> {
self._fields.1 = Option::Some(value.into());
ViewDetachedBuilder {
_state: PhantomData,
_fields: self._fields,
_lifetime: PhantomData,
}
}
}
impl<'a, S> ViewDetachedBuilder<'a, S>
where
S: view_detached_state::State,
S::Uri: view_detached_state::IsSet,
S::Detached: view_detached_state::IsSet,
{
pub fn build(self) -> ViewDetached<'a> {
ViewDetached {
detached: self._fields.0.unwrap(),
uri: self._fields.1.unwrap(),
extra_data: Default::default(),
}
}
pub fn build_with_data(
self,
extra_data: BTreeMap<jacquard_common::deps::smol_str::SmolStr, Data<'a>>,
) -> ViewDetached<'a> {
ViewDetached {
detached: self._fields.0.unwrap(),
uri: self._fields.1.unwrap(),
extra_data: Some(extra_data),
}
}
}
pub mod view_not_found_state {
pub use crate::builder_types::{Set, Unset, IsSet, IsUnset};
#[allow(unused)]
use ::core::marker::PhantomData;
mod sealed {
pub trait Sealed {}
}
pub trait State: sealed::Sealed {
type NotFound;
type Uri;
}
pub struct Empty(());
impl sealed::Sealed for Empty {}
impl State for Empty {
type NotFound = Unset;
type Uri = Unset;
}
pub struct SetNotFound<S: State = Empty>(PhantomData<fn() -> S>);
impl<S: State> sealed::Sealed for SetNotFound<S> {}
impl<S: State> State for SetNotFound<S> {
type NotFound = Set<members::not_found>;
type Uri = S::Uri;
}
pub struct SetUri<S: State = Empty>(PhantomData<fn() -> S>);
impl<S: State> sealed::Sealed for SetUri<S> {}
impl<S: State> State for SetUri<S> {
type NotFound = S::NotFound;
type Uri = Set<members::uri>;
}
#[allow(non_camel_case_types)]
pub mod members {
pub struct not_found(());
pub struct uri(());
}
}
pub struct ViewNotFoundBuilder<'a, S: view_not_found_state::State> {
_state: PhantomData<fn() -> S>,
_fields: (Option<bool>, Option<AtUri<'a>>),
_lifetime: PhantomData<&'a ()>,
}
impl<'a> ViewNotFound<'a> {
pub fn new() -> ViewNotFoundBuilder<'a, view_not_found_state::Empty> {
ViewNotFoundBuilder::new()
}
}
impl<'a> ViewNotFoundBuilder<'a, view_not_found_state::Empty> {
pub fn new() -> Self {
ViewNotFoundBuilder {
_state: PhantomData,
_fields: (None, None),
_lifetime: PhantomData,
}
}
}
impl<'a, S> ViewNotFoundBuilder<'a, S>
where
S: view_not_found_state::State,
S::NotFound: view_not_found_state::IsUnset,
{
pub fn not_found(
mut self,
value: impl Into<bool>,
) -> ViewNotFoundBuilder<'a, view_not_found_state::SetNotFound<S>> {
self._fields.0 = Option::Some(value.into());
ViewNotFoundBuilder {
_state: PhantomData,
_fields: self._fields,
_lifetime: PhantomData,
}
}
}
impl<'a, S> ViewNotFoundBuilder<'a, S>
where
S: view_not_found_state::State,
S::Uri: view_not_found_state::IsUnset,
{
pub fn uri(
mut self,
value: impl Into<AtUri<'a>>,
) -> ViewNotFoundBuilder<'a, view_not_found_state::SetUri<S>> {
self._fields.1 = Option::Some(value.into());
ViewNotFoundBuilder {
_state: PhantomData,
_fields: self._fields,
_lifetime: PhantomData,
}
}
}
impl<'a, S> ViewNotFoundBuilder<'a, S>
where
S: view_not_found_state::State,
S::NotFound: view_not_found_state::IsSet,
S::Uri: view_not_found_state::IsSet,
{
pub fn build(self) -> ViewNotFound<'a> {
ViewNotFound {
not_found: self._fields.0.unwrap(),
uri: self._fields.1.unwrap(),
extra_data: Default::default(),
}
}
pub fn build_with_data(
self,
extra_data: BTreeMap<jacquard_common::deps::smol_str::SmolStr, Data<'a>>,
) -> ViewNotFound<'a> {
ViewNotFound {
not_found: self._fields.0.unwrap(),
uri: self._fields.1.unwrap(),
extra_data: Some(extra_data),
}
}
}
pub mod view_record_state {
pub use crate::builder_types::{Set, Unset, IsSet, IsUnset};
#[allow(unused)]
use ::core::marker::PhantomData;
mod sealed {
pub trait Sealed {}
}
pub trait State: sealed::Sealed {
type Author;
type IndexedAt;
type Uri;
type Cid;
type Value;
}
pub struct Empty(());
impl sealed::Sealed for Empty {}
impl State for Empty {
type Author = Unset;
type IndexedAt = Unset;
type Uri = Unset;
type Cid = Unset;
type Value = Unset;
}
pub struct SetAuthor<S: State = Empty>(PhantomData<fn() -> S>);
impl<S: State> sealed::Sealed for SetAuthor<S> {}
impl<S: State> State for SetAuthor<S> {
type Author = Set<members::author>;
type IndexedAt = S::IndexedAt;
type Uri = S::Uri;
type Cid = S::Cid;
type Value = S::Value;
}
pub struct SetIndexedAt<S: State = Empty>(PhantomData<fn() -> S>);
impl<S: State> sealed::Sealed for SetIndexedAt<S> {}
impl<S: State> State for SetIndexedAt<S> {
type Author = S::Author;
type IndexedAt = Set<members::indexed_at>;
type Uri = S::Uri;
type Cid = S::Cid;
type Value = S::Value;
}
pub struct SetUri<S: State = Empty>(PhantomData<fn() -> S>);
impl<S: State> sealed::Sealed for SetUri<S> {}
impl<S: State> State for SetUri<S> {
type Author = S::Author;
type IndexedAt = S::IndexedAt;
type Uri = Set<members::uri>;
type Cid = S::Cid;
type Value = S::Value;
}
pub struct SetCid<S: State = Empty>(PhantomData<fn() -> S>);
impl<S: State> sealed::Sealed for SetCid<S> {}
impl<S: State> State for SetCid<S> {
type Author = S::Author;
type IndexedAt = S::IndexedAt;
type Uri = S::Uri;
type Cid = Set<members::cid>;
type Value = S::Value;
}
pub struct SetValue<S: State = Empty>(PhantomData<fn() -> S>);
impl<S: State> sealed::Sealed for SetValue<S> {}
impl<S: State> State for SetValue<S> {
type Author = S::Author;
type IndexedAt = S::IndexedAt;
type Uri = S::Uri;
type Cid = S::Cid;
type Value = Set<members::value>;
}
#[allow(non_camel_case_types)]
pub mod members {
pub struct author(());
pub struct indexed_at(());
pub struct uri(());
pub struct cid(());
pub struct value(());
}
}
pub struct ViewRecordBuilder<'a, S: view_record_state::State> {
_state: PhantomData<fn() -> S>,
_fields: (
Option<ProfileDataViewBasic<'a>>,
Option<Cid<'a>>,
Option<Vec<records::RecordEmbedView<'a>>>,
Option<Datetime>,
Option<Vec<Label<'a>>>,
Option<i64>,
Option<i64>,
Option<i64>,
Option<i64>,
Option<AtUri<'a>>,
Option<Data<'a>>,
),
_lifetime: PhantomData<&'a ()>,
}
impl<'a> ViewRecord<'a> {
pub fn new() -> ViewRecordBuilder<'a, view_record_state::Empty> {
ViewRecordBuilder::new()
}
}
impl<'a> ViewRecordBuilder<'a, view_record_state::Empty> {
pub fn new() -> Self {
ViewRecordBuilder {
_state: PhantomData,
_fields: (None, None, None, None, None, None, None, None, None, None, None),
_lifetime: PhantomData,
}
}
}
impl<'a, S> ViewRecordBuilder<'a, S>
where
S: view_record_state::State,
S::Author: view_record_state::IsUnset,
{
pub fn author(
mut self,
value: impl Into<ProfileDataViewBasic<'a>>,
) -> ViewRecordBuilder<'a, view_record_state::SetAuthor<S>> {
self._fields.0 = Option::Some(value.into());
ViewRecordBuilder {
_state: PhantomData,
_fields: self._fields,
_lifetime: PhantomData,
}
}
}
impl<'a, S> ViewRecordBuilder<'a, S>
where
S: view_record_state::State,
S::Cid: view_record_state::IsUnset,
{
pub fn cid(
mut self,
value: impl Into<Cid<'a>>,
) -> ViewRecordBuilder<'a, view_record_state::SetCid<S>> {
self._fields.1 = Option::Some(value.into());
ViewRecordBuilder {
_state: PhantomData,
_fields: self._fields,
_lifetime: PhantomData,
}
}
}
impl<'a, S: view_record_state::State> ViewRecordBuilder<'a, S> {
pub fn embeds(
mut self,
value: impl Into<Option<Vec<records::RecordEmbedView<'a>>>>,
) -> Self {
self._fields.2 = value.into();
self
}
pub fn maybe_embeds(
mut self,
value: Option<Vec<records::RecordEmbedView<'a>>>,
) -> Self {
self._fields.2 = value;
self
}
}
impl<'a, S> ViewRecordBuilder<'a, S>
where
S: view_record_state::State,
S::IndexedAt: view_record_state::IsUnset,
{
pub fn indexed_at(
mut self,
value: impl Into<Datetime>,
) -> ViewRecordBuilder<'a, view_record_state::SetIndexedAt<S>> {
self._fields.3 = Option::Some(value.into());
ViewRecordBuilder {
_state: PhantomData,
_fields: self._fields,
_lifetime: PhantomData,
}
}
}
impl<'a, S: view_record_state::State> ViewRecordBuilder<'a, S> {
pub fn labels(mut self, value: impl Into<Option<Vec<Label<'a>>>>) -> Self {
self._fields.4 = value.into();
self
}
pub fn maybe_labels(mut self, value: Option<Vec<Label<'a>>>) -> Self {
self._fields.4 = value;
self
}
}
impl<'a, S: view_record_state::State> ViewRecordBuilder<'a, S> {
pub fn like_count(mut self, value: impl Into<Option<i64>>) -> Self {
self._fields.5 = value.into();
self
}
pub fn maybe_like_count(mut self, value: Option<i64>) -> Self {
self._fields.5 = value;
self
}
}
impl<'a, S: view_record_state::State> ViewRecordBuilder<'a, S> {
pub fn quote_count(mut self, value: impl Into<Option<i64>>) -> Self {
self._fields.6 = value.into();
self
}
pub fn maybe_quote_count(mut self, value: Option<i64>) -> Self {
self._fields.6 = value;
self
}
}
impl<'a, S: view_record_state::State> ViewRecordBuilder<'a, S> {
pub fn reply_count(mut self, value: impl Into<Option<i64>>) -> Self {
self._fields.7 = value.into();
self
}
pub fn maybe_reply_count(mut self, value: Option<i64>) -> Self {
self._fields.7 = value;
self
}
}
impl<'a, S: view_record_state::State> ViewRecordBuilder<'a, S> {
pub fn repost_count(mut self, value: impl Into<Option<i64>>) -> Self {
self._fields.8 = value.into();
self
}
pub fn maybe_repost_count(mut self, value: Option<i64>) -> Self {
self._fields.8 = value;
self
}
}
impl<'a, S> ViewRecordBuilder<'a, S>
where
S: view_record_state::State,
S::Uri: view_record_state::IsUnset,
{
pub fn uri(
mut self,
value: impl Into<AtUri<'a>>,
) -> ViewRecordBuilder<'a, view_record_state::SetUri<S>> {
self._fields.9 = Option::Some(value.into());
ViewRecordBuilder {
_state: PhantomData,
_fields: self._fields,
_lifetime: PhantomData,
}
}
}
impl<'a, S> ViewRecordBuilder<'a, S>
where
S: view_record_state::State,
S::Value: view_record_state::IsUnset,
{
pub fn value(
mut self,
value: impl Into<Data<'a>>,
) -> ViewRecordBuilder<'a, view_record_state::SetValue<S>> {
self._fields.10 = Option::Some(value.into());
ViewRecordBuilder {
_state: PhantomData,
_fields: self._fields,
_lifetime: PhantomData,
}
}
}
impl<'a, S> ViewRecordBuilder<'a, S>
where
S: view_record_state::State,
S::Author: view_record_state::IsSet,
S::IndexedAt: view_record_state::IsSet,
S::Uri: view_record_state::IsSet,
S::Cid: view_record_state::IsSet,
S::Value: view_record_state::IsSet,
{
pub fn build(self) -> ViewRecord<'a> {
ViewRecord {
author: self._fields.0.unwrap(),
cid: self._fields.1.unwrap(),
embeds: self._fields.2,
indexed_at: self._fields.3.unwrap(),
labels: self._fields.4,
like_count: self._fields.5,
quote_count: self._fields.6,
reply_count: self._fields.7,
repost_count: self._fields.8,
uri: self._fields.9.unwrap(),
value: self._fields.10.unwrap(),
extra_data: Default::default(),
}
}
pub fn build_with_data(
self,
extra_data: BTreeMap<jacquard_common::deps::smol_str::SmolStr, Data<'a>>,
) -> ViewRecord<'a> {
ViewRecord {
author: self._fields.0.unwrap(),
cid: self._fields.1.unwrap(),
embeds: self._fields.2,
indexed_at: self._fields.3.unwrap(),
labels: self._fields.4,
like_count: self._fields.5,
quote_count: self._fields.6,
reply_count: self._fields.7,
repost_count: self._fields.8,
uri: self._fields.9.unwrap(),
value: self._fields.10.unwrap(),
extra_data: Some(extra_data),
}
}
}