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
// 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 GetActivityTaskInput {
/// <p>The Amazon Resource Name (ARN) of the activity to retrieve tasks from (assigned when you create the task using <code>CreateActivity</code>.)</p>
pub activity_arn: ::std::option::Option<::std::string::String>,
/// <p>You can provide an arbitrary name in order to identify the worker that the task is assigned to. This name is used when it is logged in the execution history.</p>
pub worker_name: ::std::option::Option<::std::string::String>,
}
impl GetActivityTaskInput {
/// <p>The Amazon Resource Name (ARN) of the activity to retrieve tasks from (assigned when you create the task using <code>CreateActivity</code>.)</p>
pub fn activity_arn(&self) -> ::std::option::Option<&str> {
self.activity_arn.as_deref()
}
/// <p>You can provide an arbitrary name in order to identify the worker that the task is assigned to. This name is used when it is logged in the execution history.</p>
pub fn worker_name(&self) -> ::std::option::Option<&str> {
self.worker_name.as_deref()
}
}
impl GetActivityTaskInput {
/// Creates a new builder-style object to manufacture [`GetActivityTaskInput`](crate::operation::get_activity_task::GetActivityTaskInput).
pub fn builder() -> crate::operation::get_activity_task::builders::GetActivityTaskInputBuilder {
crate::operation::get_activity_task::builders::GetActivityTaskInputBuilder::default()
}
}
/// A builder for [`GetActivityTaskInput`](crate::operation::get_activity_task::GetActivityTaskInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct GetActivityTaskInputBuilder {
pub(crate) activity_arn: ::std::option::Option<::std::string::String>,
pub(crate) worker_name: ::std::option::Option<::std::string::String>,
}
impl GetActivityTaskInputBuilder {
/// <p>The Amazon Resource Name (ARN) of the activity to retrieve tasks from (assigned when you create the task using <code>CreateActivity</code>.)</p>
/// This field is required.
pub fn activity_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.activity_arn = ::std::option::Option::Some(input.into());
self
}
/// <p>The Amazon Resource Name (ARN) of the activity to retrieve tasks from (assigned when you create the task using <code>CreateActivity</code>.)</p>
pub fn set_activity_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.activity_arn = input;
self
}
/// <p>The Amazon Resource Name (ARN) of the activity to retrieve tasks from (assigned when you create the task using <code>CreateActivity</code>.)</p>
pub fn get_activity_arn(&self) -> &::std::option::Option<::std::string::String> {
&self.activity_arn
}
/// <p>You can provide an arbitrary name in order to identify the worker that the task is assigned to. This name is used when it is logged in the execution history.</p>
pub fn worker_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.worker_name = ::std::option::Option::Some(input.into());
self
}
/// <p>You can provide an arbitrary name in order to identify the worker that the task is assigned to. This name is used when it is logged in the execution history.</p>
pub fn set_worker_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.worker_name = input;
self
}
/// <p>You can provide an arbitrary name in order to identify the worker that the task is assigned to. This name is used when it is logged in the execution history.</p>
pub fn get_worker_name(&self) -> &::std::option::Option<::std::string::String> {
&self.worker_name
}
/// Consumes the builder and constructs a [`GetActivityTaskInput`](crate::operation::get_activity_task::GetActivityTaskInput).
pub fn build(
self,
) -> ::std::result::Result<crate::operation::get_activity_task::GetActivityTaskInput, ::aws_smithy_types::error::operation::BuildError> {
::std::result::Result::Ok(crate::operation::get_activity_task::GetActivityTaskInput {
activity_arn: self.activity_arn,
worker_name: self.worker_name,
})
}
}