aws-sdk-quicksight 1.145.0

AWS SDK for Amazon QuickSight
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 CreateAgentInput {
    /// <p>The Amazon Resource Names (ARNs) of the spaces to attach to the agent.</p>
    pub spaces: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
    /// <p>The Amazon Resource Names (ARNs) of the action connectors to attach to the agent.</p>
    pub action_connectors: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
    /// <p>The ID of the Amazon Web Services account that contains the agent.</p>
    pub aws_account_id: ::std::option::Option<::std::string::String>,
    /// <p>A unique identifier for the agent.</p>
    pub agent_id: ::std::option::Option<::std::string::String>,
    /// <p>The name of the agent.</p>
    pub name: ::std::option::Option<::std::string::String>,
    /// <p>A description of the agent.</p>
    pub description: ::std::option::Option<::std::string::String>,
    /// <p>The icon identifier for the agent.</p>
    pub icon_id: ::std::option::Option<::std::string::String>,
    /// <p>A list of starter prompts that are displayed to users when they begin interacting with the agent.</p>
    pub starter_prompts: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
    /// <p>The welcome message that is displayed when a user starts a conversation with the agent.</p>
    pub welcome_message: ::std::option::Option<::std::string::String>,
    /// <p>The lifecycle state of the agent. Valid values are <code>PREVIEW</code> and <code>PUBLISHED</code>.</p>
    pub agent_lifecycle: ::std::option::Option<crate::types::AgentLifecycle>,
    /// <p>The custom prompt configuration for the agent.</p>
    pub custom_prompt_input: ::std::option::Option<crate::types::CustomPromptInput>,
}
impl CreateAgentInput {
    /// <p>The Amazon Resource Names (ARNs) of the spaces to attach to the agent.</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 `.spaces.is_none()`.
    pub fn spaces(&self) -> &[::std::string::String] {
        self.spaces.as_deref().unwrap_or_default()
    }
    /// <p>The Amazon Resource Names (ARNs) of the action connectors to attach to the agent.</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 `.action_connectors.is_none()`.
    pub fn action_connectors(&self) -> &[::std::string::String] {
        self.action_connectors.as_deref().unwrap_or_default()
    }
    /// <p>The ID of the Amazon Web Services account that contains the agent.</p>
    pub fn aws_account_id(&self) -> ::std::option::Option<&str> {
        self.aws_account_id.as_deref()
    }
    /// <p>A unique identifier for the agent.</p>
    pub fn agent_id(&self) -> ::std::option::Option<&str> {
        self.agent_id.as_deref()
    }
    /// <p>The name of the agent.</p>
    pub fn name(&self) -> ::std::option::Option<&str> {
        self.name.as_deref()
    }
    /// <p>A description of the agent.</p>
    pub fn description(&self) -> ::std::option::Option<&str> {
        self.description.as_deref()
    }
    /// <p>The icon identifier for the agent.</p>
    pub fn icon_id(&self) -> ::std::option::Option<&str> {
        self.icon_id.as_deref()
    }
    /// <p>A list of starter prompts that are displayed to users when they begin interacting with the agent.</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 `.starter_prompts.is_none()`.
    pub fn starter_prompts(&self) -> &[::std::string::String] {
        self.starter_prompts.as_deref().unwrap_or_default()
    }
    /// <p>The welcome message that is displayed when a user starts a conversation with the agent.</p>
    pub fn welcome_message(&self) -> ::std::option::Option<&str> {
        self.welcome_message.as_deref()
    }
    /// <p>The lifecycle state of the agent. Valid values are <code>PREVIEW</code> and <code>PUBLISHED</code>.</p>
    pub fn agent_lifecycle(&self) -> ::std::option::Option<&crate::types::AgentLifecycle> {
        self.agent_lifecycle.as_ref()
    }
    /// <p>The custom prompt configuration for the agent.</p>
    pub fn custom_prompt_input(&self) -> ::std::option::Option<&crate::types::CustomPromptInput> {
        self.custom_prompt_input.as_ref()
    }
}
impl ::std::fmt::Debug for CreateAgentInput {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        let mut formatter = f.debug_struct("CreateAgentInput");
        formatter.field("spaces", &self.spaces);
        formatter.field("action_connectors", &self.action_connectors);
        formatter.field("aws_account_id", &self.aws_account_id);
        formatter.field("agent_id", &self.agent_id);
        formatter.field("name", &self.name);
        formatter.field("description", &self.description);
        formatter.field("icon_id", &self.icon_id);
        formatter.field("starter_prompts", &"*** Sensitive Data Redacted ***");
        formatter.field("welcome_message", &"*** Sensitive Data Redacted ***");
        formatter.field("agent_lifecycle", &self.agent_lifecycle);
        formatter.field("custom_prompt_input", &"*** Sensitive Data Redacted ***");
        formatter.finish()
    }
}
impl CreateAgentInput {
    /// Creates a new builder-style object to manufacture [`CreateAgentInput`](crate::operation::create_agent::CreateAgentInput).
    pub fn builder() -> crate::operation::create_agent::builders::CreateAgentInputBuilder {
        crate::operation::create_agent::builders::CreateAgentInputBuilder::default()
    }
}

