#[non_exhaustive]pub struct AssetModelHierarchyBuilder { /* private fields */ }Expand description
A builder for AssetModelHierarchy.
Implementations§
source§impl AssetModelHierarchyBuilder
impl AssetModelHierarchyBuilder
sourcepub fn id(self, input: impl Into<String>) -> Self
pub fn id(self, input: impl Into<String>) -> Self
The ID of the asset model hierarchy. This ID is a hierarchyId.
-
If you are callling UpdateAssetModel to create a new hierarchy: You can specify its ID here, 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.
-
If you are calling UpdateAssetModel to modify an existing 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_id(self, input: Option<String>) -> Self
pub fn set_id(self, input: Option<String>) -> Self
The ID of the asset model hierarchy. This ID is a hierarchyId.
-
If you are callling UpdateAssetModel to create a new hierarchy: You can specify its ID here, 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.
-
If you are calling UpdateAssetModel to modify an existing 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_id(&self) -> &Option<String>
pub fn get_id(&self) -> &Option<String>
The ID of the asset model hierarchy. This ID is a hierarchyId.
-
If you are callling UpdateAssetModel to create a new hierarchy: You can specify its ID here, 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.
-
If you are calling UpdateAssetModel to modify an existing 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 name(self, input: impl Into<String>) -> Self
pub fn name(self, input: impl Into<String>) -> Self
The name of the asset model hierarchy that you specify by using 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 that you specify by using 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 that you specify by using 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 the asset model, in UUID format. All assets in this hierarchy must be instances of the childAssetModelId asset model. IoT SiteWise will always return the actual asset model ID for this value. However, when you are specifying this value as part of a call to UpdateAssetModel, you may provide either the asset model ID or else externalId: followed by the asset model's external ID. For more information, see Using 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 the asset model, in UUID format. All assets in this hierarchy must be instances of the childAssetModelId asset model. IoT SiteWise will always return the actual asset model ID for this value. However, when you are specifying this value as part of a call to UpdateAssetModel, you may provide either the asset model ID or else externalId: followed by the asset model's external ID. For more information, see Using 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 the asset model, in UUID format. All assets in this hierarchy must be instances of the childAssetModelId asset model. IoT SiteWise will always return the actual asset model ID for this value. However, when you are specifying this value as part of a call to UpdateAssetModel, you may provide either the asset model ID or else externalId: followed by the asset model's external ID. For more information, see Using external IDs in the IoT SiteWise User Guide.
sourcepub fn external_id(self, input: impl Into<String>) -> Self
pub fn external_id(self, input: impl Into<String>) -> Self
The external ID (if any) provided in the CreateAssetModel or UpdateAssetModel operation. You can assign an external ID by specifying this value as part of a call to UpdateAssetModel. However, you can't change the external ID if one is already assigned. 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
The external ID (if any) provided in the CreateAssetModel or UpdateAssetModel operation. You can assign an external ID by specifying this value as part of a call to UpdateAssetModel. However, you can't change the external ID if one is already assigned. 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>
The external ID (if any) provided in the CreateAssetModel or UpdateAssetModel operation. You can assign an external ID by specifying this value as part of a call to UpdateAssetModel. However, you can't change the external ID if one is already assigned. For more information, see Using external IDs in the IoT SiteWise User Guide.
sourcepub fn build(self) -> Result<AssetModelHierarchy, BuildError>
pub fn build(self) -> Result<AssetModelHierarchy, BuildError>
Consumes the builder and constructs a AssetModelHierarchy.
This method will fail if any of the following fields are not set:
Trait Implementations§
source§impl Clone for AssetModelHierarchyBuilder
impl Clone for AssetModelHierarchyBuilder
source§fn clone(&self) -> AssetModelHierarchyBuilder
fn clone(&self) -> AssetModelHierarchyBuilder
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moresource§impl Debug for AssetModelHierarchyBuilder
impl Debug for AssetModelHierarchyBuilder
source§impl Default for AssetModelHierarchyBuilder
impl Default for AssetModelHierarchyBuilder
source§fn default() -> AssetModelHierarchyBuilder
fn default() -> AssetModelHierarchyBuilder
source§impl PartialEq for AssetModelHierarchyBuilder
impl PartialEq for AssetModelHierarchyBuilder
source§fn eq(&self, other: &AssetModelHierarchyBuilder) -> bool
fn eq(&self, other: &AssetModelHierarchyBuilder) -> bool
self and other values to be equal, and is used
by ==.impl StructuralPartialEq for AssetModelHierarchyBuilder
Auto Trait Implementations§
impl Freeze for AssetModelHierarchyBuilder
impl RefUnwindSafe for AssetModelHierarchyBuilder
impl Send for AssetModelHierarchyBuilder
impl Sync for AssetModelHierarchyBuilder
impl Unpin for AssetModelHierarchyBuilder
impl UnwindSafe for AssetModelHierarchyBuilder
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