-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add more different types of self-describing event (close #76)
- Loading branch information
Showing
35 changed files
with
1,037 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
29 changes: 29 additions & 0 deletions
29
...in/scala/com/snowplowanalytics/snowplow/eventgen/protocol/unstructs/AdBreakEndEvent.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
/* | ||
* Copyright (c) 2021-2022 Snowplow Analytics Ltd. All rights reserved. | ||
* | ||
* This program is licensed to you under the Apache License Version 2.0, | ||
* and you may not use this file except in compliance with the Apache License Version 2.0. | ||
* You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. | ||
* | ||
* Unless required by applicable law or agreed to in writing, | ||
* software distributed under the Apache License Version 2.0 is distributed on an | ||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. | ||
*/ | ||
package com.snowplowanalytics.snowplow.eventgen.protocol.unstructs | ||
|
||
import com.snowplowanalytics.iglu.core.{SchemaKey, SchemaVer} | ||
import com.snowplowanalytics.snowplow.eventgen.protocol.SelfDescribingJsonGen | ||
import org.scalacheck.Gen | ||
import io.circe.Json | ||
import java.time.Instant | ||
|
||
object AdBreakEndEvent extends SelfDescribingJsonGen { | ||
|
||
override def schemaKey: SchemaKey = | ||
SchemaKey("com.snowplowanalytics.snowplow.media", "ad_break_end_event", "jsonschema", SchemaVer.Full(1, 0, 0)) | ||
|
||
override def fieldGens(now: Instant): Map[String, Gen[Option[Json]]] = | ||
Map.empty | ||
|
||
} |
29 changes: 29 additions & 0 deletions
29
.../scala/com/snowplowanalytics/snowplow/eventgen/protocol/unstructs/AdBreakStartEvent.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
/* | ||
* Copyright (c) 2021-2022 Snowplow Analytics Ltd. All rights reserved. | ||
* | ||
* This program is licensed to you under the Apache License Version 2.0, | ||
* and you may not use this file except in compliance with the Apache License Version 2.0. | ||
* You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. | ||
* | ||
* Unless required by applicable law or agreed to in writing, | ||
* software distributed under the Apache License Version 2.0 is distributed on an | ||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. | ||
*/ | ||
package com.snowplowanalytics.snowplow.eventgen.protocol.unstructs | ||
|
||
import com.snowplowanalytics.iglu.core.{SchemaKey, SchemaVer} | ||
import com.snowplowanalytics.snowplow.eventgen.protocol.SelfDescribingJsonGen | ||
import org.scalacheck.Gen | ||
import io.circe.Json | ||
import java.time.Instant | ||
|
||
object AdBreakStartEvent extends SelfDescribingJsonGen { | ||
|
||
override def schemaKey: SchemaKey = | ||
SchemaKey("com.snowplowanalytics.snowplow.media", "ad_break_start_event", "jsonschema", SchemaVer.Full(1, 0, 0)) | ||
|
||
override def fieldGens(now: Instant): Map[String, Gen[Option[Json]]] = | ||
Map.empty | ||
|
||
} |
29 changes: 29 additions & 0 deletions
29
.../main/scala/com/snowplowanalytics/snowplow/eventgen/protocol/unstructs/AdClickEvent.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
/* | ||
* Copyright (c) 2021-2022 Snowplow Analytics Ltd. All rights reserved. | ||
* | ||
* This program is licensed to you under the Apache License Version 2.0, | ||
* and you may not use this file except in compliance with the Apache License Version 2.0. | ||
* You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. | ||
* | ||
* Unless required by applicable law or agreed to in writing, | ||
* software distributed under the Apache License Version 2.0 is distributed on an | ||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. | ||
*/ | ||
package com.snowplowanalytics.snowplow.eventgen.protocol.unstructs | ||
|
||
import com.snowplowanalytics.iglu.core.{SchemaKey, SchemaVer} | ||
import com.snowplowanalytics.snowplow.eventgen.protocol.SelfDescribingJsonGen | ||
import org.scalacheck.Gen | ||
import io.circe.Json | ||
import java.time.Instant | ||
|
||
object AdClickEvent extends SelfDescribingJsonGen { | ||
|
||
override def schemaKey: SchemaKey = | ||
SchemaKey("com.snowplowanalytics.snowplow.media", "ad_click_event", "jsonschema", SchemaVer.Full(1, 0, 0)) | ||
|
||
override def fieldGens(now: Instant): Map[String, Gen[Option[Json]]] = | ||
Map.empty | ||
|
||
} |
29 changes: 29 additions & 0 deletions
29
...in/scala/com/snowplowanalytics/snowplow/eventgen/protocol/unstructs/AdCompleteEvent.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
/* | ||
* Copyright (c) 2021-2022 Snowplow Analytics Ltd. All rights reserved. | ||
* | ||
* This program is licensed to you under the Apache License Version 2.0, | ||
* and you may not use this file except in compliance with the Apache License Version 2.0. | ||
* You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. | ||
* | ||
* Unless required by applicable law or agreed to in writing, | ||
* software distributed under the Apache License Version 2.0 is distributed on an | ||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. | ||
*/ | ||
package com.snowplowanalytics.snowplow.eventgen.protocol.unstructs | ||
|
||
import com.snowplowanalytics.iglu.core.{SchemaKey, SchemaVer} | ||
import com.snowplowanalytics.snowplow.eventgen.protocol.SelfDescribingJsonGen | ||
import org.scalacheck.Gen | ||
import io.circe.Json | ||
import java.time.Instant | ||
|
||
object AdCompleteEvent extends SelfDescribingJsonGen { | ||
|
||
override def schemaKey: SchemaKey = | ||
SchemaKey("com.snowplowanalytics.snowplow.media", "ad_complete_event", "jsonschema", SchemaVer.Full(1, 0, 0)) | ||
|
||
override def fieldGens(now: Instant): Map[String, Gen[Option[Json]]] = | ||
Map.empty | ||
|
||
} |
32 changes: 32 additions & 0 deletions
32
.../main/scala/com/snowplowanalytics/snowplow/eventgen/protocol/unstructs/AdPauseEvent.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
/* | ||
* Copyright (c) 2021-2022 Snowplow Analytics Ltd. All rights reserved. | ||
* | ||
* This program is licensed to you under the Apache License Version 2.0, | ||
* and you may not use this file except in compliance with the Apache License Version 2.0. | ||
* You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. | ||
* | ||
* Unless required by applicable law or agreed to in writing, | ||
* software distributed under the Apache License Version 2.0 is distributed on an | ||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. | ||
*/ | ||
package com.snowplowanalytics.snowplow.eventgen.protocol.unstructs | ||
|
||
import com.snowplowanalytics.iglu.core.{SchemaKey, SchemaVer} | ||
import com.snowplowanalytics.snowplow.eventgen.protocol.SelfDescribingJsonGen | ||
import com.snowplowanalytics.snowplow.eventgen.protocol.implicits._ | ||
import org.scalacheck.Gen | ||
import io.circe.Json | ||
import java.time.Instant | ||
|
||
object AdPauseEvent extends SelfDescribingJsonGen { | ||
|
||
override def schemaKey: SchemaKey = | ||
SchemaKey("com.snowplowanalytics.snowplow.media", "ad_pause_event", "jsonschema", SchemaVer.Full(1, 0, 0)) | ||
|
||
override def fieldGens(now: Instant): Map[String, Gen[Option[Json]]] = | ||
Map( | ||
"percentProgress" -> Gen.chooseNum(0, 100).optionalOrNull | ||
) | ||
|
||
} |
32 changes: 32 additions & 0 deletions
32
...in/scala/com/snowplowanalytics/snowplow/eventgen/protocol/unstructs/AdQuartileEvent.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
/* | ||
* Copyright (c) 2021-2022 Snowplow Analytics Ltd. All rights reserved. | ||
* | ||
* This program is licensed to you under the Apache License Version 2.0, | ||
* and you may not use this file except in compliance with the Apache License Version 2.0. | ||
* You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. | ||
* | ||
* Unless required by applicable law or agreed to in writing, | ||
* software distributed under the Apache License Version 2.0 is distributed on an | ||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. | ||
*/ | ||
package com.snowplowanalytics.snowplow.eventgen.protocol.unstructs | ||
|
||
import com.snowplowanalytics.iglu.core.{SchemaKey, SchemaVer} | ||
import com.snowplowanalytics.snowplow.eventgen.protocol.SelfDescribingJsonGen | ||
import com.snowplowanalytics.snowplow.eventgen.protocol.implicits._ | ||
import org.scalacheck.Gen | ||
import io.circe.Json | ||
import java.time.Instant | ||
|
||
object AdQuartileEvent extends SelfDescribingJsonGen { | ||
|
||
override def schemaKey: SchemaKey = | ||
SchemaKey("com.snowplowanalytics.snowplow.media", "ad_quartile_event", "jsonschema", SchemaVer.Full(1, 0, 0)) | ||
|
||
override def fieldGens(now: Instant): Map[String, Gen[Option[Json]]] = | ||
Map( | ||
"percentProgress" -> Gen.chooseNum(0, 100).required | ||
) | ||
|
||
} |
32 changes: 32 additions & 0 deletions
32
...main/scala/com/snowplowanalytics/snowplow/eventgen/protocol/unstructs/AdResumeEvent.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
/* | ||
* Copyright (c) 2021-2022 Snowplow Analytics Ltd. All rights reserved. | ||
* | ||
* This program is licensed to you under the Apache License Version 2.0, | ||
* and you may not use this file except in compliance with the Apache License Version 2.0. | ||
* You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. | ||
* | ||
* Unless required by applicable law or agreed to in writing, | ||
* software distributed under the Apache License Version 2.0 is distributed on an | ||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. | ||
*/ | ||
package com.snowplowanalytics.snowplow.eventgen.protocol.unstructs | ||
|
||
import com.snowplowanalytics.iglu.core.{SchemaKey, SchemaVer} | ||
import com.snowplowanalytics.snowplow.eventgen.protocol.SelfDescribingJsonGen | ||
import com.snowplowanalytics.snowplow.eventgen.protocol.implicits._ | ||
import org.scalacheck.Gen | ||
import io.circe.Json | ||
import java.time.Instant | ||
|
||
object AdResumeEvent extends SelfDescribingJsonGen { | ||
|
||
override def schemaKey: SchemaKey = | ||
SchemaKey("com.snowplowanalytics.snowplow.media", "ad_resume_event", "jsonschema", SchemaVer.Full(1, 0, 0)) | ||
|
||
override def fieldGens(now: Instant): Map[String, Gen[Option[Json]]] = | ||
Map( | ||
"percentProgress" -> Gen.chooseNum(0, 100).optionalOrNull | ||
) | ||
|
||
} |
32 changes: 32 additions & 0 deletions
32
...c/main/scala/com/snowplowanalytics/snowplow/eventgen/protocol/unstructs/AdSkipEvent.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
/* | ||
* Copyright (c) 2021-2022 Snowplow Analytics Ltd. All rights reserved. | ||
* | ||
* This program is licensed to you under the Apache License Version 2.0, | ||
* and you may not use this file except in compliance with the Apache License Version 2.0. | ||
* You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. | ||
* | ||
* Unless required by applicable law or agreed to in writing, | ||
* software distributed under the Apache License Version 2.0 is distributed on an | ||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. | ||
*/ | ||
package com.snowplowanalytics.snowplow.eventgen.protocol.unstructs | ||
|
||
import com.snowplowanalytics.iglu.core.{SchemaKey, SchemaVer} | ||
import com.snowplowanalytics.snowplow.eventgen.protocol.SelfDescribingJsonGen | ||
import com.snowplowanalytics.snowplow.eventgen.protocol.implicits._ | ||
import org.scalacheck.Gen | ||
import io.circe.Json | ||
import java.time.Instant | ||
|
||
object AdSkipEvent extends SelfDescribingJsonGen { | ||
|
||
override def schemaKey: SchemaKey = | ||
SchemaKey("com.snowplowanalytics.snowplow.media", "ad_skip_event", "jsonschema", SchemaVer.Full(1, 0, 0)) | ||
|
||
override def fieldGens(now: Instant): Map[String, Gen[Option[Json]]] = | ||
Map( | ||
"percentProgress" -> Gen.chooseNum(0, 100).optionalOrNull | ||
) | ||
|
||
} |
29 changes: 29 additions & 0 deletions
29
.../main/scala/com/snowplowanalytics/snowplow/eventgen/protocol/unstructs/AdStartEvent.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
/* | ||
* Copyright (c) 2021-2022 Snowplow Analytics Ltd. All rights reserved. | ||
* | ||
* This program is licensed to you under the Apache License Version 2.0, | ||
* and you may not use this file except in compliance with the Apache License Version 2.0. | ||
* You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. | ||
* | ||
* Unless required by applicable law or agreed to in writing, | ||
* software distributed under the Apache License Version 2.0 is distributed on an | ||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. | ||
*/ | ||
package com.snowplowanalytics.snowplow.eventgen.protocol.unstructs | ||
|
||
import com.snowplowanalytics.iglu.core.{SchemaKey, SchemaVer} | ||
import com.snowplowanalytics.snowplow.eventgen.protocol.SelfDescribingJsonGen | ||
import org.scalacheck.Gen | ||
import io.circe.Json | ||
import java.time.Instant | ||
|
||
object AdStartEvent extends SelfDescribingJsonGen { | ||
|
||
override def schemaKey: SchemaKey = | ||
SchemaKey("com.snowplowanalytics.snowplow.media", "ad_start_event", "jsonschema", SchemaVer.Full(1, 0, 0)) | ||
|
||
override def fieldGens(now: Instant): Map[String, Gen[Option[Json]]] = | ||
Map.empty | ||
|
||
} |
Oops, something went wrong.