zio.temporal.protobuf

Protobuf-aware conveniences.

The important members here are scalapbMessageZTemporalCodec and scalapbSealedOneofZTemporalCodec, which auto-derive a ZTemporalCodec for any ScalaPB-generated scalapb.GeneratedMessage or scalapb.GeneratedSealedOneof. The zio-json JsonEncoder/JsonDecoder carried by those codecs are deliberate stubs that must never actually run — the encoder throws, the decoder fails with a Left(msg) decode error — at runtime, ScalapbPayloadConverter handles protobuf types before zio.temporal.json.ZioJsonPayloadConverter is reached in ProtobufDataConverter's chain, so the stubs are never called.

'''Scope warning — the JsonEncoder/JsonDecoder bridges are deliberately not provided at the package-object level.''' They live in ScalapbJsonImplicits and must be imported explicitly, because making them globally implicit-visible would hijack every zio-json call site the user has for protobuf types — including any unrelated logging/HTTP use — and cause it to throw at runtime.

Use them only where zio-json's own derivation needs to see encoder/decoder evidence for a protobuf type inside a generic structure (e.g. Either[Foo, MyProtobufMsg]).

Attributes

Members list

Type members

Classlikes

final case class BigDecimal(scale: Int, intVal: BigInteger, unknownFields: UnknownFieldSet = ...) extends GeneratedMessage, Updatable[BigDecimal]

A BigDecimal encoded as scale with BigInteger value

A BigDecimal encoded as scale with BigInteger value

Attributes

Companion
object
Supertypes
trait Updatable[BigDecimal]
trait GeneratedMessage
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
object BigDecimal extends GeneratedMessageCompanion[BigDecimal]

Attributes

Companion
class
Supertypes
trait Product
trait Mirror
trait GeneratedMessageCompanion[BigDecimal]
trait Serializable
class Object
trait Matchable
class Any
Show all
Self type
BigDecimal.type
object BigInteger extends GeneratedMessageCompanion[BigInteger]

Attributes

Companion
class
Supertypes
trait Product
trait Mirror
trait GeneratedMessageCompanion[BigInteger]
trait Serializable
class Object
trait Matchable
class Any
Show all
Self type
BigInteger.type
final case class BigInteger(value: ByteString, unknownFields: UnknownFieldSet = ...) extends GeneratedMessage, Updatable[BigInteger]

A BigInteger bytes representation

A BigInteger bytes representation

Attributes

Companion
object
Supertypes
trait Updatable[BigInteger]
trait GeneratedMessage
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
object EnumProtoType

Attributes

Companion
class
Supertypes
class Object
trait Matchable
class Any
Self type
final class EnumProtoType[P <: GeneratedEnum, E <: Enum](companion: GeneratedEnumCompanion[P], enumMeta: Scala3EnumMeta[E]) extends ProtoType[E]

Attributes

Companion
object
Supertypes
trait ProtoType[E]
class Object
trait Matchable
class Any
final class EnumProtoTypePartiallyApplied[P <: GeneratedEnum](companion: GeneratedEnumCompanion[P]) extends AnyVal

Attributes

Supertypes
class AnyVal
trait Matchable
class Any
final class EnumeratumEnumException extends RuntimeException

Attributes

Supertypes
class RuntimeException
class Exception
class Throwable
trait Serializable
class Object
trait Matchable
class Any
Show all
sealed trait LowPriorityProtoTypes

Attributes

Supertypes
class Object
trait Matchable
class Any
Known subtypes
object ProtoType
final case class Optional(value: Option[Any] = ..., unknownFields: UnknownFieldSet = ...) extends GeneratedMessage, Updatable[Optional]

Optional is a scala.Option like type representing either value or null. Untyped due to absence of generic in protocol buffers

Optional is a scala.Option like type representing either value or null. Untyped due to absence of generic in protocol buffers

Attributes

Companion
object
Supertypes
trait Updatable[Optional]
trait GeneratedMessage
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
object Optional extends GeneratedMessageCompanion[Optional]

Attributes

Companion
class
Supertypes
trait Product
trait Mirror
trait GeneratedMessageCompanion[Optional]
trait Serializable
class Object
trait Matchable
class Any
Show all
Self type
Optional.type

Attributes

Companion
trait
Supertypes
class Object
trait Matchable
class Any
Self type
ProtoType.type
trait ProtoType[A]

Typeclass allowing conversion to protocol buffers supported type

Typeclass allowing conversion to protocol buffers supported type

Type parameters

A

value type

Attributes

Companion
object
Supertypes
class Object
trait Matchable
class Any
Known subtypes
class EnumProtoType[P, E]

Attributes

