com.google.protobuf.descriptor.FeatureSet.scala Maven / Gradle / Ivy
The newest version!
// Generated by the Scala Plugin for the Protocol Buffer Compiler.
// Do not edit!
package com.google.protobuf.descriptor
/** TODO Enums in C++ gencode (and potentially other languages) are
* not well scoped. This means that each of the feature enums below can clash
* with each other. The short names we've chosen maximize call-site
* readability, but leave us very open to this scenario. A future feature will
* be designed and implemented to handle this, hopefully before we ever hit a
* conflict here.
*/
@SerialVersionUID(0L)
final case class FeatureSet(
fieldPresence: _root_.scala.Option[com.google.protobuf.descriptor.FeatureSet.FieldPresence] = _root_.scala.None,
enumType: _root_.scala.Option[com.google.protobuf.descriptor.FeatureSet.EnumType] = _root_.scala.None,
repeatedFieldEncoding: _root_.scala.Option[com.google.protobuf.descriptor.FeatureSet.RepeatedFieldEncoding] = _root_.scala.None,
utf8Validation: _root_.scala.Option[com.google.protobuf.descriptor.FeatureSet.Utf8Validation] = _root_.scala.None,
messageEncoding: _root_.scala.Option[com.google.protobuf.descriptor.FeatureSet.MessageEncoding] = _root_.scala.None,
jsonFormat: _root_.scala.Option[com.google.protobuf.descriptor.FeatureSet.JsonFormat] = _root_.scala.None,
unknownFields: _root_.scalapb.UnknownFieldSet = _root_.scalapb.UnknownFieldSet.empty
) extends scalapb.GeneratedMessage with scalapb.lenses.Updatable[FeatureSet] with _root_.scalapb.ExtendableMessage[FeatureSet] {
@transient
private[this] var __serializedSizeMemoized: _root_.scala.Int = 0
private[this] def __computeSerializedSize(): _root_.scala.Int = {
var __size = 0
if (fieldPresence.isDefined) {
val __value = fieldPresence.get.value
__size += _root_.com.google.protobuf.CodedOutputStream.computeEnumSize(1, __value)
};
if (enumType.isDefined) {
val __value = enumType.get.value
__size += _root_.com.google.protobuf.CodedOutputStream.computeEnumSize(2, __value)
};
if (repeatedFieldEncoding.isDefined) {
val __value = repeatedFieldEncoding.get.value
__size += _root_.com.google.protobuf.CodedOutputStream.computeEnumSize(3, __value)
};
if (utf8Validation.isDefined) {
val __value = utf8Validation.get.value
__size += _root_.com.google.protobuf.CodedOutputStream.computeEnumSize(4, __value)
};
if (messageEncoding.isDefined) {
val __value = messageEncoding.get.value
__size += _root_.com.google.protobuf.CodedOutputStream.computeEnumSize(5, __value)
};
if (jsonFormat.isDefined) {
val __value = jsonFormat.get.value
__size += _root_.com.google.protobuf.CodedOutputStream.computeEnumSize(6, __value)
};
__size += unknownFields.serializedSize
__size
}
override def serializedSize: _root_.scala.Int = {
var __size = __serializedSizeMemoized
if (__size == 0) {
__size = __computeSerializedSize() + 1
__serializedSizeMemoized = __size
}
__size - 1
}
def writeTo(`_output__`: _root_.com.google.protobuf.CodedOutputStream): _root_.scala.Unit = {
fieldPresence.foreach { __v =>
val __m = __v.value
_output__.writeEnum(1, __m)
};
enumType.foreach { __v =>
val __m = __v.value
_output__.writeEnum(2, __m)
};
repeatedFieldEncoding.foreach { __v =>
val __m = __v.value
_output__.writeEnum(3, __m)
};
utf8Validation.foreach { __v =>
val __m = __v.value
_output__.writeEnum(4, __m)
};
messageEncoding.foreach { __v =>
val __m = __v.value
_output__.writeEnum(5, __m)
};
jsonFormat.foreach { __v =>
val __m = __v.value
_output__.writeEnum(6, __m)
};
unknownFields.writeTo(_output__)
}
def getFieldPresence: com.google.protobuf.descriptor.FeatureSet.FieldPresence = fieldPresence.getOrElse(com.google.protobuf.descriptor.FeatureSet.FieldPresence.FIELD_PRESENCE_UNKNOWN)
def clearFieldPresence: FeatureSet = copy(fieldPresence = _root_.scala.None)
def withFieldPresence(__v: com.google.protobuf.descriptor.FeatureSet.FieldPresence): FeatureSet = copy(fieldPresence = Option(__v))
def getEnumType: com.google.protobuf.descriptor.FeatureSet.EnumType = enumType.getOrElse(com.google.protobuf.descriptor.FeatureSet.EnumType.ENUM_TYPE_UNKNOWN)
def clearEnumType: FeatureSet = copy(enumType = _root_.scala.None)
def withEnumType(__v: com.google.protobuf.descriptor.FeatureSet.EnumType): FeatureSet = copy(enumType = Option(__v))
def getRepeatedFieldEncoding: com.google.protobuf.descriptor.FeatureSet.RepeatedFieldEncoding = repeatedFieldEncoding.getOrElse(com.google.protobuf.descriptor.FeatureSet.RepeatedFieldEncoding.REPEATED_FIELD_ENCODING_UNKNOWN)
def clearRepeatedFieldEncoding: FeatureSet = copy(repeatedFieldEncoding = _root_.scala.None)
def withRepeatedFieldEncoding(__v: com.google.protobuf.descriptor.FeatureSet.RepeatedFieldEncoding): FeatureSet = copy(repeatedFieldEncoding = Option(__v))
def getUtf8Validation: com.google.protobuf.descriptor.FeatureSet.Utf8Validation = utf8Validation.getOrElse(com.google.protobuf.descriptor.FeatureSet.Utf8Validation.UTF8_VALIDATION_UNKNOWN)
def clearUtf8Validation: FeatureSet = copy(utf8Validation = _root_.scala.None)
def withUtf8Validation(__v: com.google.protobuf.descriptor.FeatureSet.Utf8Validation): FeatureSet = copy(utf8Validation = Option(__v))
def getMessageEncoding: com.google.protobuf.descriptor.FeatureSet.MessageEncoding = messageEncoding.getOrElse(com.google.protobuf.descriptor.FeatureSet.MessageEncoding.MESSAGE_ENCODING_UNKNOWN)
def clearMessageEncoding: FeatureSet = copy(messageEncoding = _root_.scala.None)
def withMessageEncoding(__v: com.google.protobuf.descriptor.FeatureSet.MessageEncoding): FeatureSet = copy(messageEncoding = Option(__v))
def getJsonFormat: com.google.protobuf.descriptor.FeatureSet.JsonFormat = jsonFormat.getOrElse(com.google.protobuf.descriptor.FeatureSet.JsonFormat.JSON_FORMAT_UNKNOWN)
def clearJsonFormat: FeatureSet = copy(jsonFormat = _root_.scala.None)
def withJsonFormat(__v: com.google.protobuf.descriptor.FeatureSet.JsonFormat): FeatureSet = copy(jsonFormat = Option(__v))
def withUnknownFields(__v: _root_.scalapb.UnknownFieldSet) = copy(unknownFields = __v)
def discardUnknownFields = copy(unknownFields = _root_.scalapb.UnknownFieldSet.empty)
def getFieldByNumber(__fieldNumber: _root_.scala.Int): _root_.scala.Any = {
(__fieldNumber: @_root_.scala.unchecked) match {
case 1 => fieldPresence.map(_.javaValueDescriptor).orNull
case 2 => enumType.map(_.javaValueDescriptor).orNull
case 3 => repeatedFieldEncoding.map(_.javaValueDescriptor).orNull
case 4 => utf8Validation.map(_.javaValueDescriptor).orNull
case 5 => messageEncoding.map(_.javaValueDescriptor).orNull
case 6 => jsonFormat.map(_.javaValueDescriptor).orNull
}
}
def getField(__field: _root_.scalapb.descriptors.FieldDescriptor): _root_.scalapb.descriptors.PValue = {
_root_.scala.Predef.require(__field.containingMessage eq companion.scalaDescriptor)
(__field.number: @_root_.scala.unchecked) match {
case 1 => fieldPresence.map(__e => _root_.scalapb.descriptors.PEnum(__e.scalaValueDescriptor)).getOrElse(_root_.scalapb.descriptors.PEmpty)
case 2 => enumType.map(__e => _root_.scalapb.descriptors.PEnum(__e.scalaValueDescriptor)).getOrElse(_root_.scalapb.descriptors.PEmpty)
case 3 => repeatedFieldEncoding.map(__e => _root_.scalapb.descriptors.PEnum(__e.scalaValueDescriptor)).getOrElse(_root_.scalapb.descriptors.PEmpty)
case 4 => utf8Validation.map(__e => _root_.scalapb.descriptors.PEnum(__e.scalaValueDescriptor)).getOrElse(_root_.scalapb.descriptors.PEmpty)
case 5 => messageEncoding.map(__e => _root_.scalapb.descriptors.PEnum(__e.scalaValueDescriptor)).getOrElse(_root_.scalapb.descriptors.PEmpty)
case 6 => jsonFormat.map(__e => _root_.scalapb.descriptors.PEnum(__e.scalaValueDescriptor)).getOrElse(_root_.scalapb.descriptors.PEmpty)
}
}
def toProtoString: _root_.scala.Predef.String = _root_.scalapb.TextFormat.printToUnicodeString(this)
def companion: com.google.protobuf.descriptor.FeatureSet.type = com.google.protobuf.descriptor.FeatureSet
// @@protoc_insertion_point(GeneratedMessage[google.protobuf.FeatureSet])
}
object FeatureSet extends scalapb.GeneratedMessageCompanion[com.google.protobuf.descriptor.FeatureSet] {
implicit def messageCompanion: scalapb.GeneratedMessageCompanion[com.google.protobuf.descriptor.FeatureSet] = this
def parseFrom(`_input__`: _root_.com.google.protobuf.CodedInputStream): com.google.protobuf.descriptor.FeatureSet = {
var __fieldPresence: _root_.scala.Option[com.google.protobuf.descriptor.FeatureSet.FieldPresence] = _root_.scala.None
var __enumType: _root_.scala.Option[com.google.protobuf.descriptor.FeatureSet.EnumType] = _root_.scala.None
var __repeatedFieldEncoding: _root_.scala.Option[com.google.protobuf.descriptor.FeatureSet.RepeatedFieldEncoding] = _root_.scala.None
var __utf8Validation: _root_.scala.Option[com.google.protobuf.descriptor.FeatureSet.Utf8Validation] = _root_.scala.None
var __messageEncoding: _root_.scala.Option[com.google.protobuf.descriptor.FeatureSet.MessageEncoding] = _root_.scala.None
var __jsonFormat: _root_.scala.Option[com.google.protobuf.descriptor.FeatureSet.JsonFormat] = _root_.scala.None
var `_unknownFields__`: _root_.scalapb.UnknownFieldSet.Builder = null
var _done__ = false
while (!_done__) {
val _tag__ = _input__.readTag()
_tag__ match {
case 0 => _done__ = true
case 8 =>
__fieldPresence = _root_.scala.Option(com.google.protobuf.descriptor.FeatureSet.FieldPresence.fromValue(_input__.readEnum()))
case 16 =>
__enumType = _root_.scala.Option(com.google.protobuf.descriptor.FeatureSet.EnumType.fromValue(_input__.readEnum()))
case 24 =>
__repeatedFieldEncoding = _root_.scala.Option(com.google.protobuf.descriptor.FeatureSet.RepeatedFieldEncoding.fromValue(_input__.readEnum()))
case 32 =>
__utf8Validation = _root_.scala.Option(com.google.protobuf.descriptor.FeatureSet.Utf8Validation.fromValue(_input__.readEnum()))
case 40 =>
__messageEncoding = _root_.scala.Option(com.google.protobuf.descriptor.FeatureSet.MessageEncoding.fromValue(_input__.readEnum()))
case 48 =>
__jsonFormat = _root_.scala.Option(com.google.protobuf.descriptor.FeatureSet.JsonFormat.fromValue(_input__.readEnum()))
case tag =>
if (_unknownFields__ == null) {
_unknownFields__ = new _root_.scalapb.UnknownFieldSet.Builder()
}
_unknownFields__.parseField(tag, _input__)
}
}
com.google.protobuf.descriptor.FeatureSet(
fieldPresence = __fieldPresence,
enumType = __enumType,
repeatedFieldEncoding = __repeatedFieldEncoding,
utf8Validation = __utf8Validation,
messageEncoding = __messageEncoding,
jsonFormat = __jsonFormat,
unknownFields = if (_unknownFields__ == null) _root_.scalapb.UnknownFieldSet.empty else _unknownFields__.result()
)
}
implicit def messageReads: _root_.scalapb.descriptors.Reads[com.google.protobuf.descriptor.FeatureSet] = _root_.scalapb.descriptors.Reads{
case _root_.scalapb.descriptors.PMessage(__fieldsMap) =>
_root_.scala.Predef.require(__fieldsMap.keys.forall(_.containingMessage eq scalaDescriptor), "FieldDescriptor does not match message type.")
com.google.protobuf.descriptor.FeatureSet(
fieldPresence = __fieldsMap.get(scalaDescriptor.findFieldByNumber(1).get).flatMap(_.as[_root_.scala.Option[_root_.scalapb.descriptors.EnumValueDescriptor]]).map(__e => com.google.protobuf.descriptor.FeatureSet.FieldPresence.fromValue(__e.number)),
enumType = __fieldsMap.get(scalaDescriptor.findFieldByNumber(2).get).flatMap(_.as[_root_.scala.Option[_root_.scalapb.descriptors.EnumValueDescriptor]]).map(__e => com.google.protobuf.descriptor.FeatureSet.EnumType.fromValue(__e.number)),
repeatedFieldEncoding = __fieldsMap.get(scalaDescriptor.findFieldByNumber(3).get).flatMap(_.as[_root_.scala.Option[_root_.scalapb.descriptors.EnumValueDescriptor]]).map(__e => com.google.protobuf.descriptor.FeatureSet.RepeatedFieldEncoding.fromValue(__e.number)),
utf8Validation = __fieldsMap.get(scalaDescriptor.findFieldByNumber(4).get).flatMap(_.as[_root_.scala.Option[_root_.scalapb.descriptors.EnumValueDescriptor]]).map(__e => com.google.protobuf.descriptor.FeatureSet.Utf8Validation.fromValue(__e.number)),
messageEncoding = __fieldsMap.get(scalaDescriptor.findFieldByNumber(5).get).flatMap(_.as[_root_.scala.Option[_root_.scalapb.descriptors.EnumValueDescriptor]]).map(__e => com.google.protobuf.descriptor.FeatureSet.MessageEncoding.fromValue(__e.number)),
jsonFormat = __fieldsMap.get(scalaDescriptor.findFieldByNumber(6).get).flatMap(_.as[_root_.scala.Option[_root_.scalapb.descriptors.EnumValueDescriptor]]).map(__e => com.google.protobuf.descriptor.FeatureSet.JsonFormat.fromValue(__e.number))
)
case _ => throw new RuntimeException("Expected PMessage")
}
def javaDescriptor: _root_.com.google.protobuf.Descriptors.Descriptor = com.google.protobuf.descriptor.DescriptorProtoCompanion.javaDescriptor.getMessageTypes().get(19)
def scalaDescriptor: _root_.scalapb.descriptors.Descriptor = com.google.protobuf.descriptor.DescriptorProtoCompanion.scalaDescriptor.messages(19)
def messageCompanionForFieldNumber(__number: _root_.scala.Int): _root_.scalapb.GeneratedMessageCompanion[_] = throw new MatchError(__number)
lazy val nestedMessagesCompanions: Seq[_root_.scalapb.GeneratedMessageCompanion[_ <: _root_.scalapb.GeneratedMessage]] = Seq.empty
def enumCompanionForFieldNumber(__fieldNumber: _root_.scala.Int): _root_.scalapb.GeneratedEnumCompanion[_] = {
(__fieldNumber: @_root_.scala.unchecked) match {
case 1 => com.google.protobuf.descriptor.FeatureSet.FieldPresence
case 2 => com.google.protobuf.descriptor.FeatureSet.EnumType
case 3 => com.google.protobuf.descriptor.FeatureSet.RepeatedFieldEncoding
case 4 => com.google.protobuf.descriptor.FeatureSet.Utf8Validation
case 5 => com.google.protobuf.descriptor.FeatureSet.MessageEncoding
case 6 => com.google.protobuf.descriptor.FeatureSet.JsonFormat
}
}
lazy val defaultInstance = com.google.protobuf.descriptor.FeatureSet(
fieldPresence = _root_.scala.None,
enumType = _root_.scala.None,
repeatedFieldEncoding = _root_.scala.None,
utf8Validation = _root_.scala.None,
messageEncoding = _root_.scala.None,
jsonFormat = _root_.scala.None
)
sealed abstract class FieldPresence(val value: _root_.scala.Int) extends _root_.scalapb.GeneratedEnum {
type EnumType = com.google.protobuf.descriptor.FeatureSet.FieldPresence
type RecognizedType = com.google.protobuf.descriptor.FeatureSet.FieldPresence.Recognized
def isFieldPresenceUnknown: _root_.scala.Boolean = false
def isExplicit: _root_.scala.Boolean = false
def isImplicit: _root_.scala.Boolean = false
def isLegacyRequired: _root_.scala.Boolean = false
def companion: _root_.scalapb.GeneratedEnumCompanion[FieldPresence] = com.google.protobuf.descriptor.FeatureSet.FieldPresence
final def asRecognized: _root_.scala.Option[com.google.protobuf.descriptor.FeatureSet.FieldPresence.Recognized] = if (isUnrecognized) _root_.scala.None else _root_.scala.Some(this.asInstanceOf[com.google.protobuf.descriptor.FeatureSet.FieldPresence.Recognized])
}
object FieldPresence extends _root_.scalapb.GeneratedEnumCompanion[FieldPresence] {
sealed trait Recognized extends FieldPresence
implicit def enumCompanion: _root_.scalapb.GeneratedEnumCompanion[FieldPresence] = this
@SerialVersionUID(0L)
case object FIELD_PRESENCE_UNKNOWN extends FieldPresence(0) with FieldPresence.Recognized {
val index = 0
val name = "FIELD_PRESENCE_UNKNOWN"
override def isFieldPresenceUnknown: _root_.scala.Boolean = true
}
@SerialVersionUID(0L)
case object EXPLICIT extends FieldPresence(1) with FieldPresence.Recognized {
val index = 1
val name = "EXPLICIT"
override def isExplicit: _root_.scala.Boolean = true
}
@SerialVersionUID(0L)
case object IMPLICIT extends FieldPresence(2) with FieldPresence.Recognized {
val index = 2
val name = "IMPLICIT"
override def isImplicit: _root_.scala.Boolean = true
}
@SerialVersionUID(0L)
case object LEGACY_REQUIRED extends FieldPresence(3) with FieldPresence.Recognized {
val index = 3
val name = "LEGACY_REQUIRED"
override def isLegacyRequired: _root_.scala.Boolean = true
}
@SerialVersionUID(0L)
final case class Unrecognized(unrecognizedValue: _root_.scala.Int) extends FieldPresence(unrecognizedValue) with _root_.scalapb.UnrecognizedEnum
lazy val values: scala.collection.immutable.Seq[ValueType] = scala.collection.immutable.Seq(FIELD_PRESENCE_UNKNOWN, EXPLICIT, IMPLICIT, LEGACY_REQUIRED)
def fromValue(__value: _root_.scala.Int): FieldPresence = __value match {
case 0 => FIELD_PRESENCE_UNKNOWN
case 1 => EXPLICIT
case 2 => IMPLICIT
case 3 => LEGACY_REQUIRED
case __other => Unrecognized(__other)
}
def javaDescriptor: _root_.com.google.protobuf.Descriptors.EnumDescriptor = com.google.protobuf.descriptor.FeatureSet.javaDescriptor.getEnumTypes().get(0)
def scalaDescriptor: _root_.scalapb.descriptors.EnumDescriptor = com.google.protobuf.descriptor.FeatureSet.scalaDescriptor.enums(0)
}
sealed abstract class EnumType(val value: _root_.scala.Int) extends _root_.scalapb.GeneratedEnum {
type EnumType = com.google.protobuf.descriptor.FeatureSet.EnumType
type RecognizedType = com.google.protobuf.descriptor.FeatureSet.EnumType.Recognized
def isEnumTypeUnknown: _root_.scala.Boolean = false
def isOpen: _root_.scala.Boolean = false
def isClosed: _root_.scala.Boolean = false
def companion: _root_.scalapb.GeneratedEnumCompanion[EnumType] = com.google.protobuf.descriptor.FeatureSet.EnumType
final def asRecognized: _root_.scala.Option[com.google.protobuf.descriptor.FeatureSet.EnumType.Recognized] = if (isUnrecognized) _root_.scala.None else _root_.scala.Some(this.asInstanceOf[com.google.protobuf.descriptor.FeatureSet.EnumType.Recognized])
}
object EnumType extends _root_.scalapb.GeneratedEnumCompanion[EnumType] {
sealed trait Recognized extends EnumType
implicit def enumCompanion: _root_.scalapb.GeneratedEnumCompanion[EnumType] = this
@SerialVersionUID(0L)
case object ENUM_TYPE_UNKNOWN extends EnumType(0) with EnumType.Recognized {
val index = 0
val name = "ENUM_TYPE_UNKNOWN"
override def isEnumTypeUnknown: _root_.scala.Boolean = true
}
@SerialVersionUID(0L)
case object OPEN extends EnumType(1) with EnumType.Recognized {
val index = 1
val name = "OPEN"
override def isOpen: _root_.scala.Boolean = true
}
@SerialVersionUID(0L)
case object CLOSED extends EnumType(2) with EnumType.Recognized {
val index = 2
val name = "CLOSED"
override def isClosed: _root_.scala.Boolean = true
}
@SerialVersionUID(0L)
final case class Unrecognized(unrecognizedValue: _root_.scala.Int) extends EnumType(unrecognizedValue) with _root_.scalapb.UnrecognizedEnum
lazy val values: scala.collection.immutable.Seq[ValueType] = scala.collection.immutable.Seq(ENUM_TYPE_UNKNOWN, OPEN, CLOSED)
def fromValue(__value: _root_.scala.Int): EnumType = __value match {
case 0 => ENUM_TYPE_UNKNOWN
case 1 => OPEN
case 2 => CLOSED
case __other => Unrecognized(__other)
}
def javaDescriptor: _root_.com.google.protobuf.Descriptors.EnumDescriptor = com.google.protobuf.descriptor.FeatureSet.javaDescriptor.getEnumTypes().get(1)
def scalaDescriptor: _root_.scalapb.descriptors.EnumDescriptor = com.google.protobuf.descriptor.FeatureSet.scalaDescriptor.enums(1)
}
sealed abstract class RepeatedFieldEncoding(val value: _root_.scala.Int) extends _root_.scalapb.GeneratedEnum {
type EnumType = com.google.protobuf.descriptor.FeatureSet.RepeatedFieldEncoding
type RecognizedType = com.google.protobuf.descriptor.FeatureSet.RepeatedFieldEncoding.Recognized
def isRepeatedFieldEncodingUnknown: _root_.scala.Boolean = false
def isPacked: _root_.scala.Boolean = false
def isExpanded: _root_.scala.Boolean = false
def companion: _root_.scalapb.GeneratedEnumCompanion[RepeatedFieldEncoding] = com.google.protobuf.descriptor.FeatureSet.RepeatedFieldEncoding
final def asRecognized: _root_.scala.Option[com.google.protobuf.descriptor.FeatureSet.RepeatedFieldEncoding.Recognized] = if (isUnrecognized) _root_.scala.None else _root_.scala.Some(this.asInstanceOf[com.google.protobuf.descriptor.FeatureSet.RepeatedFieldEncoding.Recognized])
}
object RepeatedFieldEncoding extends _root_.scalapb.GeneratedEnumCompanion[RepeatedFieldEncoding] {
sealed trait Recognized extends RepeatedFieldEncoding
implicit def enumCompanion: _root_.scalapb.GeneratedEnumCompanion[RepeatedFieldEncoding] = this
@SerialVersionUID(0L)
case object REPEATED_FIELD_ENCODING_UNKNOWN extends RepeatedFieldEncoding(0) with RepeatedFieldEncoding.Recognized {
val index = 0
val name = "REPEATED_FIELD_ENCODING_UNKNOWN"
override def isRepeatedFieldEncodingUnknown: _root_.scala.Boolean = true
}
@SerialVersionUID(0L)
case object PACKED extends RepeatedFieldEncoding(1) with RepeatedFieldEncoding.Recognized {
val index = 1
val name = "PACKED"
override def isPacked: _root_.scala.Boolean = true
}
@SerialVersionUID(0L)
case object EXPANDED extends RepeatedFieldEncoding(2) with RepeatedFieldEncoding.Recognized {
val index = 2
val name = "EXPANDED"
override def isExpanded: _root_.scala.Boolean = true
}
@SerialVersionUID(0L)
final case class Unrecognized(unrecognizedValue: _root_.scala.Int) extends RepeatedFieldEncoding(unrecognizedValue) with _root_.scalapb.UnrecognizedEnum
lazy val values: scala.collection.immutable.Seq[ValueType] = scala.collection.immutable.Seq(REPEATED_FIELD_ENCODING_UNKNOWN, PACKED, EXPANDED)
def fromValue(__value: _root_.scala.Int): RepeatedFieldEncoding = __value match {
case 0 => REPEATED_FIELD_ENCODING_UNKNOWN
case 1 => PACKED
case 2 => EXPANDED
case __other => Unrecognized(__other)
}
def javaDescriptor: _root_.com.google.protobuf.Descriptors.EnumDescriptor = com.google.protobuf.descriptor.FeatureSet.javaDescriptor.getEnumTypes().get(2)
def scalaDescriptor: _root_.scalapb.descriptors.EnumDescriptor = com.google.protobuf.descriptor.FeatureSet.scalaDescriptor.enums(2)
}
sealed abstract class Utf8Validation(val value: _root_.scala.Int) extends _root_.scalapb.GeneratedEnum {
type EnumType = com.google.protobuf.descriptor.FeatureSet.Utf8Validation
type RecognizedType = com.google.protobuf.descriptor.FeatureSet.Utf8Validation.Recognized
def isUtf8ValidationUnknown: _root_.scala.Boolean = false
def isVerify: _root_.scala.Boolean = false
def isNone: _root_.scala.Boolean = false
def companion: _root_.scalapb.GeneratedEnumCompanion[Utf8Validation] = com.google.protobuf.descriptor.FeatureSet.Utf8Validation
final def asRecognized: _root_.scala.Option[com.google.protobuf.descriptor.FeatureSet.Utf8Validation.Recognized] = if (isUnrecognized) _root_.scala.None else _root_.scala.Some(this.asInstanceOf[com.google.protobuf.descriptor.FeatureSet.Utf8Validation.Recognized])
}
object Utf8Validation extends _root_.scalapb.GeneratedEnumCompanion[Utf8Validation] {
sealed trait Recognized extends Utf8Validation
implicit def enumCompanion: _root_.scalapb.GeneratedEnumCompanion[Utf8Validation] = this
@SerialVersionUID(0L)
case object UTF8_VALIDATION_UNKNOWN extends Utf8Validation(0) with Utf8Validation.Recognized {
val index = 0
val name = "UTF8_VALIDATION_UNKNOWN"
override def isUtf8ValidationUnknown: _root_.scala.Boolean = true
}
@SerialVersionUID(0L)
case object VERIFY extends Utf8Validation(2) with Utf8Validation.Recognized {
val index = 1
val name = "VERIFY"
override def isVerify: _root_.scala.Boolean = true
}
@SerialVersionUID(0L)
case object NONE extends Utf8Validation(3) with Utf8Validation.Recognized {
val index = 2
val name = "NONE"
override def isNone: _root_.scala.Boolean = true
}
@SerialVersionUID(0L)
final case class Unrecognized(unrecognizedValue: _root_.scala.Int) extends Utf8Validation(unrecognizedValue) with _root_.scalapb.UnrecognizedEnum
lazy val values: scala.collection.immutable.Seq[ValueType] = scala.collection.immutable.Seq(UTF8_VALIDATION_UNKNOWN, VERIFY, NONE)
def fromValue(__value: _root_.scala.Int): Utf8Validation = __value match {
case 0 => UTF8_VALIDATION_UNKNOWN
case 2 => VERIFY
case 3 => NONE
case __other => Unrecognized(__other)
}
def javaDescriptor: _root_.com.google.protobuf.Descriptors.EnumDescriptor = com.google.protobuf.descriptor.FeatureSet.javaDescriptor.getEnumTypes().get(3)
def scalaDescriptor: _root_.scalapb.descriptors.EnumDescriptor = com.google.protobuf.descriptor.FeatureSet.scalaDescriptor.enums(3)
}
sealed abstract class MessageEncoding(val value: _root_.scala.Int) extends _root_.scalapb.GeneratedEnum {
type EnumType = com.google.protobuf.descriptor.FeatureSet.MessageEncoding
type RecognizedType = com.google.protobuf.descriptor.FeatureSet.MessageEncoding.Recognized
def isMessageEncodingUnknown: _root_.scala.Boolean = false
def isLengthPrefixed: _root_.scala.Boolean = false
def isDelimited: _root_.scala.Boolean = false
def companion: _root_.scalapb.GeneratedEnumCompanion[MessageEncoding] = com.google.protobuf.descriptor.FeatureSet.MessageEncoding
final def asRecognized: _root_.scala.Option[com.google.protobuf.descriptor.FeatureSet.MessageEncoding.Recognized] = if (isUnrecognized) _root_.scala.None else _root_.scala.Some(this.asInstanceOf[com.google.protobuf.descriptor.FeatureSet.MessageEncoding.Recognized])
}
object MessageEncoding extends _root_.scalapb.GeneratedEnumCompanion[MessageEncoding] {
sealed trait Recognized extends MessageEncoding
implicit def enumCompanion: _root_.scalapb.GeneratedEnumCompanion[MessageEncoding] = this
@SerialVersionUID(0L)
case object MESSAGE_ENCODING_UNKNOWN extends MessageEncoding(0) with MessageEncoding.Recognized {
val index = 0
val name = "MESSAGE_ENCODING_UNKNOWN"
override def isMessageEncodingUnknown: _root_.scala.Boolean = true
}
@SerialVersionUID(0L)
case object LENGTH_PREFIXED extends MessageEncoding(1) with MessageEncoding.Recognized {
val index = 1
val name = "LENGTH_PREFIXED"
override def isLengthPrefixed: _root_.scala.Boolean = true
}
@SerialVersionUID(0L)
case object DELIMITED extends MessageEncoding(2) with MessageEncoding.Recognized {
val index = 2
val name = "DELIMITED"
override def isDelimited: _root_.scala.Boolean = true
}
@SerialVersionUID(0L)
final case class Unrecognized(unrecognizedValue: _root_.scala.Int) extends MessageEncoding(unrecognizedValue) with _root_.scalapb.UnrecognizedEnum
lazy val values: scala.collection.immutable.Seq[ValueType] = scala.collection.immutable.Seq(MESSAGE_ENCODING_UNKNOWN, LENGTH_PREFIXED, DELIMITED)
def fromValue(__value: _root_.scala.Int): MessageEncoding = __value match {
case 0 => MESSAGE_ENCODING_UNKNOWN
case 1 => LENGTH_PREFIXED
case 2 => DELIMITED
case __other => Unrecognized(__other)
}
def javaDescriptor: _root_.com.google.protobuf.Descriptors.EnumDescriptor = com.google.protobuf.descriptor.FeatureSet.javaDescriptor.getEnumTypes().get(4)
def scalaDescriptor: _root_.scalapb.descriptors.EnumDescriptor = com.google.protobuf.descriptor.FeatureSet.scalaDescriptor.enums(4)
}
sealed abstract class JsonFormat(val value: _root_.scala.Int) extends _root_.scalapb.GeneratedEnum {
type EnumType = com.google.protobuf.descriptor.FeatureSet.JsonFormat
type RecognizedType = com.google.protobuf.descriptor.FeatureSet.JsonFormat.Recognized
def isJsonFormatUnknown: _root_.scala.Boolean = false
def isAllow: _root_.scala.Boolean = false
def isLegacyBestEffort: _root_.scala.Boolean = false
def companion: _root_.scalapb.GeneratedEnumCompanion[JsonFormat] = com.google.protobuf.descriptor.FeatureSet.JsonFormat
final def asRecognized: _root_.scala.Option[com.google.protobuf.descriptor.FeatureSet.JsonFormat.Recognized] = if (isUnrecognized) _root_.scala.None else _root_.scala.Some(this.asInstanceOf[com.google.protobuf.descriptor.FeatureSet.JsonFormat.Recognized])
}
object JsonFormat extends _root_.scalapb.GeneratedEnumCompanion[JsonFormat] {
sealed trait Recognized extends JsonFormat
implicit def enumCompanion: _root_.scalapb.GeneratedEnumCompanion[JsonFormat] = this
@SerialVersionUID(0L)
case object JSON_FORMAT_UNKNOWN extends JsonFormat(0) with JsonFormat.Recognized {
val index = 0
val name = "JSON_FORMAT_UNKNOWN"
override def isJsonFormatUnknown: _root_.scala.Boolean = true
}
@SerialVersionUID(0L)
case object ALLOW extends JsonFormat(1) with JsonFormat.Recognized {
val index = 1
val name = "ALLOW"
override def isAllow: _root_.scala.Boolean = true
}
@SerialVersionUID(0L)
case object LEGACY_BEST_EFFORT extends JsonFormat(2) with JsonFormat.Recognized {
val index = 2
val name = "LEGACY_BEST_EFFORT"
override def isLegacyBestEffort: _root_.scala.Boolean = true
}
@SerialVersionUID(0L)
final case class Unrecognized(unrecognizedValue: _root_.scala.Int) extends JsonFormat(unrecognizedValue) with _root_.scalapb.UnrecognizedEnum
lazy val values: scala.collection.immutable.Seq[ValueType] = scala.collection.immutable.Seq(JSON_FORMAT_UNKNOWN, ALLOW, LEGACY_BEST_EFFORT)
def fromValue(__value: _root_.scala.Int): JsonFormat = __value match {
case 0 => JSON_FORMAT_UNKNOWN
case 1 => ALLOW
case 2 => LEGACY_BEST_EFFORT
case __other => Unrecognized(__other)
}
def javaDescriptor: _root_.com.google.protobuf.Descriptors.EnumDescriptor = com.google.protobuf.descriptor.FeatureSet.javaDescriptor.getEnumTypes().get(5)
def scalaDescriptor: _root_.scalapb.descriptors.EnumDescriptor = com.google.protobuf.descriptor.FeatureSet.scalaDescriptor.enums(5)
}
implicit class FeatureSetLens[UpperPB](_l: _root_.scalapb.lenses.Lens[UpperPB, com.google.protobuf.descriptor.FeatureSet]) extends _root_.scalapb.lenses.ObjectLens[UpperPB, com.google.protobuf.descriptor.FeatureSet](_l) {
def fieldPresence: _root_.scalapb.lenses.Lens[UpperPB, com.google.protobuf.descriptor.FeatureSet.FieldPresence] = field(_.getFieldPresence)((c_, f_) => c_.copy(fieldPresence = _root_.scala.Option(f_)))
def optionalFieldPresence: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Option[com.google.protobuf.descriptor.FeatureSet.FieldPresence]] = field(_.fieldPresence)((c_, f_) => c_.copy(fieldPresence = f_))
def enumType: _root_.scalapb.lenses.Lens[UpperPB, com.google.protobuf.descriptor.FeatureSet.EnumType] = field(_.getEnumType)((c_, f_) => c_.copy(enumType = _root_.scala.Option(f_)))
def optionalEnumType: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Option[com.google.protobuf.descriptor.FeatureSet.EnumType]] = field(_.enumType)((c_, f_) => c_.copy(enumType = f_))
def repeatedFieldEncoding: _root_.scalapb.lenses.Lens[UpperPB, com.google.protobuf.descriptor.FeatureSet.RepeatedFieldEncoding] = field(_.getRepeatedFieldEncoding)((c_, f_) => c_.copy(repeatedFieldEncoding = _root_.scala.Option(f_)))
def optionalRepeatedFieldEncoding: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Option[com.google.protobuf.descriptor.FeatureSet.RepeatedFieldEncoding]] = field(_.repeatedFieldEncoding)((c_, f_) => c_.copy(repeatedFieldEncoding = f_))
def utf8Validation: _root_.scalapb.lenses.Lens[UpperPB, com.google.protobuf.descriptor.FeatureSet.Utf8Validation] = field(_.getUtf8Validation)((c_, f_) => c_.copy(utf8Validation = _root_.scala.Option(f_)))
def optionalUtf8Validation: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Option[com.google.protobuf.descriptor.FeatureSet.Utf8Validation]] = field(_.utf8Validation)((c_, f_) => c_.copy(utf8Validation = f_))
def messageEncoding: _root_.scalapb.lenses.Lens[UpperPB, com.google.protobuf.descriptor.FeatureSet.MessageEncoding] = field(_.getMessageEncoding)((c_, f_) => c_.copy(messageEncoding = _root_.scala.Option(f_)))
def optionalMessageEncoding: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Option[com.google.protobuf.descriptor.FeatureSet.MessageEncoding]] = field(_.messageEncoding)((c_, f_) => c_.copy(messageEncoding = f_))
def jsonFormat: _root_.scalapb.lenses.Lens[UpperPB, com.google.protobuf.descriptor.FeatureSet.JsonFormat] = field(_.getJsonFormat)((c_, f_) => c_.copy(jsonFormat = _root_.scala.Option(f_)))
def optionalJsonFormat: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Option[com.google.protobuf.descriptor.FeatureSet.JsonFormat]] = field(_.jsonFormat)((c_, f_) => c_.copy(jsonFormat = f_))
}
final val FIELD_PRESENCE_FIELD_NUMBER = 1
final val ENUM_TYPE_FIELD_NUMBER = 2
final val REPEATED_FIELD_ENCODING_FIELD_NUMBER = 3
final val UTF8_VALIDATION_FIELD_NUMBER = 4
final val MESSAGE_ENCODING_FIELD_NUMBER = 5
final val JSON_FORMAT_FIELD_NUMBER = 6
def of(
fieldPresence: _root_.scala.Option[com.google.protobuf.descriptor.FeatureSet.FieldPresence],
enumType: _root_.scala.Option[com.google.protobuf.descriptor.FeatureSet.EnumType],
repeatedFieldEncoding: _root_.scala.Option[com.google.protobuf.descriptor.FeatureSet.RepeatedFieldEncoding],
utf8Validation: _root_.scala.Option[com.google.protobuf.descriptor.FeatureSet.Utf8Validation],
messageEncoding: _root_.scala.Option[com.google.protobuf.descriptor.FeatureSet.MessageEncoding],
jsonFormat: _root_.scala.Option[com.google.protobuf.descriptor.FeatureSet.JsonFormat]
): _root_.com.google.protobuf.descriptor.FeatureSet = _root_.com.google.protobuf.descriptor.FeatureSet(
fieldPresence,
enumType,
repeatedFieldEncoding,
utf8Validation,
messageEncoding,
jsonFormat
)
// @@protoc_insertion_point(GeneratedMessageCompanion[google.protobuf.FeatureSet])
}