lattice_sdk/api/types/
principal.rs

1pub use crate::prelude::*;
2
3/// A Principal is an entity that has authority over this Task.
4#[derive(Debug, Clone, Serialize, Deserialize, PartialEq)]
5pub struct Principal {
6    #[serde(skip_serializing_if = "Option::is_none")]
7    pub system: Option<System>,
8    #[serde(skip_serializing_if = "Option::is_none")]
9    pub user: Option<User>,
10    #[serde(skip_serializing_if = "Option::is_none")]
11    pub team: Option<Team>,
12    /// The Principal _this_ Principal is acting on behalf of.
13    ///
14    /// Likely only populated once in the nesting (i.e. the "on_behalf_of" Principal would not have another "on_behalf_of" in most cases).
15    #[serde(rename = "onBehalfOf")]
16    #[serde(skip_serializing_if = "Option::is_none")]
17    pub on_behalf_of: Option<Box<Principal>>,
18}