A better Rust ATProto crate
at main 4.7 kB view raw
1// @generated by jacquard-lexicon. DO NOT EDIT. 2// 3// Lexicon: app.bsky.labeler.defs 4// 5// This file was automatically generated from Lexicon schemas. 6// Any manual changes will be overwritten on the next regeneration. 7 8pub mod get_services; 9pub mod service; 10 11#[jacquard_derive::lexicon] 12#[derive( 13 serde::Serialize, 14 serde::Deserialize, 15 Debug, 16 Clone, 17 PartialEq, 18 Eq, 19 jacquard_derive::IntoStatic, 20 bon::Builder 21)] 22#[serde(rename_all = "camelCase")] 23pub struct LabelerPolicies<'a> { 24 /// Label values created by this labeler and scoped exclusively to it. Labels defined here will override global label definitions for this labeler. 25 #[serde(skip_serializing_if = "std::option::Option::is_none")] 26 #[builder(into)] 27 #[serde(borrow)] 28 pub label_value_definitions: Option< 29 Vec<crate::com_atproto::label::LabelValueDefinition<'a>>, 30 >, 31 /// The label values which this labeler publishes. May include global or custom labels. 32 #[serde(borrow)] 33 pub label_values: Vec<crate::com_atproto::label::LabelValue<'a>>, 34} 35 36#[jacquard_derive::lexicon] 37#[derive( 38 serde::Serialize, 39 serde::Deserialize, 40 Debug, 41 Clone, 42 PartialEq, 43 Eq, 44 jacquard_derive::IntoStatic, 45 bon::Builder 46)] 47#[serde(rename_all = "camelCase")] 48pub struct LabelerView<'a> { 49 #[serde(borrow)] 50 pub cid: jacquard_common::types::string::Cid<'a>, 51 #[serde(borrow)] 52 pub creator: crate::app_bsky::actor::ProfileView<'a>, 53 pub indexed_at: jacquard_common::types::string::Datetime, 54 #[serde(skip_serializing_if = "std::option::Option::is_none")] 55 #[builder(into)] 56 #[serde(borrow)] 57 pub labels: Option<Vec<crate::com_atproto::label::Label<'a>>>, 58 #[serde(skip_serializing_if = "std::option::Option::is_none")] 59 #[builder(into)] 60 pub like_count: Option<i64>, 61 #[serde(borrow)] 62 pub uri: jacquard_common::types::string::AtUri<'a>, 63 #[serde(skip_serializing_if = "std::option::Option::is_none")] 64 #[builder(into)] 65 #[serde(borrow)] 66 pub viewer: Option<crate::app_bsky::labeler::LabelerViewerState<'a>>, 67} 68 69#[jacquard_derive::lexicon] 70#[derive( 71 serde::Serialize, 72 serde::Deserialize, 73 Debug, 74 Clone, 75 PartialEq, 76 Eq, 77 jacquard_derive::IntoStatic, 78 bon::Builder 79)] 80#[serde(rename_all = "camelCase")] 81pub struct LabelerViewDetailed<'a> { 82 #[serde(borrow)] 83 pub cid: jacquard_common::types::string::Cid<'a>, 84 #[serde(borrow)] 85 pub creator: crate::app_bsky::actor::ProfileView<'a>, 86 pub indexed_at: jacquard_common::types::string::Datetime, 87 #[serde(skip_serializing_if = "std::option::Option::is_none")] 88 #[builder(into)] 89 #[serde(borrow)] 90 pub labels: Option<Vec<crate::com_atproto::label::Label<'a>>>, 91 #[serde(skip_serializing_if = "std::option::Option::is_none")] 92 #[builder(into)] 93 pub like_count: Option<i64>, 94 #[serde(borrow)] 95 pub policies: crate::app_bsky::labeler::LabelerPolicies<'a>, 96 /// The set of report reason 'codes' which are in-scope for this service to review and action. These usually align to policy categories. If not defined (distinct from empty array), all reason types are allowed. 97 #[serde(skip_serializing_if = "std::option::Option::is_none")] 98 #[builder(into)] 99 #[serde(borrow)] 100 pub reason_types: Option<Vec<crate::com_atproto::moderation::ReasonType<'a>>>, 101 /// Set of record types (collection NSIDs) which can be reported to this service. If not defined (distinct from empty array), default is any record type. 102 #[serde(skip_serializing_if = "std::option::Option::is_none")] 103 #[builder(into)] 104 #[serde(borrow)] 105 pub subject_collections: Option<Vec<jacquard_common::types::string::Nsid<'a>>>, 106 /// The set of subject types (account, record, etc) this service accepts reports on. 107 #[serde(skip_serializing_if = "std::option::Option::is_none")] 108 #[builder(into)] 109 #[serde(borrow)] 110 pub subject_types: Option<Vec<crate::com_atproto::moderation::SubjectType<'a>>>, 111 #[serde(borrow)] 112 pub uri: jacquard_common::types::string::AtUri<'a>, 113 #[serde(skip_serializing_if = "std::option::Option::is_none")] 114 #[builder(into)] 115 #[serde(borrow)] 116 pub viewer: Option<crate::app_bsky::labeler::LabelerViewerState<'a>>, 117} 118 119#[jacquard_derive::lexicon] 120#[derive( 121 serde::Serialize, 122 serde::Deserialize, 123 Debug, 124 Clone, 125 PartialEq, 126 Eq, 127 jacquard_derive::IntoStatic, 128 Default 129)] 130#[serde(rename_all = "camelCase")] 131pub struct LabelerViewerState<'a> { 132 #[serde(skip_serializing_if = "std::option::Option::is_none")] 133 #[serde(borrow)] 134 pub like: std::option::Option<jacquard_common::types::string::AtUri<'a>>, 135}