pub struct PublishNotificationRequest {
pub id: Option<String>,
pub priority: NotificationPriority,
pub require_ack: bool,
pub title: String,
pub body: String,
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§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
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
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>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl JsonSchema for PublishNotificationRequest
impl JsonSchema for PublishNotificationRequest
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Returns a string that uniquely identifies the schema produced by this type. Read more
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
Whether JSON Schemas generated for this type should be included directly in parent schemas,
rather than being re-used where possible using the
$ref keyword. Read moreAuto Trait Implementations§
impl Freeze for PublishNotificationRequest
impl RefUnwindSafe for PublishNotificationRequest
impl Send for PublishNotificationRequest
impl Sync for PublishNotificationRequest
impl Unpin for PublishNotificationRequest
impl UnsafeUnpin for PublishNotificationRequest
impl UnwindSafe for PublishNotificationRequest
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more