Skip to content

Commit

Permalink
Add function to create minimal event (#81)
Browse files Browse the repository at this point in the history
  • Loading branch information
aldemirenes authored and dilyand committed Nov 6, 2019
1 parent b4b7720 commit a41742b
Showing 1 changed file with 15 additions and 1 deletion.
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 an event with only required fields.
* All optional fields are set to [[None]].
*/
def minimal(id: UUID, collectorTstamp: Instant, vCollector: String, vEtl: String): Event =
Event(None, None, None, collectorTstamp, None, None, id, None, None, None, vCollector, vEtl, 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 a41742b

Please sign in to comment.