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
// 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 SendTaskHeartbeatInput {
/// <p>The token that represents this task. Task tokens are generated by Step Functions when tasks are assigned to a worker, or in the <a href="https://docs.aws.amazon.com/step-functions/latest/dg/input-output-contextobject.html">context object</a> when a workflow enters a task state. See <code>GetActivityTaskOutput$taskToken</code>.</p>
pub task_token: ::std::option::Option<::std::string::String>,
}
impl SendTaskHeartbeatInput {
/// <p>The token that represents this task. Task tokens are generated by Step Functions when tasks are assigned to a worker, or in the <a href="https://docs.aws.amazon.com/step-functions/latest/dg/input-output-contextobject.html">context object</a> when a workflow enters a task state. See <code>GetActivityTaskOutput$taskToken</code>.</p>
pub fn task_token(&self) -> ::std::option::Option<&str> {
self.task_token.as_deref()
}
}
impl SendTaskHeartbeatInput {
/// Creates a new builder-style object to manufacture [`SendTaskHeartbeatInput`](crate::operation::send_task_heartbeat::SendTaskHeartbeatInput).
pub fn builder() -> crate::operation::send_task_heartbeat::builders::SendTaskHeartbeatInputBuilder {
crate::operation::send_task_heartbeat::builders::SendTaskHeartbeatInputBuilder::default()
}
}
/// A builder for [`SendTaskHeartbeatInput`](crate::operation::send_task_heartbeat::SendTaskHeartbeatInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct SendTaskHeartbeatInputBuilder {
pub(crate) task_token: ::std::option::Option<::std::string::String>,
}
impl SendTaskHeartbeatInputBuilder {
/// <p>The token that represents this task. Task tokens are generated by Step Functions when tasks are assigned to a worker, or in the <a href="https://docs.aws.amazon.com/step-functions/latest/dg/input-output-contextobject.html">context object</a> when a workflow enters a task state. See <code>GetActivityTaskOutput$taskToken</code>.</p>
/// This field is required.
pub fn task_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.task_token = ::std::option::Option::Some(input.into());
self
}
/// <p>The token that represents this task. Task tokens are generated by Step Functions when tasks are assigned to a worker, or in the <a href="https://docs.aws.amazon.com/step-functions/latest/dg/input-output-contextobject.html">context object</a> when a workflow enters a task state. See <code>GetActivityTaskOutput$taskToken</code>.</p>
pub fn set_task_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.task_token = input;
self
}
/// <p>The token that represents this task. Task tokens are generated by Step Functions when tasks are assigned to a worker, or in the <a href="https://docs.aws.amazon.com/step-functions/latest/dg/input-output-contextobject.html">context object</a> when a workflow enters a task state. See <code>GetActivityTaskOutput$taskToken</code>.</p>
pub fn get_task_token(&self) -> &::std::option::Option<::std::string::String> {
&self.task_token
}
/// Consumes the builder and constructs a [`SendTaskHeartbeatInput`](crate::operation::send_task_heartbeat::SendTaskHeartbeatInput).
pub fn build(
self,
) -> ::std::result::Result<crate::operation::send_task_heartbeat::SendTaskHeartbeatInput, ::aws_smithy_types::error::operation::BuildError> {
::std::result::Result::Ok(crate::operation::send_task_heartbeat::SendTaskHeartbeatInput { task_token: self.task_token })
}
}