aws-sdk-dax 1.96.0

AWS SDK for Amazon DynamoDB Accelerator (DAX)
Documentation
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.

/// <p>Describes an individual setting that controls some aspect of DAX behavior.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct Parameter {
    /// <p>The name of the parameter.</p>
    pub parameter_name: ::std::option::Option<::std::string::String>,
    /// <p>Determines whether the parameter can be applied to any nodes, or only nodes of a particular type.</p>
    pub parameter_type: ::std::option::Option<crate::types::ParameterType>,
    /// <p>The value for the parameter.</p>
    pub parameter_value: ::std::option::Option<::std::string::String>,
    /// <p>A list of node types, and specific parameter values for each node.</p>
    pub node_type_specific_values: ::std::option::Option<::std::vec::Vec<crate::types::NodeTypeSpecificValue>>,
    /// <p>A description of the parameter</p>
    pub description: ::std::option::Option<::std::string::String>,
    /// <p>How the parameter is defined. For example, <code>system</code> denotes a system-defined parameter.</p>
    pub source: ::std::option::Option<::std::string::String>,
    /// <p>The data type of the parameter. For example, <code>integer</code>:</p>
    pub data_type: ::std::option::Option<::std::string::String>,
    /// <p>A range of values within which the parameter can be set.</p>
    pub allowed_values: ::std::option::Option<::std::string::String>,
    /// <p>Whether the customer is allowed to modify the parameter.</p>
    pub is_modifiable: ::std::option::Option<crate::types::IsModifiable>,
    /// <p>The conditions under which changes to this parameter can be applied. For example, <code>requires-reboot</code> indicates that a new value for this parameter will only take effect if a node is rebooted.</p>
    pub change_type: ::std::option::Option<crate::types::ChangeType>,
}
impl Parameter {
    /// <p>The name of the parameter.</p>
    pub fn parameter_name(&self) -> ::std::option::Option<&str> {
        self.parameter_name.as_deref()
    }
    /// <p>Determines whether the parameter can be applied to any nodes, or only nodes of a particular type.</p>
    pub fn parameter_type(&self) -> ::std::option::Option<&crate::types::ParameterType> {
        self.parameter_type.as_ref()
    }
    /// <p>The value for the parameter.</p>
    pub fn parameter_value(&self) -> ::std::option::Option<&str> {
        self.parameter_value.as_deref()
    }
    /// <p>A list of node types, and specific parameter values for each node.</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 `.node_type_specific_values.is_none()`.
    pub fn node_type_specific_values(&self) -> &[crate::types::NodeTypeSpecificValue] {
        self.node_type_specific_values.as_deref().unwrap_or_default()
    }
    /// <p>A description of the parameter</p>
    pub fn description(&self) -> ::std::option::Option<&str> {
        self.description.as_deref()
    }
    /// <p>How the parameter is defined. For example, <code>system</code> denotes a system-defined parameter.</p>
    pub fn source(&self) -> ::std::option::Option<&str> {
        self.source.as_deref()
    }
    /// <p>The data type of the parameter. For example, <code>integer</code>:</p>
    pub fn data_type(&self) -> ::std::option::Option<&str> {
        self.data_type.as_deref()
    }
    /// <p>A range of values within which the parameter can be set.</p>
    pub fn allowed_values(&self) -> ::std::option::Option<&str> {
        self.allowed_values.as_deref()
    }
    /// <p>Whether the customer is allowed to modify the parameter.</p>
    pub fn is_modifiable(&self) -> ::std::option::Option<&crate::types::IsModifiable> {
        self.is_modifiable.as_ref()
    }
    /// <p>The conditions under which changes to this parameter can be applied. For example, <code>requires-reboot</code> indicates that a new value for this parameter will only take effect if a node is rebooted.</p>
    pub fn change_type(&self) -> ::std::option::Option<&crate::types::ChangeType> {
        self.change_type.as_ref()
    }
}
impl Parameter {
    /// Creates a new builder-style object to manufacture [`Parameter`](crate::types::Parameter).
    pub fn builder() -> crate::types::builders::ParameterBuilder {
        crate::types::builders::ParameterBuilder::default()
    }
}

