aws-sdk-quicksight 1.136.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 UpdateAgentInput {
    /// <p>The unique identifier for the agent to update.</p>
    pub agent_id: ::std::option::Option<::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>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 custom prompt configuration for the agent.</p>
    pub custom_prompt_input: ::std::option::Option<crate::types::CustomPromptInput>,
    /// <p>The Amazon Resource Names (ARNs) of the spaces to attach to the agent.</p>
    pub spaces_to_add: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
    /// <p>The Amazon Resource Names (ARNs) of the spaces to detach from the agent.</p>
    pub spaces_to_remove: ::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_to_add: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
    /// <p>The Amazon Resource Names (ARNs) of the action connectors to detach from the agent.</p>
    pub action_connectors_to_remove: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
}
impl UpdateAgentInput {
    /// <p>The unique identifier for the agent to update.</p>
    pub fn agent_id(&self) -> ::std::option::Option<&str> {
        self.agent_id.as_deref()
    }
    /// <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>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 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()
    }
    /// <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_to_add.is_none()`.
    pub fn spaces_to_add(&self) -> &[::std::string::String] {
        self.spaces_to_add.as_deref().unwrap_or_default()
    }
    /// <p>The Amazon Resource Names (ARNs) of the spaces to detach from 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_to_remove.is_none()`.
    pub fn spaces_to_remove(&self) -> &[::std::string::String] {
        self.spaces_to_remove.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_to_add.is_none()`.
    pub fn action_connectors_to_add(&self) -> &[::std::string::String] {
        self.action_connectors_to_add.as_deref().unwrap_or_default()
    }
    /// <p>The Amazon Resource Names (ARNs) of the action connectors to detach from 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_to_remove.is_none()`.
    pub fn action_connectors_to_remove(&self) -> &[::std::string::String] {
        self.action_connectors_to_remove.as_deref().unwrap_or_default()
    }
}
impl ::std::fmt::Debug for UpdateAgentInput {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        let mut formatter = f.debug_struct("UpdateAgentInput");
        formatter.field("agent_id", &self.agent_id);
        formatter.field("aws_account_id", &self.aws_account_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("custom_prompt_input", &"*** Sensitive Data Redacted ***");
        formatter.field("spaces_to_add", &self.spaces_to_add);
        formatter.field("spaces_to_remove", &self.spaces_to_remove);
        formatter.field("action_connectors_to_add", &self.action_connectors_to_add);
        formatter.field("action_connectors_to_remove", &self.action_connectors_to_remove);
        formatter.finish()
    }
}
impl UpdateAgentInput {
    /// Creates a new builder-style object to manufacture [`UpdateAgentInput`](crate::operation::update_agent::UpdateAgentInput).
    pub fn builder() -> crate::operation::update_agent::builders::UpdateAgentInputBuilder {
        crate::operation::update_agent::builders::UpdateAgentInputBuilder::default()
    }
}

