aws_sdk_novaact/operation/update_act/
_update_act_input.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2#[allow(missing_docs)] // documentation missing in model
3#[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct UpdateActInput {
6    /// <p>The name of the workflow definition containing the act.</p>
7    pub workflow_definition_name: ::std::option::Option<::std::string::String>,
8    /// <p>The unique identifier of the workflow run containing the act.</p>
9    pub workflow_run_id: ::std::option::Option<::std::string::String>,
10    /// <p>The unique identifier of the session containing the act.</p>
11    pub session_id: ::std::option::Option<::std::string::String>,
12    /// <p>The unique identifier of the act to update.</p>
13    pub act_id: ::std::option::Option<::std::string::String>,
14    /// <p>The new status to set for the act.</p>
15    pub status: ::std::option::Option<crate::types::ActStatus>,
16    /// <p>Error information to associate with the act, if applicable.</p>
17    pub error: ::std::option::Option<crate::types::ActError>,
18}
19impl UpdateActInput {
20    /// <p>The name of the workflow definition containing the act.</p>
21    pub fn workflow_definition_name(&self) -> ::std::option::Option<&str> {
22        self.workflow_definition_name.as_deref()
23    }
24    /// <p>The unique identifier of the workflow run containing the act.</p>
25    pub fn workflow_run_id(&self) -> ::std::option::Option<&str> {
26        self.workflow_run_id.as_deref()
27    }
28    /// <p>The unique identifier of the session containing the act.</p>
29    pub fn session_id(&self) -> ::std::option::Option<&str> {
30        self.session_id.as_deref()
31    }
32    /// <p>The unique identifier of the act to update.</p>
33    pub fn act_id(&self) -> ::std::option::Option<&str> {
34        self.act_id.as_deref()
35    }
36    /// <p>The new status to set for the act.</p>
37    pub fn status(&self) -> ::std::option::Option<&crate::types::ActStatus> {
38        self.status.as_ref()
39    }
40    /// <p>Error information to associate with the act, if applicable.</p>
41    pub fn error(&self) -> ::std::option::Option<&crate::types::ActError> {
42        self.error.as_ref()
43    }
44}
45impl UpdateActInput {
46    /// Creates a new builder-style object to manufacture [`UpdateActInput`](crate::operation::update_act::UpdateActInput).
47    pub fn builder() -> crate::operation::update_act::builders::UpdateActInputBuilder {
48        crate::operation::update_act::builders::UpdateActInputBuilder::default()
49    }
50}
51
52/// A builder for [`UpdateActInput`](crate::operation::update_act::UpdateActInput).
53#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
54#[non_exhaustive]
55pub struct UpdateActInputBuilder {
56    pub(crate) workflow_definition_name: ::std::option::Option<::std::string::String>,
57    pub(crate) workflow_run_id: ::std::option::Option<::std::string::String>,
58    pub(crate) session_id: ::std::option::Option<::std::string::String>,
59    pub(crate) act_id: ::std::option::Option<::std::string::String>,
60    pub(crate) status: ::std::option::Option<crate::types::ActStatus>,
61    pub(crate) error: ::std::option::Option<crate::types::ActError>,
62}
63impl UpdateActInputBuilder {
64    /// <p>The name of the workflow definition containing the act.</p>
65    /// This field is required.
66    pub fn workflow_definition_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
67        self.workflow_definition_name = ::std::option::Option::Some(input.into());
68        self
69    }
70    /// <p>The name of the workflow definition containing the act.</p>
71    pub fn set_workflow_definition_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
72        self.workflow_definition_name = input;
73        self
74    }
75    /// <p>The name of the workflow definition containing the act.</p>
76    pub fn get_workflow_definition_name(&self) -> &::std::option::Option<::std::string::String> {
77        &self.workflow_definition_name
78    }
79    /// <p>The unique identifier of the workflow run containing the act.</p>
80    /// This field is required.
81    pub fn workflow_run_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
82        self.workflow_run_id = ::std::option::Option::Some(input.into());
83        self
84    }
85    /// <p>The unique identifier of the workflow run containing the act.</p>
86    pub fn set_workflow_run_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
87        self.workflow_run_id = input;
88        self
89    }
90    /// <p>The unique identifier of the workflow run containing the act.</p>
91    pub fn get_workflow_run_id(&self) -> &::std::option::Option<::std::string::String> {
92        &self.workflow_run_id
93    }
94    /// <p>The unique identifier of the session containing the act.</p>
95    /// This field is required.
96    pub fn session_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
97        self.session_id = ::std::option::Option::Some(input.into());
98        self
99    }
100    /// <p>The unique identifier of the session containing the act.</p>
101    pub fn set_session_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
102        self.session_id = input;
103        self
104    }
105    /// <p>The unique identifier of the session containing the act.</p>
106    pub fn get_session_id(&self) -> &::std::option::Option<::std::string::String> {
107        &self.session_id
108    }
109    /// <p>The unique identifier of the act to update.</p>
110    /// This field is required.
111    pub fn act_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
112        self.act_id = ::std::option::Option::Some(input.into());
113        self
114    }
115    /// <p>The unique identifier of the act to update.</p>
116    pub fn set_act_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
117        self.act_id = input;
118        self
119    }
120    /// <p>The unique identifier of the act to update.</p>
121    pub fn get_act_id(&self) -> &::std::option::Option<::std::string::String> {
122        &self.act_id
123    }
124    /// <p>The new status to set for the act.</p>
125    /// This field is required.
126    pub fn status(mut self, input: crate::types::ActStatus) -> Self {
127        self.status = ::std::option::Option::Some(input);
128        self
129    }
130    /// <p>The new status to set for the act.</p>
131    pub fn set_status(mut self, input: ::std::option::Option<crate::types::ActStatus>) -> Self {
132        self.status = input;
133        self
134    }
135    /// <p>The new status to set for the act.</p>
136    pub fn get_status(&self) -> &::std::option::Option<crate::types::ActStatus> {
137        &self.status
138    }
139    /// <p>Error information to associate with the act, if applicable.</p>
140    pub fn error(mut self, input: crate::types::ActError) -> Self {
141        self.error = ::std::option::Option::Some(input);
142        self
143    }
144    /// <p>Error information to associate with the act, if applicable.</p>
145    pub fn set_error(mut self, input: ::std::option::Option<crate::types::ActError>) -> Self {
146        self.error = input;
147        self
148    }
149    /// <p>Error information to associate with the act, if applicable.</p>
150    pub fn get_error(&self) -> &::std::option::Option<crate::types::ActError> {
151        &self.error
152    }
153    /// Consumes the builder and constructs a [`UpdateActInput`](crate::operation::update_act::UpdateActInput).
154    pub fn build(self) -> ::std::result::Result<crate::operation::update_act::UpdateActInput, ::aws_smithy_types::error::operation::BuildError> {
155        ::std::result::Result::Ok(crate::operation::update_act::UpdateActInput {
156            workflow_definition_name: self.workflow_definition_name,
157            workflow_run_id: self.workflow_run_id,
158            session_id: self.session_id,
159            act_id: self.act_id,
160            status: self.status,
161            error: self.error,
162        })
163    }
164}