Skip to main content

proto_blue_api/generated/app/bsky/graph/
list.rs

1// Generated by atproto-codegen. Do not edit.
2//! Lexicon: app.bsky.graph.list
3#![allow(clippy::pedantic, clippy::nursery, clippy::all)]
4
5use serde::{Deserialize, Serialize};
6
7#[derive(Debug, Clone, Serialize, Deserialize)]
8#[serde(tag = "$type")]
9pub enum MainLabelsRefs {
10    #[serde(rename = "com.atproto.label.defs#selfLabels")]
11    AtprotoLabelDefsSelfLabels(Box<crate::com::atproto::label::defs::SelfLabels>),
12    #[serde(other)]
13    Other,
14}
15
16/// `$type` discriminator for this record on the wire.
17pub const TYPE: &str = "app.bsky.graph.list";
18
19#[derive(Debug, Clone, Serialize, Deserialize)]
20#[serde(rename_all = "camelCase")]
21pub struct Main {
22    /// The `$type` discriminator. Defaults to [`TYPE`] on construction.
23    #[serde(rename = "$type", default = "default_type")]
24    pub r#type: String,
25    #[serde(skip_serializing_if = "Option::is_none")]
26    pub avatar: Option<proto_blue_lex_data::BlobRef>,
27    pub created_at: proto_blue_syntax::Datetime,
28    #[serde(skip_serializing_if = "Option::is_none")]
29    pub description: Option<String>,
30    #[serde(skip_serializing_if = "Option::is_none")]
31    pub description_facets: Option<Vec<crate::app::bsky::richtext::facet::Main>>,
32    #[serde(skip_serializing_if = "Option::is_none")]
33    pub labels: Option<MainLabelsRefs>,
34    pub name: String,
35    pub purpose: crate::app::bsky::graph::defs::ListPurpose,
36}
37
38fn default_type() -> String {
39    TYPE.to_string()
40}