/// A builder for [`UpdateAgentInput`](crate::operation::update_agent::UpdateAgentInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
#[non_exhaustive]
pub struct UpdateAgentInputBuilder {
    pub(crate) agent_id: ::std::option::Option<::std::string::String>,
    pub(crate) aws_account_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) custom_prompt_input: ::std::option::Option<crate::types::CustomPromptInput>,
    pub(crate) spaces_to_add: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
    pub(crate) spaces_to_remove: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
    pub(crate) action_connectors_to_add: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
    pub(crate) action_connectors_to_remove: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
}
impl UpdateAgentInputBuilder {
    /// <p>The unique identifier for the agent to update.</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>The unique identifier for the agent to update.</p>
    pub fn set_agent_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.agent_id = input;
        self
    }
    /// <p>The unique identifier for the agent to update.</p>
    pub fn get_agent_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.agent_id
    }
    /// <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>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 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
    }
    /// Appends an item to `spaces_to_add`.
    ///
    /// To override the contents of this collection use [`set_spaces_to_add`](Self::set_spaces_to_add).
    ///
    /// <p>The Amazon Resource Names (ARNs) of the spaces to attach to the agent.</p>
    pub fn spaces_to_add(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        let mut v = self.spaces_to_add.unwrap_or_default();
        v.push(input.into());
        self.spaces_to_add = ::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_to_add(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
        self.spaces_to_add = input;
        self
    }
    /// <p>The Amazon Resource Names (ARNs) of the spaces to attach to the agent.</p>
    pub fn get_spaces_to_add(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
        &self.spaces_to_add
    }
    /// Appends an item to `spaces_to_remove`.
    ///
    /// To override the contents of this collection use [`set_spaces_to_remove`](Self::set_spaces_to_remove).
    ///
    /// <p>The Amazon Resource Names (ARNs) of the spaces to detach from the agent.</p>
    pub fn spaces_to_remove(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        let mut v = self.spaces_to_remove.unwrap_or_default();
        v.push(input.into());
        self.spaces_to_remove = ::std::option::Option::Some(v);
        self
    }
    /// <p>The Amazon Resource Names (ARNs) of the spaces to detach from the agent.</p>
    pub fn set_spaces_to_remove(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
        self.spaces_to_remove = input;
        self
    }
    /// <p>The Amazon Resource Names (ARNs) of the spaces to detach from the agent.</p>
    pub fn get_spaces_to_remove(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
        &self.spaces_to_remove
    }
    /// Appends an item to `action_connectors_to_add`.
    ///
    /// To override the contents of this collection use [`set_action_connectors_to_add`](Self::set_action_connectors_to_add).
    ///
    /// <p>The Amazon Resource Names (ARNs) of the action connectors to attach to the agent.</p>
    pub fn action_connectors_to_add(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        let mut v = self.action_connectors_to_add.unwrap_or_default();
        v.push(input.into());
        self.action_connectors_to_add = ::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_to_add(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
        self.action_connectors_to_add = input;
        self
    }
    /// <p>The Amazon Resource Names (ARNs) of the action connectors to attach to the agent.</p>
    pub fn get_action_connectors_to_add(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
        &self.action_connectors_to_add
    }
    /// Appends an item to `action_connectors_to_remove`.
    ///
    /// To override the contents of this collection use [`set_action_connectors_to_remove`](Self::set_action_connectors_to_remove).
    ///
    /// <p>The Amazon Resource Names (ARNs) of the action connectors to detach from the agent.</p>
    pub fn action_connectors_to_remove(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        let mut v = self.action_connectors_to_remove.unwrap_or_default();
        v.push(input.into());
        self.action_connectors_to_remove = ::std::option::Option::Some(v);
        self
    }
    /// <p>The Amazon Resource Names (ARNs) of the action connectors to detach from the agent.</p>
    pub fn set_action_connectors_to_remove(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
        self.action_connectors_to_remove = input;
        self
    }
    /// <p>The Amazon Resource Names (ARNs) of the action connectors to detach from the agent.</p>
    pub fn get_action_connectors_to_remove(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
        &self.action_connectors_to_remove
    }
    /// Consumes the builder and constructs a [`UpdateAgentInput`](crate::operation::update_agent::UpdateAgentInput).
    pub fn build(self) -> ::std::result::Result<crate::operation::update_agent::UpdateAgentInput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::update_agent::UpdateAgentInput {
            agent_id: self.agent_id,
            aws_account_id: self.aws_account_id,
            name: self.name,
            description: self.description,
            icon_id: self.icon_id,
            starter_prompts: self.starter_prompts,
            welcome_message: self.welcome_message,
            custom_prompt_input: self.custom_prompt_input,
            spaces_to_add: self.spaces_to_add,
            spaces_to_remove: self.spaces_to_remove,
            action_connectors_to_add: self.action_connectors_to_add,
            action_connectors_to_remove: self.action_connectors_to_remove,
        })
    }
}
impl ::std::fmt::Debug for UpdateAgentInputBuilder {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        let mut formatter = f.debug_struct("UpdateAgentInputBuilder");
        formatter.field("agent_id", &self.agent_id);
        formatter.field("aws_account_id", &self.aws_account_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("custom_prompt_input", &"*** Sensitive Data Redacted ***");
        formatter.field("spaces_to_add", &self.spaces_to_add);
        formatter.field("spaces_to_remove", &self.spaces_to_remove);
        formatter.field("action_connectors_to_add", &self.action_connectors_to_add);
        formatter.field("action_connectors_to_remove", &self.action_connectors_to_remove);
        formatter.finish()
    }
}