#[non_exhaustive]pub struct AlarmUpdate {Show 35 fields
pub id: Option<String>,
pub href: Option<String>,
pub alarm_type: Option<AlarmType>,
pub perceived_severity: Option<PerceivedSeverity>,
pub probable_cause: Option<String>,
pub specific_problem: Option<String>,
pub alarm_details: Option<String>,
pub alarmed_object: Option<Ref<AlarmedObject>>,
pub alarmed_object_type: Option<String>,
pub state: Option<AlarmState>,
pub ack_state: Option<AckState>,
pub ack_system_id: Option<String>,
pub ack_user_id: Option<String>,
pub clear_system_id: Option<String>,
pub clear_user_id: Option<String>,
pub alarm_changed_time: Option<Timestamp>,
pub alarm_cleared_time: Option<Timestamp>,
pub alarm_reporting_time: Option<Timestamp>,
pub alarm_escalation: Option<bool>,
pub is_root_cause: Option<bool>,
pub service_affecting: Option<bool>,
pub planned_outage_indicator: Option<PlannedOutageIndicator>,
pub proposed_repaired_actions: Option<String>,
pub reporting_system_id: Option<String>,
pub external_alarm_id: Option<String>,
pub correlated_alarm: Option<Vec<Ref<Alarm>>>,
pub parent_alarm: Option<Vec<Ref<Alarm>>>,
pub affected_service: Option<Vec<Ref<Service>>>,
pub place: Option<Vec<RelatedPlace>>,
pub comment: Option<Vec<Comment>>,
pub crossed_threshold_information: Option<CrossedThresholdInformation>,
pub at_type: String,
pub at_base_type: Option<String>,
pub at_schema_location: Option<String>,
pub extensions: Extensions,
}alarm only.Expand description
Body of a PATCH /alarm/{id} — the v5 Alarm_MVO.
Like TMF621 and unlike most of this crate, TMF642 leaves id and href
on the patch body. What it does drop is alarmRaisedTime and
sourceSystemId: when and where a fault was first seen is history, and
history is not editable.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.id: Option<String>Identifier, which TMF642 leaves on the patch body.
href: Option<String>Canonical URI, likewise.
alarm_type: Option<AlarmType>New alarm type.
perceived_severity: Option<PerceivedSeverity>New severity — set cleared to clear the alarm.
probable_cause: Option<String>New probable cause.
specific_problem: Option<String>New specific problem.
alarm_details: Option<String>New detail.
alarmed_object: Option<Ref<AlarmedObject>>New alarmed object.
alarmed_object_type: Option<String>New alarmed object type.
state: Option<AlarmState>New lifecycle state.
ack_state: Option<AckState>New acknowledgement state.
ack_system_id: Option<String>New acknowledging system.
ack_user_id: Option<String>New acknowledging user.
clear_system_id: Option<String>New clearing system.
clear_user_id: Option<String>New clearing user.
alarm_changed_time: Option<Timestamp>New changed time.
alarm_cleared_time: Option<Timestamp>New cleared time.
alarm_reporting_time: Option<Timestamp>New reporting time.
alarm_escalation: Option<bool>New escalation flag.
is_root_cause: Option<bool>New root-cause flag.
service_affecting: Option<bool>New service-affecting flag.
planned_outage_indicator: Option<PlannedOutageIndicator>New planned-outage indicator.
proposed_repaired_actions: Option<String>New proposed actions.
reporting_system_id: Option<String>New reporting system.
external_alarm_id: Option<String>New external alarm identifier.
Replacement correlated alarms.
parent_alarm: Option<Vec<Ref<Alarm>>>Replacement parent alarms.
affected_service: Option<Vec<Ref<Service>>>Replacement affected services.
place: Option<Vec<RelatedPlace>>Replacement places.
comment: Option<Vec<Comment>>Replacement comments.
crossed_threshold_information: Option<CrossedThresholdInformation>New threshold-crossing detail.
at_type: StringThe @type discriminator naming this entity’s class.
Empty when the payload declared none — TMF630 v5 marks it
required, but servers omit it and so do TM Forum’s own examples.
An absent discriminator stays absent, so relaying a payload does
not silently add a member to it; anything this crate builds
carries the class name. Read it through
type_name, which resolves the empty case.
at_base_type: Option<String>The @baseType, naming the supertype where this class is sub-typed.
at_schema_location: Option<String>A URI to a JSON-Schema file defining additional attributes.
extensions: ExtensionsMembers not covered by the typed model, kept in document order.
See the crate documentation for the round-trip guarantee this underwrites.
Implementations§
Source§impl AlarmUpdate
impl AlarmUpdate
Sourcepub fn builder() -> AlarmUpdateBuilder
pub fn builder() -> AlarmUpdateBuilder
Create an instance of AlarmUpdate using the builder syntax
Source§impl AlarmUpdate
impl AlarmUpdate
Source§impl AlarmUpdate
impl AlarmUpdate
Sourcepub fn deleting(self, member: impl Into<String>) -> Self
pub fn deleting(self, member: impl Into<String>) -> Self
Marks a member of the target for deletion by this merge patch.
RFC 7386 §2 removes a member by naming it with null.
Setting the field to None cannot say that: None means the
patch does not mention the member, which leaves it unchanged.
use rutmf::product::ProductOfferingUpdate;
let update = ProductOfferingUpdate::builder()
.name("Business Internet")
.build()
.deleting("description");
assert_eq!(
serde_json::to_value(&update).unwrap()["description"],
serde_json::Value::Null,
);member is the wire name — lifecycleStatus, not
lifecycle_status — and is not checked, so name one the
schema declares.
Under Patch::Operations the
same edit is
JsonPatchOp::remove,
which fails against a member that is not there rather than
silently doing nothing.
Trait Implementations§
Source§impl Clone for AlarmUpdate
impl Clone for AlarmUpdate
Source§impl Debug for AlarmUpdate
impl Debug for AlarmUpdate
Source§impl Default for AlarmUpdate
impl Default for AlarmUpdate
Source§impl<'de> Deserialize<'de> for AlarmUpdate
impl<'de> Deserialize<'de> for AlarmUpdate
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 AlarmUpdate
impl JsonSchema for AlarmUpdate
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