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, ::std::fmt::Debug)]
pub struct UpdateAgentOutput {
    /// <p>The Amazon Resource Name (ARN) of the agent.</p>
    pub arn: ::std::string::String,
    /// <p>The unique identifier for the agent.</p>
    pub agent_id: ::std::string::String,
    /// <p>The status of the agent.</p>
    pub agent_status: crate::types::AgentStatus,
    /// <p>A list of per-ARN failures from the spaces that were requested to be added.</p>
    pub failed_to_add_spaces: ::std::option::Option<::std::vec::Vec<crate::types::FailedToUpdateAssociation>>,
    /// <p>A list of per-ARN failures from the spaces that were requested to be removed.</p>
    pub failed_to_remove_spaces: ::std::option::Option<::std::vec::Vec<crate::types::FailedToUpdateAssociation>>,
    /// <p>A list of per-ARN failures from the action connectors that were requested to be added.</p>
    pub failed_to_add_action_connectors: ::std::option::Option<::std::vec::Vec<crate::types::FailedToUpdateAssociation>>,
    /// <p>A list of per-ARN failures from the action connectors that were requested to be removed.</p>
    pub failed_to_remove_action_connectors: ::std::option::Option<::std::vec::Vec<crate::types::FailedToUpdateAssociation>>,
    /// <p>The Amazon Web Services request ID for this operation.</p>
    pub request_id: ::std::option::Option<::std::string::String>,
    _request_id: Option<String>,
}
impl UpdateAgentOutput {
    /// <p>The Amazon Resource Name (ARN) of the agent.</p>
    pub fn arn(&self) -> &str {
        use std::ops::Deref;
        self.arn.deref()
    }
    /// <p>The unique identifier for the agent.</p>
    pub fn agent_id(&self) -> &str {
        use std::ops::Deref;
        self.agent_id.deref()
    }
    /// <p>The status of the agent.</p>
    pub fn agent_status(&self) -> &crate::types::AgentStatus {
        &self.agent_status
    }
    /// <p>A list of per-ARN failures from the spaces that were requested to be added.</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 `.failed_to_add_spaces.is_none()`.
    pub fn failed_to_add_spaces(&self) -> &[crate::types::FailedToUpdateAssociation] {
        self.failed_to_add_spaces.as_deref().unwrap_or_default()
    }
    /// <p>A list of per-ARN failures from the spaces that were requested to be removed.</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 `.failed_to_remove_spaces.is_none()`.
    pub fn failed_to_remove_spaces(&self) -> &[crate::types::FailedToUpdateAssociation] {
        self.failed_to_remove_spaces.as_deref().unwrap_or_default()
    }
    /// <p>A list of per-ARN failures from the action connectors that were requested to be added.</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 `.failed_to_add_action_connectors.is_none()`.
    pub fn failed_to_add_action_connectors(&self) -> &[crate::types::FailedToUpdateAssociation] {
        self.failed_to_add_action_connectors.as_deref().unwrap_or_default()
    }
    /// <p>A list of per-ARN failures from the action connectors that were requested to be removed.</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 `.failed_to_remove_action_connectors.is_none()`.
    pub fn failed_to_remove_action_connectors(&self) -> &[crate::types::FailedToUpdateAssociation] {
        self.failed_to_remove_action_connectors.as_deref().unwrap_or_default()
    }
    /// <p>The Amazon Web Services request ID for this operation.</p>
    pub fn request_id(&self) -> ::std::option::Option<&str> {
        self.request_id.as_deref()
    }
}
impl ::aws_types::request_id::RequestId for UpdateAgentOutput {
    fn request_id(&self) -> Option<&str> {
        self._request_id.as_deref()
    }
}
impl UpdateAgentOutput {
    /// Creates a new builder-style object to manufacture [`UpdateAgentOutput`](crate::operation::update_agent::UpdateAgentOutput).
    pub fn builder() -> crate::operation::update_agent::builders::UpdateAgentOutputBuilder {
        crate::operation::update_agent::builders::UpdateAgentOutputBuilder::default()
    }
}

