1// @generated by jacquard-lexicon. DO NOT EDIT.
2//
3// Lexicon: app.bsky.feed.threadgate
4//
5// This file was automatically generated from Lexicon schemas.
6// Any manual changes will be overwritten on the next regeneration.
7
8///Allow replies from actors who follow you.
9#[jacquard_derive::lexicon]
10#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
11#[serde(rename_all = "camelCase")]
12pub struct FollowerRule<'a> {}
13impl jacquard_common::IntoStatic for FollowerRule<'_> {
14 type Output = FollowerRule<'static>;
15 fn into_static(self) -> Self::Output {
16 FollowerRule {
17 extra_data: self.extra_data.into_static(),
18 }
19 }
20}
21
22///Allow replies from actors you follow.
23#[jacquard_derive::lexicon]
24#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
25#[serde(rename_all = "camelCase")]
26pub struct FollowingRule<'a> {}
27impl jacquard_common::IntoStatic for FollowingRule<'_> {
28 type Output = FollowingRule<'static>;
29 fn into_static(self) -> Self::Output {
30 FollowingRule {
31 extra_data: self.extra_data.into_static(),
32 }
33 }
34}
35
36///Allow replies from actors on a list.
37#[jacquard_derive::lexicon]
38#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
39#[serde(rename_all = "camelCase")]
40pub struct ListRule<'a> {
41 #[serde(borrow)]
42 pub list: jacquard_common::types::string::AtUri<'a>,
43}
44
45impl jacquard_common::IntoStatic for ListRule<'_> {
46 type Output = ListRule<'static>;
47 fn into_static(self) -> Self::Output {
48 ListRule {
49 list: self.list.into_static(),
50 extra_data: self.extra_data.into_static(),
51 }
52 }
53}
54
55///Record defining interaction gating rules for a thread (aka, reply controls). The record key (rkey) of the threadgate record must match the record key of the thread's root post, and that record must be in the same repository.
56#[jacquard_derive::lexicon]
57#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
58#[serde(rename_all = "camelCase")]
59pub struct Threadgate<'a> {
60 ///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.
61 #[serde(skip_serializing_if = "std::option::Option::is_none")]
62 #[serde(borrow)]
63 pub allow: std::option::Option<Vec<jacquard_common::types::value::Data<'a>>>,
64 pub created_at: jacquard_common::types::string::Datetime,
65 ///List of hidden reply URIs.
66 #[serde(skip_serializing_if = "std::option::Option::is_none")]
67 #[serde(borrow)]
68 pub hidden_replies: std::option::Option<
69 Vec<jacquard_common::types::string::AtUri<'a>>,
70 >,
71 ///Reference (AT-URI) to the post record.
72 #[serde(borrow)]
73 pub post: jacquard_common::types::string::AtUri<'a>,
74}
75
76impl jacquard_common::types::collection::Collection for Threadgate<'_> {
77 const NSID: &'static str = "app.bsky.feed.threadgate";
78}
79
80impl jacquard_common::IntoStatic for Threadgate<'_> {
81 type Output = Threadgate<'static>;
82 fn into_static(self) -> Self::Output {
83 Threadgate {
84 allow: self.allow.into_static(),
85 created_at: self.created_at.into_static(),
86 hidden_replies: self.hidden_replies.into_static(),
87 post: self.post.into_static(),
88 extra_data: self.extra_data.into_static(),
89 }
90 }
91}
92
93///Allow replies from actors mentioned in your post.
94#[jacquard_derive::lexicon]
95#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
96#[serde(rename_all = "camelCase")]
97pub struct MentionRule<'a> {}
98impl jacquard_common::IntoStatic for MentionRule<'_> {
99 type Output = MentionRule<'static>;
100 fn into_static(self) -> Self::Output {
101 MentionRule {
102 extra_data: self.extra_data.into_static(),
103 }
104 }
105}