aws-sdk-quicksight 1.130.0

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

/// <p>A list of Quick Sight parameters and the list's override values.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct Parameters {
    /// <p>The parameters that have a data type of string.</p>
    pub string_parameters: ::std::option::Option<::std::vec::Vec<crate::types::StringParameter>>,
    /// <p>The parameters that have a data type of integer.</p>
    pub integer_parameters: ::std::option::Option<::std::vec::Vec<crate::types::IntegerParameter>>,
    /// <p>The parameters that have a data type of decimal.</p>
    pub decimal_parameters: ::std::option::Option<::std::vec::Vec<crate::types::DecimalParameter>>,
    /// <p>The parameters that have a data type of date-time.</p>
    pub date_time_parameters: ::std::option::Option<::std::vec::Vec<crate::types::DateTimeParameter>>,
}
impl Parameters {
    /// <p>The parameters that have a data type of string.</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 `.string_parameters.is_none()`.
    pub fn string_parameters(&self) -> &[crate::types::StringParameter] {
        self.string_parameters.as_deref().unwrap_or_default()
    }
    /// <p>The parameters that have a data type of integer.</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 `.integer_parameters.is_none()`.
    pub fn integer_parameters(&self) -> &[crate::types::IntegerParameter] {
        self.integer_parameters.as_deref().unwrap_or_default()
    }
    /// <p>The parameters that have a data type of decimal.</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 `.decimal_parameters.is_none()`.
    pub fn decimal_parameters(&self) -> &[crate::types::DecimalParameter] {
        self.decimal_parameters.as_deref().unwrap_or_default()
    }
    /// <p>The parameters that have a data type of date-time.</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 `.date_time_parameters.is_none()`.
    pub fn date_time_parameters(&self) -> &[crate::types::DateTimeParameter] {
        self.date_time_parameters.as_deref().unwrap_or_default()
    }
}
impl Parameters {
    /// Creates a new builder-style object to manufacture [`Parameters`](crate::types::Parameters).
    pub fn builder() -> crate::types::builders::ParametersBuilder {
        crate::types::builders::ParametersBuilder::default()
    }
}

/// A builder for [`Parameters`](crate::types::Parameters).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct ParametersBuilder {
    pub(crate) string_parameters: ::std::option::Option<::std::vec::Vec<crate::types::StringParameter>>,
    pub(crate) integer_parameters: ::std::option::Option<::std::vec::Vec<crate::types::IntegerParameter>>,
    pub(crate) decimal_parameters: ::std::option::Option<::std::vec::Vec<crate::types::DecimalParameter>>,
    pub(crate) date_time_parameters: ::std::option::Option<::std::vec::Vec<crate::types::DateTimeParameter>>,
}
impl ParametersBuilder {
    /// Appends an item to `string_parameters`.
    ///
    /// To override the contents of this collection use [`set_string_parameters`](Self::set_string_parameters).
    ///
    /// <p>The parameters that have a data type of string.</p>
    pub fn string_parameters(mut self, input: crate::types::StringParameter) -> Self {
        let mut v = self.string_parameters.unwrap_or_default();
        v.push(input);
        self.string_parameters = ::std::option::Option::Some(v);
        self
    }
    /// <p>The parameters that have a data type of string.</p>
    pub fn set_string_parameters(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::StringParameter>>) -> Self {
        self.string_parameters = input;
        self
    }
    /// <p>The parameters that have a data type of string.</p>
    pub fn get_string_parameters(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::StringParameter>> {
        &self.string_parameters
    }
    /// Appends an item to `integer_parameters`.
    ///
    /// To override the contents of this collection use [`set_integer_parameters`](Self::set_integer_parameters).
    ///
    /// <p>The parameters that have a data type of integer.</p>
    pub fn integer_parameters(mut self, input: crate::types::IntegerParameter) -> Self {
        let mut v = self.integer_parameters.unwrap_or_default();
        v.push(input);
        self.integer_parameters = ::std::option::Option::Some(v);
        self
    }
    /// <p>The parameters that have a data type of integer.</p>
    pub fn set_integer_parameters(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::IntegerParameter>>) -> Self {
        self.integer_parameters = input;
        self
    }
    /// <p>The parameters that have a data type of integer.</p>
    pub fn get_integer_parameters(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::IntegerParameter>> {
        &self.integer_parameters
    }
    /// Appends an item to `decimal_parameters`.
    ///
    /// To override the contents of this collection use [`set_decimal_parameters`](Self::set_decimal_parameters).
    ///
    /// <p>The parameters that have a data type of decimal.</p>
    pub fn decimal_parameters(mut self, input: crate::types::DecimalParameter) -> Self {
        let mut v = self.decimal_parameters.unwrap_or_default();
        v.push(input);
        self.decimal_parameters = ::std::option::Option::Some(v);
        self
    }
    /// <p>The parameters that have a data type of decimal.</p>
    pub fn set_decimal_parameters(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::DecimalParameter>>) -> Self {
        self.decimal_parameters = input;
        self
    }
    /// <p>The parameters that have a data type of decimal.</p>
    pub fn get_decimal_parameters(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::DecimalParameter>> {
        &self.decimal_parameters
    }
    /// Appends an item to `date_time_parameters`.
    ///
    /// To override the contents of this collection use [`set_date_time_parameters`](Self::set_date_time_parameters).
    ///
    /// <p>The parameters that have a data type of date-time.</p>
    pub fn date_time_parameters(mut self, input: crate::types::DateTimeParameter) -> Self {
        let mut v = self.date_time_parameters.unwrap_or_default();
        v.push(input);
        self.date_time_parameters = ::std::option::Option::Some(v);
        self
    }
    /// <p>The parameters that have a data type of date-time.</p>
    pub fn set_date_time_parameters(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::DateTimeParameter>>) -> Self {
        self.date_time_parameters = input;
        self
    }
    /// <p>The parameters that have a data type of date-time.</p>
    pub fn get_date_time_parameters(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::DateTimeParameter>> {
        &self.date_time_parameters
    }
    /// Consumes the builder and constructs a [`Parameters`](crate::types::Parameters).
    pub fn build(self) -> crate::types::Parameters {
        crate::types::Parameters {
            string_parameters: self.string_parameters,
            integer_parameters: self.integer_parameters,
            decimal_parameters: self.decimal_parameters,
            date_time_parameters: self.date_time_parameters,
        }
    }
}