#[non_exhaustive]pub struct ProductCatalogUpdate {Show 13 fields
pub name: Option<String>,
pub description: Option<String>,
pub version: Option<String>,
pub catalog_type: Option<String>,
pub last_update: Option<Timestamp>,
pub lifecycle_status: Option<String>,
pub valid_for: Option<TimePeriod>,
pub category: Option<Vec<Ref<Category>>>,
pub related_party: Option<Vec<RelatedParty>>,
pub at_type: String,
pub at_base_type: Option<String>,
pub at_schema_location: Option<String>,
pub extensions: Extensions,
}product only.Expand description
Body of a PATCH /productCatalog/{id} — the v5 _MVO schema.
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.
version: Option<String>New version.
catalog_type: Option<String>New catalog type.
last_update: Option<Timestamp>New last-changed timestamp.
lifecycle_status: Option<String>New lifecycle status.
valid_for: Option<TimePeriod>New validity period.
category: Option<Vec<Ref<Category>>>Replacement category list.
Replacement related parties.
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 ProductCatalogUpdate
impl ProductCatalogUpdate
Sourcepub fn builder() -> ProductCatalogUpdateBuilder
pub fn builder() -> ProductCatalogUpdateBuilder
Create an instance of ProductCatalogUpdate using the builder syntax
Source§impl ProductCatalogUpdate
impl ProductCatalogUpdate
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 ProductCatalogUpdate
impl Clone for ProductCatalogUpdate
Source§impl Debug for ProductCatalogUpdate
impl Debug for ProductCatalogUpdate
Source§impl Default for ProductCatalogUpdate
impl Default for ProductCatalogUpdate
Source§impl<'de> Deserialize<'de> for ProductCatalogUpdate
impl<'de> Deserialize<'de> for ProductCatalogUpdate
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 ProductCatalogUpdate
impl JsonSchema for ProductCatalogUpdate
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