proto_blue_api/generated/app/bsky/feed/
threadgate.rs1#![allow(clippy::pedantic, clippy::nursery, clippy::all)]
4
5use serde::{Deserialize, Serialize};
6
7#[derive(Debug, Clone, Serialize, Deserialize)]
9#[serde(rename_all = "camelCase")]
10pub struct FollowerRule {}
11
12#[derive(Debug, Clone, Serialize, Deserialize)]
14#[serde(rename_all = "camelCase")]
15pub struct FollowingRule {}
16
17#[derive(Debug, Clone, Serialize, Deserialize)]
19#[serde(rename_all = "camelCase")]
20pub struct ListRule {
21 pub list: proto_blue_syntax::AtUri,
22}
23
24#[derive(Debug, Clone, Serialize, Deserialize)]
25#[serde(tag = "$type")]
26pub enum MainAllowItemRefs {
27 #[serde(rename = "app.bsky.feed.threadgate#mentionRule")]
28 BskyFeedThreadgateMentionRule(Box<MentionRule>),
29 #[serde(rename = "app.bsky.feed.threadgate#followerRule")]
30 BskyFeedThreadgateFollowerRule(Box<FollowerRule>),
31 #[serde(rename = "app.bsky.feed.threadgate#followingRule")]
32 BskyFeedThreadgateFollowingRule(Box<FollowingRule>),
33 #[serde(rename = "app.bsky.feed.threadgate#listRule")]
34 BskyFeedThreadgateListRule(Box<ListRule>),
35 #[serde(other)]
36 Other,
37}
38
39pub const TYPE: &str = "app.bsky.feed.threadgate";
41
42#[derive(Debug, Clone, Serialize, Deserialize)]
43#[serde(rename_all = "camelCase")]
44pub struct Main {
45 #[serde(rename = "$type", default = "default_type")]
47 pub r#type: String,
48 #[serde(skip_serializing_if = "Option::is_none")]
49 pub allow: Option<Vec<MainAllowItemRefs>>,
50 pub created_at: proto_blue_syntax::Datetime,
51 #[serde(skip_serializing_if = "Option::is_none")]
52 pub hidden_replies: Option<Vec<proto_blue_syntax::AtUri>>,
53 pub post: proto_blue_syntax::AtUri,
54}
55
56fn default_type() -> String {
57 TYPE.to_string()
58}
59
60#[derive(Debug, Clone, Serialize, Deserialize)]
62#[serde(rename_all = "camelCase")]
63pub struct MentionRule {}