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
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
/// <p>A user-defined note added to a finding.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct Note {
/// <p>The text of a note.</p>
/// <p>Length Constraints: Minimum of 1. Maximum of 512.</p>
pub text: ::std::option::Option<::std::string::String>,
/// <p>The principal that created a note.</p>
pub updated_by: ::std::option::Option<::std::string::String>,
/// <p>A timestamp that indicates when the note was updated.</p>
/// <p>For more information about the validation and formatting of timestamp fields in Security Hub CSPM, see <a href="https://docs.aws.amazon.com/securityhub/1.0/APIReference/Welcome.html#timestamps">Timestamps</a>.</p>
pub updated_at: ::std::option::Option<::std::string::String>,
}
impl Note {
/// <p>The text of a note.</p>
/// <p>Length Constraints: Minimum of 1. Maximum of 512.</p>
pub fn text(&self) -> ::std::option::Option<&str> {
self.text.as_deref()
}
/// <p>The principal that created a note.</p>
pub fn updated_by(&self) -> ::std::option::Option<&str> {
self.updated_by.as_deref()
}
/// <p>A timestamp that indicates when the note was updated.</p>
/// <p>For more information about the validation and formatting of timestamp fields in Security Hub CSPM, see <a href="https://docs.aws.amazon.com/securityhub/1.0/APIReference/Welcome.html#timestamps">Timestamps</a>.</p>
pub fn updated_at(&self) -> ::std::option::Option<&str> {
self.updated_at.as_deref()
}
}
impl Note {
/// Creates a new builder-style object to manufacture [`Note`](crate::types::Note).
pub fn builder() -> crate::types::builders::NoteBuilder {
crate::types::builders::NoteBuilder::default()
}
}
/// A builder for [`Note`](crate::types::Note).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct NoteBuilder {
pub(crate) text: ::std::option::Option<::std::string::String>,
pub(crate) updated_by: ::std::option::Option<::std::string::String>,
pub(crate) updated_at: ::std::option::Option<::std::string::String>,
}
impl NoteBuilder {
/// <p>The text of a note.</p>
/// <p>Length Constraints: Minimum of 1. Maximum of 512.</p>
/// This field is required.
pub fn text(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.text = ::std::option::Option::Some(input.into());
self
}
/// <p>The text of a note.</p>
/// <p>Length Constraints: Minimum of 1. Maximum of 512.</p>
pub fn set_text(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.text = input;
self
}
/// <p>The text of a note.</p>
/// <p>Length Constraints: Minimum of 1. Maximum of 512.</p>
pub fn get_text(&self) -> &::std::option::Option<::std::string::String> {
&self.text
}
/// <p>The principal that created a note.</p>
/// This field is required.
pub fn updated_by(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.updated_by = ::std::option::Option::Some(input.into());
self
}
/// <p>The principal that created a note.</p>
pub fn set_updated_by(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.updated_by = input;
self
}
/// <p>The principal that created a note.</p>
pub fn get_updated_by(&self) -> &::std::option::Option<::std::string::String> {
&self.updated_by
}
/// <p>A timestamp that indicates when the note was updated.</p>
/// <p>For more information about the validation and formatting of timestamp fields in Security Hub CSPM, see <a href="https://docs.aws.amazon.com/securityhub/1.0/APIReference/Welcome.html#timestamps">Timestamps</a>.</p>
/// This field is required.
pub fn updated_at(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.updated_at = ::std::option::Option::Some(input.into());
self
}
/// <p>A timestamp that indicates when the note was updated.</p>
/// <p>For more information about the validation and formatting of timestamp fields in Security Hub CSPM, see <a href="https://docs.aws.amazon.com/securityhub/1.0/APIReference/Welcome.html#timestamps">Timestamps</a>.</p>
pub fn set_updated_at(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.updated_at = input;
self
}
/// <p>A timestamp that indicates when the note was updated.</p>
/// <p>For more information about the validation and formatting of timestamp fields in Security Hub CSPM, see <a href="https://docs.aws.amazon.com/securityhub/1.0/APIReference/Welcome.html#timestamps">Timestamps</a>.</p>
pub fn get_updated_at(&self) -> &::std::option::Option<::std::string::String> {
&self.updated_at
}
/// Consumes the builder and constructs a [`Note`](crate::types::Note).
pub fn build(self) -> crate::types::Note {
crate::types::Note {
text: self.text,
updated_by: self.updated_by,
updated_at: self.updated_at,
}
}
}