#[non_exhaustive]pub struct AssetModelPropertyDefinitionBuilder { /* private fields */ }Expand description
A builder for AssetModelPropertyDefinition.
Implementations§
source§impl AssetModelPropertyDefinitionBuilder
impl AssetModelPropertyDefinitionBuilder
sourcepub fn name(self, input: impl Into<String>) -> Self
pub fn name(self, input: impl Into<String>) -> Self
The name of the property definition.
This field is required.sourcepub fn data_type(self, input: PropertyDataType) -> Self
pub fn data_type(self, input: PropertyDataType) -> Self
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 set_data_type(self, input: Option<PropertyDataType>) -> Self
pub fn set_data_type(self, input: Option<PropertyDataType>) -> Self
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 get_data_type(&self) -> &Option<PropertyDataType>
pub fn get_data_type(&self) -> &Option<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, input: impl Into<String>) -> Self
pub fn data_type_spec(self, input: impl Into<String>) -> Self
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 set_data_type_spec(self, input: Option<String>) -> Self
pub fn set_data_type_spec(self, input: Option<String>) -> Self
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 get_data_type_spec(&self) -> &Option<String>
pub fn get_data_type_spec(&self) -> &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.
sourcepub fn unit(self, input: impl Into<String>) -> Self
pub fn unit(self, input: impl Into<String>) -> Self
The unit of the property definition, such as Newtons or RPM.
sourcepub fn set_unit(self, input: Option<String>) -> Self
pub fn set_unit(self, input: Option<String>) -> Self
The unit of the property definition, such as Newtons or RPM.
sourcepub fn get_unit(&self) -> &Option<String>
pub fn get_unit(&self) -> &Option<String>
The unit of the property definition, such as Newtons or RPM.
sourcepub fn type(self, input: PropertyType) -> Self
pub fn type(self, input: PropertyType) -> Self
The property definition type (see PropertyType). You can only specify one type in a property definition.
sourcepub fn set_type(self, input: Option<PropertyType>) -> Self
pub fn set_type(self, input: Option<PropertyType>) -> Self
The property definition type (see PropertyType). You can only specify one type in a property definition.
sourcepub fn get_type(&self) -> &Option<PropertyType>
pub fn get_type(&self) -> &Option<PropertyType>
The property definition type (see PropertyType). You can only specify one type in a property definition.
sourcepub fn id(self, input: impl Into<String>) -> Self
pub fn id(self, input: impl Into<String>) -> Self
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 set_id(self, input: Option<String>) -> Self
pub fn set_id(self, input: Option<String>) -> Self
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 get_id(&self) -> &Option<String>
pub fn get_id(&self) -> &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.
sourcepub fn external_id(self, input: impl Into<String>) -> Self
pub fn external_id(self, input: impl Into<String>) -> Self
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.
sourcepub fn set_external_id(self, input: Option<String>) -> Self
pub fn set_external_id(self, input: Option<String>) -> Self
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.
sourcepub fn get_external_id(&self) -> &Option<String>
pub fn get_external_id(&self) -> &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.
sourcepub fn build(self) -> Result<AssetModelPropertyDefinition, BuildError>
pub fn build(self) -> Result<AssetModelPropertyDefinition, BuildError>
Consumes the builder and constructs a AssetModelPropertyDefinition.
This method will fail if any of the following fields are not set:
Trait Implementations§
source§impl Clone for AssetModelPropertyDefinitionBuilder
impl Clone for AssetModelPropertyDefinitionBuilder
source§fn clone(&self) -> AssetModelPropertyDefinitionBuilder
fn clone(&self) -> AssetModelPropertyDefinitionBuilder
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moresource§impl Default for AssetModelPropertyDefinitionBuilder
impl Default for AssetModelPropertyDefinitionBuilder
source§fn default() -> AssetModelPropertyDefinitionBuilder
fn default() -> AssetModelPropertyDefinitionBuilder
source§impl PartialEq for AssetModelPropertyDefinitionBuilder
impl PartialEq for AssetModelPropertyDefinitionBuilder
source§fn eq(&self, other: &AssetModelPropertyDefinitionBuilder) -> bool
fn eq(&self, other: &AssetModelPropertyDefinitionBuilder) -> bool
self and other values to be equal, and is used
by ==.impl StructuralPartialEq for AssetModelPropertyDefinitionBuilder
Auto Trait Implementations§
impl Freeze for AssetModelPropertyDefinitionBuilder
impl RefUnwindSafe for AssetModelPropertyDefinitionBuilder
impl Send for AssetModelPropertyDefinitionBuilder
impl Sync for AssetModelPropertyDefinitionBuilder
impl Unpin for AssetModelPropertyDefinitionBuilder
impl UnwindSafe for AssetModelPropertyDefinitionBuilder
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