#[non_exhaustive]pub struct AssetModelCompositeModelDefinitionBuilder { /* private fields */ }Expand description
A builder for AssetModelCompositeModelDefinition.
Implementations§
source§impl AssetModelCompositeModelDefinitionBuilder
impl AssetModelCompositeModelDefinitionBuilder
sourcepub fn name(self, input: impl Into<String>) -> Self
pub fn name(self, input: impl Into<String>) -> Self
The name of the composite model.
This field is required.sourcepub fn description(self, input: impl Into<String>) -> Self
pub fn description(self, input: impl Into<String>) -> Self
The description of the composite model.
sourcepub fn set_description(self, input: Option<String>) -> Self
pub fn set_description(self, input: Option<String>) -> Self
The description of the composite model.
sourcepub fn get_description(&self) -> &Option<String>
pub fn get_description(&self) -> &Option<String>
The description of the composite model.
sourcepub fn type(self, input: impl Into<String>) -> Self
pub fn type(self, input: impl Into<String>) -> Self
The type of the composite model. For alarm composite models, this type is AWS/ALARM.
sourcepub fn set_type(self, input: Option<String>) -> Self
pub fn set_type(self, input: Option<String>) -> Self
The type of the composite model. For alarm composite models, this type is AWS/ALARM.
sourcepub fn get_type(&self) -> &Option<String>
pub fn get_type(&self) -> &Option<String>
The type of the composite model. For alarm composite models, this type is AWS/ALARM.
sourcepub fn properties(self, input: AssetModelPropertyDefinition) -> Self
pub fn properties(self, input: AssetModelPropertyDefinition) -> Self
Appends an item to properties.
To override the contents of this collection use set_properties.
The asset property definitions for this composite model.
sourcepub fn set_properties(
self,
input: Option<Vec<AssetModelPropertyDefinition>>
) -> Self
pub fn set_properties( self, input: Option<Vec<AssetModelPropertyDefinition>> ) -> Self
The asset property definitions for this composite model.
sourcepub fn get_properties(&self) -> &Option<Vec<AssetModelPropertyDefinition>>
pub fn get_properties(&self) -> &Option<Vec<AssetModelPropertyDefinition>>
The asset property definitions for this composite model.
sourcepub fn id(self, input: impl Into<String>) -> Self
pub fn id(self, input: impl Into<String>) -> Self
The ID to assign to the composite model, 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 composite model, 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 composite model, 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 composite model. The external ID must be unique among composite models 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 composite model. The external ID must be unique among composite models 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 composite model. The external ID must be unique among composite models within this asset model. For more information, see Using external IDs in the IoT SiteWise User Guide.
sourcepub fn build(self) -> Result<AssetModelCompositeModelDefinition, BuildError>
pub fn build(self) -> Result<AssetModelCompositeModelDefinition, BuildError>
Consumes the builder and constructs a AssetModelCompositeModelDefinition.
This method will fail if any of the following fields are not set:
Trait Implementations§
source§impl Clone for AssetModelCompositeModelDefinitionBuilder
impl Clone for AssetModelCompositeModelDefinitionBuilder
source§fn clone(&self) -> AssetModelCompositeModelDefinitionBuilder
fn clone(&self) -> AssetModelCompositeModelDefinitionBuilder
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moresource§impl Default for AssetModelCompositeModelDefinitionBuilder
impl Default for AssetModelCompositeModelDefinitionBuilder
source§fn default() -> AssetModelCompositeModelDefinitionBuilder
fn default() -> AssetModelCompositeModelDefinitionBuilder
source§impl PartialEq for AssetModelCompositeModelDefinitionBuilder
impl PartialEq for AssetModelCompositeModelDefinitionBuilder
source§fn eq(&self, other: &AssetModelCompositeModelDefinitionBuilder) -> bool
fn eq(&self, other: &AssetModelCompositeModelDefinitionBuilder) -> bool
self and other values to be equal, and is used
by ==.impl StructuralPartialEq for AssetModelCompositeModelDefinitionBuilder
Auto Trait Implementations§
impl Freeze for AssetModelCompositeModelDefinitionBuilder
impl RefUnwindSafe for AssetModelCompositeModelDefinitionBuilder
impl Send for AssetModelCompositeModelDefinitionBuilder
impl Sync for AssetModelCompositeModelDefinitionBuilder
impl Unpin for AssetModelCompositeModelDefinitionBuilder
impl UnwindSafe for AssetModelCompositeModelDefinitionBuilder
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