A better Rust ATProto crate
at lifetimes 4.6 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)] 21#[serde(rename_all = "camelCase")] 22pub struct LabelerPolicies<'a> { 23 ///Label values created by this labeler and scoped exclusively to it. Labels defined here will override global label definitions for this labeler. 24 #[serde(skip_serializing_if = "std::option::Option::is_none")] 25 #[serde(borrow)] 26 pub label_value_definitions: std::option::Option< 27 Vec<crate::com_atproto::label::LabelValueDefinition<'a>>, 28 >, 29 ///The label values which this labeler publishes. May include global or custom labels. 30 #[serde(borrow)] 31 pub label_values: Vec<crate::com_atproto::label::LabelValue<'a>>, 32} 33 34#[jacquard_derive::lexicon] 35#[derive( 36 serde::Serialize, 37 serde::Deserialize, 38 Debug, 39 Clone, 40 PartialEq, 41 Eq, 42 jacquard_derive::IntoStatic 43)] 44#[serde(rename_all = "camelCase")] 45pub struct LabelerView<'a> { 46 #[serde(borrow)] 47 pub cid: jacquard_common::types::string::Cid<'a>, 48 #[serde(borrow)] 49 pub creator: crate::app_bsky::actor::ProfileView<'a>, 50 pub indexed_at: jacquard_common::types::string::Datetime, 51 #[serde(skip_serializing_if = "std::option::Option::is_none")] 52 #[serde(borrow)] 53 pub labels: std::option::Option<Vec<crate::com_atproto::label::Label<'a>>>, 54 #[serde(skip_serializing_if = "std::option::Option::is_none")] 55 pub like_count: std::option::Option<i64>, 56 #[serde(borrow)] 57 pub uri: jacquard_common::types::string::AtUri<'a>, 58 #[serde(skip_serializing_if = "std::option::Option::is_none")] 59 #[serde(borrow)] 60 pub viewer: std::option::Option<crate::app_bsky::labeler::LabelerViewerState<'a>>, 61} 62 63#[jacquard_derive::lexicon] 64#[derive( 65 serde::Serialize, 66 serde::Deserialize, 67 Debug, 68 Clone, 69 PartialEq, 70 Eq, 71 jacquard_derive::IntoStatic 72)] 73#[serde(rename_all = "camelCase")] 74pub struct LabelerViewDetailed<'a> { 75 #[serde(borrow)] 76 pub cid: jacquard_common::types::string::Cid<'a>, 77 #[serde(borrow)] 78 pub creator: crate::app_bsky::actor::ProfileView<'a>, 79 pub indexed_at: jacquard_common::types::string::Datetime, 80 #[serde(skip_serializing_if = "std::option::Option::is_none")] 81 #[serde(borrow)] 82 pub labels: std::option::Option<Vec<crate::com_atproto::label::Label<'a>>>, 83 #[serde(skip_serializing_if = "std::option::Option::is_none")] 84 pub like_count: std::option::Option<i64>, 85 #[serde(borrow)] 86 pub policies: crate::app_bsky::labeler::LabelerPolicies<'a>, 87 ///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. 88 #[serde(skip_serializing_if = "std::option::Option::is_none")] 89 #[serde(borrow)] 90 pub reason_types: std::option::Option< 91 Vec<crate::com_atproto::moderation::ReasonType<'a>>, 92 >, 93 ///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. 94 #[serde(skip_serializing_if = "std::option::Option::is_none")] 95 #[serde(borrow)] 96 pub subject_collections: std::option::Option< 97 Vec<jacquard_common::types::string::Nsid<'a>>, 98 >, 99 ///The set of subject types (account, record, etc) this service accepts reports on. 100 #[serde(skip_serializing_if = "std::option::Option::is_none")] 101 #[serde(borrow)] 102 pub subject_types: std::option::Option< 103 Vec<crate::com_atproto::moderation::SubjectType<'a>>, 104 >, 105 #[serde(borrow)] 106 pub uri: jacquard_common::types::string::AtUri<'a>, 107 #[serde(skip_serializing_if = "std::option::Option::is_none")] 108 #[serde(borrow)] 109 pub viewer: std::option::Option<crate::app_bsky::labeler::LabelerViewerState<'a>>, 110} 111 112#[jacquard_derive::lexicon] 113#[derive( 114 serde::Serialize, 115 serde::Deserialize, 116 Debug, 117 Clone, 118 PartialEq, 119 Eq, 120 jacquard_derive::IntoStatic 121)] 122#[serde(rename_all = "camelCase")] 123pub struct LabelerViewerState<'a> { 124 #[serde(skip_serializing_if = "std::option::Option::is_none")] 125 #[serde(borrow)] 126 pub like: std::option::Option<jacquard_common::types::string::AtUri<'a>>, 127}