-
Notifications
You must be signed in to change notification settings - Fork 39
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Marin Veršić <marin.versic101@gmail.com>
- Loading branch information
Showing
24 changed files
with
1,501 additions
and
590 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
36 changes: 36 additions & 0 deletions
36
modules/model/src/main/kotlin/jp/co/soramitsu/iroha2/generated/ActionPredicateAtom.kt
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,36 @@ | ||
// | ||
// Auto-generated file. DO NOT EDIT! | ||
// | ||
package jp.co.soramitsu.iroha2.generated | ||
|
||
import jp.co.soramitsu.iroha2.ModelEnum | ||
import jp.co.soramitsu.iroha2.codec.ScaleCodecReader | ||
import jp.co.soramitsu.iroha2.codec.ScaleCodecWriter | ||
import jp.co.soramitsu.iroha2.codec.ScaleReader | ||
import jp.co.soramitsu.iroha2.codec.ScaleWriter | ||
import kotlin.Int | ||
|
||
/** | ||
* ActionPredicateAtom | ||
* | ||
* Generated from 'ActionPredicateAtom' enum | ||
*/ | ||
public sealed class ActionPredicateAtom : ModelEnum { | ||
/** | ||
* @return Discriminator of variant in enum | ||
*/ | ||
public abstract fun discriminant(): Int | ||
|
||
public companion object : ScaleReader<ActionPredicateAtom>, ScaleWriter<ActionPredicateAtom> { | ||
override fun read(reader: ScaleCodecReader): ActionPredicateAtom = when (val discriminant = reader.readUByte()) { | ||
else -> throw RuntimeException("Unresolved discriminant of the enum variant: $discriminant") | ||
} | ||
|
||
override fun write(writer: ScaleCodecWriter, instance: ActionPredicateAtom) { | ||
writer.directWrite(instance.discriminant()) | ||
when (val discriminant = instance.discriminant()) { | ||
else -> throw RuntimeException("Unresolved discriminant of the enum variant: $discriminant") | ||
} | ||
} | ||
} | ||
} |
105 changes: 105 additions & 0 deletions
105
...del/src/main/kotlin/jp/co/soramitsu/iroha2/generated/ActionProjectionOfPredicateMarker.kt
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,105 @@ | ||
// | ||
// Auto-generated file. DO NOT EDIT! | ||
// | ||
package jp.co.soramitsu.iroha2.generated | ||
|
||
import jp.co.soramitsu.iroha2.ModelEnum | ||
import jp.co.soramitsu.iroha2.codec.ScaleCodecReader | ||
import jp.co.soramitsu.iroha2.codec.ScaleCodecWriter | ||
import jp.co.soramitsu.iroha2.codec.ScaleReader | ||
import jp.co.soramitsu.iroha2.codec.ScaleWriter | ||
import jp.co.soramitsu.iroha2.wrapException | ||
import kotlin.Int | ||
import kotlin.Unit | ||
|
||
/** | ||
* ActionProjectionOfPredicateMarker | ||
* | ||
* Generated from 'ActionProjectionOfPredicateMarker' enum | ||
*/ | ||
public sealed class ActionProjectionOfPredicateMarker : ModelEnum { | ||
/** | ||
* @return Discriminator of variant in enum | ||
*/ | ||
public abstract fun discriminant(): Int | ||
|
||
/** | ||
* 'Atom' variant | ||
*/ | ||
public data class Atom(public val actionPredicateAtom: ActionPredicateAtom) : ActionProjectionOfPredicateMarker() { | ||
override fun discriminant(): Int = DISCRIMINANT | ||
|
||
public companion object : | ||
ScaleReader<jp.co.soramitsu.iroha2.generated.ActionProjectionOfPredicateMarker.Atom>, | ||
ScaleWriter<jp.co.soramitsu.iroha2.generated.ActionProjectionOfPredicateMarker.Atom> { | ||
public const val DISCRIMINANT: Int = 0 | ||
|
||
override fun read(reader: ScaleCodecReader): jp.co.soramitsu.iroha2.generated.ActionProjectionOfPredicateMarker.Atom = try { | ||
Atom( | ||
ActionPredicateAtom.read(reader), | ||
) | ||
} catch (ex: Exception) { | ||
throw wrapException(ex) | ||
} | ||
|
||
override fun write( | ||
writer: ScaleCodecWriter, | ||
instance: jp.co.soramitsu.iroha2.generated.ActionProjectionOfPredicateMarker.Atom, | ||
): Unit = try { | ||
ActionPredicateAtom.write(writer, instance.actionPredicateAtom) | ||
} catch (ex: Exception) { | ||
throw wrapException(ex) | ||
} | ||
} | ||
} | ||
|
||
/** | ||
* 'Metadata' variant | ||
*/ | ||
public data class Metadata(public val metadataProjectionOfPredicateMarker: MetadataProjectionOfPredicateMarker) : | ||
ActionProjectionOfPredicateMarker() { | ||
override fun discriminant(): Int = DISCRIMINANT | ||
|
||
public companion object : | ||
ScaleReader<jp.co.soramitsu.iroha2.generated.ActionProjectionOfPredicateMarker.Metadata>, | ||
ScaleWriter<jp.co.soramitsu.iroha2.generated.ActionProjectionOfPredicateMarker.Metadata> { | ||
public const val DISCRIMINANT: Int = 1 | ||
|
||
override fun read(reader: ScaleCodecReader): jp.co.soramitsu.iroha2.generated.ActionProjectionOfPredicateMarker.Metadata = try { | ||
Metadata( | ||
MetadataProjectionOfPredicateMarker.read(reader), | ||
) | ||
} catch (ex: Exception) { | ||
throw wrapException(ex) | ||
} | ||
|
||
override fun write( | ||
writer: ScaleCodecWriter, | ||
instance: jp.co.soramitsu.iroha2.generated.ActionProjectionOfPredicateMarker.Metadata, | ||
): Unit = try { | ||
MetadataProjectionOfPredicateMarker.write(writer, instance.metadataProjectionOfPredicateMarker) | ||
} catch (ex: Exception) { | ||
throw wrapException(ex) | ||
} | ||
} | ||
} | ||
|
||
public companion object : | ||
ScaleReader<ActionProjectionOfPredicateMarker>, | ||
ScaleWriter<ActionProjectionOfPredicateMarker> { | ||
override fun read(reader: ScaleCodecReader): ActionProjectionOfPredicateMarker = when (val discriminant = reader.readUByte()) { | ||
0 -> Atom.read(reader) | ||
1 -> Metadata.read(reader) | ||
else -> throw RuntimeException("Unresolved discriminant of the enum variant: $discriminant") | ||
} | ||
|
||
override fun write(writer: ScaleCodecWriter, instance: ActionProjectionOfPredicateMarker) { | ||
writer.directWrite(instance.discriminant()) | ||
when (val discriminant = instance.discriminant()) { | ||
0 -> Atom.write(writer, instance as Atom) | ||
1 -> Metadata.write(writer, instance as Metadata) | ||
else -> throw RuntimeException("Unresolved discriminant of the enum variant: $discriminant") | ||
} | ||
} | ||
} | ||
} |
121 changes: 121 additions & 0 deletions
121
...odel/src/main/kotlin/jp/co/soramitsu/iroha2/generated/ActionProjectionOfSelectorMarker.kt
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,121 @@ | ||
// | ||
// Auto-generated file. DO NOT EDIT! | ||
// | ||
package jp.co.soramitsu.iroha2.generated | ||
|
||
import jp.co.soramitsu.iroha2.ModelEnum | ||
import jp.co.soramitsu.iroha2.codec.ScaleCodecReader | ||
import jp.co.soramitsu.iroha2.codec.ScaleCodecWriter | ||
import jp.co.soramitsu.iroha2.codec.ScaleReader | ||
import jp.co.soramitsu.iroha2.codec.ScaleWriter | ||
import jp.co.soramitsu.iroha2.wrapException | ||
import kotlin.Any | ||
import kotlin.Boolean | ||
import kotlin.Int | ||
import kotlin.Unit | ||
|
||
/** | ||
* ActionProjectionOfSelectorMarker | ||
* | ||
* Generated from 'ActionProjectionOfSelectorMarker' enum | ||
*/ | ||
public sealed class ActionProjectionOfSelectorMarker : ModelEnum { | ||
/** | ||
* @return Discriminator of variant in enum | ||
*/ | ||
public abstract fun discriminant(): Int | ||
|
||
override fun equals(other: Any?): Boolean = when (this) { | ||
is Atom -> Atom.equals(this, other) | ||
else -> super.equals(other) | ||
} | ||
|
||
override fun hashCode(): Int = when (this) { | ||
is Atom -> Atom.hashCode() | ||
else -> super.hashCode() | ||
} | ||
|
||
/** | ||
* 'Atom' variant | ||
*/ | ||
public class Atom : ActionProjectionOfSelectorMarker() { | ||
override fun discriminant(): Int = DISCRIMINANT | ||
|
||
public companion object : | ||
ScaleReader<jp.co.soramitsu.iroha2.generated.ActionProjectionOfSelectorMarker.Atom>, | ||
ScaleWriter<jp.co.soramitsu.iroha2.generated.ActionProjectionOfSelectorMarker.Atom> { | ||
public const val DISCRIMINANT: Int = 0 | ||
|
||
override fun read(reader: ScaleCodecReader): jp.co.soramitsu.iroha2.generated.ActionProjectionOfSelectorMarker.Atom = try { | ||
Atom() | ||
} catch (ex: Exception) { | ||
throw wrapException(ex) | ||
} | ||
|
||
override fun write( | ||
writer: ScaleCodecWriter, | ||
instance: jp.co.soramitsu.iroha2.generated.ActionProjectionOfSelectorMarker.Atom, | ||
): Unit = try { | ||
} catch (ex: Exception) { | ||
throw wrapException(ex) | ||
} | ||
|
||
public fun equals(o1: jp.co.soramitsu.iroha2.generated.ActionProjectionOfSelectorMarker.Atom, o2: Any?): Boolean = when (o2) { | ||
null -> false | ||
else -> o2::class == o1::class | ||
} | ||
|
||
override fun hashCode(): Int = ".ActionProjectionOfSelectorMarker.Atom".hashCode() | ||
} | ||
} | ||
|
||
/** | ||
* 'Metadata' variant | ||
*/ | ||
public data class Metadata(public val metadataProjectionOfSelectorMarker: MetadataProjectionOfSelectorMarker) : | ||
ActionProjectionOfSelectorMarker() { | ||
override fun discriminant(): Int = DISCRIMINANT | ||
|
||
public companion object : | ||
ScaleReader<jp.co.soramitsu.iroha2.generated.ActionProjectionOfSelectorMarker.Metadata>, | ||
ScaleWriter<jp.co.soramitsu.iroha2.generated.ActionProjectionOfSelectorMarker.Metadata> { | ||
public const val DISCRIMINANT: Int = 1 | ||
|
||
override fun read(reader: ScaleCodecReader): jp.co.soramitsu.iroha2.generated.ActionProjectionOfSelectorMarker.Metadata = try { | ||
Metadata( | ||
MetadataProjectionOfSelectorMarker.read(reader), | ||
) | ||
} catch (ex: Exception) { | ||
throw wrapException(ex) | ||
} | ||
|
||
override fun write( | ||
writer: ScaleCodecWriter, | ||
instance: jp.co.soramitsu.iroha2.generated.ActionProjectionOfSelectorMarker.Metadata, | ||
): Unit = try { | ||
MetadataProjectionOfSelectorMarker.write(writer, instance.metadataProjectionOfSelectorMarker) | ||
} catch (ex: Exception) { | ||
throw wrapException(ex) | ||
} | ||
} | ||
} | ||
|
||
public companion object : | ||
ScaleReader<ActionProjectionOfSelectorMarker>, | ||
ScaleWriter<ActionProjectionOfSelectorMarker> { | ||
override fun read(reader: ScaleCodecReader): ActionProjectionOfSelectorMarker = when (val discriminant = reader.readUByte()) { | ||
0 -> Atom.read(reader) | ||
1 -> Metadata.read(reader) | ||
else -> throw RuntimeException("Unresolved discriminant of the enum variant: $discriminant") | ||
} | ||
|
||
override fun write(writer: ScaleCodecWriter, instance: ActionProjectionOfSelectorMarker) { | ||
writer.directWrite(instance.discriminant()) | ||
when (val discriminant = instance.discriminant()) { | ||
0 -> Atom.write(writer, instance as Atom) | ||
1 -> Metadata.write(writer, instance as Metadata) | ||
else -> throw RuntimeException("Unresolved discriminant of the enum variant: $discriminant") | ||
} | ||
} | ||
} | ||
} |
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
Oops, something went wrong.