aws-sdk-novaact 1.6.0

AWS SDK for Nova Act Service
Documentation
// 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 InvokeActStepInput {
    /// <p>The name of the workflow definition containing the act.</p>
    pub workflow_definition_name: ::std::option::Option<::std::string::String>,
    /// <p>The unique identifier of the workflow run containing the act.</p>
    pub workflow_run_id: ::std::option::Option<::std::string::String>,
    /// <p>The unique identifier of the session containing the act.</p>
    pub session_id: ::std::option::Option<::std::string::String>,
    /// <p>The unique identifier of the act to invoke the next step for.</p>
    pub act_id: ::std::option::Option<::std::string::String>,
    /// <p>The results from previous tool calls that the act requested.</p>
    pub call_results: ::std::option::Option<::std::vec::Vec<crate::types::CallResult>>,
    /// <p>The identifier of the previous step, used for tracking execution flow.</p>
    pub previous_step_id: ::std::option::Option<::std::string::String>,
}
impl InvokeActStepInput {
    /// <p>The name of the workflow definition containing the act.</p>
    pub fn workflow_definition_name(&self) -> ::std::option::Option<&str> {
        self.workflow_definition_name.as_deref()
    }
    /// <p>The unique identifier of the workflow run containing the act.</p>
    pub fn workflow_run_id(&self) -> ::std::option::Option<&str> {
        self.workflow_run_id.as_deref()
    }
    /// <p>The unique identifier of the session containing the act.</p>
    pub fn session_id(&self) -> ::std::option::Option<&str> {
        self.session_id.as_deref()
    }
    /// <p>The unique identifier of the act to invoke the next step for.</p>
    pub fn act_id(&self) -> ::std::option::Option<&str> {
        self.act_id.as_deref()
    }
    /// <p>The results from previous tool calls that the act requested.</p>
    ///
    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.call_results.is_none()`.
    pub fn call_results(&self) -> &[crate::types::CallResult] {
        self.call_results.as_deref().unwrap_or_default()
    }
    /// <p>The identifier of the previous step, used for tracking execution flow.</p>
    pub fn previous_step_id(&self) -> ::std::option::Option<&str> {
        self.previous_step_id.as_deref()
    }
}
impl InvokeActStepInput {
    /// Creates a new builder-style object to manufacture [`InvokeActStepInput`](crate::operation::invoke_act_step::InvokeActStepInput).
    pub fn builder() -> crate::operation::invoke_act_step::builders::InvokeActStepInputBuilder {
        crate::operation::invoke_act_step::builders::InvokeActStepInputBuilder::default()
    }
}

/// A builder for [`InvokeActStepInput`](crate::operation::invoke_act_step::InvokeActStepInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct InvokeActStepInputBuilder {
    pub(crate) workflow_definition_name: ::std::option::Option<::std::string::String>,
    pub(crate) workflow_run_id: ::std::option::Option<::std::string::String>,
    pub(crate) session_id: ::std::option::Option<::std::string::String>,
    pub(crate) act_id: ::std::option::Option<::std::string::String>,
    pub(crate) call_results: ::std::option::Option<::std::vec::Vec<crate::types::CallResult>>,
    pub(crate) previous_step_id: ::std::option::Option<::std::string::String>,
}
impl InvokeActStepInputBuilder {
    /// <p>The name of the workflow definition containing the act.</p>
    /// This field is required.
    pub fn workflow_definition_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.workflow_definition_name = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The name of the workflow definition containing the act.</p>
    pub fn set_workflow_definition_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.workflow_definition_name = input;
        self
    }
    /// <p>The name of the workflow definition containing the act.</p>
    pub fn get_workflow_definition_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.workflow_definition_name
    }
    /// <p>The unique identifier of the workflow run containing the act.</p>
    /// This field is required.
    pub fn workflow_run_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.workflow_run_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The unique identifier of the workflow run containing the act.</p>
    pub fn set_workflow_run_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.workflow_run_id = input;
        self
    }
    /// <p>The unique identifier of the workflow run containing the act.</p>
    pub fn get_workflow_run_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.workflow_run_id
    }
    /// <p>The unique identifier of the session containing the act.</p>
    /// This field is required.
    pub fn session_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.session_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The unique identifier of the session containing the act.</p>
    pub fn set_session_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.session_id = input;
        self
    }
    /// <p>The unique identifier of the session containing the act.</p>
    pub fn get_session_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.session_id
    }
    /// <p>The unique identifier of the act to invoke the next step for.</p>
    /// This field is required.
    pub fn act_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.act_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The unique identifier of the act to invoke the next step for.</p>
    pub fn set_act_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.act_id = input;
        self
    }
    /// <p>The unique identifier of the act to invoke the next step for.</p>
    pub fn get_act_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.act_id
    }
    /// Appends an item to `call_results`.
    ///
    /// To override the contents of this collection use [`set_call_results`](Self::set_call_results).
    ///
    /// <p>The results from previous tool calls that the act requested.</p>
    pub fn call_results(mut self, input: crate::types::CallResult) -> Self {
        let mut v = self.call_results.unwrap_or_default();
        v.push(input);
        self.call_results = ::std::option::Option::Some(v);
        self
    }
    /// <p>The results from previous tool calls that the act requested.</p>
    pub fn set_call_results(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::CallResult>>) -> Self {
        self.call_results = input;
        self
    }
    /// <p>The results from previous tool calls that the act requested.</p>
    pub fn get_call_results(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::CallResult>> {
        &self.call_results
    }
    /// <p>The identifier of the previous step, used for tracking execution flow.</p>
    pub fn previous_step_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.previous_step_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The identifier of the previous step, used for tracking execution flow.</p>
    pub fn set_previous_step_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.previous_step_id = input;
        self
    }
    /// <p>The identifier of the previous step, used for tracking execution flow.</p>
    pub fn get_previous_step_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.previous_step_id
    }
    /// Consumes the builder and constructs a [`InvokeActStepInput`](crate::operation::invoke_act_step::InvokeActStepInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::invoke_act_step::InvokeActStepInput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::invoke_act_step::InvokeActStepInput {
            workflow_definition_name: self.workflow_definition_name,
            workflow_run_id: self.workflow_run_id,
            session_id: self.session_id,
            act_id: self.act_id,
            call_results: self.call_results,
            previous_step_id: self.previous_step_id,
        })
    }
}