#[non_exhaustive]pub struct Feature {
pub id: Option<String>,
pub name: Option<String>,
pub is_enabled: Option<bool>,
pub is_bundle: Option<bool>,
pub feature_characteristic: Option<Vec<Characteristic>>,
pub feature_relationship: Option<Vec<FeatureRelationship>>,
pub constraint: Option<Vec<Ref<Constraint>>>,
pub at_type: String,
pub at_base_type: Option<String>,
pub at_schema_location: Option<String>,
pub extensions: Extensions,
}service only.Expand description
A configurable capability of a service, switched on or off.
§Why this is not resource::Feature
TMF638 and TMF639 both declare a schema called Feature, and they are
not the same: a service feature is constrained by a ConstraintRef,
a resource feature by a PolicyRef. Modelling them as one type would
let you set a member the server will silently drop, so this crate keeps
them apart — see crate::resource::Feature.
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 of the feature within its service.
name: Option<String>Name the feature is known by.
is_enabled: Option<bool>Whether the feature is currently switched on.
is_bundle: Option<bool>Whether the feature groups others.
feature_characteristic: Option<Vec<Characteristic>>Characteristics configuring the feature.
feature_relationship: Option<Vec<FeatureRelationship>>Relationships to other features.
constraint: Option<Vec<Ref<Constraint>>>Constraints on the feature.
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§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Feature
impl<'de> Deserialize<'de> for Feature
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 Feature
impl JsonSchema for Feature
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