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
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
/// <p>Provide details of the <code>ChildWorkflowExecutionCanceled</code> event.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct ChildWorkflowExecutionCanceledEventAttributes {
/// <p>The child workflow execution that was canceled.</p>
pub workflow_execution: ::std::option::Option<crate::types::WorkflowExecution>,
/// <p>The type of the child workflow execution.</p>
pub workflow_type: ::std::option::Option<crate::types::WorkflowType>,
/// <p>Details of the cancellation (if provided).</p>
pub details: ::std::option::Option<::std::string::String>,
/// <p>The ID of the <code>StartChildWorkflowExecutionInitiated</code> event corresponding to the <code>StartChildWorkflowExecution</code> <code>Decision</code> to start this child workflow execution. This information can be useful for diagnosing problems by tracing back the chain of events leading up to this event.</p>
pub initiated_event_id: i64,
/// <p>The ID of the <code>ChildWorkflowExecutionStarted</code> event recorded when this child workflow execution was started. This information can be useful for diagnosing problems by tracing back the chain of events leading up to this event.</p>
pub started_event_id: i64,
}
impl ChildWorkflowExecutionCanceledEventAttributes {
/// <p>The child workflow execution that was canceled.</p>
pub fn workflow_execution(&self) -> ::std::option::Option<&crate::types::WorkflowExecution> {
self.workflow_execution.as_ref()
}
/// <p>The type of the child workflow execution.</p>
pub fn workflow_type(&self) -> ::std::option::Option<&crate::types::WorkflowType> {
self.workflow_type.as_ref()
}
/// <p>Details of the cancellation (if provided).</p>
pub fn details(&self) -> ::std::option::Option<&str> {
self.details.as_deref()
}
/// <p>The ID of the <code>StartChildWorkflowExecutionInitiated</code> event corresponding to the <code>StartChildWorkflowExecution</code> <code>Decision</code> to start this child workflow execution. This information can be useful for diagnosing problems by tracing back the chain of events leading up to this event.</p>
pub fn initiated_event_id(&self) -> i64 {
self.initiated_event_id
}
/// <p>The ID of the <code>ChildWorkflowExecutionStarted</code> event recorded when this child workflow execution was started. This information can be useful for diagnosing problems by tracing back the chain of events leading up to this event.</p>
pub fn started_event_id(&self) -> i64 {
self.started_event_id
}
}
impl ChildWorkflowExecutionCanceledEventAttributes {
/// Creates a new builder-style object to manufacture [`ChildWorkflowExecutionCanceledEventAttributes`](crate::types::ChildWorkflowExecutionCanceledEventAttributes).
pub fn builder() -> crate::types::builders::ChildWorkflowExecutionCanceledEventAttributesBuilder {
crate::types::builders::ChildWorkflowExecutionCanceledEventAttributesBuilder::default()
}
}
/// A builder for [`ChildWorkflowExecutionCanceledEventAttributes`](crate::types::ChildWorkflowExecutionCanceledEventAttributes).
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
pub struct ChildWorkflowExecutionCanceledEventAttributesBuilder {
pub(crate) workflow_execution: ::std::option::Option<crate::types::WorkflowExecution>,
pub(crate) workflow_type: ::std::option::Option<crate::types::WorkflowType>,
pub(crate) details: ::std::option::Option<::std::string::String>,
pub(crate) initiated_event_id: ::std::option::Option<i64>,
pub(crate) started_event_id: ::std::option::Option<i64>,
}
impl ChildWorkflowExecutionCanceledEventAttributesBuilder {
/// <p>The child workflow execution that was canceled.</p>
/// This field is required.
pub fn workflow_execution(mut self, input: crate::types::WorkflowExecution) -> Self {
self.workflow_execution = ::std::option::Option::Some(input);
self
}
/// <p>The child workflow execution that was canceled.</p>
pub fn set_workflow_execution(mut self, input: ::std::option::Option<crate::types::WorkflowExecution>) -> Self {
self.workflow_execution = input;
self
}
/// <p>The child workflow execution that was canceled.</p>
pub fn get_workflow_execution(&self) -> &::std::option::Option<crate::types::WorkflowExecution> {
&self.workflow_execution
}
/// <p>The type of the child workflow execution.</p>
/// This field is required.
pub fn workflow_type(mut self, input: crate::types::WorkflowType) -> Self {
self.workflow_type = ::std::option::Option::Some(input);
self
}
/// <p>The type of the child workflow execution.</p>
pub fn set_workflow_type(mut self, input: ::std::option::Option<crate::types::WorkflowType>) -> Self {
self.workflow_type = input;
self
}
/// <p>The type of the child workflow execution.</p>
pub fn get_workflow_type(&self) -> &::std::option::Option<crate::types::WorkflowType> {
&self.workflow_type
}
/// <p>Details of the cancellation (if provided).</p>
pub fn details(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.details = ::std::option::Option::Some(input.into());
self
}
/// <p>Details of the cancellation (if provided).</p>
pub fn set_details(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.details = input;
self
}
/// <p>Details of the cancellation (if provided).</p>
pub fn get_details(&self) -> &::std::option::Option<::std::string::String> {
&self.details
}
/// <p>The ID of the <code>StartChildWorkflowExecutionInitiated</code> event corresponding to the <code>StartChildWorkflowExecution</code> <code>Decision</code> to start this child workflow execution. This information can be useful for diagnosing problems by tracing back the chain of events leading up to this event.</p>
/// This field is required.
pub fn initiated_event_id(mut self, input: i64) -> Self {
self.initiated_event_id = ::std::option::Option::Some(input);
self
}
/// <p>The ID of the <code>StartChildWorkflowExecutionInitiated</code> event corresponding to the <code>StartChildWorkflowExecution</code> <code>Decision</code> to start this child workflow execution. This information can be useful for diagnosing problems by tracing back the chain of events leading up to this event.</p>
pub fn set_initiated_event_id(mut self, input: ::std::option::Option<i64>) -> Self {
self.initiated_event_id = input;
self
}
/// <p>The ID of the <code>StartChildWorkflowExecutionInitiated</code> event corresponding to the <code>StartChildWorkflowExecution</code> <code>Decision</code> to start this child workflow execution. This information can be useful for diagnosing problems by tracing back the chain of events leading up to this event.</p>
pub fn get_initiated_event_id(&self) -> &::std::option::Option<i64> {
&self.initiated_event_id
}
/// <p>The ID of the <code>ChildWorkflowExecutionStarted</code> event recorded when this child workflow execution was started. This information can be useful for diagnosing problems by tracing back the chain of events leading up to this event.</p>
/// This field is required.
pub fn started_event_id(mut self, input: i64) -> Self {
self.started_event_id = ::std::option::Option::Some(input);
self
}
/// <p>The ID of the <code>ChildWorkflowExecutionStarted</code> event recorded when this child workflow execution was started. This information can be useful for diagnosing problems by tracing back the chain of events leading up to this event.</p>
pub fn set_started_event_id(mut self, input: ::std::option::Option<i64>) -> Self {
self.started_event_id = input;
self
}
/// <p>The ID of the <code>ChildWorkflowExecutionStarted</code> event recorded when this child workflow execution was started. This information can be useful for diagnosing problems by tracing back the chain of events leading up to this event.</p>
pub fn get_started_event_id(&self) -> &::std::option::Option<i64> {
&self.started_event_id
}
/// Consumes the builder and constructs a [`ChildWorkflowExecutionCanceledEventAttributes`](crate::types::ChildWorkflowExecutionCanceledEventAttributes).
pub fn build(self) -> crate::types::ChildWorkflowExecutionCanceledEventAttributes {
crate::types::ChildWorkflowExecutionCanceledEventAttributes {
workflow_execution: self.workflow_execution,
workflow_type: self.workflow_type,
details: self.details,
initiated_event_id: self.initiated_event_id.unwrap_or_default(),
started_event_id: self.started_event_id.unwrap_or_default(),
}
}
}