atrium_api/com/atproto/label/
defs.rs

1// @generated - This file is generated by atrium-codegen. DO NOT EDIT.
2//!Definitions for the `com.atproto.label.defs` namespace.
3///Metadata tag on an atproto resource (eg, repo or record).
4#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
5#[serde(rename_all = "camelCase")]
6pub struct LabelData {
7    ///Optionally, CID specifying the specific version of 'uri' resource this label applies to.
8    #[serde(skip_serializing_if = "core::option::Option::is_none")]
9    pub cid: core::option::Option<crate::types::string::Cid>,
10    ///Timestamp when this label was created.
11    pub cts: crate::types::string::Datetime,
12    ///Timestamp at which this label expires (no longer applies).
13    #[serde(skip_serializing_if = "core::option::Option::is_none")]
14    pub exp: core::option::Option<crate::types::string::Datetime>,
15    ///If true, this is a negation label, overwriting a previous label.
16    #[serde(skip_serializing_if = "core::option::Option::is_none")]
17    pub neg: core::option::Option<bool>,
18    ///Signature of dag-cbor encoded label.
19    #[serde(default)]
20    #[serde(with = "serde_bytes")]
21    #[serde(skip_serializing_if = "core::option::Option::is_none")]
22    pub sig: core::option::Option<Vec<u8>>,
23    ///DID of the actor who created this label.
24    pub src: crate::types::string::Did,
25    ///AT URI of the record, repository (account), or other resource that this label applies to.
26    pub uri: String,
27    ///The short string name of the value or type of this label.
28    pub val: String,
29    ///The AT Protocol version of the label object.
30    #[serde(skip_serializing_if = "core::option::Option::is_none")]
31    pub ver: core::option::Option<i64>,
32}
33pub type Label = crate::types::Object<LabelData>;
34pub type LabelValue = String;
35///Declares a label value and its expected interpretations and behaviors.
36#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
37#[serde(rename_all = "camelCase")]
38pub struct LabelValueDefinitionData {
39    ///Does the user need to have adult content enabled in order to configure this label?
40    #[serde(skip_serializing_if = "core::option::Option::is_none")]
41    pub adult_only: core::option::Option<bool>,
42    ///What should this label hide in the UI, if applied? 'content' hides all of the target; 'media' hides the images/video/audio; 'none' hides nothing.
43    pub blurs: String,
44    ///The default setting for this label.
45    #[serde(skip_serializing_if = "core::option::Option::is_none")]
46    pub default_setting: core::option::Option<String>,
47    ///The value of the label being defined. Must only include lowercase ascii and the '-' character ([a-z-]+).
48    pub identifier: String,
49    pub locales: Vec<LabelValueDefinitionStrings>,
50    ///How should a client visually convey this label? 'inform' means neutral and informational; 'alert' means negative and warning; 'none' means show nothing.
51    pub severity: String,
52}
53pub type LabelValueDefinition = crate::types::Object<LabelValueDefinitionData>;
54///Strings which describe the label in the UI, localized into a specific language.
55#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
56#[serde(rename_all = "camelCase")]
57pub struct LabelValueDefinitionStringsData {
58    ///A longer description of what the label means and why it might be applied.
59    pub description: String,
60    ///The code of the language these strings are written in.
61    pub lang: crate::types::string::Language,
62    ///A short human-readable name for the label.
63    pub name: String,
64}
65pub type LabelValueDefinitionStrings = crate::types::Object<LabelValueDefinitionStringsData>;
66///Metadata tag on an atproto record, published by the author within the record. Note that schemas should use #selfLabels, not #selfLabel.
67#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
68#[serde(rename_all = "camelCase")]
69pub struct SelfLabelData {
70    ///The short string name of the value or type of this label.
71    pub val: String,
72}
73pub type SelfLabel = crate::types::Object<SelfLabelData>;
74///Metadata tags on an atproto record, published by the author within the record.
75#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
76#[serde(rename_all = "camelCase")]
77pub struct SelfLabelsData {
78    pub values: Vec<SelfLabel>,
79}
80pub type SelfLabels = crate::types::Object<SelfLabelsData>;