1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
// 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,
}
}
}