aws-sdk-quicksight 1.131.0

AWS SDK for Amazon QuickSight
Documentation
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.

/// <p>The configuration of spacing (often a margin or padding).</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct Spacing {
    /// <p>Define the top spacing.</p>
    pub top: ::std::option::Option<::std::string::String>,
    /// <p>Define the bottom spacing.</p>
    pub bottom: ::std::option::Option<::std::string::String>,
    /// <p>Define the left spacing.</p>
    pub left: ::std::option::Option<::std::string::String>,
    /// <p>Define the right spacing.</p>
    pub right: ::std::option::Option<::std::string::String>,
}
impl Spacing {
    /// <p>Define the top spacing.</p>
    pub fn top(&self) -> ::std::option::Option<&str> {
        self.top.as_deref()
    }
    /// <p>Define the bottom spacing.</p>
    pub fn bottom(&self) -> ::std::option::Option<&str> {
        self.bottom.as_deref()
    }
    /// <p>Define the left spacing.</p>
    pub fn left(&self) -> ::std::option::Option<&str> {
        self.left.as_deref()
    }
    /// <p>Define the right spacing.</p>
    pub fn right(&self) -> ::std::option::Option<&str> {
        self.right.as_deref()
    }
}
impl Spacing {
    /// Creates a new builder-style object to manufacture [`Spacing`](crate::types::Spacing).
    pub fn builder() -> crate::types::builders::SpacingBuilder {
        crate::types::builders::SpacingBuilder::default()
    }
}

/// A builder for [`Spacing`](crate::types::Spacing).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct SpacingBuilder {
    pub(crate) top: ::std::option::Option<::std::string::String>,
    pub(crate) bottom: ::std::option::Option<::std::string::String>,
    pub(crate) left: ::std::option::Option<::std::string::String>,
    pub(crate) right: ::std::option::Option<::std::string::String>,
}
impl SpacingBuilder {
    /// <p>Define the top spacing.</p>
    pub fn top(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.top = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>Define the top spacing.</p>
    pub fn set_top(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.top = input;
        self
    }
    /// <p>Define the top spacing.</p>
    pub fn get_top(&self) -> &::std::option::Option<::std::string::String> {
        &self.top
    }
    /// <p>Define the bottom spacing.</p>
    pub fn bottom(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.bottom = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>Define the bottom spacing.</p>
    pub fn set_bottom(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.bottom = input;
        self
    }
    /// <p>Define the bottom spacing.</p>
    pub fn get_bottom(&self) -> &::std::option::Option<::std::string::String> {
        &self.bottom
    }
    /// <p>Define the left spacing.</p>
    pub fn left(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.left = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>Define the left spacing.</p>
    pub fn set_left(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.left = input;
        self
    }
    /// <p>Define the left spacing.</p>
    pub fn get_left(&self) -> &::std::option::Option<::std::string::String> {
        &self.left
    }
    /// <p>Define the right spacing.</p>
    pub fn right(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.right = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>Define the right spacing.</p>
    pub fn set_right(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.right = input;
        self
    }
    /// <p>Define the right spacing.</p>
    pub fn get_right(&self) -> &::std::option::Option<::std::string::String> {
        &self.right
    }
    /// Consumes the builder and constructs a [`Spacing`](crate::types::Spacing).
    pub fn build(self) -> crate::types::Spacing {
        crate::types::Spacing {
            top: self.top,
            bottom: self.bottom,
            left: self.left,
            right: self.right,
        }
    }
}