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 UpdateSpaceResourcesOutput {
    /// <p>The ID of the space.</p>
    pub space_id: ::std::string::String,
    /// <p>The ARN of the space.</p>
    pub space_arn: ::std::option::Option<::std::string::String>,
    /// <p>A list of resource operations that failed.</p>
    pub failed_resource_operations: ::std::option::Option<::std::vec::Vec<crate::types::FailedSpaceResourceOperation>>,
    /// <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 UpdateSpaceResourcesOutput {
    /// <p>The ID of the space.</p>
    pub fn space_id(&self) -> &str {
        use std::ops::Deref;
        self.space_id.deref()
    }
    /// <p>The ARN of the space.</p>
    pub fn space_arn(&self) -> ::std::option::Option<&str> {
        self.space_arn.as_deref()
    }
    /// <p>A list of resource operations that failed.</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_resource_operations.is_none()`.
    pub fn failed_resource_operations(&self) -> &[crate::types::FailedSpaceResourceOperation] {
        self.failed_resource_operations.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 UpdateSpaceResourcesOutput {
    fn request_id(&self) -> Option<&str> {
        self._request_id.as_deref()
    }
}
impl UpdateSpaceResourcesOutput {
    /// Creates a new builder-style object to manufacture [`UpdateSpaceResourcesOutput`](crate::operation::update_space_resources::UpdateSpaceResourcesOutput).
    pub fn builder() -> crate::operation::update_space_resources::builders::UpdateSpaceResourcesOutputBuilder {
        crate::operation::update_space_resources::builders::UpdateSpaceResourcesOutputBuilder::default()
    }
}

/// A builder for [`UpdateSpaceResourcesOutput`](crate::operation::update_space_resources::UpdateSpaceResourcesOutput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct UpdateSpaceResourcesOutputBuilder {
    pub(crate) space_id: ::std::option::Option<::std::string::String>,
    pub(crate) space_arn: ::std::option::Option<::std::string::String>,
    pub(crate) failed_resource_operations: ::std::option::Option<::std::vec::Vec<crate::types::FailedSpaceResourceOperation>>,
    pub(crate) request_id: ::std::option::Option<::std::string::String>,
    _request_id: Option<String>,
}
impl UpdateSpaceResourcesOutputBuilder {
    /// <p>The ID of the space.</p>
    /// This field is required.
    pub fn space_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.space_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The ID of the space.</p>
    pub fn set_space_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.space_id = input;
        self
    }
    /// <p>The ID of the space.</p>
    pub fn get_space_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.space_id
    }
    /// <p>The ARN of the space.</p>
    pub fn space_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.space_arn = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The ARN of the space.</p>
    pub fn set_space_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.space_arn = input;
        self
    }
    /// <p>The ARN of the space.</p>
    pub fn get_space_arn(&self) -> &::std::option::Option<::std::string::String> {
        &self.space_arn
    }
    /// Appends an item to `failed_resource_operations`.
    ///
    /// To override the contents of this collection use [`set_failed_resource_operations`](Self::set_failed_resource_operations).
    ///
    /// <p>A list of resource operations that failed.</p>
    pub fn failed_resource_operations(mut self, input: crate::types::FailedSpaceResourceOperation) -> Self {
        let mut v = self.failed_resource_operations.unwrap_or_default();
        v.push(input);
        self.failed_resource_operations = ::std::option::Option::Some(v);
        self
    }
    /// <p>A list of resource operations that failed.</p>
    pub fn set_failed_resource_operations(
        mut self,
        input: ::std::option::Option<::std::vec::Vec<crate::types::FailedSpaceResourceOperation>>,
    ) -> Self {
        self.failed_resource_operations = input;
        self
    }
    /// <p>A list of resource operations that failed.</p>
    pub fn get_failed_resource_operations(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::FailedSpaceResourceOperation>> {
        &self.failed_resource_operations
    }
    /// <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 [`UpdateSpaceResourcesOutput`](crate::operation::update_space_resources::UpdateSpaceResourcesOutput).
    /// This method will fail if any of the following fields are not set:
    /// - [`space_id`](crate::operation::update_space_resources::builders::UpdateSpaceResourcesOutputBuilder::space_id)
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::update_space_resources::UpdateSpaceResourcesOutput, ::aws_smithy_types::error::operation::BuildError>
    {
        ::std::result::Result::Ok(crate::operation::update_space_resources::UpdateSpaceResourcesOutput {
            space_id: self.space_id.ok_or_else(|| {
                ::aws_smithy_types::error::operation::BuildError::missing_field(
                    "space_id",
                    "space_id was not specified but it is required when building UpdateSpaceResourcesOutput",
                )
            })?,
            space_arn: self.space_arn,
            failed_resource_operations: self.failed_resource_operations,
            request_id: self.request_id,
            _request_id: self._request_id,
        })
    }
}