muse_code_sdk/msp/method/session_external_wait.rs
1// @generated from the MSP stable schema and protocol sources; do not edit by hand.
2
3use serde::Deserialize;
4use serde::Serialize;
5
6/// `session/declareExternalWait` params.
7#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
8#[serde(rename_all = "camelCase")]
9pub struct SessionDeclareExternalWaitParams {
10 /// The loaded session the declaration is for.
11 pub session_id: String,
12 /// The host's label for what the session waits on, shown in the
13 /// session view while the declaration is live. Omitted when the
14 /// host has no label to show.
15 #[serde(default, skip_serializing_if = "Option::is_none")]
16 pub reason: Option<String>,
17}
18
19/// `session/declareExternalWait` result: the declaration is live.
20#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
21#[serde(rename_all = "camelCase")]
22#[non_exhaustive]
23pub struct SessionDeclareExternalWaitResult {
24 /// Always `true` on a successful declare: a declaration is live.
25 pub declared: bool,
26 /// The live declaration's reason, as declared (truncated by the
27 /// host runtime). Omitted when the host declared without one.
28 #[serde(default, skip_serializing_if = "Option::is_none")]
29 pub reason: Option<String>,
30}
31
32/// `session/clearExternalWait` params.
33#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
34#[serde(rename_all = "camelCase")]
35pub struct SessionClearExternalWaitParams {
36 /// The loaded session the declaration is cleared for.
37 pub session_id: String,
38}
39
40/// `session/clearExternalWait` result: no declaration is live.
41#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
42#[serde(rename_all = "camelCase")]
43#[non_exhaustive]
44pub struct SessionClearExternalWaitResult {
45 /// Always `false` on a successful clear: no declaration is live.
46 pub declared: bool,
47}
48
49/// The live host-declared external wait as served on a `Session` object
50/// (`Session.externalWait`): present exactly while a declaration is
51/// live for the loaded session, absent otherwise. Absence is never
52/// fabricated — an unloaded row carries no member.
53#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
54#[serde(rename_all = "camelCase")]
55#[non_exhaustive]
56pub struct ExternalWaitView {
57 /// The host's label for what the session waits on. Omitted when
58 /// the host declared without one.
59 #[serde(default, skip_serializing_if = "Option::is_none")]
60 pub reason: Option<String>,
61}