rusty_falcon 0.7.1

Rust bindings for CrowdStrike Falcon API
Documentation
/*
 * 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 ModelsApiImageCombinedExport {
    #[serde(rename = "ai_related")]
    pub ai_related: bool,
    #[serde(rename = "architecture")]
    pub architecture: String,
    #[serde(rename = "base_os")]
    pub base_os: String,
    #[serde(rename = "business_impact", skip_serializing_if = "Option::is_none")]
    pub business_impact: Option<Vec<String>>,
    #[serde(rename = "business_unit", skip_serializing_if = "Option::is_none")]
    pub business_unit: Option<Vec<String>>,
    #[serde(rename = "cid")]
    pub cid: String,
    #[serde(rename = "cloud_groups_v2", skip_serializing_if = "Option::is_none")]
    pub cloud_groups_v2: Option<Vec<models::RbacCloudGroup>>,
    #[serde(
        rename = "cve_exploited_status",
        skip_serializing_if = "Option::is_none"
    )]
    pub cve_exploited_status: Option<i32>,
    #[serde(rename = "cve_first_seen", skip_serializing_if = "Option::is_none")]
    pub cve_first_seen: Option<String>,
    #[serde(rename = "cve_id")]
    pub cve_id: String,
    #[serde(
        rename = "cve_publication_date",
        skip_serializing_if = "Option::is_none"
    )]
    pub cve_publication_date: Option<String>,
    #[serde(rename = "cvss_score")]
    pub cvss_score: String,
    #[serde(rename = "detection_name")]
    pub detection_name: String,
    #[serde(rename = "detection_severity")]
    pub detection_severity: String,
    #[serde(rename = "detection_type")]
    pub detection_type: String,
    #[serde(rename = "environment", skip_serializing_if = "Option::is_none")]
    pub environment: Option<Vec<String>>,
    #[serde(rename = "first_seen")]
    pub first_seen: String,
    #[serde(rename = "groups", skip_serializing_if = "Option::is_none")]
    pub groups: Option<Vec<String>>,
    #[serde(rename = "image_build_date", skip_serializing_if = "Option::is_none")]
    pub image_build_date: Option<String>,
    #[serde(rename = "image_digest")]
    pub image_digest: String,
    #[serde(rename = "image_id")]
    pub image_id: String,
    #[serde(rename = "is_base_image")]
    pub is_base_image: bool,
    #[serde(rename = "last_seen")]
    pub last_seen: String,
    #[serde(
        rename = "package_name_version",
        skip_serializing_if = "Option::is_none"
    )]
    pub package_name_version: Option<String>,
    #[serde(rename = "packages_impacted")]
    pub packages_impacted: i32,
    #[serde(rename = "registry")]
    pub registry: String,
    #[serde(rename = "repository")]
    pub repository: String,
    #[serde(rename = "source")]
    pub source: String,
    #[serde(rename = "started_containers")]
    pub started_containers: i64,
    #[serde(rename = "stopped_containers")]
    pub stopped_containers: i64,
    #[serde(rename = "tag")]
    pub tag: String,
    #[serde(rename = "vulnerability_cps_rating")]
    pub vulnerability_cps_rating: String,
    #[serde(rename = "vulnerability_description")]
    pub vulnerability_description: String,
    #[serde(rename = "vulnerability_severity")]
    pub vulnerability_severity: String,
}

impl ModelsApiImageCombinedExport {
    pub fn new(
        ai_related: bool,
        architecture: String,
        base_os: String,
        cid: String,
        cve_id: String,
        cvss_score: String,
        detection_name: String,
        detection_severity: String,
        detection_type: String,
        first_seen: String,
        image_digest: String,
        image_id: String,
        is_base_image: bool,
        last_seen: String,
        packages_impacted: i32,
        registry: String,
        repository: String,
        source: String,
        started_containers: i64,
        stopped_containers: i64,
        tag: String,
        vulnerability_cps_rating: String,
        vulnerability_description: String,
        vulnerability_severity: String,
    ) -> ModelsApiImageCombinedExport {
        ModelsApiImageCombinedExport {
            ai_related,
            architecture,
            base_os,
            business_impact: None,
            business_unit: None,
            cid,
            cloud_groups_v2: None,
            cve_exploited_status: None,
            cve_first_seen: None,
            cve_id,
            cve_publication_date: None,
            cvss_score,
            detection_name,
            detection_severity,
            detection_type,
            environment: None,
            first_seen,
            groups: None,
            image_build_date: None,
            image_digest,
            image_id,
            is_base_image,
            last_seen,
            package_name_version: None,
            packages_impacted,
            registry,
            repository,
            source,
            started_containers,
            stopped_containers,
            tag,
            vulnerability_cps_rating,
            vulnerability_description,
            vulnerability_severity,
        }
    }
}