/// A builder for [`UpdateAgentOutput`](crate::operation::update_agent::UpdateAgentOutput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct UpdateAgentOutputBuilder {
    pub(crate) arn: ::std::option::Option<::std::string::String>,
    pub(crate) agent_id: ::std::option::Option<::std::string::String>,
    pub(crate) agent_status: ::std::option::Option<crate::types::AgentStatus>,
    pub(crate) failed_to_add_spaces: ::std::option::Option<::std::vec::Vec<crate::types::FailedToUpdateAssociation>>,
    pub(crate) failed_to_remove_spaces: ::std::option::Option<::std::vec::Vec<crate::types::FailedToUpdateAssociation>>,
    pub(crate) failed_to_add_action_connectors: ::std::option::Option<::std::vec::Vec<crate::types::FailedToUpdateAssociation>>,
    pub(crate) failed_to_remove_action_connectors: ::std::option::Option<::std::vec::Vec<crate::types::FailedToUpdateAssociation>>,
    pub(crate) request_id: ::std::option::Option<::std::string::String>,
    _request_id: Option<String>,
}
impl UpdateAgentOutputBuilder {
    /// <p>The Amazon Resource Name (ARN) of the agent.</p>
    /// This field is required.
    pub fn arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.arn = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The Amazon Resource Name (ARN) of the agent.</p>
    pub fn set_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.arn = input;
        self
    }
    /// <p>The Amazon Resource Name (ARN) of the agent.</p>
    pub fn get_arn(&self) -> &::std::option::Option<::std::string::String> {
        &self.arn
    }
    /// <p>The 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>The 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>The unique identifier for the agent.</p>
    pub fn get_agent_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.agent_id
    }
    /// <p>The status of the agent.</p>
    /// This field is required.
    pub fn agent_status(mut self, input: crate::types::AgentStatus) -> Self {
        self.agent_status = ::std::option::Option::Some(input);
        self
    }
    /// <p>The status of the agent.</p>
    pub fn set_agent_status(mut self, input: ::std::option::Option<crate::types::AgentStatus>) -> Self {
        self.agent_status = input;
        self
    }
    /// <p>The status of the agent.</p>
    pub fn get_agent_status(&self) -> &::std::option::Option<crate::types::AgentStatus> {
        &self.agent_status
    }
    /// Appends an item to `failed_to_add_spaces`.
    ///
    /// To override the contents of this collection use [`set_failed_to_add_spaces`](Self::set_failed_to_add_spaces).
    ///
    /// <p>A list of per-ARN failures from the spaces that were requested to be added.</p>
    pub fn failed_to_add_spaces(mut self, input: crate::types::FailedToUpdateAssociation) -> Self {
        let mut v = self.failed_to_add_spaces.unwrap_or_default();
        v.push(input);
        self.failed_to_add_spaces = ::std::option::Option::Some(v);
        self
    }
    /// <p>A list of per-ARN failures from the spaces that were requested to be added.</p>
    pub fn set_failed_to_add_spaces(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::FailedToUpdateAssociation>>) -> Self {
        self.failed_to_add_spaces = input;
        self
    }
    /// <p>A list of per-ARN failures from the spaces that were requested to be added.</p>
    pub fn get_failed_to_add_spaces(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::FailedToUpdateAssociation>> {
        &self.failed_to_add_spaces
    }
    /// Appends an item to `failed_to_remove_spaces`.
    ///
    /// To override the contents of this collection use [`set_failed_to_remove_spaces`](Self::set_failed_to_remove_spaces).
    ///
    /// <p>A list of per-ARN failures from the spaces that were requested to be removed.</p>
    pub fn failed_to_remove_spaces(mut self, input: crate::types::FailedToUpdateAssociation) -> Self {
        let mut v = self.failed_to_remove_spaces.unwrap_or_default();
        v.push(input);
        self.failed_to_remove_spaces = ::std::option::Option::Some(v);
        self
    }
    /// <p>A list of per-ARN failures from the spaces that were requested to be removed.</p>
    pub fn set_failed_to_remove_spaces(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::FailedToUpdateAssociation>>) -> Self {
        self.failed_to_remove_spaces = input;
        self
    }
    /// <p>A list of per-ARN failures from the spaces that were requested to be removed.</p>
    pub fn get_failed_to_remove_spaces(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::FailedToUpdateAssociation>> {
        &self.failed_to_remove_spaces
    }
    /// Appends an item to `failed_to_add_action_connectors`.
    ///
    /// To override the contents of this collection use [`set_failed_to_add_action_connectors`](Self::set_failed_to_add_action_connectors).
    ///
    /// <p>A list of per-ARN failures from the action connectors that were requested to be added.</p>
    pub fn failed_to_add_action_connectors(mut self, input: crate::types::FailedToUpdateAssociation) -> Self {
        let mut v = self.failed_to_add_action_connectors.unwrap_or_default();
        v.push(input);
        self.failed_to_add_action_connectors = ::std::option::Option::Some(v);
        self
    }
    /// <p>A list of per-ARN failures from the action connectors that were requested to be added.</p>
    pub fn set_failed_to_add_action_connectors(
        mut self,
        input: ::std::option::Option<::std::vec::Vec<crate::types::FailedToUpdateAssociation>>,
    ) -> Self {
        self.failed_to_add_action_connectors = input;
        self
    }
    /// <p>A list of per-ARN failures from the action connectors that were requested to be added.</p>
    pub fn get_failed_to_add_action_connectors(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::FailedToUpdateAssociation>> {
        &self.failed_to_add_action_connectors
    }
    /// Appends an item to `failed_to_remove_action_connectors`.
    ///
    /// To override the contents of this collection use [`set_failed_to_remove_action_connectors`](Self::set_failed_to_remove_action_connectors).
    ///
    /// <p>A list of per-ARN failures from the action connectors that were requested to be removed.</p>
    pub fn failed_to_remove_action_connectors(mut self, input: crate::types::FailedToUpdateAssociation) -> Self {
        let mut v = self.failed_to_remove_action_connectors.unwrap_or_default();
        v.push(input);
        self.failed_to_remove_action_connectors = ::std::option::Option::Some(v);
        self
    }
    /// <p>A list of per-ARN failures from the action connectors that were requested to be removed.</p>
    pub fn set_failed_to_remove_action_connectors(
        mut self,
        input: ::std::option::Option<::std::vec::Vec<crate::types::FailedToUpdateAssociation>>,
    ) -> Self {
        self.failed_to_remove_action_connectors = input;
        self
    }
    /// <p>A list of per-ARN failures from the action connectors that were requested to be removed.</p>
    pub fn get_failed_to_remove_action_connectors(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::FailedToUpdateAssociation>> {
        &self.failed_to_remove_action_connectors
    }
    /// <p>The Amazon Web Services request ID for this operation.</p>
    pub fn request_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.request_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The Amazon Web Services request ID for this operation.</p>
    pub fn set_request_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.request_id = input;
        self
    }
    /// <p>The Amazon Web Services request ID for this operation.</p>
    pub fn get_request_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.request_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 [`UpdateAgentOutput`](crate::operation::update_agent::UpdateAgentOutput).
    /// This method will fail if any of the following fields are not set:
    /// - [`arn`](crate::operation::update_agent::builders::UpdateAgentOutputBuilder::arn)
    /// - [`agent_id`](crate::operation::update_agent::builders::UpdateAgentOutputBuilder::agent_id)
    /// - [`agent_status`](crate::operation::update_agent::builders::UpdateAgentOutputBuilder::agent_status)
    pub fn build(self) -> ::std::result::Result<crate::operation::update_agent::UpdateAgentOutput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::update_agent::UpdateAgentOutput {
            arn: self.arn.ok_or_else(|| {
                ::aws_smithy_types::error::operation::BuildError::missing_field(
                    "arn",
                    "arn was not specified but it is required when building UpdateAgentOutput",
                )
            })?,
            agent_id: self.agent_id.ok_or_else(|| {
                ::aws_smithy_types::error::operation::BuildError::missing_field(
                    "agent_id",
                    "agent_id was not specified but it is required when building UpdateAgentOutput",
                )
            })?,
            agent_status: self.agent_status.ok_or_else(|| {
                ::aws_smithy_types::error::operation::BuildError::missing_field(
                    "agent_status",
                    "agent_status was not specified but it is required when building UpdateAgentOutput",
                )
            })?,
            failed_to_add_spaces: self.failed_to_add_spaces,
            failed_to_remove_spaces: self.failed_to_remove_spaces,
            failed_to_add_action_connectors: self.failed_to_add_action_connectors,
            failed_to_remove_action_connectors: self.failed_to_remove_action_connectors,
            request_id: self.request_id,
            _request_id: self._request_id,
        })
    }
}