Adjust from rebasing

This commit is contained in:
Eugene Yokota 2017-01-06 11:35:08 -05:00
parent a2df1a4b53
commit 66301dbaf1
12 changed files with 132 additions and 275 deletions

View File

@ -0,0 +1,26 @@
/**
* This code is generated using sbt-datatype.
*/
// DO NOT EDIT MANUALLY
import _root_.sjsonnew.{ deserializationError, serializationError, Builder, JsonFormat, Unbuilder }
trait CommandSourceFormats { self: sjsonnew.BasicJsonProtocol =>
implicit lazy val CommandSourceFormat: JsonFormat[sbt.CommandSource] = new JsonFormat[sbt.CommandSource] {
override def read[J](jsOpt: Option[J], unbuilder: Unbuilder[J]): sbt.CommandSource = {
jsOpt match {
case Some(js) =>
unbuilder.beginObject(js)
val channelName = unbuilder.readField[String]("channelName")
unbuilder.endObject()
sbt.CommandSource(channelName)
case None =>
deserializationError("Expected JsObject but found None")
}
}
override def write[J](obj: sbt.CommandSource, builder: Builder[J]): Unit = {
builder.beginObject()
builder.addField("channelName", obj.channelName)
builder.endObject()
}
}
}

View File

@ -0,0 +1,30 @@
/**
* This code is generated using sbt-datatype.
*/
// DO NOT EDIT MANUALLY
import _root_.sjsonnew.{ deserializationError, serializationError, Builder, JsonFormat, Unbuilder }
trait ExecFormats { self: CommandSourceFormats with sjsonnew.BasicJsonProtocol =>
implicit lazy val ExecFormat: JsonFormat[sbt.Exec] = new JsonFormat[sbt.Exec] {
override def read[J](jsOpt: Option[J], unbuilder: Unbuilder[J]): sbt.Exec = {
jsOpt match {
case Some(js) =>
unbuilder.beginObject(js)
val commandLine = unbuilder.readField[String]("commandLine")
val execId = unbuilder.readField[Option[String]]("execId")
val source = unbuilder.readField[Option[sbt.CommandSource]]("source")
unbuilder.endObject()
sbt.Exec(commandLine, execId, source)
case None =>
deserializationError("Expected JsObject but found None")
}
}
override def write[J](obj: sbt.Exec, builder: Builder[J]): Unit = {
builder.beginObject()
builder.addField("commandLine", obj.commandLine)
builder.addField("execId", obj.execId)
builder.addField("source", obj.source)
builder.endObject()
}
}
}

View File

