Class EventParser
java.lang.Object
com.cognite.client.servicesV1.parser.EventParser
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 EventparseEvent(String json) Parses an event json string toEventproto object.toRequestInsertItem(Event element) Builds a request insert item object fromEvent.toRequestReplaceItem(Event element) Builds a request update replace item object fromEvent.toRequestUpdateItem(Event element) Builds a request update item object fromEvent.
-
Constructor Details
-
EventParser
public EventParser()
-
-
Method Details
-
parseEvent
Parses an event json string toEventproto object.- Parameters:
json-- Returns:
- Throws:
Exception
-
toRequestInsertItem
Builds a request insert item object fromEvent. An insert item object creates a new Event data object in the Cognite system.- Parameters:
element-- Returns:
- Throws:
Exception
-
toRequestUpdateItem
Builds a request update item object fromEvent. An update item object updates an existing event 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 update replace item object fromEvent. 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:
-