1// @generated by jacquard-lexicon. DO NOT EDIT.
2//
3// Lexicon: app.bsky.labeler.service
4//
5// This file was automatically generated from Lexicon schemas.
6// Any manual changes will be overwritten on the next regeneration.
7
8///A declaration of the existence of labeler service.
9#[jacquard_derive::lexicon]
10#[derive(
11 serde::Serialize,
12 serde::Deserialize,
13 Debug,
14 Clone,
15 PartialEq,
16 Eq,
17 jacquard_derive::IntoStatic
18)]
19#[serde(rename_all = "camelCase")]
20pub struct Service<'a> {
21 pub created_at: jacquard_common::types::string::Datetime,
22 #[serde(skip_serializing_if = "std::option::Option::is_none")]
23 #[serde(borrow)]
24 pub labels: std::option::Option<ServiceRecordLabels<'a>>,
25 #[serde(borrow)]
26 pub policies: crate::app_bsky::labeler::LabelerPolicies<'a>,
27 ///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.
28 #[serde(skip_serializing_if = "std::option::Option::is_none")]
29 #[serde(borrow)]
30 pub reason_types: std::option::Option<
31 Vec<crate::com_atproto::moderation::ReasonType<'a>>,
32 >,
33 ///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.
34 #[serde(skip_serializing_if = "std::option::Option::is_none")]
35 #[serde(borrow)]
36 pub subject_collections: std::option::Option<
37 Vec<jacquard_common::types::string::Nsid<'a>>,
38 >,
39 ///The set of subject types (account, record, etc) this service accepts reports on.
40 #[serde(skip_serializing_if = "std::option::Option::is_none")]
41 #[serde(borrow)]
42 pub subject_types: std::option::Option<
43 Vec<crate::com_atproto::moderation::SubjectType<'a>>,
44 >,
45}
46
47#[jacquard_derive::open_union]
48#[derive(
49 serde::Serialize,
50 serde::Deserialize,
51 Debug,
52 Clone,
53 PartialEq,
54 Eq,
55 jacquard_derive::IntoStatic
56)]
57#[serde(tag = "$type")]
58#[serde(bound(deserialize = "'de: 'a"))]
59pub enum ServiceRecordLabels<'a> {
60 #[serde(rename = "com.atproto.label.defs#selfLabels")]
61 DefsSelfLabels(Box<crate::com_atproto::label::SelfLabels<'a>>),
62}
63
64impl jacquard_common::types::collection::Collection for Service<'_> {
65 const NSID: &'static str = "app.bsky.labeler.service";
66}