Supertypes
class Object
trait Matchable
class Any
Self type
class ProtobufPayloadException extends Exception

Thrown in case of deserialization errors

Thrown in case of deserialization errors

Attributes

Supertypes
class Exception
class Throwable
trait Serializable
class Object
trait Matchable
class Any
Show all
object Result extends GeneratedMessageCompanion[Result]

Attributes

Companion
class
Supertypes
trait Product
trait Mirror
trait GeneratedMessageCompanion[Result]
trait Serializable
class Object
trait Matchable
class Any
Show all
Self type
Result.type
final case class Result(result: Result = ..., unknownFields: UnknownFieldSet = ...) extends GeneratedMessage, Updatable[Result]

Result is a scala.Either like type representing either error or some value. Untyped due to absence of generic in protocol buffers

Result is a scala.Either like type representing either error or some value. Untyped due to absence of generic in protocol buffers

Attributes

Companion
object
Supertypes
trait Updatable[Result]
trait GeneratedMessage
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Opt-in zio-json encoder/decoder bridges for ScalaPB-generated types.

Opt-in zio-json encoder/decoder bridges for ScalaPB-generated types.

These are needed only when you want zio-json to derive a codec for a generic structure that contains a protobuf type — e.g. JsonEncoder[Either[MyProtobufMsg, String]]. Importing this object brings JsonEncoder[A &lt;: GeneratedMessage] and JsonDecoder[A &lt;: GeneratedMessage] (and the sealed-oneof variants) into implicit scope.

''Do not import globally.'' These encoders/decoders are stubs that must never actually run — the encoder throws, the decoder fails with a Left(msg) decode error — they are meant to live inside a ZTemporalCodec whose actual serialization is handled by ScalapbPayloadConverter earlier in the chain. If they leak into the user's wider zio-json usage (logs, HTTP handlers, etc.) protobuf serialization will fail at runtime.

Import it locally where needed:

 import zio.temporal.protobuf.ScalapbJsonImplicits._

Attributes

Supertypes
class Object
trait Matchable
class Any
Self type

Attributes

Companion
class
Supertypes
class Object
trait Matchable
class Any
Self type
class ScalapbPayloadConverter extends PayloadConverter

Used to deserialize protobuf generated types

Used to deserialize protobuf generated types

Attributes

Companion
object
Supertypes
trait PayloadConverter
class Object
trait Matchable
class Any
object UUID extends GeneratedMessageCompanion[UUID]

Attributes

Companion
class
Supertypes
trait Product
trait Mirror
trait GeneratedMessageCompanion[UUID]
trait Serializable
class Object
trait Matchable
class Any
Show all
Self type
UUID.type
final case class UUID(mostSignificantBits: Long, leastSignificantBits: Long, unknownFields: UnknownFieldSet = ...) extends GeneratedMessage, Updatable[UUID]

A UUID, encoded in accordance with section 4.1.2 of RFC 4122.

A UUID, encoded in accordance with section 4.1.2 of RFC 4122.

Attributes

Companion
object
Supertypes
trait Updatable[UUID]
trait GeneratedMessage
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
final case class ZUnit(unknownFields: UnknownFieldSet = ...) extends GeneratedMessage, Updatable[ZUnit]

Empty message which should be used as a result type for activities and workflows with no return value

Empty message which should be used as a result type for activities and workflows with no return value

Attributes

Companion
object
Supertypes
trait Updatable[ZUnit]
trait GeneratedMessage
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
object ZUnit extends GeneratedMessageCompanion[ZUnit]

Attributes

Companion
class
Supertypes
trait Product
trait Mirror
trait GeneratedMessageCompanion[ZUnit]
trait Serializable
class Object
trait Matchable
class Any
Show all
Self type
ZUnit.type
object ZioTemporalProto extends GeneratedFileObject

Attributes

Supertypes
class GeneratedFileObject
class Object
trait Matchable
class Any
Self type
object syntax

Attributes

Supertypes
class Object
trait Matchable
class Any
Self type
syntax.type

Givens

Givens

given scalapbMessageZTemporalCodec[A <: GeneratedMessage](using ClassTag[A]): ZTemporalCodec[A]

ZTemporalCodec[A] for any GeneratedMessage. Safe to import globally — the zio-json encoder/decoder the codec carries are internal and never leak into the user's wider implicit scope.

ZTemporalCodec[A] for any GeneratedMessage. Safe to import globally — the zio-json encoder/decoder the codec carries are internal and never leak into the user's wider implicit scope.

Attributes

given scalapbSealedOneofZTemporalCodec[A <: GeneratedSealedOneof](using ClassTag[A]): ZTemporalCodec[A]