pub use crate::prelude::*;

/// Details about an override. Last write wins.
#[derive(Debug, Clone, Serialize, Deserialize, PartialEq)]
pub struct Override {
    /// override request id for an override request
    #[serde(rename = "requestId")]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub request_id: Option<String>,
    /// proto field path which is the string representation of a field.
    /// example: correlated.primary_entity_id would be primary_entity_id in correlated component
    #[serde(rename = "fieldPath")]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub field_path: Option<String>,
    /// new field value corresponding to field path. In the shape of an empty entity with only the changed value.
    /// example: entity: { mil_view: { disposition: Disposition_DISPOSITION_HOSTILE } }
    #[serde(rename = "maskedFieldValue")]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub masked_field_value: Option<Box<Entity>>,
    /// status of the override
    #[serde(skip_serializing_if = "Option::is_none")]
    pub status: Option<OverrideStatus>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub provenance: Option<Provenance>,
    /// The type of the override, defined by the stage of the entity lifecycle that the entity was in when the override
    /// was requested.
    #[serde(skip_serializing_if = "Option::is_none")]
    pub r#type: Option<OverrideType>,
    /// Timestamp of the override request. The timestamp is generated by the Entity Manager instance that receives the request.
    #[serde(rename = "requestTimestamp")]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub request_timestamp: Option<DateTime<Utc>>,
}
