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 14, 2019
1 parent fc52d9d commit bf50568
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, 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 bf50568

Please sign in to comment.