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
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
/// <p>Provides the details of the <code>WorkflowExecutionTimedOut</code> event.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct WorkflowExecutionTimedOutEventAttributes {
/// <p>The type of timeout that caused this event.</p>
pub timeout_type: ::std::option::Option<crate::types::WorkflowExecutionTimeoutType>,
/// <p>The policy used for the child workflow executions of this workflow execution.</p>
/// <p>The supported child policies are:</p>
/// <ul>
/// <li> <p> <code>TERMINATE</code> – The child executions are terminated.</p> </li>
/// <li> <p> <code>REQUEST_CANCEL</code> – A request to cancel is attempted for each child execution by recording a <code>WorkflowExecutionCancelRequested</code> event in its history. It is up to the decider to take appropriate actions when it receives an execution history with this event.</p> </li>
/// <li> <p> <code>ABANDON</code> – No action is taken. The child executions continue to run.</p> </li>
/// </ul>
pub child_policy: ::std::option::Option<crate::types::ChildPolicy>,
}
impl WorkflowExecutionTimedOutEventAttributes {
/// <p>The type of timeout that caused this event.</p>
pub fn timeout_type(&self) -> ::std::option::Option<&crate::types::WorkflowExecutionTimeoutType> {
self.timeout_type.as_ref()
}
/// <p>The policy used for the child workflow executions of this workflow execution.</p>
/// <p>The supported child policies are:</p>
/// <ul>
/// <li> <p> <code>TERMINATE</code> – The child executions are terminated.</p> </li>
/// <li> <p> <code>REQUEST_CANCEL</code> – A request to cancel is attempted for each child execution by recording a <code>WorkflowExecutionCancelRequested</code> event in its history. It is up to the decider to take appropriate actions when it receives an execution history with this event.</p> </li>
/// <li> <p> <code>ABANDON</code> – No action is taken. The child executions continue to run.</p> </li>
/// </ul>
pub fn child_policy(&self) -> ::std::option::Option<&crate::types::ChildPolicy> {
self.child_policy.as_ref()
}
}
impl WorkflowExecutionTimedOutEventAttributes {
/// Creates a new builder-style object to manufacture [`WorkflowExecutionTimedOutEventAttributes`](crate::types::WorkflowExecutionTimedOutEventAttributes).
pub fn builder() -> crate::types::builders::WorkflowExecutionTimedOutEventAttributesBuilder {
crate::types::builders::WorkflowExecutionTimedOutEventAttributesBuilder::default()
}
}
/// A builder for [`WorkflowExecutionTimedOutEventAttributes`](crate::types::WorkflowExecutionTimedOutEventAttributes).
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
pub struct WorkflowExecutionTimedOutEventAttributesBuilder {
pub(crate) timeout_type: ::std::option::Option<crate::types::WorkflowExecutionTimeoutType>,
pub(crate) child_policy: ::std::option::Option<crate::types::ChildPolicy>,
}
impl WorkflowExecutionTimedOutEventAttributesBuilder {
/// <p>The type of timeout that caused this event.</p>
pub fn timeout_type(mut self, input: crate::types::WorkflowExecutionTimeoutType) -> Self {
self.timeout_type = ::std::option::Option::Some(input);
self
}
/// <p>The type of timeout that caused this event.</p>
pub fn set_timeout_type(mut self, input: ::std::option::Option<crate::types::WorkflowExecutionTimeoutType>) -> Self {
self.timeout_type = input;
self
}
/// <p>The type of timeout that caused this event.</p>
pub fn get_timeout_type(&self) -> &::std::option::Option<crate::types::WorkflowExecutionTimeoutType> {
&self.timeout_type
}
/// <p>The policy used for the child workflow executions of this workflow execution.</p>
/// <p>The supported child policies are:</p>
/// <ul>
/// <li> <p> <code>TERMINATE</code> – The child executions are terminated.</p> </li>
/// <li> <p> <code>REQUEST_CANCEL</code> – A request to cancel is attempted for each child execution by recording a <code>WorkflowExecutionCancelRequested</code> event in its history. It is up to the decider to take appropriate actions when it receives an execution history with this event.</p> </li>
/// <li> <p> <code>ABANDON</code> – No action is taken. The child executions continue to run.</p> </li>
/// </ul>
pub fn child_policy(mut self, input: crate::types::ChildPolicy) -> Self {
self.child_policy = ::std::option::Option::Some(input);
self
}
/// <p>The policy used for the child workflow executions of this workflow execution.</p>
/// <p>The supported child policies are:</p>
/// <ul>
/// <li> <p> <code>TERMINATE</code> – The child executions are terminated.</p> </li>
/// <li> <p> <code>REQUEST_CANCEL</code> – A request to cancel is attempted for each child execution by recording a <code>WorkflowExecutionCancelRequested</code> event in its history. It is up to the decider to take appropriate actions when it receives an execution history with this event.</p> </li>
/// <li> <p> <code>ABANDON</code> – No action is taken. The child executions continue to run.</p> </li>
/// </ul>
pub fn set_child_policy(mut self, input: ::std::option::Option<crate::types::ChildPolicy>) -> Self {
self.child_policy = input;
self
}
/// <p>The policy used for the child workflow executions of this workflow execution.</p>
/// <p>The supported child policies are:</p>
/// <ul>
/// <li> <p> <code>TERMINATE</code> – The child executions are terminated.</p> </li>
/// <li> <p> <code>REQUEST_CANCEL</code> – A request to cancel is attempted for each child execution by recording a <code>WorkflowExecutionCancelRequested</code> event in its history. It is up to the decider to take appropriate actions when it receives an execution history with this event.</p> </li>
/// <li> <p> <code>ABANDON</code> – No action is taken. The child executions continue to run.</p> </li>
/// </ul>
pub fn get_child_policy(&self) -> &::std::option::Option<crate::types::ChildPolicy> {
&self.child_policy
}
/// Consumes the builder and constructs a [`WorkflowExecutionTimedOutEventAttributes`](crate::types::WorkflowExecutionTimedOutEventAttributes).
pub fn build(self) -> crate::types::WorkflowExecutionTimedOutEventAttributes {
crate::types::WorkflowExecutionTimedOutEventAttributes {
timeout_type: self.timeout_type,
child_policy: self.child_policy,
}
}
}