aws-sdk-novaact 1.8.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)]
pub struct CreateActInput {
    /// <p>The name of the workflow definition containing the session.</p>
    pub workflow_definition_name: ::std::option::Option<::std::string::String>,
    /// <p>The unique identifier of the workflow run containing the session.</p>
    pub workflow_run_id: ::std::option::Option<::std::string::String>,
    /// <p>The unique identifier of the session to create the act in.</p>
    pub session_id: ::std::option::Option<::std::string::String>,
    /// <p>The task description that defines what the act should accomplish.</p>
    pub task: ::std::option::Option<::std::string::String>,
    /// <p>A list of tool specifications that the act can invoke to complete its task.</p>
    pub tool_specs: ::std::option::Option<::std::vec::Vec<crate::types::ToolSpec>>,
    /// <p>A unique, case-sensitive identifier that you provide to ensure the idempotency of the request.</p>
    pub client_token: ::std::option::Option<::std::string::String>,
}
impl CreateActInput {
    /// <p>The name of the workflow definition containing the session.</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 session.</p>
    pub fn workflow_run_id(&self) -> ::std::option::Option<&str> {
        self.workflow_run_id.as_deref()
    }
    /// <p>The unique identifier of the session to create the act in.</p>
    pub fn session_id(&self) -> ::std::option::Option<&str> {
        self.session_id.as_deref()
    }
    /// <p>The task description that defines what the act should accomplish.</p>
    pub fn task(&self) -> ::std::option::Option<&str> {
        self.task.as_deref()
    }
    /// <p>A list of tool specifications that the act can invoke to complete its task.</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 `.tool_specs.is_none()`.
    pub fn tool_specs(&self) -> &[crate::types::ToolSpec] {
        self.tool_specs.as_deref().unwrap_or_default()
    }
    /// <p>A unique, case-sensitive identifier that you provide to ensure the idempotency of the request.</p>
    pub fn client_token(&self) -> ::std::option::Option<&str> {
        self.client_token.as_deref()
    }
}
impl ::std::fmt::Debug for CreateActInput {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        let mut formatter = f.debug_struct("CreateActInput");
        formatter.field("workflow_definition_name", &self.workflow_definition_name);
        formatter.field("workflow_run_id", &self.workflow_run_id);
        formatter.field("session_id", &self.session_id);
        formatter.field("task", &"*** Sensitive Data Redacted ***");
        formatter.field("tool_specs", &self.tool_specs);
        formatter.field("client_token", &self.client_token);
        formatter.finish()
    }
}
impl CreateActInput {
    /// Creates a new builder-style object to manufacture [`CreateActInput`](crate::operation::create_act::CreateActInput).
    pub fn builder() -> crate::operation::create_act::builders::CreateActInputBuilder {
        crate::operation::create_act::builders::CreateActInputBuilder::default()
    }
}

/// A builder for [`CreateActInput`](crate::operation::create_act::CreateActInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
#[non_exhaustive]
pub struct CreateActInputBuilder {
    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) task: ::std::option::Option<::std::string::String>,
    pub(crate) tool_specs: ::std::option::Option<::std::vec::Vec<crate::types::ToolSpec>>,
    pub(crate) client_token: ::std::option::Option<::std::string::String>,
}
impl CreateActInputBuilder {
    /// <p>The name of the workflow definition containing the session.</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 session.</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 session.</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 session.</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 session.</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 session.</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 to create the act in.</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 to create the act in.</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 to create the act in.</p>
    pub fn get_session_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.session_id
    }
    /// <p>The task description that defines what the act should accomplish.</p>
    /// This field is required.
    pub fn task(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.task = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The task description that defines what the act should accomplish.</p>
    pub fn set_task(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.task = input;
        self
    }
    /// <p>The task description that defines what the act should accomplish.</p>
    pub fn get_task(&self) -> &::std::option::Option<::std::string::String> {
        &self.task
    }
    /// Appends an item to `tool_specs`.
    ///
    /// To override the contents of this collection use [`set_tool_specs`](Self::set_tool_specs).
    ///
    /// <p>A list of tool specifications that the act can invoke to complete its task.</p>
    pub fn tool_specs(mut self, input: crate::types::ToolSpec) -> Self {
        let mut v = self.tool_specs.unwrap_or_default();
        v.push(input);
        self.tool_specs = ::std::option::Option::Some(v);
        self
    }
    /// <p>A list of tool specifications that the act can invoke to complete its task.</p>
    pub fn set_tool_specs(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::ToolSpec>>) -> Self {
        self.tool_specs = input;
        self
    }
    /// <p>A list of tool specifications that the act can invoke to complete its task.</p>
    pub fn get_tool_specs(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::ToolSpec>> {
        &self.tool_specs
    }
    /// <p>A unique, case-sensitive identifier that you provide to ensure the idempotency of the request.</p>
    pub fn client_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.client_token = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>A unique, case-sensitive identifier that you provide to ensure the idempotency of the request.</p>
    pub fn set_client_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.client_token = input;
        self
    }
    /// <p>A unique, case-sensitive identifier that you provide to ensure the idempotency of the request.</p>
    pub fn get_client_token(&self) -> &::std::option::Option<::std::string::String> {
        &self.client_token
    }
    /// Consumes the builder and constructs a [`CreateActInput`](crate::operation::create_act::CreateActInput).
    pub fn build(self) -> ::std::result::Result<crate::operation::create_act::CreateActInput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::create_act::CreateActInput {
            workflow_definition_name: self.workflow_definition_name,
            workflow_run_id: self.workflow_run_id,
            session_id: self.session_id,
            task: self.task,
            tool_specs: self.tool_specs,
            client_token: self.client_token,
        })
    }
}
impl ::std::fmt::Debug for CreateActInputBuilder {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        let mut formatter = f.debug_struct("CreateActInputBuilder");
        formatter.field("workflow_definition_name", &self.workflow_definition_name);
        formatter.field("workflow_run_id", &self.workflow_run_id);
        formatter.field("session_id", &self.session_id);
        formatter.field("task", &"*** Sensitive Data Redacted ***");
        formatter.field("tool_specs", &self.tool_specs);
        formatter.field("client_token", &self.client_token);
        formatter.finish()
    }
}