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
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
/// <p>The collection of assets used in a pentest configuration, including endpoints, actors, documents, source code repositories, and integrated repositories.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct Assets {
/// <p>The list of endpoints to test during the pentest.</p>
pub endpoints: ::std::option::Option<::std::vec::Vec<crate::types::Endpoint>>,
/// <p>The list of actors used during penetration testing.</p>
pub actors: ::std::option::Option<::std::vec::Vec<crate::types::Actor>>,
/// <p>The list of documents that provide context for the pentest.</p>
pub documents: ::std::option::Option<::std::vec::Vec<crate::types::DocumentInfo>>,
/// <p>The list of source code repositories to analyze during the pentest.</p>
pub source_code: ::std::option::Option<::std::vec::Vec<crate::types::SourceCodeRepository>>,
/// <p>The list of integrated repositories associated with the pentest.</p>
pub integrated_repositories: ::std::option::Option<::std::vec::Vec<crate::types::IntegratedRepository>>,
}
impl Assets {
/// <p>The list of endpoints to test during the pentest.</p>
///
/// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.endpoints.is_none()`.
pub fn endpoints(&self) -> &[crate::types::Endpoint] {
self.endpoints.as_deref().unwrap_or_default()
}
/// <p>The list of actors used during penetration testing.</p>
///
/// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.actors.is_none()`.
pub fn actors(&self) -> &[crate::types::Actor] {
self.actors.as_deref().unwrap_or_default()
}
/// <p>The list of documents that provide context for the pentest.</p>
///
/// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.documents.is_none()`.
pub fn documents(&self) -> &[crate::types::DocumentInfo] {
self.documents.as_deref().unwrap_or_default()
}
/// <p>The list of source code repositories to analyze during the pentest.</p>
///
/// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.source_code.is_none()`.
pub fn source_code(&self) -> &[crate::types::SourceCodeRepository] {
self.source_code.as_deref().unwrap_or_default()
}
/// <p>The list of integrated repositories associated with the pentest.</p>
///
/// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.integrated_repositories.is_none()`.
pub fn integrated_repositories(&self) -> &[crate::types::IntegratedRepository] {
self.integrated_repositories.as_deref().unwrap_or_default()
}
}
impl Assets {
/// Creates a new builder-style object to manufacture [`Assets`](crate::types::Assets).
pub fn builder() -> crate::types::builders::AssetsBuilder {
crate::types::builders::AssetsBuilder::default()
}
}
/// A builder for [`Assets`](crate::types::Assets).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct AssetsBuilder {
pub(crate) endpoints: ::std::option::Option<::std::vec::Vec<crate::types::Endpoint>>,
pub(crate) actors: ::std::option::Option<::std::vec::Vec<crate::types::Actor>>,
pub(crate) documents: ::std::option::Option<::std::vec::Vec<crate::types::DocumentInfo>>,
pub(crate) source_code: ::std::option::Option<::std::vec::Vec<crate::types::SourceCodeRepository>>,
pub(crate) integrated_repositories: ::std::option::Option<::std::vec::Vec<crate::types::IntegratedRepository>>,
}
impl AssetsBuilder {
/// Appends an item to `endpoints`.
///
/// To override the contents of this collection use [`set_endpoints`](Self::set_endpoints).
///
/// <p>The list of endpoints to test during the pentest.</p>
pub fn endpoints(mut self, input: crate::types::Endpoint) -> Self {
let mut v = self.endpoints.unwrap_or_default();
v.push(input);
self.endpoints = ::std::option::Option::Some(v);
self
}
/// <p>The list of endpoints to test during the pentest.</p>
pub fn set_endpoints(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Endpoint>>) -> Self {
self.endpoints = input;
self
}
/// <p>The list of endpoints to test during the pentest.</p>
pub fn get_endpoints(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Endpoint>> {
&self.endpoints
}
/// Appends an item to `actors`.
///
/// To override the contents of this collection use [`set_actors`](Self::set_actors).
///
/// <p>The list of actors used during penetration testing.</p>
pub fn actors(mut self, input: crate::types::Actor) -> Self {
let mut v = self.actors.unwrap_or_default();
v.push(input);
self.actors = ::std::option::Option::Some(v);
self
}
/// <p>The list of actors used during penetration testing.</p>
pub fn set_actors(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Actor>>) -> Self {
self.actors = input;
self
}
/// <p>The list of actors used during penetration testing.</p>
pub fn get_actors(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Actor>> {
&self.actors
}
/// Appends an item to `documents`.
///
/// To override the contents of this collection use [`set_documents`](Self::set_documents).
///
/// <p>The list of documents that provide context for the pentest.</p>
pub fn documents(mut self, input: crate::types::DocumentInfo) -> Self {
let mut v = self.documents.unwrap_or_default();
v.push(input);
self.documents = ::std::option::Option::Some(v);
self
}
/// <p>The list of documents that provide context for the pentest.</p>
pub fn set_documents(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::DocumentInfo>>) -> Self {
self.documents = input;
self
}
/// <p>The list of documents that provide context for the pentest.</p>
pub fn get_documents(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::DocumentInfo>> {
&self.documents
}
/// Appends an item to `source_code`.
///
/// To override the contents of this collection use [`set_source_code`](Self::set_source_code).
///
/// <p>The list of source code repositories to analyze during the pentest.</p>
pub fn source_code(mut self, input: crate::types::SourceCodeRepository) -> Self {
let mut v = self.source_code.unwrap_or_default();
v.push(input);
self.source_code = ::std::option::Option::Some(v);
self
}
/// <p>The list of source code repositories to analyze during the pentest.</p>
pub fn set_source_code(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::SourceCodeRepository>>) -> Self {
self.source_code = input;
self
}
/// <p>The list of source code repositories to analyze during the pentest.</p>
pub fn get_source_code(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::SourceCodeRepository>> {
&self.source_code
}
/// Appends an item to `integrated_repositories`.
///
/// To override the contents of this collection use [`set_integrated_repositories`](Self::set_integrated_repositories).
///
/// <p>The list of integrated repositories associated with the pentest.</p>
pub fn integrated_repositories(mut self, input: crate::types::IntegratedRepository) -> Self {
let mut v = self.integrated_repositories.unwrap_or_default();
v.push(input);
self.integrated_repositories = ::std::option::Option::Some(v);
self
}
/// <p>The list of integrated repositories associated with the pentest.</p>
pub fn set_integrated_repositories(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::IntegratedRepository>>) -> Self {
self.integrated_repositories = input;
self
}
/// <p>The list of integrated repositories associated with the pentest.</p>
pub fn get_integrated_repositories(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::IntegratedRepository>> {
&self.integrated_repositories
}
/// Consumes the builder and constructs a [`Assets`](crate::types::Assets).
pub fn build(self) -> crate::types::Assets {
crate::types::Assets {
endpoints: self.endpoints,
actors: self.actors,
documents: self.documents,
source_code: self.source_code,
integrated_repositories: self.integrated_repositories,
}
}
}