1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
// This file is generated by atrium-codegen. DO NOT EDIT.
//!Definitions for the `app.bsky.graph.getRelationships` namespace.
pub const NSID: &str = "app.bsky.graph.getRelationships";
#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
#[serde(rename_all = "camelCase")]
pub struct Parameters {
    ///Primary account requesting relationships for.
    pub actor: crate::types::string::AtIdentifier,
    ///List of 'other' accounts to be related back to the primary.
    #[serde(skip_serializing_if = "Option::is_none")]
    pub others: Option<Vec<crate::types::string::AtIdentifier>>,
}
#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
#[serde(rename_all = "camelCase")]
pub struct Output {
    #[serde(skip_serializing_if = "Option::is_none")]
    pub actor: Option<crate::types::string::Did>,
    pub relationships: Vec<crate::types::Union<OutputRelationshipsItem>>,
}
#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
#[serde(tag = "error", content = "message")]
pub enum Error {
    ///the primary actor at-identifier could not be resolved
    ActorNotFound(Option<String>),
}
impl std::fmt::Display for Error {
    fn fmt(&self, _f: &mut std::fmt::Formatter) -> std::fmt::Result {
        match self {
            Error::ActorNotFound(msg) => {
                write!(_f, "ActorNotFound")?;
                if let Some(msg) = msg {
                    write!(_f, ": {msg}")?;
                }
            }
        }
        Ok(())
    }
}
#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
#[serde(tag = "$type")]
pub enum OutputRelationshipsItem {
    #[serde(rename = "app.bsky.graph.defs#relationship")]
    AppBskyGraphDefsRelationship(Box<crate::app::bsky::graph::defs::Relationship>),
    #[serde(rename = "app.bsky.graph.defs#notFoundActor")]
    AppBskyGraphDefsNotFoundActor(Box<crate::app::bsky::graph::defs::NotFoundActor>),
}