/*
* CrowdStrike API Specification
*
* Use this API specification as a reference for the API endpoints you can use to interact with your Falcon environment. These endpoints support authentication via OAuth2 and interact with detections and network containment. For detailed usage guides and examples, see our [documentation inside the Falcon console](https://falcon.crowdstrike.com/support/documentation). To use the APIs described below, combine the base URL with the path shown for each API endpoint. For commercial cloud customers, your base URL is `https://api.crowdstrike.com`. Each API endpoint requires authorization via an OAuth2 token. Your first API request should retrieve an OAuth2 token using the `oauth2/token` endpoint, such as `https://api.crowdstrike.com/oauth2/token`. For subsequent requests, include the OAuth2 token in an HTTP authorization header. Tokens expire after 30 minutes, after which you should make a new token request to continue making API requests.
*
* The version of the OpenAPI document: rolling
*
* Generated by: https://openapi-generator.tech
*/
use crate::models;
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct DomainBaseApiVulnerabilityV2 {
/// Asset ID for which the vulnerability has been detected. For managed assets it can correspond to the sensor ID, for unmanaged assets can be a stand alone ID
#[serde(rename = "aid")]
pub aid: String,
#[serde(rename = "app", skip_serializing_if = "Option::is_none")]
pub app: Option<Box<models::DomainApiVulnerabilityAppV2>>,
/// Provide details related to the products for which a the vulnerability has been detected
#[serde(rename = "apps", skip_serializing_if = "Option::is_none")]
pub apps: Option<Vec<models::DomainApiVulnerabilityExtendedAppV2>>,
/// Contains the customer identifier associated with the asset for which the vulnerability has been detected
#[serde(rename = "cid")]
pub cid: String,
/// A timestamp corresponding to the point in time when the vulnerability has no longer been detected (eg: it got fixed)
#[serde(rename = "closed_timestamp", skip_serializing_if = "Option::is_none")]
pub closed_timestamp: Option<String>,
/// Represents the confidence level of a vulnerability
#[serde(rename = "confidence", skip_serializing_if = "Option::is_none")]
pub confidence: Option<String>,
/// A timestamp corresponding to the point in time when the vulnerability has been created (detected) in our system
#[serde(rename = "created_timestamp")]
pub created_timestamp: String,
#[serde(rename = "cve", skip_serializing_if = "Option::is_none")]
pub cve: Option<Box<models::DomainApiVulnerabilityCveDetailsFacetV2>>,
/// Contains information about the vulnerability data providers of this entity
#[serde(rename = "data_providers", skip_serializing_if = "Option::is_none")]
pub data_providers: Option<Vec<models::DomainApiVulnerabilityDataProviderV1>>,
#[serde(rename = "host_info", skip_serializing_if = "Option::is_none")]
pub host_info: Option<Box<models::DomainApiVulnerabilityHostFacetV2>>,
/// Vulnerability unique ID
#[serde(rename = "id")]
pub id: String,
#[serde(rename = "remediation", skip_serializing_if = "Option::is_none")]
pub remediation: Option<Box<models::DomainApiVulnerabilityRemediationFacetV2>>,
/// Contains details about the vulnerable services
#[serde(rename = "services", skip_serializing_if = "Option::is_none")]
pub services: Option<Vec<models::DomainApiVulnerabilityServiceV2>>,
/// Current status of a vulnerability (open, closed, reopen)
#[serde(rename = "status")]
pub status: String,
#[serde(rename = "suppression_info", skip_serializing_if = "Option::is_none")]
pub suppression_info: Option<Box<models::DomainApiVulnerabilitySuppressionInfoV2>>,
/// A timestamp corresponding to the point in time when a vulnerability's information or status have been updated
#[serde(rename = "updated_timestamp")]
pub updated_timestamp: String,
/// Dynamic label that contains the CVE ID if applicable, otherwise the vulnerability metadata ID or label from the provider
#[serde(rename = "vulnerability_id", skip_serializing_if = "Option::is_none")]
pub vulnerability_id: Option<String>,
}
impl DomainBaseApiVulnerabilityV2 {
pub fn new(
aid: String,
cid: String,
created_timestamp: String,
id: String,
status: String,
updated_timestamp: String,
) -> DomainBaseApiVulnerabilityV2 {
DomainBaseApiVulnerabilityV2 {
aid,
app: None,
apps: None,
cid,
closed_timestamp: None,
confidence: None,
created_timestamp,
cve: None,
data_providers: None,
host_info: None,
id,
remediation: None,
services: None,
status,
suppression_info: None,
updated_timestamp,
vulnerability_id: None,
}
}
}