atrium_api/app/bsky/feed/
threadgate.rs

1// @generated - This file is generated by atrium-codegen. DO NOT EDIT.
2//!Definitions for the `app.bsky.feed.threadgate` namespace.
3#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
4#[serde(rename_all = "camelCase")]
5pub struct RecordData {
6    ///List of rules defining who can reply to this post. If value is an empty array, no one can reply. If value is undefined, anyone can reply.
7    #[serde(skip_serializing_if = "core::option::Option::is_none")]
8    pub allow: core::option::Option<Vec<crate::types::Union<RecordAllowItem>>>,
9    pub created_at: crate::types::string::Datetime,
10    ///List of hidden reply URIs.
11    #[serde(skip_serializing_if = "core::option::Option::is_none")]
12    pub hidden_replies: core::option::Option<Vec<String>>,
13    ///Reference (AT-URI) to the post record.
14    pub post: String,
15}
16pub type Record = crate::types::Object<RecordData>;
17///Allow replies from actors who follow you.
18#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
19#[serde(rename_all = "camelCase")]
20pub struct FollowerRuleData {}
21pub type FollowerRule = crate::types::Object<FollowerRuleData>;
22///Allow replies from actors you follow.
23#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
24#[serde(rename_all = "camelCase")]
25pub struct FollowingRuleData {}
26pub type FollowingRule = crate::types::Object<FollowingRuleData>;
27///Allow replies from actors on a list.
28#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
29#[serde(rename_all = "camelCase")]
30pub struct ListRuleData {
31    pub list: String,
32}
33pub type ListRule = crate::types::Object<ListRuleData>;
34///Allow replies from actors mentioned in your post.
35#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
36#[serde(rename_all = "camelCase")]
37pub struct MentionRuleData {}
38pub type MentionRule = crate::types::Object<MentionRuleData>;
39#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
40#[serde(tag = "$type")]
41pub enum RecordAllowItem {
42    #[serde(rename = "app.bsky.feed.threadgate#mentionRule")]
43    MentionRule(Box<MentionRule>),
44    #[serde(rename = "app.bsky.feed.threadgate#followerRule")]
45    FollowerRule(Box<FollowerRule>),
46    #[serde(rename = "app.bsky.feed.threadgate#followingRule")]
47    FollowingRule(Box<FollowingRule>),
48    #[serde(rename = "app.bsky.feed.threadgate#listRule")]
49    ListRule(Box<ListRule>),
50}