#[non_exhaustive]pub struct AssetModelHierarchyDefinitionBuilder { /* private fields */ }Expand description
A builder for AssetModelHierarchyDefinition.
Implementations§
source§impl AssetModelHierarchyDefinitionBuilder
impl AssetModelHierarchyDefinitionBuilder
sourcepub fn name(self, input: impl Into<String>) -> Self
pub fn name(self, input: impl Into<String>) -> Self
The name of the asset model hierarchy definition (as specified in the CreateAssetModel or UpdateAssetModel API operation).
This field is required.sourcepub fn set_name(self, input: Option<String>) -> Self
pub fn set_name(self, input: Option<String>) -> Self
The name of the asset model hierarchy definition (as specified in the CreateAssetModel or UpdateAssetModel API operation).
sourcepub fn get_name(&self) -> &Option<String>
pub fn get_name(&self) -> &Option<String>
The name of the asset model hierarchy definition (as specified in the CreateAssetModel or UpdateAssetModel API operation).
sourcepub fn child_asset_model_id(self, input: impl Into<String>) -> Self
pub fn child_asset_model_id(self, input: impl Into<String>) -> Self
The ID of an asset model for this hierarchy. This can be either the actual ID in UUID format, or else externalId: followed by the external ID, if it has one. For more information, see Referencing objects with external IDs in the IoT SiteWise User Guide.
sourcepub fn set_child_asset_model_id(self, input: Option<String>) -> Self
pub fn set_child_asset_model_id(self, input: Option<String>) -> Self
The ID of an asset model for this hierarchy. This can be either the actual ID in UUID format, or else externalId: followed by the external ID, if it has one. For more information, see Referencing objects with external IDs in the IoT SiteWise User Guide.
sourcepub fn get_child_asset_model_id(&self) -> &Option<String>
pub fn get_child_asset_model_id(&self) -> &Option<String>
The ID of an asset model for this hierarchy. This can be either the actual ID in UUID format, or else externalId: followed by the external ID, if it has one. For more information, see Referencing objects with external IDs in the IoT SiteWise User Guide.
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 hierarchy, 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 hierarchy, 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 hierarchy, 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 asset model hierarchy. The external ID must be unique among asset model hierarchies 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 asset model hierarchy. The external ID must be unique among asset model hierarchies 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 asset model hierarchy. The external ID must be unique among asset model hierarchies within this asset model. For more information, see Using external IDs in the IoT SiteWise User Guide.
sourcepub fn build(self) -> Result<AssetModelHierarchyDefinition, BuildError>
pub fn build(self) -> Result<AssetModelHierarchyDefinition, BuildError>
Consumes the builder and constructs a AssetModelHierarchyDefinition.
This method will fail if any of the following fields are not set:
Trait Implementations§
source§impl Clone for AssetModelHierarchyDefinitionBuilder
impl Clone for AssetModelHierarchyDefinitionBuilder
source§fn clone(&self) -> AssetModelHierarchyDefinitionBuilder
fn clone(&self) -> AssetModelHierarchyDefinitionBuilder
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moresource§impl Default for AssetModelHierarchyDefinitionBuilder
impl Default for AssetModelHierarchyDefinitionBuilder
source§fn default() -> AssetModelHierarchyDefinitionBuilder
fn default() -> AssetModelHierarchyDefinitionBuilder
source§impl PartialEq for AssetModelHierarchyDefinitionBuilder
impl PartialEq for AssetModelHierarchyDefinitionBuilder
source§fn eq(&self, other: &AssetModelHierarchyDefinitionBuilder) -> bool
fn eq(&self, other: &AssetModelHierarchyDefinitionBuilder) -> bool
self and other values to be equal, and is used
by ==.impl StructuralPartialEq for AssetModelHierarchyDefinitionBuilder
Auto Trait Implementations§
impl Freeze for AssetModelHierarchyDefinitionBuilder
impl RefUnwindSafe for AssetModelHierarchyDefinitionBuilder
impl Send for AssetModelHierarchyDefinitionBuilder
impl Sync for AssetModelHierarchyDefinitionBuilder
impl Unpin for AssetModelHierarchyDefinitionBuilder
impl UnwindSafe for AssetModelHierarchyDefinitionBuilder
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