// @generated by jacquard-lexicon. DO NOT EDIT. // // Lexicon: app.bsky.feed.postgate // // This file was automatically generated from Lexicon schemas. // Any manual changes will be overwritten on the next regeneration. /// Disables embedding of this post. #[jacquard_derive::lexicon] #[derive( serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq, jacquard_derive::IntoStatic, Default )] #[serde(rename_all = "camelCase")] pub struct DisableRule<'a> {} /// Record defining interaction rules for a post. The record key (rkey) of the postgate record must match the record key of the post, and that record must be in the same repository. #[jacquard_derive::lexicon] #[derive( serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq, jacquard_derive::IntoStatic, bon::Builder )] #[serde(rename_all = "camelCase")] pub struct Postgate<'a> { pub created_at: jacquard_common::types::string::Datetime, /// List of AT-URIs embedding this post that the author has detached from. #[serde(skip_serializing_if = "std::option::Option::is_none")] #[builder(into)] #[serde(borrow)] pub detached_embedding_uris: Option>>, /// List of rules defining who can embed this post. If value is an empty array or is undefined, no particular rules apply and anyone can embed. #[serde(skip_serializing_if = "std::option::Option::is_none")] #[builder(into)] #[serde(borrow)] pub embedding_rules: Option>>, /// Reference (AT-URI) to the post record. #[serde(borrow)] pub post: jacquard_common::types::string::AtUri<'a>, } /// Typed wrapper for GetRecord response with this collection's record type. #[derive( serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq, jacquard_derive::IntoStatic )] #[serde(rename_all = "camelCase")] pub struct PostgateGetRecordOutput<'a> { #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub cid: std::option::Option>, #[serde(borrow)] pub uri: jacquard_common::types::string::AtUri<'a>, #[serde(borrow)] pub value: Postgate<'a>, } /// Marker type for deserializing records from this collection. pub struct PostgateRecord; impl jacquard_common::xrpc::XrpcResp for PostgateRecord { const NSID: &'static str = "app.bsky.feed.postgate"; const ENCODING: &'static str = "application/json"; type Output<'de> = PostgateGetRecordOutput<'de>; type Err<'de> = jacquard_common::types::collection::RecordError<'de>; } impl jacquard_common::types::collection::Collection for Postgate<'_> { const NSID: &'static str = "app.bsky.feed.postgate"; type Record = PostgateRecord; } impl From> for Postgate<'_> { fn from(output: PostgateGetRecordOutput<'_>) -> Self { use jacquard_common::IntoStatic; output.value.into_static() } }