/*
* Santati
*
* Santati's HTTP API. Operations under `/api/v0/` take a team API key in `Authorization: Api-Key <key>`; a missing, invalid or under-scoped key is answered with `403`, never `401`. Errors on `/api/v0/` use one of three bodies: `ErrorDetail` (`{\"detail\": ...}`), `FieldErrors` (messages keyed by request field) or `ErrorEnvelope` (`{\"error\": {\"code\", \"message\", \"field\"}}`, returned by event ingestion and log stream quota checks). Lists on `/api/v0/` are cursor-paginated: follow `next` until it is `null`.
*
* The version of the OpenAPI document: 0.3.0
*
* Generated by: https://openapi-generator.tech
*/
use crate::models;
use serde::{Deserialize, Serialize};
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct OcsfMapping {
/// The OCSF release the mapping targets, e.g. 1.9.0.
#[serde(rename = "version")]
pub version: String,
/// The OCSF class the action maps to.
#[serde(rename = "class_uid")]
pub class_uid: i32,
/// The class's activity_id enum value; 99 is Other, a best fit rather than exact.
#[serde(rename = "activity_id")]
pub activity_id: i32,
/// The OCSF status_id the outcome sets: 2 for a failure, null when the action sets none.
#[serde(rename = "status_id", deserialize_with = "Option::deserialize")]
pub status_id: Option<i32>,
}
impl OcsfMapping {
pub fn new(version: String, class_uid: i32, activity_id: i32, status_id: Option<i32>) -> OcsfMapping {
OcsfMapping {
version,
class_uid,
activity_id,
status_id,
}
}
}