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 ApiQueryMetadataJson {
    #[serde(rename = "costs")]
    pub costs: Box<models::Costs>,
    #[serde(rename = "digestFlow")]
    pub digest_flow: Box<models::DigestFlow>,
    /// Number of events in the result set
    #[serde(rename = "eventCount")]
    pub event_count: i64,
    #[serde(rename = "extraData")]
    pub extra_data: serde_json::Value,
    /// Order of the returned fields
    #[serde(rename = "fieldOrder")]
    pub field_order: Vec<String>,
    #[serde(rename = "filterQuery")]
    pub filter_query: serde_json::Value,
    /// True if this is an aggregate query
    #[serde(rename = "isAggregate")]
    pub is_aggregate: bool,
    /// How soon to poll the query after it has been submitted to expected results
    #[serde(rename = "pollAfter")]
    pub poll_after: i64,
    /// Number of bytes processed to return results
    #[serde(rename = "processedBytes")]
    pub processed_bytes: i64,
    /// Number of events processed in result set
    #[serde(rename = "processedEvents")]
    pub processed_events: i64,
    /// Timestamp of the end of the query
    #[serde(rename = "queryEnd")]
    pub query_end: i64,
    #[serde(rename = "querySpent")]
    pub query_spent: Box<models::QuerySpent>,
    /// Timestampt of when the query started
    #[serde(rename = "queryStart")]
    pub query_start: i64,
    /// Number of milliseconds the query was queued before execution
    #[serde(rename = "queuedMillis")]
    pub queued_millis: i64,
    #[serde(rename = "quotaTotalSpent")]
    pub quota_total_spent: Box<models::QuotaTotalSpent>,
    /// Number of the host returning the response
    #[serde(rename = "responderVHost")]
    pub responder_v_host: i64,
    /// Size of the buffer used to store the result
    #[serde(rename = "resultBufferSize")]
    pub result_buffer_size: i64,
    /// Time spent executing the query in milliseconds
    #[serde(rename = "timeMillis")]
    pub time_millis: i64,
    /// Total amount of work to execute the query
    #[serde(rename = "totalWork")]
    pub total_work: i64,
    /// Deprecated: Use warnings in the message root instead
    #[serde(rename = "warning")]
    pub warning: String,
    /// Use 'warnings' in the message root instead
    #[serde(rename = "warnings")]
    pub warnings: Vec<String>,
    /// Estimate of the work done to complete the query
    #[serde(rename = "workDone")]
    pub work_done: i64,
}

impl ApiQueryMetadataJson {
    pub fn new(
        costs: models::Costs,
        digest_flow: models::DigestFlow,
        event_count: i64,
        extra_data: serde_json::Value,
        field_order: Vec<String>,
        filter_query: serde_json::Value,
        is_aggregate: bool,
        poll_after: i64,
        processed_bytes: i64,
        processed_events: i64,
        query_end: i64,
        query_spent: models::QuerySpent,
        query_start: i64,
        queued_millis: i64,
        quota_total_spent: models::QuotaTotalSpent,
        responder_v_host: i64,
        result_buffer_size: i64,
        time_millis: i64,
        total_work: i64,
        warning: String,
        warnings: Vec<String>,
        work_done: i64,
    ) -> ApiQueryMetadataJson {
        ApiQueryMetadataJson {
            costs: Box::new(costs),
            digest_flow: Box::new(digest_flow),
            event_count,
            extra_data,
            field_order,
            filter_query,
            is_aggregate,
            poll_after,
            processed_bytes,
            processed_events,
            query_end,
            query_spent: Box::new(query_spent),
            query_start,
            queued_millis,
            quota_total_spent: Box::new(quota_total_spent),
            responder_v_host,
            result_buffer_size,
            time_millis,
            total_work,
            warning,
            warnings,
            work_done,
        }
    }
}