Class EventParser

java.lang.Object
com.cognite.client.servicesV1.parser.EventParser

public class EventParser extends Object
This class contains a set of methods to help parsing file objects between Cognite api representations (json and proto) and typed objects.
  • Constructor Details

    • EventParser

      public EventParser()
  • Method Details

    • parseEvent

      public static Event parseEvent(String json) throws Exception
      Parses an event json string to Event proto object.
      Parameters:
      json -
      Returns:
      Throws:
      Exception
    • toRequestInsertItem

      public static Map<String,Object> toRequestInsertItem(Event element) throws Exception
      Builds a request insert item object from Event. An insert item object creates a new Event data object in the Cognite system.
      Parameters:
      element -
      Returns:
      Throws:
      Exception
    • toRequestUpdateItem

      public static Map<String,Object> toRequestUpdateItem(Event element)
      Builds a request update item object from Event. 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

      public static Map<String,Object> toRequestReplaceItem(Event element)
      Builds a request update replace item object from Event. 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: