pub mod create_draft;
pub mod delete_draft;
pub mod get_drafts;
pub mod update_draft;
#[jacquard_derive::lexicon]
#[derive(
serde::Serialize,
serde::Deserialize,
Debug,
Clone,
PartialEq,
Eq,
jacquard_derive::IntoStatic
)]
#[serde(rename_all = "camelCase")]
pub struct Draft<'a> {
#[serde(skip_serializing_if = "std::option::Option::is_none")]
#[serde(borrow)]
pub device_id: std::option::Option<jacquard_common::CowStr<'a>>,
#[serde(skip_serializing_if = "std::option::Option::is_none")]
#[serde(borrow)]
pub device_name: std::option::Option<jacquard_common::CowStr<'a>>,
#[serde(skip_serializing_if = "std::option::Option::is_none")]
pub langs: std::option::Option<Vec<jacquard_common::types::string::Language>>,
#[serde(skip_serializing_if = "std::option::Option::is_none")]
#[serde(borrow)]
pub postgate_embedding_rules: std::option::Option<
Vec<crate::app_bsky::feed::postgate::DisableRule<'a>>,
>,
#[serde(borrow)]
pub posts: Vec<crate::app_bsky::draft::DraftPost<'a>>,
#[serde(skip_serializing_if = "std::option::Option::is_none")]
#[serde(borrow)]
pub threadgate_allow: std::option::Option<Vec<DraftThreadgateAllowItem<'a>>>,
}
pub mod draft_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 Posts;
}
pub struct Empty(());
impl sealed::Sealed for Empty {}
impl State for Empty {
type Posts = Unset;
}
pub struct SetPosts<S: State = Empty>(PhantomData<fn() -> S>);
impl<S: State> sealed::Sealed for SetPosts<S> {}
impl<S: State> State for SetPosts<S> {
type Posts = Set<members::posts>;
}
#[allow(non_camel_case_types)]
pub mod members {
pub struct posts(());
}
}
pub struct DraftBuilder<'a, S: draft_state::State> {
_phantom_state: ::core::marker::PhantomData<fn() -> S>,
__unsafe_private_named: (
::core::option::Option<jacquard_common::CowStr<'a>>,
::core::option::Option<jacquard_common::CowStr<'a>>,
::core::option::Option<Vec<jacquard_common::types::string::Language>>,
::core::option::Option<Vec<crate::app_bsky::feed::postgate::DisableRule<'a>>>,
::core::option::Option<Vec<crate::app_bsky::draft::DraftPost<'a>>>,
::core::option::Option<Vec<DraftThreadgateAllowItem<'a>>>,
),
_phantom: ::core::marker::PhantomData<&'a ()>,
}
impl<'a> Draft<'a> {
pub fn new() -> DraftBuilder<'a, draft_state::Empty> {
DraftBuilder::new()
}
}
impl<'a> DraftBuilder<'a, draft_state::Empty> {
pub fn new() -> Self {
DraftBuilder {
_phantom_state: ::core::marker::PhantomData,
__unsafe_private_named: (None, None, None, None, None, None),
_phantom: ::core::marker::PhantomData,
}
}
}
impl<'a, S: draft_state::State> DraftBuilder<'a, S> {
pub fn device_id(
mut self,
value: impl Into<Option<jacquard_common::CowStr<'a>>>,
) -> Self {
self.__unsafe_private_named.0 = value.into();
self
}
pub fn maybe_device_id(
mut self,
value: Option<jacquard_common::CowStr<'a>>,
) -> Self {
self.__unsafe_private_named.0 = value;
self
}
}
impl<'a, S: draft_state::State> DraftBuilder<'a, S> {
pub fn device_name(
mut self,
value: impl Into<Option<jacquard_common::CowStr<'a>>>,
) -> Self {
self.__unsafe_private_named.1 = value.into();
self
}
pub fn maybe_device_name(
mut self,
value: Option<jacquard_common::CowStr<'a>>,
) -> Self {
self.__unsafe_private_named.1 = value;
self
}
}
impl<'a, S: draft_state::State> DraftBuilder<'a, S> {
pub fn langs(
mut self,
value: impl Into<Option<Vec<jacquard_common::types::string::Language>>>,
) -> Self {
self.__unsafe_private_named.2 = value.into();
self
}
pub fn maybe_langs(
mut self,
value: Option<Vec<jacquard_common::types::string::Language>>,
) -> Self {
self.__unsafe_private_named.2 = value;
self
}
}
impl<'a, S: draft_state::State> DraftBuilder<'a, S> {
pub fn postgate_embedding_rules(
mut self,
value: impl Into<Option<Vec<crate::app_bsky::feed::postgate::DisableRule<'a>>>>,
) -> Self {
self.__unsafe_private_named.3 = value.into();
self
}
pub fn maybe_postgate_embedding_rules(
mut self,
value: Option<Vec<crate::app_bsky::feed::postgate::DisableRule<'a>>>,
) -> Self {
self.__unsafe_private_named.3 = value;
self
}
}
impl<'a, S> DraftBuilder<'a, S>
where
S: draft_state::State,
S::Posts: draft_state::IsUnset,
{
pub fn posts(
mut self,
value: impl Into<Vec<crate::app_bsky::draft::DraftPost<'a>>>,
) -> DraftBuilder<'a, draft_state::SetPosts<S>> {
self.__unsafe_private_named.4 = ::core::option::Option::Some(value.into());
DraftBuilder {
_phantom_state: ::core::marker::PhantomData,
__unsafe_private_named: self.__unsafe_private_named,
_phantom: ::core::marker::PhantomData,
}
}
}
impl<'a, S: draft_state::State> DraftBuilder<'a, S> {
pub fn threadgate_allow(
mut self,
value: impl Into<Option<Vec<DraftThreadgateAllowItem<'a>>>>,
) -> Self {
self.__unsafe_private_named.5 = value.into();
self
}
pub fn maybe_threadgate_allow(
mut self,
value: Option<Vec<DraftThreadgateAllowItem<'a>>>,
) -> Self {
self.__unsafe_private_named.5 = value;
self
}
}
impl<'a, S> DraftBuilder<'a, S>
where
S: draft_state::State,
S::Posts: draft_state::IsSet,
{
pub fn build(self) -> Draft<'a> {
Draft {
device_id: self.__unsafe_private_named.0,
device_name: self.__unsafe_private_named.1,
langs: self.__unsafe_private_named.2,
postgate_embedding_rules: self.__unsafe_private_named.3,
posts: self.__unsafe_private_named.4.unwrap(),
threadgate_allow: self.__unsafe_private_named.5,
extra_data: Default::default(),
}
}
pub fn build_with_data(
self,
extra_data: std::collections::BTreeMap<
jacquard_common::deps::smol_str::SmolStr,
jacquard_common::types::value::Data<'a>,
>,
) -> Draft<'a> {
Draft {
device_id: self.__unsafe_private_named.0,
device_name: self.__unsafe_private_named.1,
langs: self.__unsafe_private_named.2,
postgate_embedding_rules: self.__unsafe_private_named.3,
posts: self.__unsafe_private_named.4.unwrap(),
threadgate_allow: self.__unsafe_private_named.5,
extra_data: Some(extra_data),
}
}
}
#[jacquard_derive::open_union]
#[derive(
serde::Serialize,
serde::Deserialize,
Debug,
Clone,
PartialEq,
Eq,
jacquard_derive::IntoStatic
)]
#[serde(tag = "$type")]
#[serde(bound(deserialize = "'de: 'a"))]
pub enum DraftThreadgateAllowItem<'a> {
#[serde(rename = "app.bsky.feed.threadgate#mentionRule")]
ThreadgateMentionRule(Box<crate::app_bsky::feed::threadgate::MentionRule<'a>>),
#[serde(rename = "app.bsky.feed.threadgate#followerRule")]
ThreadgateFollowerRule(Box<crate::app_bsky::feed::threadgate::FollowerRule<'a>>),
#[serde(rename = "app.bsky.feed.threadgate#followingRule")]
ThreadgateFollowingRule(Box<crate::app_bsky::feed::threadgate::FollowingRule<'a>>),
#[serde(rename = "app.bsky.feed.threadgate#listRule")]
ThreadgateListRule(Box<crate::app_bsky::feed::threadgate::ListRule<'a>>),
}
fn lexicon_doc_app_bsky_draft_defs() -> ::jacquard_lexicon::lexicon::LexiconDoc<
'static,
> {
::jacquard_lexicon::lexicon::LexiconDoc {
lexicon: ::jacquard_lexicon::lexicon::Lexicon::Lexicon1,
id: ::jacquard_common::CowStr::new_static("app.bsky.draft.defs"),
revision: None,
description: None,
defs: {
let mut map = ::alloc::collections::BTreeMap::new();
map.insert(
::jacquard_common::deps::smol_str::SmolStr::new_static("draft"),
::jacquard_lexicon::lexicon::LexUserType::Object(::jacquard_lexicon::lexicon::LexObject {
description: Some(
::jacquard_common::CowStr::new_static(
"A draft containing an array of draft posts.",
),
),
required: Some(
vec![
::jacquard_common::deps::smol_str::SmolStr::new_static("posts")
],
),
nullable: None,
properties: {
#[allow(unused_mut)]
let mut map = ::alloc::collections::BTreeMap::new();
map.insert(
::jacquard_common::deps::smol_str::SmolStr::new_static(
"deviceId",
),
::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString {
description: Some(
::jacquard_common::CowStr::new_static(
"UUIDv4 identifier of the device that created this draft.",
),
),
format: None,
default: None,
min_length: None,
max_length: Some(100usize),
min_graphemes: None,
max_graphemes: None,
r#enum: None,
r#const: None,
known_values: None,
}),
);
map.insert(
::jacquard_common::deps::smol_str::SmolStr::new_static(
"deviceName",
),
::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString {
description: Some(
::jacquard_common::CowStr::new_static(
"The device and/or platform on which the draft was created.",
),
),
format: None,
default: None,
min_length: None,
max_length: Some(100usize),
min_graphemes: None,
max_graphemes: None,
r#enum: None,
r#const: None,
known_values: None,
}),
);
map.insert(
::jacquard_common::deps::smol_str::SmolStr::new_static(
"langs",
),
::jacquard_lexicon::lexicon::LexObjectProperty::Array(::jacquard_lexicon::lexicon::LexArray {
description: Some(
::jacquard_common::CowStr::new_static(
"Indicates human language of posts primary text content.",
),
),
items: ::jacquard_lexicon::lexicon::LexArrayItem::String(::jacquard_lexicon::lexicon::LexString {
description: None,
format: Some(
::jacquard_lexicon::lexicon::LexStringFormat::Language,
),
default: None,
min_length: None,
max_length: None,
min_graphemes: None,
max_graphemes: None,
r#enum: None,
r#const: None,
known_values: None,
}),
min_length: None,
max_length: Some(3usize),
}),
);
map.insert(
::jacquard_common::deps::smol_str::SmolStr::new_static(
"postgateEmbeddingRules",
),
::jacquard_lexicon::lexicon::LexObjectProperty::Array(::jacquard_lexicon::lexicon::LexArray {
description: Some(
::jacquard_common::CowStr::new_static(
"Embedding rules for the postgates to be created when this draft is published.",
),
),
items: ::jacquard_lexicon::lexicon::LexArrayItem::Union(::jacquard_lexicon::lexicon::LexRefUnion {
description: None,
refs: vec![
::jacquard_common::CowStr::new_static("app.bsky.feed.postgate#disableRule")
],
closed: None,
}),
min_length: None,
max_length: Some(5usize),
}),
);
map.insert(
::jacquard_common::deps::smol_str::SmolStr::new_static(
"posts",
),
::jacquard_lexicon::lexicon::LexObjectProperty::Array(::jacquard_lexicon::lexicon::LexArray {
description: Some(
::jacquard_common::CowStr::new_static(
"Array of draft posts that compose this draft.",
),
),
items: ::jacquard_lexicon::lexicon::LexArrayItem::Ref(::jacquard_lexicon::lexicon::LexRef {
description: None,
r#ref: ::jacquard_common::CowStr::new_static("#draftPost"),
}),
min_length: Some(1usize),
max_length: Some(100usize),
}),
);
map.insert(
::jacquard_common::deps::smol_str::SmolStr::new_static(
"threadgateAllow",
),
::jacquard_lexicon::lexicon::LexObjectProperty::Array(::jacquard_lexicon::lexicon::LexArray {
description: Some(
::jacquard_common::CowStr::new_static(
"Allow-rules for the threadgate to be created when this draft is published.",
),
),
items: ::jacquard_lexicon::lexicon::LexArrayItem::Union(::jacquard_lexicon::lexicon::LexRefUnion {
description: None,
refs: vec![
::jacquard_common::CowStr::new_static("app.bsky.feed.threadgate#mentionRule"),
::jacquard_common::CowStr::new_static("app.bsky.feed.threadgate#followerRule"),
::jacquard_common::CowStr::new_static("app.bsky.feed.threadgate#followingRule"),
::jacquard_common::CowStr::new_static("app.bsky.feed.threadgate#listRule")
],
closed: None,
}),
min_length: None,
max_length: Some(5usize),
}),
);
map
},
}),
);
map.insert(
::jacquard_common::deps::smol_str::SmolStr::new_static(
"draftEmbedCaption",
),
::jacquard_lexicon::lexicon::LexUserType::Object(::jacquard_lexicon::lexicon::LexObject {
description: None,
required: Some(
vec![
::jacquard_common::deps::smol_str::SmolStr::new_static("lang"),
::jacquard_common::deps::smol_str::SmolStr::new_static("content")
],
),
nullable: None,
properties: {
#[allow(unused_mut)]
let mut map = ::alloc::collections::BTreeMap::new();
map.insert(
::jacquard_common::deps::smol_str::SmolStr::new_static(
"content",
),
::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString {
description: None,
format: None,
default: None,
min_length: None,
max_length: Some(10000usize),
min_graphemes: None,
max_graphemes: None,
r#enum: None,
r#const: None,
known_values: None,
}),
);
map.insert(
::jacquard_common::deps::smol_str::SmolStr::new_static(
"lang",
),
::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString {
description: None,
format: Some(
::jacquard_lexicon::lexicon::LexStringFormat::Language,
),
default: None,
min_length: None,
max_length: None,
min_graphemes: None,
max_graphemes: None,
r#enum: None,
r#const: None,
known_values: None,
}),
);
map
},
}),
);
map.insert(
::jacquard_common::deps::smol_str::SmolStr::new_static(
"draftEmbedExternal",
),
::jacquard_lexicon::lexicon::LexUserType::Object(::jacquard_lexicon::lexicon::LexObject {
description: None,
required: Some(
vec![
::jacquard_common::deps::smol_str::SmolStr::new_static("uri")
],
),
nullable: None,
properties: {
#[allow(unused_mut)]
let mut map = ::alloc::collections::BTreeMap::new();
map.insert(
::jacquard_common::deps::smol_str::SmolStr::new_static(
"uri",
),
::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString {
description: None,
format: Some(
::jacquard_lexicon::lexicon::LexStringFormat::Uri,
),
default: None,
min_length: None,
max_length: None,
min_graphemes: None,
max_graphemes: None,
r#enum: None,
r#const: None,
known_values: None,
}),
);
map
},
}),
);
map.insert(
::jacquard_common::deps::smol_str::SmolStr::new_static(
"draftEmbedImage",
),
::jacquard_lexicon::lexicon::LexUserType::Object(::jacquard_lexicon::lexicon::LexObject {
description: None,
required: Some(
vec![
::jacquard_common::deps::smol_str::SmolStr::new_static("localRef")
],
),
nullable: None,
properties: {
#[allow(unused_mut)]
let mut map = ::alloc::collections::BTreeMap::new();
map.insert(
::jacquard_common::deps::smol_str::SmolStr::new_static(
"alt",
),
::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString {
description: None,
format: None,
default: None,
min_length: None,
max_length: None,
min_graphemes: None,
max_graphemes: Some(2000usize),
r#enum: None,
r#const: None,
known_values: None,
}),
);
map.insert(
::jacquard_common::deps::smol_str::SmolStr::new_static(
"localRef",
),
::jacquard_lexicon::lexicon::LexObjectProperty::Ref(::jacquard_lexicon::lexicon::LexRef {
description: None,
r#ref: ::jacquard_common::CowStr::new_static(
"#draftEmbedLocalRef",
),
}),
);
map
},
}),
);
map.insert(
::jacquard_common::deps::smol_str::SmolStr::new_static(
"draftEmbedLocalRef",
),
::jacquard_lexicon::lexicon::LexUserType::Object(::jacquard_lexicon::lexicon::LexObject {
description: None,
required: Some(
vec![
::jacquard_common::deps::smol_str::SmolStr::new_static("path")
],
),
nullable: None,
properties: {
#[allow(unused_mut)]
let mut map = ::alloc::collections::BTreeMap::new();
map.insert(
::jacquard_common::deps::smol_str::SmolStr::new_static(
"path",
),
::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString {
description: Some(
::jacquard_common::CowStr::new_static(
"Local, on-device ref to file to be embedded. Embeds are currently device-bound for drafts.",
),
),
format: None,
default: None,
min_length: Some(1usize),
max_length: Some(1024usize),
min_graphemes: None,
max_graphemes: None,
r#enum: None,
r#const: None,
known_values: None,
}),
);
map
},
}),
);
map.insert(
::jacquard_common::deps::smol_str::SmolStr::new_static(
"draftEmbedRecord",
),
::jacquard_lexicon::lexicon::LexUserType::Object(::jacquard_lexicon::lexicon::LexObject {
description: None,
required: Some(
vec![
::jacquard_common::deps::smol_str::SmolStr::new_static("record")
],
),
nullable: None,
properties: {
#[allow(unused_mut)]
let mut map = ::alloc::collections::BTreeMap::new();
map.insert(
::jacquard_common::deps::smol_str::SmolStr::new_static(
"record",
),
::jacquard_lexicon::lexicon::LexObjectProperty::Ref(::jacquard_lexicon::lexicon::LexRef {
description: None,
r#ref: ::jacquard_common::CowStr::new_static(
"com.atproto.repo.strongRef",
),
}),
);
map
},
}),
);
map.insert(
::jacquard_common::deps::smol_str::SmolStr::new_static(
"draftEmbedVideo",
),
::jacquard_lexicon::lexicon::LexUserType::Object(::jacquard_lexicon::lexicon::LexObject {
description: None,
required: Some(
vec![
::jacquard_common::deps::smol_str::SmolStr::new_static("localRef")
],
),
nullable: None,
properties: {
#[allow(unused_mut)]
let mut map = ::alloc::collections::BTreeMap::new();
map.insert(
::jacquard_common::deps::smol_str::SmolStr::new_static(
"alt",
),
::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString {
description: None,
format: None,
default: None,
min_length: None,
max_length: None,
min_graphemes: None,
max_graphemes: Some(2000usize),
r#enum: None,
r#const: None,
known_values: None,
}),
);
map.insert(
::jacquard_common::deps::smol_str::SmolStr::new_static(
"captions",
),
::jacquard_lexicon::lexicon::LexObjectProperty::Array(::jacquard_lexicon::lexicon::LexArray {
description: None,
items: ::jacquard_lexicon::lexicon::LexArrayItem::Ref(::jacquard_lexicon::lexicon::LexRef {
description: None,
r#ref: ::jacquard_common::CowStr::new_static(
"#draftEmbedCaption",
),
}),
min_length: None,
max_length: Some(20usize),
}),
);
map.insert(
::jacquard_common::deps::smol_str::SmolStr::new_static(
"localRef",
),
::jacquard_lexicon::lexicon::LexObjectProperty::Ref(::jacquard_lexicon::lexicon::LexRef {
description: None,
r#ref: ::jacquard_common::CowStr::new_static(
"#draftEmbedLocalRef",
),
}),
);
map
},
}),
);
map.insert(
::jacquard_common::deps::smol_str::SmolStr::new_static("draftPost"),
::jacquard_lexicon::lexicon::LexUserType::Object(::jacquard_lexicon::lexicon::LexObject {
description: Some(
::jacquard_common::CowStr::new_static(
"One of the posts that compose a draft.",
),
),
required: Some(
vec![
::jacquard_common::deps::smol_str::SmolStr::new_static("text")
],
),
nullable: None,
properties: {
#[allow(unused_mut)]
let mut map = ::alloc::collections::BTreeMap::new();
map.insert(
::jacquard_common::deps::smol_str::SmolStr::new_static(
"embedExternals",
),
::jacquard_lexicon::lexicon::LexObjectProperty::Array(::jacquard_lexicon::lexicon::LexArray {
description: None,
items: ::jacquard_lexicon::lexicon::LexArrayItem::Ref(::jacquard_lexicon::lexicon::LexRef {
description: None,
r#ref: ::jacquard_common::CowStr::new_static(
"#draftEmbedExternal",
),
}),
min_length: None,
max_length: Some(1usize),
}),
);
map.insert(
::jacquard_common::deps::smol_str::SmolStr::new_static(
"embedImages",
),
::jacquard_lexicon::lexicon::LexObjectProperty::Array(::jacquard_lexicon::lexicon::LexArray {
description: None,
items: ::jacquard_lexicon::lexicon::LexArrayItem::Ref(::jacquard_lexicon::lexicon::LexRef {
description: None,
r#ref: ::jacquard_common::CowStr::new_static(
"#draftEmbedImage",
),
}),
min_length: None,
max_length: Some(4usize),
}),
);
map.insert(
::jacquard_common::deps::smol_str::SmolStr::new_static(
"embedRecords",
),
::jacquard_lexicon::lexicon::LexObjectProperty::Array(::jacquard_lexicon::lexicon::LexArray {
description: None,
items: ::jacquard_lexicon::lexicon::LexArrayItem::Ref(::jacquard_lexicon::lexicon::LexRef {
description: None,
r#ref: ::jacquard_common::CowStr::new_static(
"#draftEmbedRecord",
),
}),
min_length: None,
max_length: Some(1usize),
}),
);
map.insert(
::jacquard_common::deps::smol_str::SmolStr::new_static(
"embedVideos",
),
::jacquard_lexicon::lexicon::LexObjectProperty::Array(::jacquard_lexicon::lexicon::LexArray {
description: None,
items: ::jacquard_lexicon::lexicon::LexArrayItem::Ref(::jacquard_lexicon::lexicon::LexRef {
description: None,
r#ref: ::jacquard_common::CowStr::new_static(
"#draftEmbedVideo",
),
}),
min_length: None,
max_length: Some(1usize),
}),
);
map.insert(
::jacquard_common::deps::smol_str::SmolStr::new_static(
"labels",
),
::jacquard_lexicon::lexicon::LexObjectProperty::Union(::jacquard_lexicon::lexicon::LexRefUnion {
description: Some(
::jacquard_common::CowStr::new_static(
"Self-label values for this post. Effectively content warnings.",
),
),
refs: vec![
::jacquard_common::CowStr::new_static("com.atproto.label.defs#selfLabels")
],
closed: None,
}),
);
map.insert(
::jacquard_common::deps::smol_str::SmolStr::new_static(
"text",
),
::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString {
description: Some(
::jacquard_common::CowStr::new_static(
"The primary post content. It has a higher limit than post contents to allow storing a larger text that can later be refined into smaller posts.",
),
),
format: None,
default: None,
min_length: None,
max_length: Some(10000usize),
min_graphemes: None,
max_graphemes: Some(1000usize),
r#enum: None,
r#const: None,
known_values: None,
}),
);
map
},
}),
);
map.insert(
::jacquard_common::deps::smol_str::SmolStr::new_static("draftView"),
::jacquard_lexicon::lexicon::LexUserType::Object(::jacquard_lexicon::lexicon::LexObject {
description: Some(
::jacquard_common::CowStr::new_static(
"View to present drafts data to users.",
),
),
required: Some(
vec![
::jacquard_common::deps::smol_str::SmolStr::new_static("id"),
::jacquard_common::deps::smol_str::SmolStr::new_static("draft"),
::jacquard_common::deps::smol_str::SmolStr::new_static("createdAt"),
::jacquard_common::deps::smol_str::SmolStr::new_static("updatedAt")
],
),
nullable: None,
properties: {
#[allow(unused_mut)]
let mut map = ::alloc::collections::BTreeMap::new();
map.insert(
::jacquard_common::deps::smol_str::SmolStr::new_static(
"createdAt",
),
::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString {
description: Some(
::jacquard_common::CowStr::new_static(
"The time the draft was created.",
),
),
format: Some(
::jacquard_lexicon::lexicon::LexStringFormat::Datetime,
),
default: None,
min_length: None,
max_length: None,
min_graphemes: None,
max_graphemes: None,
r#enum: None,
r#const: None,
known_values: None,
}),
);
map.insert(
::jacquard_common::deps::smol_str::SmolStr::new_static(
"draft",
),
::jacquard_lexicon::lexicon::LexObjectProperty::Ref(::jacquard_lexicon::lexicon::LexRef {
description: None,
r#ref: ::jacquard_common::CowStr::new_static("#draft"),
}),
);
map.insert(
::jacquard_common::deps::smol_str::SmolStr::new_static("id"),
::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString {
description: Some(
::jacquard_common::CowStr::new_static(
"A TID to be used as a draft identifier.",
),
),
format: Some(
::jacquard_lexicon::lexicon::LexStringFormat::Tid,
),
default: None,
min_length: None,
max_length: None,
min_graphemes: None,
max_graphemes: None,
r#enum: None,
r#const: None,
known_values: None,
}),
);
map.insert(
::jacquard_common::deps::smol_str::SmolStr::new_static(
"updatedAt",
),
::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString {
description: Some(
::jacquard_common::CowStr::new_static(
"The time the draft was last updated.",
),
),
format: Some(
::jacquard_lexicon::lexicon::LexStringFormat::Datetime,
),
default: None,
min_length: None,
max_length: None,
min_graphemes: None,
max_graphemes: None,
r#enum: None,
r#const: None,
known_values: None,
}),
);
map
},
}),
);
map.insert(
::jacquard_common::deps::smol_str::SmolStr::new_static("draftWithId"),
::jacquard_lexicon::lexicon::LexUserType::Object(::jacquard_lexicon::lexicon::LexObject {
description: Some(
::jacquard_common::CowStr::new_static(
"A draft with an identifier, used to store drafts in private storage (stash).",
),
),
required: Some(
vec![
::jacquard_common::deps::smol_str::SmolStr::new_static("id"),
::jacquard_common::deps::smol_str::SmolStr::new_static("draft")
],
),
nullable: None,
properties: {
#[allow(unused_mut)]
let mut map = ::alloc::collections::BTreeMap::new();
map.insert(
::jacquard_common::deps::smol_str::SmolStr::new_static(
"draft",
),
::jacquard_lexicon::lexicon::LexObjectProperty::Ref(::jacquard_lexicon::lexicon::LexRef {
description: None,
r#ref: ::jacquard_common::CowStr::new_static("#draft"),
}),
);
map.insert(
::jacquard_common::deps::smol_str::SmolStr::new_static("id"),
::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString {
description: Some(
::jacquard_common::CowStr::new_static(
"A TID to be used as a draft identifier.",
),
),
format: Some(
::jacquard_lexicon::lexicon::LexStringFormat::Tid,
),
default: None,
min_length: None,
max_length: None,
min_graphemes: None,
max_graphemes: None,
r#enum: None,
r#const: None,
known_values: None,
}),
);
map
},
}),
);
map
},
}
}
impl<'a> ::jacquard_lexicon::schema::LexiconSchema for Draft<'a> {
fn nsid() -> &'static str {
"app.bsky.draft.defs"
}
fn def_name() -> &'static str {
"draft"
}
fn lexicon_doc() -> ::jacquard_lexicon::lexicon::LexiconDoc<'static> {
lexicon_doc_app_bsky_draft_defs()
}
fn validate(
&self,
) -> ::core::result::Result<(), ::jacquard_lexicon::validation::ConstraintError> {
if let Some(ref value) = self.device_id {
#[allow(unused_comparisons)]
if <str>::len(value.as_ref()) > 100usize {
return Err(::jacquard_lexicon::validation::ConstraintError::MaxLength {
path: ::jacquard_lexicon::validation::ValidationPath::from_field(
"device_id",
),
max: 100usize,
actual: <str>::len(value.as_ref()),
});
}
}
if let Some(ref value) = self.device_name {
#[allow(unused_comparisons)]
if <str>::len(value.as_ref()) > 100usize {
return Err(::jacquard_lexicon::validation::ConstraintError::MaxLength {
path: ::jacquard_lexicon::validation::ValidationPath::from_field(
"device_name",
),
max: 100usize,
actual: <str>::len(value.as_ref()),
});
}
}
if let Some(ref value) = self.langs {
#[allow(unused_comparisons)]
if value.len() > 3usize {
return Err(::jacquard_lexicon::validation::ConstraintError::MaxLength {
path: ::jacquard_lexicon::validation::ValidationPath::from_field(
"langs",
),
max: 3usize,
actual: value.len(),
});
}
}
if let Some(ref value) = self.postgate_embedding_rules {
#[allow(unused_comparisons)]
if value.len() > 5usize {
return Err(::jacquard_lexicon::validation::ConstraintError::MaxLength {
path: ::jacquard_lexicon::validation::ValidationPath::from_field(
"postgate_embedding_rules",
),
max: 5usize,
actual: value.len(),
});
}
}
{
let value = &self.posts;
#[allow(unused_comparisons)]
if value.len() > 100usize {
return Err(::jacquard_lexicon::validation::ConstraintError::MaxLength {
path: ::jacquard_lexicon::validation::ValidationPath::from_field(
"posts",
),
max: 100usize,
actual: value.len(),
});
}
}
{
let value = &self.posts;
#[allow(unused_comparisons)]
if value.len() < 1usize {
return Err(::jacquard_lexicon::validation::ConstraintError::MinLength {
path: ::jacquard_lexicon::validation::ValidationPath::from_field(
"posts",
),
min: 1usize,
actual: value.len(),
});
}
}
if let Some(ref value) = self.threadgate_allow {
#[allow(unused_comparisons)]
if value.len() > 5usize {
return Err(::jacquard_lexicon::validation::ConstraintError::MaxLength {
path: ::jacquard_lexicon::validation::ValidationPath::from_field(
"threadgate_allow",
),
max: 5usize,
actual: value.len(),
});
}
}
Ok(())
}
}
#[jacquard_derive::lexicon]
#[derive(
serde::Serialize,
serde::Deserialize,
Debug,
Clone,
PartialEq,
Eq,
jacquard_derive::IntoStatic
)]
#[serde(rename_all = "camelCase")]
pub struct DraftEmbedCaption<'a> {
#[serde(borrow)]
pub content: jacquard_common::CowStr<'a>,
pub lang: jacquard_common::types::string::Language,
}
pub mod draft_embed_caption_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 Lang;
type Content;
}
pub struct Empty(());
impl sealed::Sealed for Empty {}
impl State for Empty {
type Lang = Unset;
type Content = Unset;
}
pub struct SetLang<S: State = Empty>(PhantomData<fn() -> S>);
impl<S: State> sealed::Sealed for SetLang<S> {}
impl<S: State> State for SetLang<S> {
type Lang = Set<members::lang>;
type Content = S::Content;
}
pub struct SetContent<S: State = Empty>(PhantomData<fn() -> S>);
impl<S: State> sealed::Sealed for SetContent<S> {}
impl<S: State> State for SetContent<S> {
type Lang = S::Lang;
type Content = Set<members::content>;
}
#[allow(non_camel_case_types)]
pub mod members {
pub struct lang(());
pub struct content(());
}
}
pub struct DraftEmbedCaptionBuilder<'a, S: draft_embed_caption_state::State> {
_phantom_state: ::core::marker::PhantomData<fn() -> S>,
__unsafe_private_named: (
::core::option::Option<jacquard_common::CowStr<'a>>,
::core::option::Option<jacquard_common::types::string::Language>,
),
_phantom: ::core::marker::PhantomData<&'a ()>,
}
impl<'a> DraftEmbedCaption<'a> {
pub fn new() -> DraftEmbedCaptionBuilder<'a, draft_embed_caption_state::Empty> {
DraftEmbedCaptionBuilder::new()
}
}
impl<'a> DraftEmbedCaptionBuilder<'a, draft_embed_caption_state::Empty> {
pub fn new() -> Self {
DraftEmbedCaptionBuilder {
_phantom_state: ::core::marker::PhantomData,
__unsafe_private_named: (None, None),
_phantom: ::core::marker::PhantomData,
}
}
}
impl<'a, S> DraftEmbedCaptionBuilder<'a, S>
where
S: draft_embed_caption_state::State,
S::Content: draft_embed_caption_state::IsUnset,
{
pub fn content(
mut self,
value: impl Into<jacquard_common::CowStr<'a>>,
) -> DraftEmbedCaptionBuilder<'a, draft_embed_caption_state::SetContent<S>> {
self.__unsafe_private_named.0 = ::core::option::Option::Some(value.into());
DraftEmbedCaptionBuilder {
_phantom_state: ::core::marker::PhantomData,
__unsafe_private_named: self.__unsafe_private_named,
_phantom: ::core::marker::PhantomData,
}
}
}
impl<'a, S> DraftEmbedCaptionBuilder<'a, S>
where
S: draft_embed_caption_state::State,
S::Lang: draft_embed_caption_state::IsUnset,
{
pub fn lang(
mut self,
value: impl Into<jacquard_common::types::string::Language>,
) -> DraftEmbedCaptionBuilder<'a, draft_embed_caption_state::SetLang<S>> {
self.__unsafe_private_named.1 = ::core::option::Option::Some(value.into());
DraftEmbedCaptionBuilder {
_phantom_state: ::core::marker::PhantomData,
__unsafe_private_named: self.__unsafe_private_named,
_phantom: ::core::marker::PhantomData,
}
}
}
impl<'a, S> DraftEmbedCaptionBuilder<'a, S>
where
S: draft_embed_caption_state::State,
S::Lang: draft_embed_caption_state::IsSet,
S::Content: draft_embed_caption_state::IsSet,
{
pub fn build(self) -> DraftEmbedCaption<'a> {
DraftEmbedCaption {
content: self.__unsafe_private_named.0.unwrap(),
lang: self.__unsafe_private_named.1.unwrap(),
extra_data: Default::default(),
}
}
pub fn build_with_data(
self,
extra_data: std::collections::BTreeMap<
jacquard_common::deps::smol_str::SmolStr,
jacquard_common::types::value::Data<'a>,
>,
) -> DraftEmbedCaption<'a> {
DraftEmbedCaption {
content: self.__unsafe_private_named.0.unwrap(),
lang: self.__unsafe_private_named.1.unwrap(),
extra_data: Some(extra_data),
}
}
}
impl<'a> ::jacquard_lexicon::schema::LexiconSchema for DraftEmbedCaption<'a> {
fn nsid() -> &'static str {
"app.bsky.draft.defs"
}
fn def_name() -> &'static str {
"draftEmbedCaption"
}
fn lexicon_doc() -> ::jacquard_lexicon::lexicon::LexiconDoc<'static> {
lexicon_doc_app_bsky_draft_defs()
}
fn validate(
&self,
) -> ::core::result::Result<(), ::jacquard_lexicon::validation::ConstraintError> {
{
let value = &self.content;
#[allow(unused_comparisons)]
if <str>::len(value.as_ref()) > 10000usize {
return Err(::jacquard_lexicon::validation::ConstraintError::MaxLength {
path: ::jacquard_lexicon::validation::ValidationPath::from_field(
"content",
),
max: 10000usize,
actual: <str>::len(value.as_ref()),
});
}
}
Ok(())
}
}
#[jacquard_derive::lexicon]
#[derive(
serde::Serialize,
serde::Deserialize,
Debug,
Clone,
PartialEq,
Eq,
jacquard_derive::IntoStatic
)]
#[serde(rename_all = "camelCase")]
pub struct DraftEmbedExternal<'a> {
#[serde(borrow)]
pub uri: jacquard_common::types::string::UriValue<'a>,
}
pub mod draft_embed_external_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;
}
pub struct Empty(());
impl sealed::Sealed for Empty {}
impl State for Empty {
type Uri = 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>;
}
#[allow(non_camel_case_types)]
pub mod members {
pub struct uri(());
}
}
pub struct DraftEmbedExternalBuilder<'a, S: draft_embed_external_state::State> {
_phantom_state: ::core::marker::PhantomData<fn() -> S>,
__unsafe_private_named: (
::core::option::Option<jacquard_common::types::string::UriValue<'a>>,
),
_phantom: ::core::marker::PhantomData<&'a ()>,
}
impl<'a> DraftEmbedExternal<'a> {
pub fn new() -> DraftEmbedExternalBuilder<'a, draft_embed_external_state::Empty> {
DraftEmbedExternalBuilder::new()
}
}
impl<'a> DraftEmbedExternalBuilder<'a, draft_embed_external_state::Empty> {
pub fn new() -> Self {
DraftEmbedExternalBuilder {
_phantom_state: ::core::marker::PhantomData,
__unsafe_private_named: (None,),
_phantom: ::core::marker::PhantomData,
}
}
}
impl<'a, S> DraftEmbedExternalBuilder<'a, S>
where
S: draft_embed_external_state::State,
S::Uri: draft_embed_external_state::IsUnset,
{
pub fn uri(
mut self,
value: impl Into<jacquard_common::types::string::UriValue<'a>>,
) -> DraftEmbedExternalBuilder<'a, draft_embed_external_state::SetUri<S>> {
self.__unsafe_private_named.0 = ::core::option::Option::Some(value.into());
DraftEmbedExternalBuilder {
_phantom_state: ::core::marker::PhantomData,
__unsafe_private_named: self.__unsafe_private_named,
_phantom: ::core::marker::PhantomData,
}
}
}
impl<'a, S> DraftEmbedExternalBuilder<'a, S>
where
S: draft_embed_external_state::State,
S::Uri: draft_embed_external_state::IsSet,
{
pub fn build(self) -> DraftEmbedExternal<'a> {
DraftEmbedExternal {
uri: self.__unsafe_private_named.0.unwrap(),
extra_data: Default::default(),
}
}
pub fn build_with_data(
self,
extra_data: std::collections::BTreeMap<
jacquard_common::deps::smol_str::SmolStr,
jacquard_common::types::value::Data<'a>,
>,
) -> DraftEmbedExternal<'a> {
DraftEmbedExternal {
uri: self.__unsafe_private_named.0.unwrap(),
extra_data: Some(extra_data),
}
}
}
impl<'a> ::jacquard_lexicon::schema::LexiconSchema for DraftEmbedExternal<'a> {
fn nsid() -> &'static str {
"app.bsky.draft.defs"
}
fn def_name() -> &'static str {
"draftEmbedExternal"
}
fn lexicon_doc() -> ::jacquard_lexicon::lexicon::LexiconDoc<'static> {
lexicon_doc_app_bsky_draft_defs()
}
fn validate(
&self,
) -> ::core::result::Result<(), ::jacquard_lexicon::validation::ConstraintError> {
Ok(())
}
}
#[jacquard_derive::lexicon]
#[derive(
serde::Serialize,
serde::Deserialize,
Debug,
Clone,
PartialEq,
Eq,
jacquard_derive::IntoStatic
)]
#[serde(rename_all = "camelCase")]
pub struct DraftEmbedImage<'a> {
#[serde(skip_serializing_if = "std::option::Option::is_none")]
#[serde(borrow)]
pub alt: std::option::Option<jacquard_common::CowStr<'a>>,
#[serde(borrow)]
pub local_ref: crate::app_bsky::draft::DraftEmbedLocalRef<'a>,
}
pub mod draft_embed_image_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 LocalRef;
}
pub struct Empty(());
impl sealed::Sealed for Empty {}
impl State for Empty {
type LocalRef = Unset;
}
pub struct SetLocalRef<S: State = Empty>(PhantomData<fn() -> S>);
impl<S: State> sealed::Sealed for SetLocalRef<S> {}
impl<S: State> State for SetLocalRef<S> {
type LocalRef = Set<members::local_ref>;
}
#[allow(non_camel_case_types)]
pub mod members {
pub struct local_ref(());
}
}
pub struct DraftEmbedImageBuilder<'a, S: draft_embed_image_state::State> {
_phantom_state: ::core::marker::PhantomData<fn() -> S>,
__unsafe_private_named: (
::core::option::Option<jacquard_common::CowStr<'a>>,
::core::option::Option<crate::app_bsky::draft::DraftEmbedLocalRef<'a>>,
),
_phantom: ::core::marker::PhantomData<&'a ()>,
}
impl<'a> DraftEmbedImage<'a> {
pub fn new() -> DraftEmbedImageBuilder<'a, draft_embed_image_state::Empty> {
DraftEmbedImageBuilder::new()
}
}
impl<'a> DraftEmbedImageBuilder<'a, draft_embed_image_state::Empty> {
pub fn new() -> Self {
DraftEmbedImageBuilder {
_phantom_state: ::core::marker::PhantomData,
__unsafe_private_named: (None, None),
_phantom: ::core::marker::PhantomData,
}
}
}
impl<'a, S: draft_embed_image_state::State> DraftEmbedImageBuilder<'a, S> {
pub fn alt(mut self, value: impl Into<Option<jacquard_common::CowStr<'a>>>) -> Self {
self.__unsafe_private_named.0 = value.into();
self
}
pub fn maybe_alt(mut self, value: Option<jacquard_common::CowStr<'a>>) -> Self {
self.__unsafe_private_named.0 = value;
self
}
}
impl<'a, S> DraftEmbedImageBuilder<'a, S>
where
S: draft_embed_image_state::State,
S::LocalRef: draft_embed_image_state::IsUnset,
{
pub fn local_ref(
mut self,
value: impl Into<crate::app_bsky::draft::DraftEmbedLocalRef<'a>>,
) -> DraftEmbedImageBuilder<'a, draft_embed_image_state::SetLocalRef<S>> {
self.__unsafe_private_named.1 = ::core::option::Option::Some(value.into());
DraftEmbedImageBuilder {
_phantom_state: ::core::marker::PhantomData,
__unsafe_private_named: self.__unsafe_private_named,
_phantom: ::core::marker::PhantomData,
}
}
}
impl<'a, S> DraftEmbedImageBuilder<'a, S>
where
S: draft_embed_image_state::State,
S::LocalRef: draft_embed_image_state::IsSet,
{
pub fn build(self) -> DraftEmbedImage<'a> {
DraftEmbedImage {
alt: self.__unsafe_private_named.0,
local_ref: self.__unsafe_private_named.1.unwrap(),
extra_data: Default::default(),
}
}
pub fn build_with_data(
self,
extra_data: std::collections::BTreeMap<
jacquard_common::deps::smol_str::SmolStr,
jacquard_common::types::value::Data<'a>,
>,
) -> DraftEmbedImage<'a> {
DraftEmbedImage {
alt: self.__unsafe_private_named.0,
local_ref: self.__unsafe_private_named.1.unwrap(),
extra_data: Some(extra_data),
}
}
}
impl<'a> ::jacquard_lexicon::schema::LexiconSchema for DraftEmbedImage<'a> {
fn nsid() -> &'static str {
"app.bsky.draft.defs"
}
fn def_name() -> &'static str {
"draftEmbedImage"
}
fn lexicon_doc() -> ::jacquard_lexicon::lexicon::LexiconDoc<'static> {
lexicon_doc_app_bsky_draft_defs()
}
fn validate(
&self,
) -> ::core::result::Result<(), ::jacquard_lexicon::validation::ConstraintError> {
if let Some(ref value) = self.alt {
{
let count = jacquard_common::deps::codegen::unicode_segmentation::UnicodeSegmentation::graphemes(
value.as_ref(),
true,
)
.count();
if count > 2000usize {
return Err(::jacquard_lexicon::validation::ConstraintError::MaxGraphemes {
path: ::jacquard_lexicon::validation::ValidationPath::from_field(
"alt",
),
max: 2000usize,
actual: count,
});
}
}
}
Ok(())
}
}
#[jacquard_derive::lexicon]
#[derive(
serde::Serialize,
serde::Deserialize,
Debug,
Clone,
PartialEq,
Eq,
jacquard_derive::IntoStatic,
Default
)]
#[serde(rename_all = "camelCase")]
pub struct DraftEmbedLocalRef<'a> {
#[serde(borrow)]
pub path: jacquard_common::CowStr<'a>,
}
impl<'a> ::jacquard_lexicon::schema::LexiconSchema for DraftEmbedLocalRef<'a> {
fn nsid() -> &'static str {
"app.bsky.draft.defs"
}
fn def_name() -> &'static str {
"draftEmbedLocalRef"
}
fn lexicon_doc() -> ::jacquard_lexicon::lexicon::LexiconDoc<'static> {
lexicon_doc_app_bsky_draft_defs()
}
fn validate(
&self,
) -> ::core::result::Result<(), ::jacquard_lexicon::validation::ConstraintError> {
{
let value = &self.path;
#[allow(unused_comparisons)]
if <str>::len(value.as_ref()) > 1024usize {
return Err(::jacquard_lexicon::validation::ConstraintError::MaxLength {
path: ::jacquard_lexicon::validation::ValidationPath::from_field(
"path",
),
max: 1024usize,
actual: <str>::len(value.as_ref()),
});
}
}
{
let value = &self.path;
#[allow(unused_comparisons)]
if <str>::len(value.as_ref()) < 1usize {
return Err(::jacquard_lexicon::validation::ConstraintError::MinLength {
path: ::jacquard_lexicon::validation::ValidationPath::from_field(
"path",
),
min: 1usize,
actual: <str>::len(value.as_ref()),
});
}
}
Ok(())
}
}
#[jacquard_derive::lexicon]
#[derive(
serde::Serialize,
serde::Deserialize,
Debug,
Clone,
PartialEq,
Eq,
jacquard_derive::IntoStatic
)]
#[serde(rename_all = "camelCase")]
pub struct DraftEmbedRecord<'a> {
#[serde(borrow)]
pub record: crate::com_atproto::repo::strong_ref::StrongRef<'a>,
}
pub mod draft_embed_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 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 DraftEmbedRecordBuilder<'a, S: draft_embed_record_state::State> {
_phantom_state: ::core::marker::PhantomData<fn() -> S>,
__unsafe_private_named: (
::core::option::Option<crate::com_atproto::repo::strong_ref::StrongRef<'a>>,
),
_phantom: ::core::marker::PhantomData<&'a ()>,
}
impl<'a> DraftEmbedRecord<'a> {
pub fn new() -> DraftEmbedRecordBuilder<'a, draft_embed_record_state::Empty> {
DraftEmbedRecordBuilder::new()
}
}
impl<'a> DraftEmbedRecordBuilder<'a, draft_embed_record_state::Empty> {
pub fn new() -> Self {
DraftEmbedRecordBuilder {
_phantom_state: ::core::marker::PhantomData,
__unsafe_private_named: (None,),
_phantom: ::core::marker::PhantomData,
}
}
}
impl<'a, S> DraftEmbedRecordBuilder<'a, S>
where
S: draft_embed_record_state::State,
S::Record: draft_embed_record_state::IsUnset,
{
pub fn record(
mut self,
value: impl Into<crate::com_atproto::repo::strong_ref::StrongRef<'a>>,
) -> DraftEmbedRecordBuilder<'a, draft_embed_record_state::SetRecord<S>> {
self.__unsafe_private_named.0 = ::core::option::Option::Some(value.into());
DraftEmbedRecordBuilder {
_phantom_state: ::core::marker::PhantomData,
__unsafe_private_named: self.__unsafe_private_named,
_phantom: ::core::marker::PhantomData,
}
}
}
impl<'a, S> DraftEmbedRecordBuilder<'a, S>
where
S: draft_embed_record_state::State,
S::Record: draft_embed_record_state::IsSet,
{
pub fn build(self) -> DraftEmbedRecord<'a> {
DraftEmbedRecord {
record: self.__unsafe_private_named.0.unwrap(),
extra_data: Default::default(),
}
}
pub fn build_with_data(
self,
extra_data: std::collections::BTreeMap<
jacquard_common::deps::smol_str::SmolStr,
jacquard_common::types::value::Data<'a>,
>,
) -> DraftEmbedRecord<'a> {
DraftEmbedRecord {
record: self.__unsafe_private_named.0.unwrap(),
extra_data: Some(extra_data),
}
}
}
impl<'a> ::jacquard_lexicon::schema::LexiconSchema for DraftEmbedRecord<'a> {
fn nsid() -> &'static str {
"app.bsky.draft.defs"
}
fn def_name() -> &'static str {
"draftEmbedRecord"
}
fn lexicon_doc() -> ::jacquard_lexicon::lexicon::LexiconDoc<'static> {
lexicon_doc_app_bsky_draft_defs()
}
fn validate(
&self,
) -> ::core::result::Result<(), ::jacquard_lexicon::validation::ConstraintError> {
Ok(())
}
}
#[jacquard_derive::lexicon]
#[derive(
serde::Serialize,
serde::Deserialize,
Debug,
Clone,
PartialEq,
Eq,
jacquard_derive::IntoStatic
)]
#[serde(rename_all = "camelCase")]
pub struct DraftEmbedVideo<'a> {
#[serde(skip_serializing_if = "std::option::Option::is_none")]
#[serde(borrow)]
pub alt: std::option::Option<jacquard_common::CowStr<'a>>,
#[serde(skip_serializing_if = "std::option::Option::is_none")]
#[serde(borrow)]
pub captions: std::option::Option<
Vec<crate::app_bsky::draft::DraftEmbedCaption<'a>>,
>,
#[serde(borrow)]
pub local_ref: crate::app_bsky::draft::DraftEmbedLocalRef<'a>,
}
pub mod draft_embed_video_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 LocalRef;
}
pub struct Empty(());
impl sealed::Sealed for Empty {}
impl State for Empty {
type LocalRef = Unset;
}
pub struct SetLocalRef<S: State = Empty>(PhantomData<fn() -> S>);
impl<S: State> sealed::Sealed for SetLocalRef<S> {}
impl<S: State> State for SetLocalRef<S> {
type LocalRef = Set<members::local_ref>;
}
#[allow(non_camel_case_types)]
pub mod members {
pub struct local_ref(());
}
}
pub struct DraftEmbedVideoBuilder<'a, S: draft_embed_video_state::State> {
_phantom_state: ::core::marker::PhantomData<fn() -> S>,
__unsafe_private_named: (
::core::option::Option<jacquard_common::CowStr<'a>>,
::core::option::Option<Vec<crate::app_bsky::draft::DraftEmbedCaption<'a>>>,
::core::option::Option<crate::app_bsky::draft::DraftEmbedLocalRef<'a>>,
),
_phantom: ::core::marker::PhantomData<&'a ()>,
}
impl<'a> DraftEmbedVideo<'a> {
pub fn new() -> DraftEmbedVideoBuilder<'a, draft_embed_video_state::Empty> {
DraftEmbedVideoBuilder::new()
}
}
impl<'a> DraftEmbedVideoBuilder<'a, draft_embed_video_state::Empty> {
pub fn new() -> Self {
DraftEmbedVideoBuilder {
_phantom_state: ::core::marker::PhantomData,
__unsafe_private_named: (None, None, None),
_phantom: ::core::marker::PhantomData,
}
}
}
impl<'a, S: draft_embed_video_state::State> DraftEmbedVideoBuilder<'a, S> {
pub fn alt(mut self, value: impl Into<Option<jacquard_common::CowStr<'a>>>) -> Self {
self.__unsafe_private_named.0 = value.into();
self
}
pub fn maybe_alt(mut self, value: Option<jacquard_common::CowStr<'a>>) -> Self {
self.__unsafe_private_named.0 = value;
self
}
}
impl<'a, S: draft_embed_video_state::State> DraftEmbedVideoBuilder<'a, S> {
pub fn captions(
mut self,
value: impl Into<Option<Vec<crate::app_bsky::draft::DraftEmbedCaption<'a>>>>,
) -> Self {
self.__unsafe_private_named.1 = value.into();
self
}
pub fn maybe_captions(
mut self,
value: Option<Vec<crate::app_bsky::draft::DraftEmbedCaption<'a>>>,
) -> Self {
self.__unsafe_private_named.1 = value;
self
}
}
impl<'a, S> DraftEmbedVideoBuilder<'a, S>
where
S: draft_embed_video_state::State,
S::LocalRef: draft_embed_video_state::IsUnset,
{
pub fn local_ref(
mut self,
value: impl Into<crate::app_bsky::draft::DraftEmbedLocalRef<'a>>,
) -> DraftEmbedVideoBuilder<'a, draft_embed_video_state::SetLocalRef<S>> {
self.__unsafe_private_named.2 = ::core::option::Option::Some(value.into());
DraftEmbedVideoBuilder {
_phantom_state: ::core::marker::PhantomData,
__unsafe_private_named: self.__unsafe_private_named,
_phantom: ::core::marker::PhantomData,
}
}
}
impl<'a, S> DraftEmbedVideoBuilder<'a, S>
where
S: draft_embed_video_state::State,
S::LocalRef: draft_embed_video_state::IsSet,
{
pub fn build(self) -> DraftEmbedVideo<'a> {
DraftEmbedVideo {
alt: self.__unsafe_private_named.0,
captions: self.__unsafe_private_named.1,
local_ref: self.__unsafe_private_named.2.unwrap(),
extra_data: Default::default(),
}
}
pub fn build_with_data(
self,
extra_data: std::collections::BTreeMap<
jacquard_common::deps::smol_str::SmolStr,
jacquard_common::types::value::Data<'a>,
>,
) -> DraftEmbedVideo<'a> {
DraftEmbedVideo {
alt: self.__unsafe_private_named.0,
captions: self.__unsafe_private_named.1,
local_ref: self.__unsafe_private_named.2.unwrap(),
extra_data: Some(extra_data),
}
}
}
impl<'a> ::jacquard_lexicon::schema::LexiconSchema for DraftEmbedVideo<'a> {
fn nsid() -> &'static str {
"app.bsky.draft.defs"
}
fn def_name() -> &'static str {
"draftEmbedVideo"
}
fn lexicon_doc() -> ::jacquard_lexicon::lexicon::LexiconDoc<'static> {
lexicon_doc_app_bsky_draft_defs()
}
fn validate(
&self,
) -> ::core::result::Result<(), ::jacquard_lexicon::validation::ConstraintError> {
if let Some(ref value) = self.alt {
{
let count = jacquard_common::deps::codegen::unicode_segmentation::UnicodeSegmentation::graphemes(
value.as_ref(),
true,
)
.count();
if count > 2000usize {
return Err(::jacquard_lexicon::validation::ConstraintError::MaxGraphemes {
path: ::jacquard_lexicon::validation::ValidationPath::from_field(
"alt",
),
max: 2000usize,
actual: count,
});
}
}
}
if let Some(ref value) = self.captions {
#[allow(unused_comparisons)]
if value.len() > 20usize {
return Err(::jacquard_lexicon::validation::ConstraintError::MaxLength {
path: ::jacquard_lexicon::validation::ValidationPath::from_field(
"captions",
),
max: 20usize,
actual: value.len(),
});
}
}
Ok(())
}
}
#[jacquard_derive::lexicon]
#[derive(
serde::Serialize,
serde::Deserialize,
Debug,
Clone,
PartialEq,
Eq,
jacquard_derive::IntoStatic,
Default
)]
#[serde(rename_all = "camelCase")]
pub struct DraftPost<'a> {
#[serde(skip_serializing_if = "std::option::Option::is_none")]
#[serde(borrow)]
pub embed_externals: std::option::Option<
Vec<crate::app_bsky::draft::DraftEmbedExternal<'a>>,
>,
#[serde(skip_serializing_if = "std::option::Option::is_none")]
#[serde(borrow)]
pub embed_images: std::option::Option<
Vec<crate::app_bsky::draft::DraftEmbedImage<'a>>,
>,
#[serde(skip_serializing_if = "std::option::Option::is_none")]
#[serde(borrow)]
pub embed_records: std::option::Option<
Vec<crate::app_bsky::draft::DraftEmbedRecord<'a>>,
>,
#[serde(skip_serializing_if = "std::option::Option::is_none")]
#[serde(borrow)]
pub embed_videos: std::option::Option<
Vec<crate::app_bsky::draft::DraftEmbedVideo<'a>>,
>,
#[serde(skip_serializing_if = "std::option::Option::is_none")]
#[serde(borrow)]
pub labels: std::option::Option<crate::com_atproto::label::SelfLabels<'a>>,
#[serde(borrow)]
pub text: jacquard_common::CowStr<'a>,
}
impl<'a> ::jacquard_lexicon::schema::LexiconSchema for DraftPost<'a> {
fn nsid() -> &'static str {
"app.bsky.draft.defs"
}
fn def_name() -> &'static str {
"draftPost"
}
fn lexicon_doc() -> ::jacquard_lexicon::lexicon::LexiconDoc<'static> {
lexicon_doc_app_bsky_draft_defs()
}
fn validate(
&self,
) -> ::core::result::Result<(), ::jacquard_lexicon::validation::ConstraintError> {
if let Some(ref value) = self.embed_externals {
#[allow(unused_comparisons)]
if value.len() > 1usize {
return Err(::jacquard_lexicon::validation::ConstraintError::MaxLength {
path: ::jacquard_lexicon::validation::ValidationPath::from_field(
"embed_externals",
),
max: 1usize,
actual: value.len(),
});
}
}
if let Some(ref value) = self.embed_images {
#[allow(unused_comparisons)]
if value.len() > 4usize {
return Err(::jacquard_lexicon::validation::ConstraintError::MaxLength {
path: ::jacquard_lexicon::validation::ValidationPath::from_field(
"embed_images",
),
max: 4usize,
actual: value.len(),
});
}
}
if let Some(ref value) = self.embed_records {
#[allow(unused_comparisons)]
if value.len() > 1usize {
return Err(::jacquard_lexicon::validation::ConstraintError::MaxLength {
path: ::jacquard_lexicon::validation::ValidationPath::from_field(
"embed_records",
),
max: 1usize,
actual: value.len(),
});
}
}
if let Some(ref value) = self.embed_videos {
#[allow(unused_comparisons)]
if value.len() > 1usize {
return Err(::jacquard_lexicon::validation::ConstraintError::MaxLength {
path: ::jacquard_lexicon::validation::ValidationPath::from_field(
"embed_videos",
),
max: 1usize,
actual: value.len(),
});
}
}
{
let value = &self.text;
#[allow(unused_comparisons)]
if <str>::len(value.as_ref()) > 10000usize {
return Err(::jacquard_lexicon::validation::ConstraintError::MaxLength {
path: ::jacquard_lexicon::validation::ValidationPath::from_field(
"text",
),
max: 10000usize,
actual: <str>::len(value.as_ref()),
});
}
}
{
let value = &self.text;
{
let count = jacquard_common::deps::codegen::unicode_segmentation::UnicodeSegmentation::graphemes(
value.as_ref(),
true,
)
.count();
if count > 1000usize {
return Err(::jacquard_lexicon::validation::ConstraintError::MaxGraphemes {
path: ::jacquard_lexicon::validation::ValidationPath::from_field(
"text",
),
max: 1000usize,
actual: count,
});
}
}
}
Ok(())
}
}
#[jacquard_derive::lexicon]
#[derive(
serde::Serialize,
serde::Deserialize,
Debug,
Clone,
PartialEq,
Eq,
jacquard_derive::IntoStatic
)]
#[serde(rename_all = "camelCase")]
pub struct DraftView<'a> {
pub created_at: jacquard_common::types::string::Datetime,
#[serde(borrow)]
pub draft: crate::app_bsky::draft::Draft<'a>,
pub id: jacquard_common::types::string::Tid,
pub updated_at: jacquard_common::types::string::Datetime,
}
pub mod draft_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 Id;
type UpdatedAt;
type Draft;
type CreatedAt;
}
pub struct Empty(());
impl sealed::Sealed for Empty {}
impl State for Empty {
type Id = Unset;
type UpdatedAt = Unset;
type Draft = Unset;
type CreatedAt = Unset;
}
pub struct SetId<S: State = Empty>(PhantomData<fn() -> S>);
impl<S: State> sealed::Sealed for SetId<S> {}
impl<S: State> State for SetId<S> {
type Id = Set<members::id>;
type UpdatedAt = S::UpdatedAt;
type Draft = S::Draft;
type CreatedAt = S::CreatedAt;
}
pub struct SetUpdatedAt<S: State = Empty>(PhantomData<fn() -> S>);
impl<S: State> sealed::Sealed for SetUpdatedAt<S> {}
impl<S: State> State for SetUpdatedAt<S> {
type Id = S::Id;
type UpdatedAt = Set<members::updated_at>;
type Draft = S::Draft;
type CreatedAt = S::CreatedAt;
}
pub struct SetDraft<S: State = Empty>(PhantomData<fn() -> S>);
impl<S: State> sealed::Sealed for SetDraft<S> {}
impl<S: State> State for SetDraft<S> {
type Id = S::Id;
type UpdatedAt = S::UpdatedAt;
type Draft = Set<members::draft>;
type CreatedAt = S::CreatedAt;
}
pub struct SetCreatedAt<S: State = Empty>(PhantomData<fn() -> S>);
impl<S: State> sealed::Sealed for SetCreatedAt<S> {}
impl<S: State> State for SetCreatedAt<S> {
type Id = S::Id;
type UpdatedAt = S::UpdatedAt;
type Draft = S::Draft;
type CreatedAt = Set<members::created_at>;
}
#[allow(non_camel_case_types)]
pub mod members {
pub struct id(());
pub struct updated_at(());
pub struct draft(());
pub struct created_at(());
}
}
pub struct DraftViewBuilder<'a, S: draft_view_state::State> {
_phantom_state: ::core::marker::PhantomData<fn() -> S>,
__unsafe_private_named: (
::core::option::Option<jacquard_common::types::string::Datetime>,
::core::option::Option<crate::app_bsky::draft::Draft<'a>>,
::core::option::Option<jacquard_common::types::string::Tid>,
::core::option::Option<jacquard_common::types::string::Datetime>,
),
_phantom: ::core::marker::PhantomData<&'a ()>,
}
impl<'a> DraftView<'a> {
pub fn new() -> DraftViewBuilder<'a, draft_view_state::Empty> {
DraftViewBuilder::new()
}
}
impl<'a> DraftViewBuilder<'a, draft_view_state::Empty> {
pub fn new() -> Self {
DraftViewBuilder {
_phantom_state: ::core::marker::PhantomData,
__unsafe_private_named: (None, None, None, None),
_phantom: ::core::marker::PhantomData,
}
}
}
impl<'a, S> DraftViewBuilder<'a, S>
where
S: draft_view_state::State,
S::CreatedAt: draft_view_state::IsUnset,
{
pub fn created_at(
mut self,
value: impl Into<jacquard_common::types::string::Datetime>,
) -> DraftViewBuilder<'a, draft_view_state::SetCreatedAt<S>> {
self.__unsafe_private_named.0 = ::core::option::Option::Some(value.into());
DraftViewBuilder {
_phantom_state: ::core::marker::PhantomData,
__unsafe_private_named: self.__unsafe_private_named,
_phantom: ::core::marker::PhantomData,
}
}
}
impl<'a, S> DraftViewBuilder<'a, S>
where
S: draft_view_state::State,
S::Draft: draft_view_state::IsUnset,
{
pub fn draft(
mut self,
value: impl Into<crate::app_bsky::draft::Draft<'a>>,
) -> DraftViewBuilder<'a, draft_view_state::SetDraft<S>> {
self.__unsafe_private_named.1 = ::core::option::Option::Some(value.into());
DraftViewBuilder {
_phantom_state: ::core::marker::PhantomData,
__unsafe_private_named: self.__unsafe_private_named,
_phantom: ::core::marker::PhantomData,
}
}
}
impl<'a, S> DraftViewBuilder<'a, S>
where
S: draft_view_state::State,
S::Id: draft_view_state::IsUnset,
{
pub fn id(
mut self,
value: impl Into<jacquard_common::types::string::Tid>,
) -> DraftViewBuilder<'a, draft_view_state::SetId<S>> {
self.__unsafe_private_named.2 = ::core::option::Option::Some(value.into());
DraftViewBuilder {
_phantom_state: ::core::marker::PhantomData,
__unsafe_private_named: self.__unsafe_private_named,
_phantom: ::core::marker::PhantomData,
}
}
}
impl<'a, S> DraftViewBuilder<'a, S>
where
S: draft_view_state::State,
S::UpdatedAt: draft_view_state::IsUnset,
{
pub fn updated_at(
mut self,
value: impl Into<jacquard_common::types::string::Datetime>,
) -> DraftViewBuilder<'a, draft_view_state::SetUpdatedAt<S>> {
self.__unsafe_private_named.3 = ::core::option::Option::Some(value.into());
DraftViewBuilder {
_phantom_state: ::core::marker::PhantomData,
__unsafe_private_named: self.__unsafe_private_named,
_phantom: ::core::marker::PhantomData,
}
}
}
impl<'a, S> DraftViewBuilder<'a, S>
where
S: draft_view_state::State,
S::Id: draft_view_state::IsSet,
S::UpdatedAt: draft_view_state::IsSet,
S::Draft: draft_view_state::IsSet,
S::CreatedAt: draft_view_state::IsSet,
{
pub fn build(self) -> DraftView<'a> {
DraftView {
created_at: self.__unsafe_private_named.0.unwrap(),
draft: self.__unsafe_private_named.1.unwrap(),
id: self.__unsafe_private_named.2.unwrap(),
updated_at: self.__unsafe_private_named.3.unwrap(),
extra_data: Default::default(),
}
}
pub fn build_with_data(
self,
extra_data: std::collections::BTreeMap<
jacquard_common::deps::smol_str::SmolStr,
jacquard_common::types::value::Data<'a>,
>,
) -> DraftView<'a> {
DraftView {
created_at: self.__unsafe_private_named.0.unwrap(),
draft: self.__unsafe_private_named.1.unwrap(),
id: self.__unsafe_private_named.2.unwrap(),
updated_at: self.__unsafe_private_named.3.unwrap(),
extra_data: Some(extra_data),
}
}
}
impl<'a> ::jacquard_lexicon::schema::LexiconSchema for DraftView<'a> {
fn nsid() -> &'static str {
"app.bsky.draft.defs"
}
fn def_name() -> &'static str {
"draftView"
}
fn lexicon_doc() -> ::jacquard_lexicon::lexicon::LexiconDoc<'static> {
lexicon_doc_app_bsky_draft_defs()
}
fn validate(
&self,
) -> ::core::result::Result<(), ::jacquard_lexicon::validation::ConstraintError> {
Ok(())
}
}
#[jacquard_derive::lexicon]
#[derive(
serde::Serialize,
serde::Deserialize,
Debug,
Clone,
PartialEq,
Eq,
jacquard_derive::IntoStatic
)]
#[serde(rename_all = "camelCase")]
pub struct DraftWithId<'a> {
#[serde(borrow)]
pub draft: crate::app_bsky::draft::Draft<'a>,
pub id: jacquard_common::types::string::Tid,
}
pub mod draft_with_id_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 Id;
type Draft;
}
pub struct Empty(());
impl sealed::Sealed for Empty {}
impl State for Empty {
type Id = Unset;
type Draft = Unset;
}
pub struct SetId<S: State = Empty>(PhantomData<fn() -> S>);
impl<S: State> sealed::Sealed for SetId<S> {}
impl<S: State> State for SetId<S> {
type Id = Set<members::id>;
type Draft = S::Draft;
}
pub struct SetDraft<S: State = Empty>(PhantomData<fn() -> S>);
impl<S: State> sealed::Sealed for SetDraft<S> {}
impl<S: State> State for SetDraft<S> {
type Id = S::Id;
type Draft = Set<members::draft>;
}
#[allow(non_camel_case_types)]
pub mod members {
pub struct id(());
pub struct draft(());
}
}
pub struct DraftWithIdBuilder<'a, S: draft_with_id_state::State> {
_phantom_state: ::core::marker::PhantomData<fn() -> S>,
__unsafe_private_named: (
::core::option::Option<crate::app_bsky::draft::Draft<'a>>,
::core::option::Option<jacquard_common::types::string::Tid>,
),
_phantom: ::core::marker::PhantomData<&'a ()>,
}
impl<'a> DraftWithId<'a> {
pub fn new() -> DraftWithIdBuilder<'a, draft_with_id_state::Empty> {
DraftWithIdBuilder::new()
}
}
impl<'a> DraftWithIdBuilder<'a, draft_with_id_state::Empty> {
pub fn new() -> Self {
DraftWithIdBuilder {
_phantom_state: ::core::marker::PhantomData,
__unsafe_private_named: (None, None),
_phantom: ::core::marker::PhantomData,
}
}
}
impl<'a, S> DraftWithIdBuilder<'a, S>
where
S: draft_with_id_state::State,
S::Draft: draft_with_id_state::IsUnset,
{
pub fn draft(
mut self,
value: impl Into<crate::app_bsky::draft::Draft<'a>>,
) -> DraftWithIdBuilder<'a, draft_with_id_state::SetDraft<S>> {
self.__unsafe_private_named.0 = ::core::option::Option::Some(value.into());
DraftWithIdBuilder {
_phantom_state: ::core::marker::PhantomData,
__unsafe_private_named: self.__unsafe_private_named,
_phantom: ::core::marker::PhantomData,
}
}
}
impl<'a, S> DraftWithIdBuilder<'a, S>
where
S: draft_with_id_state::State,
S::Id: draft_with_id_state::IsUnset,
{
pub fn id(
mut self,
value: impl Into<jacquard_common::types::string::Tid>,
) -> DraftWithIdBuilder<'a, draft_with_id_state::SetId<S>> {
self.__unsafe_private_named.1 = ::core::option::Option::Some(value.into());
DraftWithIdBuilder {
_phantom_state: ::core::marker::PhantomData,
__unsafe_private_named: self.__unsafe_private_named,
_phantom: ::core::marker::PhantomData,
}
}
}
impl<'a, S> DraftWithIdBuilder<'a, S>
where
S: draft_with_id_state::State,
S::Id: draft_with_id_state::IsSet,
S::Draft: draft_with_id_state::IsSet,
{
pub fn build(self) -> DraftWithId<'a> {
DraftWithId {
draft: self.__unsafe_private_named.0.unwrap(),
id: self.__unsafe_private_named.1.unwrap(),
extra_data: Default::default(),
}
}
pub fn build_with_data(
self,
extra_data: std::collections::BTreeMap<
jacquard_common::deps::smol_str::SmolStr,
jacquard_common::types::value::Data<'a>,
>,
) -> DraftWithId<'a> {
DraftWithId {
draft: self.__unsafe_private_named.0.unwrap(),
id: self.__unsafe_private_named.1.unwrap(),
extra_data: Some(extra_data),
}
}
}
impl<'a> ::jacquard_lexicon::schema::LexiconSchema for DraftWithId<'a> {
fn nsid() -> &'static str {
"app.bsky.draft.defs"
}
fn def_name() -> &'static str {
"draftWithId"
}
fn lexicon_doc() -> ::jacquard_lexicon::lexicon::LexiconDoc<'static> {
lexicon_doc_app_bsky_draft_defs()
}
fn validate(
&self,
) -> ::core::result::Result<(), ::jacquard_lexicon::validation::ConstraintError> {
Ok(())
}
}