oci-rust-sdk 0.4.4

Unofficial Oracle OCI SDK for Rust
Documentation
use serde::{Deserialize, Serialize};

#[allow(unused_imports)]
use super::*;
/// Provides information collected for the exploit attempt event.
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct ExploitAttemptEventContent {
    #[serde(rename = "type")]
    pub r#type: String,

    /// The content of the exploit detection log.
    #[serde(skip_serializing_if = "Option::is_none")]
    pub exploit_detection_log_content: Option<String>,

    /// The location of the exploit detection log within object storage.
    #[serde(skip_serializing_if = "Option::is_none")]
    pub exploit_object_store_location: Option<String>,
}

/// Required fields for ExploitAttemptEventContent
pub struct ExploitAttemptEventContentRequired {
    pub r#type: String,
}

impl ExploitAttemptEventContent {
    /// Create a new ExploitAttemptEventContent with required fields
    pub fn new(required: ExploitAttemptEventContentRequired) -> Self {
        Self {
            r#type: required.r#type,

            exploit_detection_log_content: None,

            exploit_object_store_location: None,
        }
    }

    /// Set exploit_detection_log_content
    pub fn set_exploit_detection_log_content(mut self, value: Option<String>) -> Self {
        self.exploit_detection_log_content = value;
        self
    }

    /// Set exploit_object_store_location
    pub fn set_exploit_object_store_location(mut self, value: Option<String>) -> Self {
        self.exploit_object_store_location = value;
        self
    }

    /// Set r#type
    pub fn set_type(mut self, value: String) -> Self {
        self.r#type = value;
        self
    }

    /// Set exploit_detection_log_content (unwraps Option)
    pub fn with_exploit_detection_log_content(mut self, value: impl Into<String>) -> Self {
        self.exploit_detection_log_content = Some(value.into());
        self
    }

    /// Set exploit_object_store_location (unwraps Option)
    pub fn with_exploit_object_store_location(mut self, value: impl Into<String>) -> Self {
        self.exploit_object_store_location = Some(value.into());
        self
    }
}