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 DomainScheduledReportV1 {
    #[serde(rename = "api_client_id")]
    pub api_client_id: String,
    #[serde(rename = "can_write", skip_serializing_if = "Option::is_none")]
    pub can_write: Option<bool>,
    #[serde(rename = "created_on")]
    pub created_on: String,
    #[serde(rename = "customer_id")]
    pub customer_id: String,
    #[serde(rename = "description")]
    pub description: String,
    #[serde(rename = "expiration_on", skip_serializing_if = "Option::is_none")]
    pub expiration_on: Option<String>,
    #[serde(rename = "id")]
    pub id: String,
    #[serde(rename = "last_execution", skip_serializing_if = "Option::is_none")]
    pub last_execution: Option<Box<models::DomainReportExecutionSummaryV1>>,
    #[serde(rename = "last_updated_on")]
    pub last_updated_on: String,
    #[serde(rename = "name")]
    pub name: String,
    #[serde(rename = "next_execution_on", skip_serializing_if = "Option::is_none")]
    pub next_execution_on: Option<String>,
    #[serde(rename = "notifications")]
    pub notifications: Vec<models::DomainNotifications>,
    #[serde(rename = "owned_by_cs", skip_serializing_if = "Option::is_none")]
    pub owned_by_cs: Option<bool>,
    #[serde(rename = "report_metadata", skip_serializing_if = "Option::is_none")]
    pub report_metadata: Option<Box<models::DomainReportMetadata>>,
    #[serde(rename = "report_params")]
    pub report_params: Box<models::DomainReportParams>,
    #[serde(rename = "schedule")]
    pub schedule: Box<models::DomainSchedule>,
    #[serde(rename = "schedule_type")]
    pub schedule_type: String,
    #[serde(rename = "shared_with")]
    pub shared_with: Vec<String>,
    #[serde(rename = "start_on", skip_serializing_if = "Option::is_none")]
    pub start_on: Option<String>,
    #[serde(rename = "status")]
    pub status: String,
    #[serde(rename = "stop_on", skip_serializing_if = "Option::is_none")]
    pub stop_on: Option<String>,
    #[serde(rename = "stopped_by_cs", skip_serializing_if = "Option::is_none")]
    pub stopped_by_cs: Option<bool>,
    #[serde(rename = "tracking", skip_serializing_if = "Option::is_none")]
    pub tracking: Option<String>,
    #[serde(rename = "trigger_reference", skip_serializing_if = "Option::is_none")]
    pub trigger_reference: Option<String>,
    #[serde(rename = "type")]
    pub r#type: String,
    #[serde(rename = "user_id")]
    pub user_id: String,
    #[serde(rename = "user_uuid")]
    pub user_uuid: String,
}

impl DomainScheduledReportV1 {
    pub fn new(
        api_client_id: String,
        created_on: String,
        customer_id: String,
        description: String,
        id: String,
        last_updated_on: String,
        name: String,
        notifications: Vec<models::DomainNotifications>,
        report_params: models::DomainReportParams,
        schedule: models::DomainSchedule,
        schedule_type: String,
        shared_with: Vec<String>,
        status: String,
        r#type: String,
        user_id: String,
        user_uuid: String,
    ) -> DomainScheduledReportV1 {
        DomainScheduledReportV1 {
            api_client_id,
            can_write: None,
            created_on,
            customer_id,
            description,
            expiration_on: None,
            id,
            last_execution: None,
            last_updated_on,
            name,
            next_execution_on: None,
            notifications,
            owned_by_cs: None,
            report_metadata: None,
            report_params: Box::new(report_params),
            schedule: Box::new(schedule),
            schedule_type,
            shared_with,
            start_on: None,
            status,
            stop_on: None,
            stopped_by_cs: None,
            tracking: None,
            trigger_reference: None,
            r#type,
            user_id,
            user_uuid,
        }
    }
}