mega/types/
command.rs

1/// A command
2#[derive(Debug, serde::Deserialize, serde::Serialize)]
3#[serde(tag = "a")]
4pub enum Command {
5    /// Get the attributes of a node
6    #[serde(rename = "g")]
7    GetAttributes {
8        /// The public id of the node
9        #[serde(rename = "p", skip_serializing_if = "Option::is_none")]
10        public_node_id: Option<String>,
11
12        /// The id of the node
13        #[serde(rename = "n")]
14        node_id: Option<String>,
15
16        /// Set to Some(1) to include the download url in the response.
17        #[serde(rename = "g")]
18        include_download_url: Option<u8>,
19    },
20
21    /// Fetch the nodes
22    #[serde(rename = "f")]
23    FetchNodes {
24        c: u8,
25
26        /// Set to 1 to make this recursive.
27        /// Otherwise, leave it as 0.
28        #[serde(rename = "r")]
29        recursive: u8,
30    },
31}