#[non_exhaustive]pub struct ServiceUpdate {Show 30 fields
pub name: Option<String>,
pub description: Option<String>,
pub category: Option<String>,
pub service_type: Option<String>,
pub state: Option<ServiceState>,
pub operating_status: Option<ServiceOperatingStatus>,
pub is_service_enabled: Option<bool>,
pub is_bundle: Option<bool>,
pub is_stateful: Option<bool>,
pub has_started: Option<bool>,
pub start_mode: Option<String>,
pub start_date: Option<Timestamp>,
pub end_date: Option<Timestamp>,
pub service_specification: Option<Ref<ServiceSpecification>>,
pub feature: Option<Vec<Feature>>,
pub service_characteristic: Option<Vec<Characteristic>>,
pub service_relationship: Option<Vec<ServiceRelationship>>,
pub supporting_service: Option<Vec<Service>>,
pub supporting_resource: Option<Vec<Ref<Resource>>>,
pub related_entity: Option<Vec<RelatedEntity>>,
pub service_order_item: Option<Vec<RelatedServiceOrderItem>>,
pub place: Option<Vec<RelatedPlace>>,
pub related_party: Option<Vec<RelatedParty>>,
pub external_identifier: Option<Vec<ExternalIdentifier>>,
pub intent: Option<Ref<Intent>>,
pub note: Option<Vec<Note>>,
pub at_type: String,
pub at_base_type: Option<String>,
pub at_schema_location: Option<String>,
pub extensions: Extensions,
}service only.Expand description
Body of a PATCH /service/{id} — the v5 Service_MVO.
Nothing is required, and operatingStatus is present here even though
the create schema omits it — a management system reporting a service as
degraded does so by patching.
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.name: Option<String>New name.
description: Option<String>New description.
category: Option<String>New category.
service_type: Option<String>New service type.
state: Option<ServiceState>New lifecycle state.
operating_status: Option<ServiceOperatingStatus>New operating status.
is_service_enabled: Option<bool>Whether the service is able to serve traffic.
is_bundle: Option<bool>Whether the service bundles others.
is_stateful: Option<bool>Whether the service retains state.
has_started: Option<bool>Whether the service has begun operating.
start_mode: Option<String>How the service is started.
start_date: Option<Timestamp>New start date.
end_date: Option<Timestamp>New end date.
service_specification: Option<Ref<ServiceSpecification>>Replacement specification reference.
feature: Option<Vec<Feature>>Replacement feature list.
service_characteristic: Option<Vec<Characteristic>>Replacement characteristics.
service_relationship: Option<Vec<ServiceRelationship>>Replacement relationships.
supporting_service: Option<Vec<Service>>Replacement supporting services.
supporting_resource: Option<Vec<Ref<Resource>>>Replacement supporting resources.
Replacement related entities.
service_order_item: Option<Vec<RelatedServiceOrderItem>>Replacement service order items.
place: Option<Vec<RelatedPlace>>Replacement places.
Replacement related parties.
external_identifier: Option<Vec<ExternalIdentifier>>Replacement external identifiers.
intent: Option<Ref<Intent>>Replacement intent.
note: Option<Vec<Note>>Replacement notes.
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 ServiceUpdate
impl ServiceUpdate
Sourcepub fn builder() -> ServiceUpdateBuilder
pub fn builder() -> ServiceUpdateBuilder
Create an instance of ServiceUpdate using the builder syntax
Source§impl ServiceUpdate
impl ServiceUpdate
Source§impl ServiceUpdate
impl ServiceUpdate
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 ServiceUpdate
impl Clone for ServiceUpdate
Source§impl Debug for ServiceUpdate
impl Debug for ServiceUpdate
Source§impl Default for ServiceUpdate
impl Default for ServiceUpdate
Source§impl<'de> Deserialize<'de> for ServiceUpdate
impl<'de> Deserialize<'de> for ServiceUpdate
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 ServiceUpdate
impl JsonSchema for ServiceUpdate
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