Struct aws_sdk_iotevents::types::AssetPropertyVariant
source · #[non_exhaustive]pub struct AssetPropertyVariant {
pub string_value: Option<String>,
pub integer_value: Option<String>,
pub double_value: Option<String>,
pub boolean_value: Option<String>,
}
Expand description
A structure that contains an asset property value. For more information, see Variant in the AWS IoT SiteWise API Reference.
You must use expressions for all parameters in AssetPropertyVariant
. The expressions accept literals, operators, functions, references, and substitution templates.
Examples
-
For literal values, the expressions must contain single quotes. For example, the value for the
integerValue
parameter can be'100'
. -
For references, you must specify either variables or parameters. For example, the value for the
booleanValue
parameter can be$variable.offline
. -
For a substitution template, you must use
${}
, and the template must be in single quotes. A substitution template can also contain a combination of literals, operators, functions, references, and substitution templates.In the following example, the value for the
doubleValue
parameter uses a substitution template.'${$input.TemperatureInput.sensorData.temperature * 6 / 5 + 32}'
For more information, see Expressions in the AWS IoT Events Developer Guide.
You must specify one of the following value types, depending on the dataType
of the specified asset property. For more information, see AssetProperty in the AWS IoT SiteWise API Reference.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. }
syntax; cannot be matched against without a wildcard ..
; and struct update syntax will not work.string_value: Option<String>
The asset property value is a string. You must use an expression, and the evaluated result should be a string.
integer_value: Option<String>
The asset property value is an integer. You must use an expression, and the evaluated result should be an integer.
double_value: Option<String>
The asset property value is a double. You must use an expression, and the evaluated result should be a double.
boolean_value: Option<String>
The asset property value is a Boolean value that must be 'TRUE'
or 'FALSE'
. You must use an expression, and the evaluated result should be a Boolean value.
Implementations§
source§impl AssetPropertyVariant
impl AssetPropertyVariant
sourcepub fn string_value(&self) -> Option<&str>
pub fn string_value(&self) -> Option<&str>
The asset property value is a string. You must use an expression, and the evaluated result should be a string.
sourcepub fn integer_value(&self) -> Option<&str>
pub fn integer_value(&self) -> Option<&str>
The asset property value is an integer. You must use an expression, and the evaluated result should be an integer.
sourcepub fn double_value(&self) -> Option<&str>
pub fn double_value(&self) -> Option<&str>
The asset property value is a double. You must use an expression, and the evaluated result should be a double.
sourcepub fn boolean_value(&self) -> Option<&str>
pub fn boolean_value(&self) -> Option<&str>
The asset property value is a Boolean value that must be 'TRUE'
or 'FALSE'
. You must use an expression, and the evaluated result should be a Boolean value.
source§impl AssetPropertyVariant
impl AssetPropertyVariant
sourcepub fn builder() -> AssetPropertyVariantBuilder
pub fn builder() -> AssetPropertyVariantBuilder
Creates a new builder-style object to manufacture AssetPropertyVariant
.
Trait Implementations§
source§impl Clone for AssetPropertyVariant
impl Clone for AssetPropertyVariant
source§fn clone(&self) -> AssetPropertyVariant
fn clone(&self) -> AssetPropertyVariant
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for AssetPropertyVariant
impl Debug for AssetPropertyVariant
source§impl PartialEq for AssetPropertyVariant
impl PartialEq for AssetPropertyVariant
source§fn eq(&self, other: &AssetPropertyVariant) -> bool
fn eq(&self, other: &AssetPropertyVariant) -> bool
self
and other
values to be equal, and is used
by ==
.impl StructuralPartialEq for AssetPropertyVariant
Auto Trait Implementations§
impl Freeze for AssetPropertyVariant
impl RefUnwindSafe for AssetPropertyVariant
impl Send for AssetPropertyVariant
impl Sync for AssetPropertyVariant
impl Unpin for AssetPropertyVariant
impl UnwindSafe for AssetPropertyVariant
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more