Enum aws_sdk_securityhub::types::ParameterValue
source · #[non_exhaustive]pub enum ParameterValue {
Boolean(bool),
Double(f64),
Enum(String),
EnumList(Vec<String>),
Integer(i32),
IntegerList(Vec<i32>),
String(String),
StringList(Vec<String>),
Unknown,
}
Expand description
An object that includes the data type of a security control parameter and its current value.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Boolean(bool)
A control parameter that is a boolean.
Double(f64)
A control parameter that is a double.
Enum(String)
A control parameter that is an enum.
EnumList(Vec<String>)
A control parameter that is a list of enums.
Integer(i32)
A control parameter that is an integer.
IntegerList(Vec<i32>)
A control parameter that is a list of integers.
String(String)
A control parameter that is a string.
StringList(Vec<String>)
A control parameter that is a list of strings.
Unknown
The Unknown
variant represents cases where new union variant was received. Consider upgrading the SDK to the latest available version.
An unknown enum variant
Note: If you encounter this error, consider upgrading your SDK to the latest version.
The Unknown
variant represents cases where the server sent a value that wasn’t recognized
by the client. This can happen when the server adds new functionality, but the client has not been updated.
To investigate this, consider turning on debug logging to print the raw HTTP response.
Implementations§
source§impl ParameterValue
impl ParameterValue
sourcepub fn as_boolean(&self) -> Result<&bool, &Self>
pub fn as_boolean(&self) -> Result<&bool, &Self>
sourcepub fn is_boolean(&self) -> bool
pub fn is_boolean(&self) -> bool
Returns true if this is a Boolean
.
sourcepub fn is_enum_list(&self) -> bool
pub fn is_enum_list(&self) -> bool
Returns true if this is a EnumList
.
sourcepub fn as_integer(&self) -> Result<&i32, &Self>
pub fn as_integer(&self) -> Result<&i32, &Self>
sourcepub fn is_integer(&self) -> bool
pub fn is_integer(&self) -> bool
Returns true if this is a Integer
.
sourcepub fn as_integer_list(&self) -> Result<&Vec<i32>, &Self>
pub fn as_integer_list(&self) -> Result<&Vec<i32>, &Self>
Tries to convert the enum instance into IntegerList
, extracting the inner Vec
.
Returns Err(&Self)
if it can’t be converted.
sourcepub fn is_integer_list(&self) -> bool
pub fn is_integer_list(&self) -> bool
Returns true if this is a IntegerList
.
sourcepub fn as_string_list(&self) -> Result<&Vec<String>, &Self>
pub fn as_string_list(&self) -> Result<&Vec<String>, &Self>
Tries to convert the enum instance into StringList
, extracting the inner Vec
.
Returns Err(&Self)
if it can’t be converted.
sourcepub fn is_string_list(&self) -> bool
pub fn is_string_list(&self) -> bool
Returns true if this is a StringList
.
sourcepub fn is_unknown(&self) -> bool
pub fn is_unknown(&self) -> bool
Returns true if the enum instance is the Unknown
variant.
Trait Implementations§
source§impl Clone for ParameterValue
impl Clone for ParameterValue
source§fn clone(&self) -> ParameterValue
fn clone(&self) -> ParameterValue
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for ParameterValue
impl Debug for ParameterValue
source§impl PartialEq for ParameterValue
impl PartialEq for ParameterValue
source§fn eq(&self, other: &ParameterValue) -> bool
fn eq(&self, other: &ParameterValue) -> bool
self
and other
values to be equal, and is used
by ==
.