1 /* 2 * Make.org Core API 3 * Copyright (C) 2021 Make.org 4 * 5 * This program is free software: you can redistribute it and/or modify 6 * it under the terms of the GNU Affero General Public License as 7 * published by the Free Software Foundation, either version 3 of the 8 * License, or (at your option) any later version. 9 * 10 * This program is distributed in the hope that it will be useful, 11 * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 * GNU Affero General Public License for more details. 14 * 15 * You should have received a copy of the GNU Affero General Public License 16 * along with this program. If not, see <https://www.gnu.org/licenses/>. 17 * 18 */ 19 20 package org.make.core 21 22 import io.circe.{Decoder, Encoder, Json} 23 import spray.json.JsonFormat 24 25 final case class EventId(value: String) extends StringValue 26 27 object EventId { 28 implicit val eventIdFormatter: JsonFormat[EventId] = SprayJsonFormatters.forStringValue(EventId.apply) 29 30 implicit lazy val eventIdEncoder: Encoder[EventId] = 31 (a: EventId) => Json.fromString(a.value) 32 implicit lazy val eventIdDecoder: Decoder[EventId] = 33 Decoder.decodeString.map(EventId(_)) 34 }
| Line | Stmt Id | Pos | Tree | Symbol | Tests | Code |
|---|---|---|---|---|---|---|
| 28 | 4264 | 1007 - 1020 | Apply | org.make.core.EventId.apply | EventId.apply(value) | |
| 28 | 3115 | 972 - 1021 | Apply | org.make.core.SprayJsonFormatters.forStringValue | org.make.api.avro.avrocompatibilitytest,akka.http.scaladsl.testkit.routetest,org.make.api.makekafkatest,org.make.api.sessionhistory.sessionhistorycoordinatortest,org.make.api.technical.crm.crmservicecomponenttest | SprayJsonFormatters.forStringValue[org.make.core.EventId](((value: String) => EventId.apply(value))) |