#[non_exhaustive]pub struct AssetModelPropertyDefinition {
pub name: String,
pub data_type: PropertyDataType,
pub data_type_spec: Option<String>,
pub unit: Option<String>,
pub type: Option<PropertyType>,
pub id: Option<String>,
pub external_id: Option<String>,
}Expand description
Contains an asset model property definition. This property definition is applied to all assets created from the asset model.
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.name: StringThe name of the property definition.
data_type: PropertyDataTypeThe data type of the property definition.
If you specify STRUCT, you must also specify dataTypeSpec to identify the type of the structure for this property.
data_type_spec: Option<String>The data type of the structure for this property. This parameter is required on properties that have the STRUCT data type.
The options for this parameter depend on the type of the composite model in which you define this property. Use AWS/ALARM_STATE for alarm state in alarm composite models.
unit: Option<String>The unit of the property definition, such as Newtons or RPM.
type: Option<PropertyType>The property definition type (see PropertyType). You can only specify one type in a property definition.
id: Option<String>The ID to assign to the asset model property, if desired. IoT SiteWise automatically generates a unique ID for you, so this parameter is never required. However, if you prefer to supply your own ID instead, you can specify it here in UUID format. If you specify your own ID, it must be globally unique.
external_id: Option<String>An external ID to assign to the property definition. The external ID must be unique among property definitions within this asset model. For more information, see Using external IDs in the IoT SiteWise User Guide.
Implementations§
source§impl AssetModelPropertyDefinition
impl AssetModelPropertyDefinition
sourcepub fn data_type(&self) -> &PropertyDataType
pub fn data_type(&self) -> &PropertyDataType
The data type of the property definition.
If you specify STRUCT, you must also specify dataTypeSpec to identify the type of the structure for this property.
sourcepub fn data_type_spec(&self) -> Option<&str>
pub fn data_type_spec(&self) -> Option<&str>
The data type of the structure for this property. This parameter is required on properties that have the STRUCT data type.
The options for this parameter depend on the type of the composite model in which you define this property. Use AWS/ALARM_STATE for alarm state in alarm composite models.
sourcepub fn unit(&self) -> Option<&str>
pub fn unit(&self) -> Option<&str>
The unit of the property definition, such as Newtons or RPM.
sourcepub fn type(&self) -> Option<&PropertyType>
pub fn type(&self) -> Option<&PropertyType>
The property definition type (see PropertyType). You can only specify one type in a property definition.
sourcepub fn id(&self) -> Option<&str>
pub fn id(&self) -> Option<&str>
The ID to assign to the asset model property, if desired. IoT SiteWise automatically generates a unique ID for you, so this parameter is never required. However, if you prefer to supply your own ID instead, you can specify it here in UUID format. If you specify your own ID, it must be globally unique.
sourcepub fn external_id(&self) -> Option<&str>
pub fn external_id(&self) -> Option<&str>
An external ID to assign to the property definition. The external ID must be unique among property definitions within this asset model. For more information, see Using external IDs in the IoT SiteWise User Guide.
source§impl AssetModelPropertyDefinition
impl AssetModelPropertyDefinition
sourcepub fn builder() -> AssetModelPropertyDefinitionBuilder
pub fn builder() -> AssetModelPropertyDefinitionBuilder
Creates a new builder-style object to manufacture AssetModelPropertyDefinition.
Trait Implementations§
source§impl Clone for AssetModelPropertyDefinition
impl Clone for AssetModelPropertyDefinition
source§fn clone(&self) -> AssetModelPropertyDefinition
fn clone(&self) -> AssetModelPropertyDefinition
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moresource§impl Debug for AssetModelPropertyDefinition
impl Debug for AssetModelPropertyDefinition
source§impl PartialEq for AssetModelPropertyDefinition
impl PartialEq for AssetModelPropertyDefinition
source§fn eq(&self, other: &AssetModelPropertyDefinition) -> bool
fn eq(&self, other: &AssetModelPropertyDefinition) -> bool
self and other values to be equal, and is used
by ==.impl StructuralPartialEq for AssetModelPropertyDefinition
Auto Trait Implementations§
impl Freeze for AssetModelPropertyDefinition
impl RefUnwindSafe for AssetModelPropertyDefinition
impl Send for AssetModelPropertyDefinition
impl Sync for AssetModelPropertyDefinition
impl Unpin for AssetModelPropertyDefinition
impl UnwindSafe for AssetModelPropertyDefinition
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