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
179
180
181
182
183
184
185
186
187
188
189
// 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 UpdateTaskExecutionInput {
/// <p>Specifies the Amazon Resource Name (ARN) of the task execution that you're updating.</p>
pub task_execution_arn: ::std::option::Option<::std::string::String>,
/// <p>Indicates how your transfer task is configured. These options include how DataSync handles files, objects, and their associated metadata during your transfer. You also can specify how to verify data integrity, set bandwidth limits for your task, among other options.</p>
/// <p>Each option has a default value. Unless you need to, you don't have to configure any option before calling <a href="https://docs.aws.amazon.com/datasync/latest/userguide/API_StartTaskExecution.html">StartTaskExecution</a>.</p>
/// <p>You also can override your task options for each task execution. For example, you might want to adjust the <code>LogLevel</code> for an individual execution.</p>
pub options: ::std::option::Option<crate::types::Options>,
}
impl UpdateTaskExecutionInput {
/// <p>Specifies the Amazon Resource Name (ARN) of the task execution that you're updating.</p>
pub fn task_execution_arn(&self) -> ::std::option::Option<&str> {
self.task_execution_arn.as_deref()
}
/// <p>Indicates how your transfer task is configured. These options include how DataSync handles files, objects, and their associated metadata during your transfer. You also can specify how to verify data integrity, set bandwidth limits for your task, among other options.</p>
/// <p>Each option has a default value. Unless you need to, you don't have to configure any option before calling <a href="https://docs.aws.amazon.com/datasync/latest/userguide/API_StartTaskExecution.html">StartTaskExecution</a>.</p>
/// <p>You also can override your task options for each task execution. For example, you might want to adjust the <code>LogLevel</code> for an individual execution.</p>
pub fn options(&self) -> ::std::option::Option<&crate::types::Options> {
self.options.as_ref()
}
}
static UPDATETASKEXECUTIONINPUT_MEMBER_TASK_EXECUTION_ARN: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
::aws_smithy_schema::ShapeId::from_parts(
"com.amazonaws.datasync.synthetic#UpdateTaskExecutionInput$TaskExecutionArn",
"com.amazonaws.datasync.synthetic",
"UpdateTaskExecutionInput",
),
::aws_smithy_schema::ShapeType::String,
"TaskExecutionArn",
0,
);
static UPDATETASKEXECUTIONINPUT_MEMBER_OPTIONS: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
::aws_smithy_schema::ShapeId::from_parts(
"com.amazonaws.datasync.synthetic#UpdateTaskExecutionInput$Options",
"com.amazonaws.datasync.synthetic",
"UpdateTaskExecutionInput",
),
::aws_smithy_schema::ShapeType::Structure,
"Options",
1,
);
static UPDATETASKEXECUTIONINPUT_SCHEMA: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_struct(
::aws_smithy_schema::ShapeId::from_parts(
"com.amazonaws.datasync.synthetic#UpdateTaskExecutionInput",
"com.amazonaws.datasync.synthetic",
"UpdateTaskExecutionInput",
),
::aws_smithy_schema::ShapeType::Structure,
&[
&UPDATETASKEXECUTIONINPUT_MEMBER_TASK_EXECUTION_ARN,
&UPDATETASKEXECUTIONINPUT_MEMBER_OPTIONS,
],
)
.with_payload_hint(::aws_smithy_schema::PayloadHint::NoStructPayload)
.with_original_name("UpdateTaskExecutionRequest");
impl UpdateTaskExecutionInput {
/// The schema for this shape.
pub const SCHEMA: &'static ::aws_smithy_schema::Schema<'static> = &UPDATETASKEXECUTIONINPUT_SCHEMA;
}
impl ::aws_smithy_schema::serde::SerializableStruct for UpdateTaskExecutionInput {
fn schema(&self) -> &::aws_smithy_schema::Schema<'_> {
Self::SCHEMA
}
#[allow(unused_variables, clippy::diverging_sub_expression)]
fn serialize_members(
&self,
ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
if let Some(ref val) = self.task_execution_arn {
ser.write_string(&UPDATETASKEXECUTIONINPUT_MEMBER_TASK_EXECUTION_ARN, val)?;
}
if let Some(ref val) = self.options {
ser.write_struct(&UPDATETASKEXECUTIONINPUT_MEMBER_OPTIONS, val)?;
}
Ok(())
}
}
impl crate::operation::update_task_execution::builders::UpdateTaskExecutionInputBuilder {
#[allow(
unused_variables,
unreachable_code,
clippy::single_match,
clippy::match_single_binding,
clippy::diverging_sub_expression
)]
pub(crate) fn deserialize_members(
&mut self,
deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
deserializer.read_struct(&UPDATETASKEXECUTIONINPUT_SCHEMA, &mut |member, deser| {
match member.member_index() {
Some(0) => {
if deser.is_null() {
deser.read_null()?;
} else {
self.task_execution_arn = Some(deser.read_string(member)?);
}
}
Some(1) => {
if deser.is_null() {
deser.read_null()?;
} else {
self.options = Some(crate::types::Options::deserialize(deser)?);
}
}
_ => {}
}
Ok(())
})
}
}
impl UpdateTaskExecutionInput {
/// Deserializes this structure from a [`ShapeDeserializer`].
pub fn deserialize(
deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
let mut builder = Self::builder();
builder.deserialize_members(deserializer)?;
builder.task_execution_arn = builder.task_execution_arn.or(Some(String::new()));
builder.build().map_err(|e| aws_smithy_schema::serde::SerdeError::custom(e.to_string()))
}
}
impl UpdateTaskExecutionInput {
/// Creates a new builder-style object to manufacture [`UpdateTaskExecutionInput`](crate::operation::update_task_execution::UpdateTaskExecutionInput).
pub fn builder() -> crate::operation::update_task_execution::builders::UpdateTaskExecutionInputBuilder {
crate::operation::update_task_execution::builders::UpdateTaskExecutionInputBuilder::default()
}
}
/// A builder for [`UpdateTaskExecutionInput`](crate::operation::update_task_execution::UpdateTaskExecutionInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct UpdateTaskExecutionInputBuilder {
pub(crate) task_execution_arn: ::std::option::Option<::std::string::String>,
pub(crate) options: ::std::option::Option<crate::types::Options>,
}
impl UpdateTaskExecutionInputBuilder {
/// <p>Specifies the Amazon Resource Name (ARN) of the task execution that you're updating.</p>
/// This field is required.
pub fn task_execution_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.task_execution_arn = ::std::option::Option::Some(input.into());
self
}
/// <p>Specifies the Amazon Resource Name (ARN) of the task execution that you're updating.</p>
pub fn set_task_execution_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.task_execution_arn = input;
self
}
/// <p>Specifies the Amazon Resource Name (ARN) of the task execution that you're updating.</p>
pub fn get_task_execution_arn(&self) -> &::std::option::Option<::std::string::String> {
&self.task_execution_arn
}
/// <p>Indicates how your transfer task is configured. These options include how DataSync handles files, objects, and their associated metadata during your transfer. You also can specify how to verify data integrity, set bandwidth limits for your task, among other options.</p>
/// <p>Each option has a default value. Unless you need to, you don't have to configure any option before calling <a href="https://docs.aws.amazon.com/datasync/latest/userguide/API_StartTaskExecution.html">StartTaskExecution</a>.</p>
/// <p>You also can override your task options for each task execution. For example, you might want to adjust the <code>LogLevel</code> for an individual execution.</p>
/// This field is required.
pub fn options(mut self, input: crate::types::Options) -> Self {
self.options = ::std::option::Option::Some(input);
self
}
/// <p>Indicates how your transfer task is configured. These options include how DataSync handles files, objects, and their associated metadata during your transfer. You also can specify how to verify data integrity, set bandwidth limits for your task, among other options.</p>
/// <p>Each option has a default value. Unless you need to, you don't have to configure any option before calling <a href="https://docs.aws.amazon.com/datasync/latest/userguide/API_StartTaskExecution.html">StartTaskExecution</a>.</p>
/// <p>You also can override your task options for each task execution. For example, you might want to adjust the <code>LogLevel</code> for an individual execution.</p>
pub fn set_options(mut self, input: ::std::option::Option<crate::types::Options>) -> Self {
self.options = input;
self
}
/// <p>Indicates how your transfer task is configured. These options include how DataSync handles files, objects, and their associated metadata during your transfer. You also can specify how to verify data integrity, set bandwidth limits for your task, among other options.</p>
/// <p>Each option has a default value. Unless you need to, you don't have to configure any option before calling <a href="https://docs.aws.amazon.com/datasync/latest/userguide/API_StartTaskExecution.html">StartTaskExecution</a>.</p>
/// <p>You also can override your task options for each task execution. For example, you might want to adjust the <code>LogLevel</code> for an individual execution.</p>
pub fn get_options(&self) -> &::std::option::Option<crate::types::Options> {
&self.options
}
/// Consumes the builder and constructs a [`UpdateTaskExecutionInput`](crate::operation::update_task_execution::UpdateTaskExecutionInput).
pub fn build(
self,
) -> ::std::result::Result<crate::operation::update_task_execution::UpdateTaskExecutionInput, ::aws_smithy_types::error::operation::BuildError>
{
::std::result::Result::Ok(crate::operation::update_task_execution::UpdateTaskExecutionInput {
task_execution_arn: self.task_execution_arn,
options: self.options,
})
}
}