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 InvokeActStepOutput {
    /// <p>A list of tool calls that the act wants to execute in this step.</p>
    pub calls: ::std::vec::Vec<crate::types::Call>,
    /// <p>The unique identifier for this execution step.</p>
    pub step_id: ::std::string::String,
    _request_id: Option<String>,
}
impl InvokeActStepOutput {
    /// <p>A list of tool calls that the act wants to execute in this step.</p>
    pub fn calls(&self) -> &[crate::types::Call] {
        use std::ops::Deref;
        self.calls.deref()
    }
    /// <p>The unique identifier for this execution step.</p>
    pub fn step_id(&self) -> &str {
        use std::ops::Deref;
        self.step_id.deref()
    }
}
impl ::aws_types::request_id::RequestId for InvokeActStepOutput {
    fn request_id(&self) -> Option<&str> {
        self._request_id.as_deref()
    }
}
impl InvokeActStepOutput {
    /// Creates a new builder-style object to manufacture [`InvokeActStepOutput`](crate::operation::invoke_act_step::InvokeActStepOutput).
    pub fn builder() -> crate::operation::invoke_act_step::builders::InvokeActStepOutputBuilder {
        crate::operation::invoke_act_step::builders::InvokeActStepOutputBuilder::default()
    }
}

/// A builder for [`InvokeActStepOutput`](crate::operation::invoke_act_step::InvokeActStepOutput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct InvokeActStepOutputBuilder {
    pub(crate) calls: ::std::option::Option<::std::vec::Vec<crate::types::Call>>,
    pub(crate) step_id: ::std::option::Option<::std::string::String>,
    _request_id: Option<String>,
}
impl InvokeActStepOutputBuilder {
    /// Appends an item to `calls`.
    ///
    /// To override the contents of this collection use [`set_calls`](Self::set_calls).
    ///
    /// <p>A list of tool calls that the act wants to execute in this step.</p>
    pub fn calls(mut self, input: crate::types::Call) -> Self {
        let mut v = self.calls.unwrap_or_default();
        v.push(input);
        self.calls = ::std::option::Option::Some(v);
        self
    }
    /// <p>A list of tool calls that the act wants to execute in this step.</p>
    pub fn set_calls(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Call>>) -> Self {
        self.calls = input;
        self
    }
    /// <p>A list of tool calls that the act wants to execute in this step.</p>
    pub fn get_calls(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Call>> {
        &self.calls
    }
    /// <p>The unique identifier for this execution step.</p>
    /// This field is required.
    pub fn step_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.step_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The unique identifier for this execution step.</p>
    pub fn set_step_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.step_id = input;
        self
    }
    /// <p>The unique identifier for this execution step.</p>
    pub fn get_step_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.step_id
    }
    pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
        self._request_id = Some(request_id.into());
        self
    }

    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
        self._request_id = request_id;
        self
    }
    /// Consumes the builder and constructs a [`InvokeActStepOutput`](crate::operation::invoke_act_step::InvokeActStepOutput).
    /// This method will fail if any of the following fields are not set:
    /// - [`calls`](crate::operation::invoke_act_step::builders::InvokeActStepOutputBuilder::calls)
    /// - [`step_id`](crate::operation::invoke_act_step::builders::InvokeActStepOutputBuilder::step_id)
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::invoke_act_step::InvokeActStepOutput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::invoke_act_step::InvokeActStepOutput {
            calls: self.calls.ok_or_else(|| {
                ::aws_smithy_types::error::operation::BuildError::missing_field(
                    "calls",
                    "calls was not specified but it is required when building InvokeActStepOutput",
                )
            })?,
            step_id: self.step_id.ok_or_else(|| {
                ::aws_smithy_types::error::operation::BuildError::missing_field(
                    "step_id",
                    "step_id was not specified but it is required when building InvokeActStepOutput",
                )
            })?,
            _request_id: self._request_id,
        })
    }
}