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
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct UpdateChangeSetInput {
/// <p>The change set to edit: the <code>changeSetId</code> that GetCurationProposal returns.</p>
pub change_set_id: ::std::option::Option<::std::string::String>,
/// <p>The agent context that the change set belongs to, by its ID or ARN. AWS Context authorizes the request on this agent context's ARN. If the change set belongs to another agent context, the request fails with <code>ResourceNotFoundException</code>.</p>
pub agent_context_id: ::std::option::Option<::std::string::String>,
/// <p>The change set version that you read with GetChangeSet. The edit applies only if it's still the latest version. Otherwise, the request fails with <code>ConflictException</code>.</p>
pub change_set_version: ::std::option::Option<i32>,
/// <p>A unique, case-sensitive identifier that you provide to make the request idempotent. For 8 hours, a retry of the same request with the same token returns the change set's latest version without writing again, and the same token used for another change set or a different request returns a <code>ValidationException</code>.</p>
pub client_token: ::std::option::Option<::std::string::String>,
/// <p>Operations to remove, copied unchanged from <code>ListChangeSetOperations</code>. A retry must resend the same list with the same clientToken.</p>
pub operations_to_remove: ::std::option::Option<::std::vec::Vec<crate::types::ChangeSetOperation>>,
}
impl UpdateChangeSetInput {
/// <p>The change set to edit: the <code>changeSetId</code> that GetCurationProposal returns.</p>
pub fn change_set_id(&self) -> ::std::option::Option<&str> {
self.change_set_id.as_deref()
}
/// <p>The agent context that the change set belongs to, by its ID or ARN. AWS Context authorizes the request on this agent context's ARN. If the change set belongs to another agent context, the request fails with <code>ResourceNotFoundException</code>.</p>
pub fn agent_context_id(&self) -> ::std::option::Option<&str> {
self.agent_context_id.as_deref()
}
/// <p>The change set version that you read with GetChangeSet. The edit applies only if it's still the latest version. Otherwise, the request fails with <code>ConflictException</code>.</p>
pub fn change_set_version(&self) -> ::std::option::Option<i32> {
self.change_set_version
}
/// <p>A unique, case-sensitive identifier that you provide to make the request idempotent. For 8 hours, a retry of the same request with the same token returns the change set's latest version without writing again, and the same token used for another change set or a different request returns a <code>ValidationException</code>.</p>
pub fn client_token(&self) -> ::std::option::Option<&str> {
self.client_token.as_deref()
}
/// <p>Operations to remove, copied unchanged from <code>ListChangeSetOperations</code>. A retry must resend the same list with the same clientToken.</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 `.operations_to_remove.is_none()`.
pub fn operations_to_remove(&self) -> &[crate::types::ChangeSetOperation] {
self.operations_to_remove.as_deref().unwrap_or_default()
}
}
impl UpdateChangeSetInput {
/// Creates a new builder-style object to manufacture [`UpdateChangeSetInput`](crate::operation::update_change_set::UpdateChangeSetInput).
pub fn builder() -> crate::operation::update_change_set::builders::UpdateChangeSetInputBuilder {
crate::operation::update_change_set::builders::UpdateChangeSetInputBuilder::default()
}
}
/// A builder for [`UpdateChangeSetInput`](crate::operation::update_change_set::UpdateChangeSetInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct UpdateChangeSetInputBuilder {
pub(crate) change_set_id: ::std::option::Option<::std::string::String>,
pub(crate) agent_context_id: ::std::option::Option<::std::string::String>,
pub(crate) change_set_version: ::std::option::Option<i32>,
pub(crate) client_token: ::std::option::Option<::std::string::String>,
pub(crate) operations_to_remove: ::std::option::Option<::std::vec::Vec<crate::types::ChangeSetOperation>>,
}
impl UpdateChangeSetInputBuilder {
/// <p>The change set to edit: the <code>changeSetId</code> that GetCurationProposal returns.</p>
/// This field is required.
pub fn change_set_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.change_set_id = ::std::option::Option::Some(input.into());
self
}
/// <p>The change set to edit: the <code>changeSetId</code> that GetCurationProposal returns.</p>
pub fn set_change_set_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.change_set_id = input;
self
}
/// <p>The change set to edit: the <code>changeSetId</code> that GetCurationProposal returns.</p>
pub fn get_change_set_id(&self) -> &::std::option::Option<::std::string::String> {
&self.change_set_id
}
/// <p>The agent context that the change set belongs to, by its ID or ARN. AWS Context authorizes the request on this agent context's ARN. If the change set belongs to another agent context, the request fails with <code>ResourceNotFoundException</code>.</p>
/// This field is required.
pub fn agent_context_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.agent_context_id = ::std::option::Option::Some(input.into());
self
}
/// <p>The agent context that the change set belongs to, by its ID or ARN. AWS Context authorizes the request on this agent context's ARN. If the change set belongs to another agent context, the request fails with <code>ResourceNotFoundException</code>.</p>
pub fn set_agent_context_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.agent_context_id = input;
self
}
/// <p>The agent context that the change set belongs to, by its ID or ARN. AWS Context authorizes the request on this agent context's ARN. If the change set belongs to another agent context, the request fails with <code>ResourceNotFoundException</code>.</p>
pub fn get_agent_context_id(&self) -> &::std::option::Option<::std::string::String> {
&self.agent_context_id
}
/// <p>The change set version that you read with GetChangeSet. The edit applies only if it's still the latest version. Otherwise, the request fails with <code>ConflictException</code>.</p>
/// This field is required.
pub fn change_set_version(mut self, input: i32) -> Self {
self.change_set_version = ::std::option::Option::Some(input);
self
}
/// <p>The change set version that you read with GetChangeSet. The edit applies only if it's still the latest version. Otherwise, the request fails with <code>ConflictException</code>.</p>
pub fn set_change_set_version(mut self, input: ::std::option::Option<i32>) -> Self {
self.change_set_version = input;
self
}
/// <p>The change set version that you read with GetChangeSet. The edit applies only if it's still the latest version. Otherwise, the request fails with <code>ConflictException</code>.</p>
pub fn get_change_set_version(&self) -> &::std::option::Option<i32> {
&self.change_set_version
}
/// <p>A unique, case-sensitive identifier that you provide to make the request idempotent. For 8 hours, a retry of the same request with the same token returns the change set's latest version without writing again, and the same token used for another change set or a different request returns a <code>ValidationException</code>.</p>
pub fn client_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.client_token = ::std::option::Option::Some(input.into());
self
}
/// <p>A unique, case-sensitive identifier that you provide to make the request idempotent. For 8 hours, a retry of the same request with the same token returns the change set's latest version without writing again, and the same token used for another change set or a different request returns a <code>ValidationException</code>.</p>
pub fn set_client_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.client_token = input;
self
}
/// <p>A unique, case-sensitive identifier that you provide to make the request idempotent. For 8 hours, a retry of the same request with the same token returns the change set's latest version without writing again, and the same token used for another change set or a different request returns a <code>ValidationException</code>.</p>
pub fn get_client_token(&self) -> &::std::option::Option<::std::string::String> {
&self.client_token
}
/// Appends an item to `operations_to_remove`.
///
/// To override the contents of this collection use [`set_operations_to_remove`](Self::set_operations_to_remove).
///
/// <p>Operations to remove, copied unchanged from <code>ListChangeSetOperations</code>. A retry must resend the same list with the same clientToken.</p>
pub fn operations_to_remove(mut self, input: crate::types::ChangeSetOperation) -> Self {
let mut v = self.operations_to_remove.unwrap_or_default();
v.push(input);
self.operations_to_remove = ::std::option::Option::Some(v);
self
}
/// <p>Operations to remove, copied unchanged from <code>ListChangeSetOperations</code>. A retry must resend the same list with the same clientToken.</p>
pub fn set_operations_to_remove(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::ChangeSetOperation>>) -> Self {
self.operations_to_remove = input;
self
}
/// <p>Operations to remove, copied unchanged from <code>ListChangeSetOperations</code>. A retry must resend the same list with the same clientToken.</p>
pub fn get_operations_to_remove(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::ChangeSetOperation>> {
&self.operations_to_remove
}
/// Consumes the builder and constructs a [`UpdateChangeSetInput`](crate::operation::update_change_set::UpdateChangeSetInput).
pub fn build(
self,
) -> ::std::result::Result<crate::operation::update_change_set::UpdateChangeSetInput, ::aws_smithy_types::error::operation::BuildError> {
::std::result::Result::Ok(crate::operation::update_change_set::UpdateChangeSetInput {
change_set_id: self.change_set_id,
agent_context_id: self.agent_context_id,
change_set_version: self.change_set_version,
client_token: self.client_token,
operations_to_remove: self.operations_to_remove,
})
}
}