Class AssetParser
java.lang.Object
com.cognite.client.servicesV1.parser.AssetParser
This class contains a set of methods to help parsing file objects between Cognite api representations
(json and proto) and typed objects.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic AssetparseAsset(String json) Parses an event json string toAssetproto object.toRequestInsertItem(Asset element) Builds a request insert item object fromAsset.toRequestReplaceItem(Asset element) Builds a request replace item object fromAsset.toRequestUpdateItem(Asset element) Builds a request update item object fromAsset.
-
Constructor Details
-
AssetParser
public AssetParser()
-
-
Method Details
-
parseAsset
Parses an event json string toAssetproto object.- Parameters:
json-- Returns:
- Throws:
Exception
-
toRequestInsertItem
Builds a request insert item object fromAsset. An insert item object creates a new asset data object in the Cognite system.- Parameters:
element-- Returns:
-
toRequestUpdateItem
Builds a request update item object fromAsset. An update item object updates an existing asset object with new values for all provided fields. Fields that are not in the update object retain their original value.- Parameters:
element-- Returns:
-
toRequestReplaceItem
Builds a request replace item object fromAsset. A replace item object replaces an existing event object with new values for all provided fields. Fields that are not in the update object are set to null.- Parameters:
element-- Returns:
-