Class 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 Detail

      • EventParser

        public EventParser()
    • Method Detail

      • parseEvent

        public static com.cognite.client.dto.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​(com.cognite.client.dto.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​(com.cognite.client.dto.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​(com.cognite.client.dto.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: