use serde::{Deserialize, Serialize};
use super::{effective_entitlement_value::EffectiveEntitlementValue, feature_ref::FeatureRef};
#[derive(Clone, Debug, PartialEq, Deserialize, Serialize)]
#[non_exhaustive]
pub struct EffectiveEntitlement {
pub feature: FeatureRef,
pub value: EffectiveEntitlementValue,
#[serde(flatten)]
pub extra: serde_json::Map<String, serde_json::Value>,
}
impl EffectiveEntitlement {
#[must_use]
pub fn new(feature: FeatureRef, value: EffectiveEntitlementValue) -> Self {
Self {
feature,
value,
extra: serde_json::Map::new(),
}
}
}