/// A builder for [`CreateAgentInput`](crate::operation::create_agent::CreateAgentInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
#[non_exhaustive]
pub struct CreateAgentInputBuilder {
    pub(crate) spaces: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
    pub(crate) action_connectors: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
    pub(crate) aws_account_id: ::std::option::Option<::std::string::String>,
    pub(crate) agent_id: ::std::option::Option<::std::string::String>,
    pub(crate) name: ::std::option::Option<::std::string::String>,
    pub(crate) description: ::std::option::Option<::std::string::String>,
    pub(crate) icon_id: ::std::option::Option<::std::string::String>,
    pub(crate) starter_prompts: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
    pub(crate) welcome_message: ::std::option::Option<::std::string::String>,
    pub(crate) agent_lifecycle: ::std::option::Option<crate::types::AgentLifecycle>,
    pub(crate) custom_prompt_input: ::std::option::Option<crate::types::CustomPromptInput>,
}
impl CreateAgentInputBuilder {
    /// Appends an item to `spaces`.
    ///
    /// To override the contents of this collection use [`set_spaces`](Self::set_spaces).
    ///
    /// <p>The Amazon Resource Names (ARNs) of the spaces to attach to the agent.</p>
    pub fn spaces(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        let mut v = self.spaces.unwrap_or_default();
        v.push(input.into());
        self.spaces = ::std::option::Option::Some(v);
        self
    }
    /// <p>The Amazon Resource Names (ARNs) of the spaces to attach to the agent.</p>
    pub fn set_spaces(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
        self.spaces = input;
        self
    }
    /// <p>The Amazon Resource Names (ARNs) of the spaces to attach to the agent.</p>
    pub fn get_spaces(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
        &self.spaces
    }
    /// Appends an item to `action_connectors`.
    ///
    /// To override the contents of this collection use [`set_action_connectors`](Self::set_action_connectors).
    ///
    /// <p>The Amazon Resource Names (ARNs) of the action connectors to attach to the agent.</p>
    pub fn action_connectors(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        let mut v = self.action_connectors.unwrap_or_default();
        v.push(input.into());
        self.action_connectors = ::std::option::Option::Some(v);
        self
    }
    /// <p>The Amazon Resource Names (ARNs) of the action connectors to attach to the agent.</p>
    pub fn set_action_connectors(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
        self.action_connectors = input;
        self
    }
    /// <p>The Amazon Resource Names (ARNs) of the action connectors to attach to the agent.</p>
    pub fn get_action_connectors(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
        &self.action_connectors
    }
    /// <p>The ID of the Amazon Web Services account that contains the agent.</p>
    /// This field is required.
    pub fn aws_account_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.aws_account_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The ID of the Amazon Web Services account that contains the agent.</p>
    pub fn set_aws_account_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.aws_account_id = input;
        self
    }
    /// <p>The ID of the Amazon Web Services account that contains the agent.</p>
    pub fn get_aws_account_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.aws_account_id
    }
    /// <p>A unique identifier for the agent.</p>
    /// This field is required.
    pub fn agent_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.agent_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>A unique identifier for the agent.</p>
    pub fn set_agent_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.agent_id = input;
        self
    }
    /// <p>A unique identifier for the agent.</p>
    pub fn get_agent_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.agent_id
    }
    /// <p>The name of the agent.</p>
    /// This field is required.
    pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.name = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The name of the agent.</p>
    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.name = input;
        self
    }
    /// <p>The name of the agent.</p>
    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.name
    }
    /// <p>A description of the agent.</p>
    pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.description = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>A description of the agent.</p>
    pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.description = input;
        self
    }
    /// <p>A description of the agent.</p>
    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
        &self.description
    }
    /// <p>The icon identifier for the agent.</p>
    pub fn icon_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.icon_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The icon identifier for the agent.</p>
    pub fn set_icon_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.icon_id = input;
        self
    }
    /// <p>The icon identifier for the agent.</p>
    pub fn get_icon_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.icon_id
    }
    /// Appends an item to `starter_prompts`.
    ///
    /// To override the contents of this collection use [`set_starter_prompts`](Self::set_starter_prompts).
    ///
    /// <p>A list of starter prompts that are displayed to users when they begin interacting with the agent.</p>
    pub fn starter_prompts(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        let mut v = self.starter_prompts.unwrap_or_default();
        v.push(input.into());
        self.starter_prompts = ::std::option::Option::Some(v);
        self
    }
    /// <p>A list of starter prompts that are displayed to users when they begin interacting with the agent.</p>
    pub fn set_starter_prompts(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
        self.starter_prompts = input;
        self
    }
    /// <p>A list of starter prompts that are displayed to users when they begin interacting with the agent.</p>
    pub fn get_starter_prompts(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
        &self.starter_prompts
    }
    /// <p>The welcome message that is displayed when a user starts a conversation with the agent.</p>
    pub fn welcome_message(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.welcome_message = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The welcome message that is displayed when a user starts a conversation with the agent.</p>
    pub fn set_welcome_message(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.welcome_message = input;
        self
    }
    /// <p>The welcome message that is displayed when a user starts a conversation with the agent.</p>
    pub fn get_welcome_message(&self) -> &::std::option::Option<::std::string::String> {
        &self.welcome_message
    }
    /// <p>The lifecycle state of the agent. Valid values are <code>PREVIEW</code> and <code>PUBLISHED</code>.</p>
    pub fn agent_lifecycle(mut self, input: crate::types::AgentLifecycle) -> Self {
        self.agent_lifecycle = ::std::option::Option::Some(input);
        self
    }
    /// <p>The lifecycle state of the agent. Valid values are <code>PREVIEW</code> and <code>PUBLISHED</code>.</p>
    pub fn set_agent_lifecycle(mut self, input: ::std::option::Option<crate::types::AgentLifecycle>) -> Self {
        self.agent_lifecycle = input;
        self
    }
    /// <p>The lifecycle state of the agent. Valid values are <code>PREVIEW</code> and <code>PUBLISHED</code>.</p>
    pub fn get_agent_lifecycle(&self) -> &::std::option::Option<crate::types::AgentLifecycle> {
        &self.agent_lifecycle
    }
    /// <p>The custom prompt configuration for the agent.</p>
    pub fn custom_prompt_input(mut self, input: crate::types::CustomPromptInput) -> Self {
        self.custom_prompt_input = ::std::option::Option::Some(input);
        self
    }
    /// <p>The custom prompt configuration for the agent.</p>
    pub fn set_custom_prompt_input(mut self, input: ::std::option::Option<crate::types::CustomPromptInput>) -> Self {
        self.custom_prompt_input = input;
        self
    }
    /// <p>The custom prompt configuration for the agent.</p>
    pub fn get_custom_prompt_input(&self) -> &::std::option::Option<crate::types::CustomPromptInput> {
        &self.custom_prompt_input
    }
    /// Consumes the builder and constructs a [`CreateAgentInput`](crate::operation::create_agent::CreateAgentInput).
    pub fn build(self) -> ::std::result::Result<crate::operation::create_agent::CreateAgentInput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::create_agent::CreateAgentInput {
            spaces: self.spaces,
            action_connectors: self.action_connectors,
            aws_account_id: self.aws_account_id,
            agent_id: self.agent_id,
            name: self.name,
            description: self.description,
            icon_id: self.icon_id,
            starter_prompts: self.starter_prompts,
            welcome_message: self.welcome_message,
            agent_lifecycle: self.agent_lifecycle,
            custom_prompt_input: self.custom_prompt_input,
        })
    }
}
impl ::std::fmt::Debug for CreateAgentInputBuilder {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        let mut formatter = f.debug_struct("CreateAgentInputBuilder");
        formatter.field("spaces", &self.spaces);
        formatter.field("action_connectors", &self.action_connectors);
        formatter.field("aws_account_id", &self.aws_account_id);
        formatter.field("agent_id", &self.agent_id);
        formatter.field("name", &self.name);
        formatter.field("description", &self.description);
        formatter.field("icon_id", &self.icon_id);
        formatter.field("starter_prompts", &"*** Sensitive Data Redacted ***");
        formatter.field("welcome_message", &"*** Sensitive Data Redacted ***");
        formatter.field("agent_lifecycle", &self.agent_lifecycle);
        formatter.field("custom_prompt_input", &"*** Sensitive Data Redacted ***");
        formatter.finish()
    }
}