aws-sdk-securityhub 1.109.0

AWS SDK for AWS SecurityHub
Documentation
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.

/// <p>A list of malware related to a finding.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct Malware {
    /// <p>The name of the malware that was observed.</p>
    /// <p>Length Constraints: Minimum of 1. Maximum of 64.</p>
    pub name: ::std::option::Option<::std::string::String>,
    /// <p>The type of the malware that was observed.</p>
    pub r#type: ::std::option::Option<crate::types::MalwareType>,
    /// <p>The file system path of the malware that was observed.</p>
    /// <p>Length Constraints: Minimum of 1. Maximum of 512.</p>
    pub path: ::std::option::Option<::std::string::String>,
    /// <p>The state of the malware that was observed.</p>
    pub state: ::std::option::Option<crate::types::MalwareState>,
}
impl Malware {
    /// <p>The name of the malware that was observed.</p>
    /// <p>Length Constraints: Minimum of 1. Maximum of 64.</p>
    pub fn name(&self) -> ::std::option::Option<&str> {
        self.name.as_deref()
    }
    /// <p>The type of the malware that was observed.</p>
    pub fn r#type(&self) -> ::std::option::Option<&crate::types::MalwareType> {
        self.r#type.as_ref()
    }
    /// <p>The file system path of the malware that was observed.</p>
    /// <p>Length Constraints: Minimum of 1. Maximum of 512.</p>
    pub fn path(&self) -> ::std::option::Option<&str> {
        self.path.as_deref()
    }
    /// <p>The state of the malware that was observed.</p>
    pub fn state(&self) -> ::std::option::Option<&crate::types::MalwareState> {
        self.state.as_ref()
    }
}
impl Malware {
    /// Creates a new builder-style object to manufacture [`Malware`](crate::types::Malware).
    pub fn builder() -> crate::types::builders::MalwareBuilder {
        crate::types::builders::MalwareBuilder::default()
    }
}

/// A builder for [`Malware`](crate::types::Malware).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct MalwareBuilder {
    pub(crate) name: ::std::option::Option<::std::string::String>,
    pub(crate) r#type: ::std::option::Option<crate::types::MalwareType>,
    pub(crate) path: ::std::option::Option<::std::string::String>,
    pub(crate) state: ::std::option::Option<crate::types::MalwareState>,
}
impl MalwareBuilder {
    /// <p>The name of the malware that was observed.</p>
    /// <p>Length Constraints: Minimum of 1. Maximum of 64.</p>
    /// This field is required.
    pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.name = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The name of the malware that was observed.</p>
    /// <p>Length Constraints: Minimum of 1. Maximum of 64.</p>
    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.name = input;
        self
    }
    /// <p>The name of the malware that was observed.</p>
    /// <p>Length Constraints: Minimum of 1. Maximum of 64.</p>
    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.name
    }
    /// <p>The type of the malware that was observed.</p>
    pub fn r#type(mut self, input: crate::types::MalwareType) -> Self {
        self.r#type = ::std::option::Option::Some(input);
        self
    }
    /// <p>The type of the malware that was observed.</p>
    pub fn set_type(mut self, input: ::std::option::Option<crate::types::MalwareType>) -> Self {
        self.r#type = input;
        self
    }
    /// <p>The type of the malware that was observed.</p>
    pub fn get_type(&self) -> &::std::option::Option<crate::types::MalwareType> {
        &self.r#type
    }
    /// <p>The file system path of the malware that was observed.</p>
    /// <p>Length Constraints: Minimum of 1. Maximum of 512.</p>
    pub fn path(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.path = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The file system path of the malware that was observed.</p>
    /// <p>Length Constraints: Minimum of 1. Maximum of 512.</p>
    pub fn set_path(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.path = input;
        self
    }
    /// <p>The file system path of the malware that was observed.</p>
    /// <p>Length Constraints: Minimum of 1. Maximum of 512.</p>
    pub fn get_path(&self) -> &::std::option::Option<::std::string::String> {
        &self.path
    }
    /// <p>The state of the malware that was observed.</p>
    pub fn state(mut self, input: crate::types::MalwareState) -> Self {
        self.state = ::std::option::Option::Some(input);
        self
    }
    /// <p>The state of the malware that was observed.</p>
    pub fn set_state(mut self, input: ::std::option::Option<crate::types::MalwareState>) -> Self {
        self.state = input;
        self
    }
    /// <p>The state of the malware that was observed.</p>
    pub fn get_state(&self) -> &::std::option::Option<crate::types::MalwareState> {
        &self.state
    }
    /// Consumes the builder and constructs a [`Malware`](crate::types::Malware).
    pub fn build(self) -> crate::types::Malware {
        crate::types::Malware {
            name: self.name,
            r#type: self.r#type,
            path: self.path,
            state: self.state,
        }
    }
}