Skip to content

Commit

Permalink
spline #831 Producer model: refine operation case class structure as …
Browse files Browse the repository at this point in the history
…well as Swagger def
  • Loading branch information
wajda committed Apr 7, 2021
1 parent bf1cd99 commit 8ce1e5c
Showing 1 changed file with 9 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@ import za.co.absa.commons.graph.GraphImplicits.DAGNodeIdMapping
import za.co.absa.spline.producer.model.v1_1.OperationLike.Id

sealed trait OperationLike {
val id: Id
val name: Option[Id]
val childIds: Seq[Id]
val output: OperationLike.Schema
val params: Map[String, Any]
val extra: Map[String, Any]
def id: Id
def name: Option[Id]
def childIds: Seq[Id]
def output: OperationLike.Schema
def params: Map[String, Any]
def extra: Map[String, Any]
}

object OperationLike {
Expand Down Expand Up @@ -60,17 +60,17 @@ case class ReadOperation(
override val params: Map[String, Any] = Map.empty,
override val extra: Map[String, Any] = Map.empty
) extends OperationLike {
override val childIds: Seq[Id] = Nil
override def childIds: Seq[Id] = Nil
}

case class WriteOperation(
outputSource: String,
append: Boolean,
override val id: Id,
override val name: Option[OperationLike.Name] = None,
override val childIds: Seq[Id] = Nil,
override val childIds: Seq[Id],
override val params: Map[String, Any] = Map.empty,
override val extra: Map[String, Any] = Map.empty
) extends OperationLike {
override val output: Seq[Attribute.Id] = Nil
override def output: Seq[Attribute.Id] = Nil
}

0 comments on commit 8ce1e5c

Please sign in to comment.