pub struct PublishNotificationRequest {
pub id: Option<String>,
pub priority: NotificationPriority,
pub require_ack: bool,
pub title: String,
pub body: String,
pub toast: bool,
pub issued_by: Option<String>,
pub expires_at: Option<DateTime<Utc>>,
pub target: Target,
}Expand description
Operator-facing request body for POST /api/notifications (and the
equivalent notifications/*.yaml manifest, SPEC §2.4.1). The
backend mints the Notification::id (when id is omitted) and
Notification::issued_at, resolves target into
the notifications.{all|group.X|pc.Y} fan-out subjects, and
publishes one Notification per resolved subject into the
NOTIFICATIONS stream.
Fields§
§id: Option<String>Operator-supplied id — the manifest’s id: doubles as the
notification id (SPEC §2.4.1). Omit it for ad-hoc SPA composer
sends and the backend mints a UUID instead.
priority: NotificationPriority§require_ack: bool§title: String§body: String§toast: boolSurface an OS toast (see Notification::toast). Decoupled from
priority; defaults to false (in-app only).
issued_by: Option<String>§expires_at: Option<DateTime<Utc>>§target: TargetFan-out audience — same shape as a job manifest’s target:
(SPEC §2.4.1). At least one of all / groups / pcs must be
set or the backend rejects the request.
Trait Implementations§
Source§impl Clone for PublishNotificationRequest
impl Clone for PublishNotificationRequest
Source§fn clone(&self) -> PublishNotificationRequest
fn clone(&self) -> PublishNotificationRequest
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for PublishNotificationRequest
impl Debug for PublishNotificationRequest
Source§impl<'de> Deserialize<'de> for PublishNotificationRequest
impl<'de> Deserialize<'de> for PublishNotificationRequest
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl JsonSchema for PublishNotificationRequest
impl JsonSchema for PublishNotificationRequest
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
$ref keyword. Read more