oci-rust-sdk 0.4.4

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

#[allow(unused_imports)]
use super::*;
/// Information about the exploit attempt event.
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct ExploitAttemptEventData {
    /// Number of times the event has occurred. Note: Numbers greater than Number.MAX_SAFE_INTEGER will result in rounding issues.
    pub count: i64,

    #[serde(skip_serializing_if = "Option::is_none")]
    pub content: Option<ExploitAttemptEventContent>,

    #[serde(skip_serializing_if = "Option::is_none")]
    pub additional_details: Option<ExploitAttemptAdditionalDetails>,
}

/// Required fields for ExploitAttemptEventData
pub struct ExploitAttemptEventDataRequired {
    /// Number of times the event has occurred. Note: Numbers greater than Number.MAX_SAFE_INTEGER will result in rounding issues.
    pub count: i64,
}

impl ExploitAttemptEventData {
    /// Create a new ExploitAttemptEventData with required fields
    pub fn new(required: ExploitAttemptEventDataRequired) -> Self {
        Self {
            count: required.count,

            content: None,

            additional_details: None,
        }
    }

    /// Set content
    pub fn set_content(mut self, value: Option<ExploitAttemptEventContent>) -> Self {
        self.content = value;
        self
    }

    /// Set count
    pub fn set_count(mut self, value: i64) -> Self {
        self.count = value;
        self
    }

    /// Set additional_details
    pub fn set_additional_details(
        mut self,
        value: Option<ExploitAttemptAdditionalDetails>,
    ) -> Self {
        self.additional_details = value;
        self
    }

    /// Set content (unwraps Option)
    pub fn with_content(mut self, value: ExploitAttemptEventContent) -> Self {
        self.content = Some(value);
        self
    }

    /// Set additional_details (unwraps Option)
    pub fn with_additional_details(mut self, value: ExploitAttemptAdditionalDetails) -> Self {
        self.additional_details = Some(value);
        self
    }
}