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
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
/// <p>Input for the StartCodeRemediation operation.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct StartCodeRemediationInput {
/// <p>The unique identifier of the agent space.</p>
pub agent_space_id: ::std::option::Option<::std::string::String>,
/// <p>The unique identifier of the pentest job that produced the findings. Mutually exclusive with <code>codeReviewJobId</code>.</p>
pub pentest_job_id: ::std::option::Option<::std::string::String>,
/// <p>The unique identifier of the code review job that produced the findings. Mutually exclusive with <code>pentestJobId</code>.</p>
pub code_review_job_id: ::std::option::Option<::std::string::String>,
/// <p>The list of finding identifiers to initiate code remediation for.</p>
pub finding_ids: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
}
impl StartCodeRemediationInput {
/// <p>The unique identifier of the agent space.</p>
pub fn agent_space_id(&self) -> ::std::option::Option<&str> {
self.agent_space_id.as_deref()
}
/// <p>The unique identifier of the pentest job that produced the findings. Mutually exclusive with <code>codeReviewJobId</code>.</p>
pub fn pentest_job_id(&self) -> ::std::option::Option<&str> {
self.pentest_job_id.as_deref()
}
/// <p>The unique identifier of the code review job that produced the findings. Mutually exclusive with <code>pentestJobId</code>.</p>
pub fn code_review_job_id(&self) -> ::std::option::Option<&str> {
self.code_review_job_id.as_deref()
}
/// <p>The list of finding identifiers to initiate code remediation for.</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 `.finding_ids.is_none()`.
pub fn finding_ids(&self) -> &[::std::string::String] {
self.finding_ids.as_deref().unwrap_or_default()
}
}
impl StartCodeRemediationInput {
/// Creates a new builder-style object to manufacture [`StartCodeRemediationInput`](crate::operation::start_code_remediation::StartCodeRemediationInput).
pub fn builder() -> crate::operation::start_code_remediation::builders::StartCodeRemediationInputBuilder {
crate::operation::start_code_remediation::builders::StartCodeRemediationInputBuilder::default()
}
}
/// A builder for [`StartCodeRemediationInput`](crate::operation::start_code_remediation::StartCodeRemediationInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct StartCodeRemediationInputBuilder {
pub(crate) agent_space_id: ::std::option::Option<::std::string::String>,
pub(crate) pentest_job_id: ::std::option::Option<::std::string::String>,
pub(crate) code_review_job_id: ::std::option::Option<::std::string::String>,
pub(crate) finding_ids: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
}
impl StartCodeRemediationInputBuilder {
/// <p>The unique identifier of the agent space.</p>
/// This field is required.
pub fn agent_space_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.agent_space_id = ::std::option::Option::Some(input.into());
self
}
/// <p>The unique identifier of the agent space.</p>
pub fn set_agent_space_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.agent_space_id = input;
self
}
/// <p>The unique identifier of the agent space.</p>
pub fn get_agent_space_id(&self) -> &::std::option::Option<::std::string::String> {
&self.agent_space_id
}
/// <p>The unique identifier of the pentest job that produced the findings. Mutually exclusive with <code>codeReviewJobId</code>.</p>
pub fn pentest_job_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.pentest_job_id = ::std::option::Option::Some(input.into());
self
}
/// <p>The unique identifier of the pentest job that produced the findings. Mutually exclusive with <code>codeReviewJobId</code>.</p>
pub fn set_pentest_job_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.pentest_job_id = input;
self
}
/// <p>The unique identifier of the pentest job that produced the findings. Mutually exclusive with <code>codeReviewJobId</code>.</p>
pub fn get_pentest_job_id(&self) -> &::std::option::Option<::std::string::String> {
&self.pentest_job_id
}
/// <p>The unique identifier of the code review job that produced the findings. Mutually exclusive with <code>pentestJobId</code>.</p>
pub fn code_review_job_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.code_review_job_id = ::std::option::Option::Some(input.into());
self
}
/// <p>The unique identifier of the code review job that produced the findings. Mutually exclusive with <code>pentestJobId</code>.</p>
pub fn set_code_review_job_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.code_review_job_id = input;
self
}
/// <p>The unique identifier of the code review job that produced the findings. Mutually exclusive with <code>pentestJobId</code>.</p>
pub fn get_code_review_job_id(&self) -> &::std::option::Option<::std::string::String> {
&self.code_review_job_id
}
/// Appends an item to `finding_ids`.
///
/// To override the contents of this collection use [`set_finding_ids`](Self::set_finding_ids).
///
/// <p>The list of finding identifiers to initiate code remediation for.</p>
pub fn finding_ids(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
let mut v = self.finding_ids.unwrap_or_default();
v.push(input.into());
self.finding_ids = ::std::option::Option::Some(v);
self
}
/// <p>The list of finding identifiers to initiate code remediation for.</p>
pub fn set_finding_ids(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
self.finding_ids = input;
self
}
/// <p>The list of finding identifiers to initiate code remediation for.</p>
pub fn get_finding_ids(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
&self.finding_ids
}
/// Consumes the builder and constructs a [`StartCodeRemediationInput`](crate::operation::start_code_remediation::StartCodeRemediationInput).
pub fn build(
self,
) -> ::std::result::Result<crate::operation::start_code_remediation::StartCodeRemediationInput, ::aws_smithy_types::error::operation::BuildError>
{
::std::result::Result::Ok(crate::operation::start_code_remediation::StartCodeRemediationInput {
agent_space_id: self.agent_space_id,
pentest_job_id: self.pentest_job_id,
code_review_job_id: self.code_review_job_id,
finding_ids: self.finding_ids,
})
}
}