/// A builder for [`Parameter`](crate::types::Parameter).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct ParameterBuilder {
    pub(crate) parameter_name: ::std::option::Option<::std::string::String>,
    pub(crate) parameter_type: ::std::option::Option<crate::types::ParameterType>,
    pub(crate) parameter_value: ::std::option::Option<::std::string::String>,
    pub(crate) node_type_specific_values: ::std::option::Option<::std::vec::Vec<crate::types::NodeTypeSpecificValue>>,
    pub(crate) description: ::std::option::Option<::std::string::String>,
    pub(crate) source: ::std::option::Option<::std::string::String>,
    pub(crate) data_type: ::std::option::Option<::std::string::String>,
    pub(crate) allowed_values: ::std::option::Option<::std::string::String>,
    pub(crate) is_modifiable: ::std::option::Option<crate::types::IsModifiable>,
    pub(crate) change_type: ::std::option::Option<crate::types::ChangeType>,
}
impl ParameterBuilder {
    /// <p>The name of the parameter.</p>
    pub fn parameter_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.parameter_name = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The name of the parameter.</p>
    pub fn set_parameter_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.parameter_name = input;
        self
    }
    /// <p>The name of the parameter.</p>
    pub fn get_parameter_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.parameter_name
    }
    /// <p>Determines whether the parameter can be applied to any nodes, or only nodes of a particular type.</p>
    pub fn parameter_type(mut self, input: crate::types::ParameterType) -> Self {
        self.parameter_type = ::std::option::Option::Some(input);
        self
    }
    /// <p>Determines whether the parameter can be applied to any nodes, or only nodes of a particular type.</p>
    pub fn set_parameter_type(mut self, input: ::std::option::Option<crate::types::ParameterType>) -> Self {
        self.parameter_type = input;
        self
    }
    /// <p>Determines whether the parameter can be applied to any nodes, or only nodes of a particular type.</p>
    pub fn get_parameter_type(&self) -> &::std::option::Option<crate::types::ParameterType> {
        &self.parameter_type
    }
    /// <p>The value for the parameter.</p>
    pub fn parameter_value(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.parameter_value = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The value for the parameter.</p>
    pub fn set_parameter_value(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.parameter_value = input;
        self
    }
    /// <p>The value for the parameter.</p>
    pub fn get_parameter_value(&self) -> &::std::option::Option<::std::string::String> {
        &self.parameter_value
    }
    /// Appends an item to `node_type_specific_values`.
    ///
    /// To override the contents of this collection use [`set_node_type_specific_values`](Self::set_node_type_specific_values).
    ///
    /// <p>A list of node types, and specific parameter values for each node.</p>
    pub fn node_type_specific_values(mut self, input: crate::types::NodeTypeSpecificValue) -> Self {
        let mut v = self.node_type_specific_values.unwrap_or_default();
        v.push(input);
        self.node_type_specific_values = ::std::option::Option::Some(v);
        self
    }
    /// <p>A list of node types, and specific parameter values for each node.</p>
    pub fn set_node_type_specific_values(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::NodeTypeSpecificValue>>) -> Self {
        self.node_type_specific_values = input;
        self
    }
    /// <p>A list of node types, and specific parameter values for each node.</p>
    pub fn get_node_type_specific_values(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::NodeTypeSpecificValue>> {
        &self.node_type_specific_values
    }
    /// <p>A description of the parameter</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 parameter</p>
    pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.description = input;
        self
    }
    /// <p>A description of the parameter</p>
    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
        &self.description
    }
    /// <p>How the parameter is defined. For example, <code>system</code> denotes a system-defined parameter.</p>
    pub fn source(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.source = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>How the parameter is defined. For example, <code>system</code> denotes a system-defined parameter.</p>
    pub fn set_source(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.source = input;
        self
    }
    /// <p>How the parameter is defined. For example, <code>system</code> denotes a system-defined parameter.</p>
    pub fn get_source(&self) -> &::std::option::Option<::std::string::String> {
        &self.source
    }
    /// <p>The data type of the parameter. For example, <code>integer</code>:</p>
    pub fn data_type(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.data_type = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The data type of the parameter. For example, <code>integer</code>:</p>
    pub fn set_data_type(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.data_type = input;
        self
    }
    /// <p>The data type of the parameter. For example, <code>integer</code>:</p>
    pub fn get_data_type(&self) -> &::std::option::Option<::std::string::String> {
        &self.data_type
    }
    /// <p>A range of values within which the parameter can be set.</p>
    pub fn allowed_values(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.allowed_values = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>A range of values within which the parameter can be set.</p>
    pub fn set_allowed_values(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.allowed_values = input;
        self
    }
    /// <p>A range of values within which the parameter can be set.</p>
    pub fn get_allowed_values(&self) -> &::std::option::Option<::std::string::String> {
        &self.allowed_values
    }
    /// <p>Whether the customer is allowed to modify the parameter.</p>
    pub fn is_modifiable(mut self, input: crate::types::IsModifiable) -> Self {
        self.is_modifiable = ::std::option::Option::Some(input);
        self
    }
    /// <p>Whether the customer is allowed to modify the parameter.</p>
    pub fn set_is_modifiable(mut self, input: ::std::option::Option<crate::types::IsModifiable>) -> Self {
        self.is_modifiable = input;
        self
    }
    /// <p>Whether the customer is allowed to modify the parameter.</p>
    pub fn get_is_modifiable(&self) -> &::std::option::Option<crate::types::IsModifiable> {
        &self.is_modifiable
    }
    /// <p>The conditions under which changes to this parameter can be applied. For example, <code>requires-reboot</code> indicates that a new value for this parameter will only take effect if a node is rebooted.</p>
    pub fn change_type(mut self, input: crate::types::ChangeType) -> Self {
        self.change_type = ::std::option::Option::Some(input);
        self
    }
    /// <p>The conditions under which changes to this parameter can be applied. For example, <code>requires-reboot</code> indicates that a new value for this parameter will only take effect if a node is rebooted.</p>
    pub fn set_change_type(mut self, input: ::std::option::Option<crate::types::ChangeType>) -> Self {
        self.change_type = input;
        self
    }
    /// <p>The conditions under which changes to this parameter can be applied. For example, <code>requires-reboot</code> indicates that a new value for this parameter will only take effect if a node is rebooted.</p>
    pub fn get_change_type(&self) -> &::std::option::Option<crate::types::ChangeType> {
        &self.change_type
    }
    /// Consumes the builder and constructs a [`Parameter`](crate::types::Parameter).
    pub fn build(self) -> crate::types::Parameter {
        crate::types::Parameter {
            parameter_name: self.parameter_name,
            parameter_type: self.parameter_type,
            parameter_value: self.parameter_value,
            node_type_specific_values: self.node_type_specific_values,
            description: self.description,
            source: self.source,
            data_type: self.data_type,
            allowed_values: self.allowed_values,
            is_modifiable: self.is_modifiable,
            change_type: self.change_type,
        }
    }
}