@ -1,37 +0,0 @@
/**
* This code is generated using sbt-datatype.
*/
// DO NOT EDIT MANUALLY
package sbt.internal.server
final class CommandMessage private (
val `type`: String,
val commandLine: Option[String]) extends Serializable {
private def this(`type`: String) = this(`type`, None)
override def equals(o: Any): Boolean = o match {
case x: CommandMessage => (this.`type` == x.`type`) && (this.commandLine == x.commandLine)
case _ => false
}
override def hashCode: Int = {
37 * (37 * (17 + `type`.##) + commandLine.##)
}
override def toString: String = {
"CommandMessage(" + `type` + ", " + commandLine + ")"
}
protected[this] def copy(`type`: String = `type`, commandLine: Option[String] = commandLine): CommandMessage = {
new CommandMessage(`type`, commandLine)
}
def withType(`type`: String): CommandMessage = {
copy(`type` = `type`)
}
def withCommandLine(commandLine: Option[String]): CommandMessage = {
copy(commandLine = commandLine)
}
}
object CommandMessage {
def apply(`type`: String): CommandMessage = new CommandMessage(`type`, None)
def apply(`type`: String, commandLine: Option[String]): CommandMessage = new CommandMessage(`type`, commandLine)
}

View File

@ -1,57 +0,0 @@
/**
* This code is generated using sbt-datatype.
*/
// DO NOT EDIT MANUALLY
package sbt.internal.server
final class EventMessage private (
val `type`: String,
val status: Option[String],
val commandQueue: scala.Vector[String],
val level: Option[String],
val message: Option[String],
val success: Option[Boolean],
val commandLine: Option[String]) extends Serializable {
private def this(`type`: String) = this(`type`, None, Vector(), None, None, None, None)
override def equals(o: Any): Boolean = o match {
case x: EventMessage => (this.`type` == x.`type`) && (this.status == x.status) && (this.commandQueue == x.commandQueue) && (this.level == x.level) && (this.message == x.message) && (this.success == x.success) && (this.commandLine == x.commandLine)
case _ => false
}
override def hashCode: Int = {
37 * (37 * (37 * (37 * (37 * (37 * (37 * (17 + `type`.##) + status.##) + commandQueue.##) + level.##) + message.##) + success.##) + commandLine.##)
}
override def toString: String = {
"EventMessage(" + `type` + ", " + status + ", " + commandQueue + ", " + level + ", " + message + ", " + success + ", " + commandLine + ")"
}
protected[this] def copy(`type`: String = `type`, status: Option[String] = status, commandQueue: scala.Vector[String] = commandQueue, level: Option[String] = level, message: Option[String] = message, success: Option[Boolean] = success, commandLine: Option[String] = commandLine): EventMessage = {
new EventMessage(`type`, status, commandQueue, level, message, success, commandLine)
}
def withType(`type`: String): EventMessage = {
copy(`type` = `type`)
}
def withStatus(status: Option[String]): EventMessage = {
copy(status = status)
}
def withCommandQueue(commandQueue: scala.Vector[String]): EventMessage = {
copy(commandQueue = commandQueue)
}
def withLevel(level: Option[String]): EventMessage = {
copy(level = level)
}
def withMessage(message: Option[String]): EventMessage = {
copy(message = message)
}
def withSuccess(success: Option[Boolean]): EventMessage = {
copy(success = success)
}
def withCommandLine(commandLine: Option[String]): EventMessage = {
copy(commandLine = commandLine)
}
}
object EventMessage {
def apply(`type`: String): EventMessage = new EventMessage(`type`, None, Vector(), None, None, None, None)
def apply(`type`: String, status: Option[String], commandQueue: scala.Vector[String], level: Option[String], message: Option[String], success: Option[Boolean], commandLine: Option[String]): EventMessage = new EventMessage(`type`, status, commandQueue, level, message, success, commandLine)
}

View File

@ -1,29 +0,0 @@
/**
* This code is generated using sbt-datatype.
*/
// DO NOT EDIT MANUALLY
package sbt.internal.server.codec
import _root_.sjsonnew.{ deserializationError, serializationError, Builder, JsonFormat, Unbuilder }
trait CommandMessageFormats { self: sjsonnew.BasicJsonProtocol =>
implicit lazy val CommandMessageFormat: JsonFormat[sbt.internal.server.CommandMessage] = new JsonFormat[sbt.internal.server.CommandMessage] {
override def read[J](jsOpt: Option[J], unbuilder: Unbuilder[J]): sbt.internal.server.CommandMessage = {
jsOpt match {
case Some(js) =>
unbuilder.beginObject(js)
val `type` = unbuilder.readField[String]("type")
val commandLine = unbuilder.readField[Option[String]]("commandLine")
unbuilder.endObject()
sbt.internal.server.CommandMessage(`type`, commandLine)
case None =>
deserializationError("Expected JsObject but found None")
}
}
override def write[J](obj: sbt.internal.server.CommandMessage, builder: Builder[J]): Unit = {
builder.beginObject()
builder.addField("type", obj.`type`)
builder.addField("commandLine", obj.commandLine)
builder.endObject()
}
}
}

View File

@ -1,39 +0,0 @@
/**
* This code is generated using sbt-datatype.
*/
// DO NOT EDIT MANUALLY
package sbt.internal.server.codec
import _root_.sjsonnew.{ deserializationError, serializationError, Builder, JsonFormat, Unbuilder }
trait EventMessageFormats { self: sjsonnew.BasicJsonProtocol =>
implicit lazy val EventMessageFormat: JsonFormat[sbt.internal.server.EventMessage] = new JsonFormat[sbt.internal.server.EventMessage] {
override def read[J](jsOpt: Option[J], unbuilder: Unbuilder[J]): sbt.internal.server.EventMessage = {
jsOpt match {
case Some(js) =>
unbuilder.beginObject(js)
val `type` = unbuilder.readField[String]("type")
val status = unbuilder.readField[Option[String]]("status")
val commandQueue = unbuilder.readField[scala.Vector[String]]("commandQueue")
val level = unbuilder.readField[Option[String]]("level")
val message = unbuilder.readField[Option[String]]("message")
val success = unbuilder.readField[Option[Boolean]]("success")
val commandLine = unbuilder.readField[Option[String]]("commandLine")
unbuilder.endObject()
sbt.internal.server.EventMessage(`type`, status, commandQueue, level, message, success, commandLine)
case None =>
deserializationError("Expected JsObject but found None")
}
}
override def write[J](obj: sbt.internal.server.EventMessage, builder: Builder[J]): Unit = {
builder.beginObject()
builder.addField("type", obj.`type`)
builder.addField("status", obj.status)
builder.addField("commandQueue", obj.commandQueue)
builder.addField("level", obj.level)
builder.addField("message", obj.message)
builder.addField("success", obj.success)
builder.addField("commandLine", obj.commandLine)
builder.endObject()
}
}
}

View File

@ -1,73 +0,0 @@
{
"codecNamespace": "sbt.internal.server.codec",
"types": [
{
"name": "CommandMessage",
"namespace": "sbt.internal.server",
"type": "record",
"target": "Scala",
"fields": [
{
"name": "type",
"type": "String",
"since": "0.0.0"
},
{
"name": "commandLine",
"type": "Option[String]",
"default": "None",
"since": "0.1.0"
}
]
},
{
"name": "EventMessage",
"namespace": "sbt.internal.server",
"type": "record",
"target": "Scala",
"fields": [
{
"name": "type",
"type": "String",
"since": "0.0.0"
},
{
"name": "status",
"type": "Option[String]",
"default": "None",
"since": "0.1.0"
},
{
"name": "commandQueue",
"type": "scala.Vector[String]",
"default": "Vector()",
"since": "0.1.0"
},
{
"name": "level",
"type": "Option[String]",
"default": "None",
"since": "0.1.0"
},
{
"name": "message",
"type": "Option[String]",
"default": "None",
"since": "0.1.0"
},
{
"name": "success",
"type": "Option[Boolean]",
"default": "None",
"since": "0.1.0"
},
{
"name": "commandLine",
"type": "Option[String]",
"default": "None",
"since": "0.1.0"
}
]
}
]
}

View File

@ -1,37 +0,0 @@
/**
* This code is generated using sbt-datatype.
*/
// DO NOT EDIT MANUALLY
package sbt.protocol
/** Executon event. */
final class ExectionEvent private (
val success: String,
val commandLine: String) extends Serializable {
override def equals(o: Any): Boolean = o match {
case x: ExectionEvent => (this.success == x.success) && (this.commandLine == x.commandLine)
case _ => false
}
override def hashCode: Int = {
37 * (37 * (17 + success.##) + commandLine.##)
}
override def toString: String = {
"ExectionEvent(" + success + ", " + commandLine + ")"
}
protected[this] def copy(success: String = success, commandLine: String = commandLine): ExectionEvent = {
new ExectionEvent(success, commandLine)
}
def withSuccess(success: String): ExectionEvent = {
copy(success = success)
}
def withCommandLine(commandLine: String): ExectionEvent = {
copy(commandLine = commandLine)
}
}
object ExectionEvent {
def apply(success: String, commandLine: String): ExectionEvent = new ExectionEvent(success, commandLine)
}

View File

@ -0,0 +1,37 @@
/**
* This code is generated using sbt-datatype.
*/
// DO NOT EDIT MANUALLY
package sbt.protocol
/** Execution event. */
final class ExecutionEvent private (
val success: String,
val commandLine: String) extends Serializable {
override def equals(o: Any): Boolean = o match {
case x: ExecutionEvent => (this.success == x.success) && (this.commandLine == x.commandLine)
case _ => false
}
override def hashCode: Int = {
37 * (37 * (17 + success.##) + commandLine.##)
}
override def toString: String = {
"ExecutionEvent(" + success + ", " + commandLine + ")"
}
protected[this] def copy(success: String = success, commandLine: String = commandLine): ExecutionEvent = {
new ExecutionEvent(success, commandLine)
}
def withSuccess(success: String): ExecutionEvent = {
copy(success = success)
}
def withCommandLine(commandLine: String): ExecutionEvent = {
copy(commandLine = commandLine)
}
}
object ExecutionEvent {
def apply(success: String, commandLine: String): ExecutionEvent = new ExecutionEvent(success, commandLine)
}

View File

@ -0,0 +1,29 @@
/**
* This code is generated using sbt-datatype.
*/
// DO NOT EDIT MANUALLY
package sbt.protocol.codec
import _root_.sjsonnew.{ deserializationError, serializationError, Builder, JsonFormat, Unbuilder }
trait ExecutionEventFormats { self: sjsonnew.BasicJsonProtocol =>
implicit lazy val ExecutionEventFormat: JsonFormat[sbt.protocol.ExecutionEvent] = new JsonFormat[sbt.protocol.ExecutionEvent] {
override def read[J](jsOpt: Option[J], unbuilder: Unbuilder[J]): sbt.protocol.ExecutionEvent = {
jsOpt match {
case Some(js) =>
unbuilder.beginObject(js)
val success = unbuilder.readField[String]("success")
val commandLine = unbuilder.readField[String]("commandLine")
unbuilder.endObject()
sbt.protocol.ExecutionEvent(success, commandLine)
case None =>
deserializationError("Expected JsObject but found None")
}
}
override def write[J](obj: sbt.protocol.ExecutionEvent, builder: Builder[J]): Unit = {
builder.beginObject()
builder.addField("success", obj.success)
builder.addField("commandLine", obj.commandLine)
builder.endObject()
}
}
}

View File

@ -4,5 +4,12 @@
// DO NOT EDIT MANUALLY
package sbt.protocol.codec
trait JsonProtocol extends sjsonnew.BasicJsonProtocol with sbt.protocol.codec.ExecCommandFormats with sbt.protocol.codec.CommandMessageFormats with sbt.protocol.codec.ChannelAcceptedEventFormats with sbt.protocol.codec.LogEventFormats with sbt.protocol.codec.ExecStatusEventFormats with sbt.protocol.codec.EventMessageFormats
trait JsonProtocol extends sjsonnew.BasicJsonProtocol
with sbt.protocol.codec.ExecCommandFormats
with sbt.protocol.codec.CommandMessageFormats
with sbt.protocol.codec.ChannelAcceptedEventFormats
with sbt.protocol.codec.LogEventFormats
with sbt.protocol.codec.ExecStatusEventFormats
with sbt.protocol.codec.EventMessageFormats
with sbt.protocol.codec.ExecutionEventFormats
object JsonProtocol extends JsonProtocol

View File

@ -40,8 +40,8 @@ type ExecStatusEvent implements EventMessage {
# Processing
# }
## Executon event.
type ExectionEvent {
## Execution event.
type ExecutionEvent {
success: String!
commandLine: String!
}