Skip to content

Commit

Permalink
Add function for creating empty event (closes #81)
Browse files Browse the repository at this point in the history
  • Loading branch information
aldemirenes committed Aug 13, 2019
1 parent ad3aab9 commit c61347d
Showing 1 changed file with 14 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -256,4 +256,18 @@ object Event {
*/
def parse(line: String): DecodeResult[Event] =
parser.parse(line)

/**
* Creates empty event which optional fields of it are None
* Only necessary fields are given as arguments
*/
def emptyEvent(id: UUID, collectorTstamp: Instant, vCollector: String, vTstamp: String): Event =
Event(None, None, None, collectorTstamp, None, None, id, None, None, None, vCollector, vTstamp, None, None, None,
None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None,
None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None,
Contexts(Nil), None, None, None, None, None, UnstructEvent(None), None, None, None, None, None, None, None, None,
None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None,
None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None,
None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None,
Contexts(Nil), None, None, None, None, None, None, None, None)
}

0 comments on commit c61347d

Please sign in to comment.