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 DomainFemExternalAsset {
    /// Lists the user actions can be taken on this asset (triage, delete, etc)
    #[serde(rename = "applicable_actions")]
    pub applicable_actions: Vec<String>,
    /// The type of external asset (ip, dns_domain)
    #[serde(rename = "asset_type")]
    pub asset_type: String,
    /// The customer ID
    #[serde(rename = "cid")]
    pub cid: String,
    /// Confidence level for the asset association to the organization
    #[serde(rename = "confidence")]
    pub confidence: i32,
    /// The criticality level of the asset (Critical, High, Noncritical, or Unassigned)
    #[serde(rename = "criticality", skip_serializing_if = "Option::is_none")]
    pub criticality: Option<String>,
    /// The description the user entered when manually assigning a criticality level
    #[serde(
        rename = "criticality_description",
        skip_serializing_if = "Option::is_none"
    )]
    pub criticality_description: Option<String>,
    /// The date and time the criticality level was manually assigned
    #[serde(
        rename = "criticality_timestamp",
        skip_serializing_if = "Option::is_none"
    )]
    pub criticality_timestamp: Option<String>,
    /// The username of the account that manually assigned the criticality level
    #[serde(
        rename = "criticality_username",
        skip_serializing_if = "Option::is_none"
    )]
    pub criticality_username: Option<String>,
    /// A list of the source providers for the asset information
    #[serde(rename = "data_providers")]
    pub data_providers: Vec<String>,
    /// The identifier of the asset
    #[serde(rename = "discovered_by", skip_serializing_if = "Option::is_none")]
    pub discovered_by: Option<String>,
    #[serde(rename = "discovery", skip_serializing_if = "Option::is_none")]
    pub discovery: Option<Box<models::DomainExternalAssetDiscoveryAttributes>>,
    #[serde(rename = "dns_domain", skip_serializing_if = "Option::is_none")]
    pub dns_domain: Option<Box<models::DomainFemDnsDomain>>,
    /// this is similar with the entity_type field from DiscoverAPIHost; it will be always 'external' and it aligns this structure with other assets structures, making UI handling of assets more generic
    #[serde(rename = "entity_type")]
    pub entity_type: String,
    /// The first time this asset has been observed as externally exposed
    #[serde(rename = "first_seen", skip_serializing_if = "Option::is_none")]
    pub first_seen: Option<String>,
    /// The unique external asset identifier
    #[serde(rename = "id")]
    pub id: String,
    /// The internet exposure status of the asset
    #[serde(rename = "internet_exposure", skip_serializing_if = "Option::is_none")]
    pub internet_exposure: Option<String>,
    #[serde(rename = "ip", skip_serializing_if = "Option::is_none")]
    pub ip: Option<Box<models::DomainFemExternalIp>>,
    /// The last time this asset has been observed as externally exposed
    #[serde(rename = "last_seen", skip_serializing_if = "Option::is_none")]
    pub last_seen: Option<String>,
    /// Flag indicating if the asset has been manually added
    #[serde(rename = "manual", skip_serializing_if = "Option::is_none")]
    pub manual: Option<bool>,
    /// Perimeter of this asset (Official/Unofficial)
    #[serde(rename = "perimeter", skip_serializing_if = "Option::is_none")]
    pub perimeter: Option<String>,
    /// The availability status for the asset
    #[serde(rename = "status")]
    pub status: String,
    /// List of subsidiaries that the asset belongs to
    #[serde(rename = "subsidiaries", skip_serializing_if = "Option::is_none")]
    pub subsidiaries: Option<Vec<models::DomainExternalAssetSubsidiary>>,
    #[serde(rename = "triage", skip_serializing_if = "Option::is_none")]
    pub triage: Option<Box<models::DomainExternalAssetsApiTriage>>,
}

impl DomainFemExternalAsset {
    pub fn new(
        applicable_actions: Vec<String>,
        asset_type: String,
        cid: String,
        confidence: i32,
        data_providers: Vec<String>,
        entity_type: String,
        id: String,
        status: String,
    ) -> DomainFemExternalAsset {
        DomainFemExternalAsset {
            applicable_actions,
            asset_type,
            cid,
            confidence,
            criticality: None,
            criticality_description: None,
            criticality_timestamp: None,
            criticality_username: None,
            data_providers,
            discovered_by: None,
            discovery: None,
            dns_domain: None,
            entity_type,
            first_seen: None,
            id,
            internet_exposure: None,
            ip: None,
            last_seen: None,
            manual: None,
            perimeter: None,
            status,
            subsidiaries: None,
            triage: None,
        }
    }
}