grpc.reflection.v1alpha.reflection.ServerReflectionRequest.scala Maven / Gradle / Ivy
// Generated by the Scala Plugin for the Protocol Buffer Compiler.
// Do not edit!
//
// Protofile syntax: PROTO3
package grpc.reflection.v1alpha.reflection
/** The message sent by the client when calling ServerReflectionInfo method.
*/
@SerialVersionUID(0L)
final case class ServerReflectionRequest(
host: _root_.scala.Predef.String = "",
messageRequest: grpc.reflection.v1alpha.reflection.ServerReflectionRequest.MessageRequest = grpc.reflection.v1alpha.reflection.ServerReflectionRequest.MessageRequest.Empty,
unknownFields: _root_.scalapb.UnknownFieldSet = _root_.scalapb.UnknownFieldSet.empty
) extends scalapb.GeneratedMessage with scalapb.lenses.Updatable[ServerReflectionRequest] {
@transient
private[this] var __serializedSizeMemoized: _root_.scala.Int = 0
private[this] def __computeSerializedSize(): _root_.scala.Int = {
var __size = 0
{
val __value = host
if (!__value.isEmpty) {
__size += _root_.com.google.protobuf.CodedOutputStream.computeStringSize(1, __value)
}
};
if (messageRequest.fileByFilename.isDefined) {
val __value = messageRequest.fileByFilename.get
__size += _root_.com.google.protobuf.CodedOutputStream.computeStringSize(3, __value)
};
if (messageRequest.fileContainingSymbol.isDefined) {
val __value = messageRequest.fileContainingSymbol.get
__size += _root_.com.google.protobuf.CodedOutputStream.computeStringSize(4, __value)
};
if (messageRequest.fileContainingExtension.isDefined) {
val __value = messageRequest.fileContainingExtension.get
__size += 1 + _root_.com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(__value.serializedSize) + __value.serializedSize
};
if (messageRequest.allExtensionNumbersOfType.isDefined) {
val __value = messageRequest.allExtensionNumbersOfType.get
__size += _root_.com.google.protobuf.CodedOutputStream.computeStringSize(6, __value)
};
if (messageRequest.listServices.isDefined) {
val __value = messageRequest.listServices.get
__size += _root_.com.google.protobuf.CodedOutputStream.computeStringSize(7, __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 = {
{
val __v = host
if (!__v.isEmpty) {
_output__.writeString(1, __v)
}
};
messageRequest.fileByFilename.foreach { __v =>
val __m = __v
_output__.writeString(3, __m)
};
messageRequest.fileContainingSymbol.foreach { __v =>
val __m = __v
_output__.writeString(4, __m)
};
messageRequest.fileContainingExtension.foreach { __v =>
val __m = __v
_output__.writeTag(5, 2)
_output__.writeUInt32NoTag(__m.serializedSize)
__m.writeTo(_output__)
};
messageRequest.allExtensionNumbersOfType.foreach { __v =>
val __m = __v
_output__.writeString(6, __m)
};
messageRequest.listServices.foreach { __v =>
val __m = __v
_output__.writeString(7, __m)
};
unknownFields.writeTo(_output__)
}
def withHost(__v: _root_.scala.Predef.String): ServerReflectionRequest = copy(host = __v)
def getFileByFilename: _root_.scala.Predef.String = messageRequest.fileByFilename.getOrElse("")
def withFileByFilename(__v: _root_.scala.Predef.String): ServerReflectionRequest = copy(messageRequest = grpc.reflection.v1alpha.reflection.ServerReflectionRequest.MessageRequest.FileByFilename(__v))
def getFileContainingSymbol: _root_.scala.Predef.String = messageRequest.fileContainingSymbol.getOrElse("")
def withFileContainingSymbol(__v: _root_.scala.Predef.String): ServerReflectionRequest = copy(messageRequest = grpc.reflection.v1alpha.reflection.ServerReflectionRequest.MessageRequest.FileContainingSymbol(__v))
def getFileContainingExtension: grpc.reflection.v1alpha.reflection.ExtensionRequest = messageRequest.fileContainingExtension.getOrElse(grpc.reflection.v1alpha.reflection.ExtensionRequest.defaultInstance)
def withFileContainingExtension(__v: grpc.reflection.v1alpha.reflection.ExtensionRequest): ServerReflectionRequest = copy(messageRequest = grpc.reflection.v1alpha.reflection.ServerReflectionRequest.MessageRequest.FileContainingExtension(__v))
def getAllExtensionNumbersOfType: _root_.scala.Predef.String = messageRequest.allExtensionNumbersOfType.getOrElse("")
def withAllExtensionNumbersOfType(__v: _root_.scala.Predef.String): ServerReflectionRequest = copy(messageRequest = grpc.reflection.v1alpha.reflection.ServerReflectionRequest.MessageRequest.AllExtensionNumbersOfType(__v))
def getListServices: _root_.scala.Predef.String = messageRequest.listServices.getOrElse("")
def withListServices(__v: _root_.scala.Predef.String): ServerReflectionRequest = copy(messageRequest = grpc.reflection.v1alpha.reflection.ServerReflectionRequest.MessageRequest.ListServices(__v))
def clearMessageRequest: ServerReflectionRequest = copy(messageRequest = grpc.reflection.v1alpha.reflection.ServerReflectionRequest.MessageRequest.Empty)
def withMessageRequest(__v: grpc.reflection.v1alpha.reflection.ServerReflectionRequest.MessageRequest): ServerReflectionRequest = copy(messageRequest = __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 => {
val __t = host
if (__t != "") __t else null
}
case 3 => messageRequest.fileByFilename.orNull
case 4 => messageRequest.fileContainingSymbol.orNull
case 5 => messageRequest.fileContainingExtension.orNull
case 6 => messageRequest.allExtensionNumbersOfType.orNull
case 7 => messageRequest.listServices.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 => _root_.scalapb.descriptors.PString(host)
case 3 => messageRequest.fileByFilename.map(_root_.scalapb.descriptors.PString(_)).getOrElse(_root_.scalapb.descriptors.PEmpty)
case 4 => messageRequest.fileContainingSymbol.map(_root_.scalapb.descriptors.PString(_)).getOrElse(_root_.scalapb.descriptors.PEmpty)
case 5 => messageRequest.fileContainingExtension.map(_.toPMessage).getOrElse(_root_.scalapb.descriptors.PEmpty)
case 6 => messageRequest.allExtensionNumbersOfType.map(_root_.scalapb.descriptors.PString(_)).getOrElse(_root_.scalapb.descriptors.PEmpty)
case 7 => messageRequest.listServices.map(_root_.scalapb.descriptors.PString(_)).getOrElse(_root_.scalapb.descriptors.PEmpty)
}
}
def toProtoString: _root_.scala.Predef.String = _root_.scalapb.TextFormat.printToUnicodeString(this)
def companion: grpc.reflection.v1alpha.reflection.ServerReflectionRequest.type = grpc.reflection.v1alpha.reflection.ServerReflectionRequest
// @@protoc_insertion_point(GeneratedMessage[grpc.reflection.v1alpha.ServerReflectionRequest])
}
object ServerReflectionRequest extends scalapb.GeneratedMessageCompanion[grpc.reflection.v1alpha.reflection.ServerReflectionRequest] {
implicit def messageCompanion: scalapb.GeneratedMessageCompanion[grpc.reflection.v1alpha.reflection.ServerReflectionRequest] = this
def parseFrom(`_input__`: _root_.com.google.protobuf.CodedInputStream): grpc.reflection.v1alpha.reflection.ServerReflectionRequest = {
var __host: _root_.scala.Predef.String = ""
var __messageRequest: grpc.reflection.v1alpha.reflection.ServerReflectionRequest.MessageRequest = grpc.reflection.v1alpha.reflection.ServerReflectionRequest.MessageRequest.Empty
var `_unknownFields__`: _root_.scalapb.UnknownFieldSet.Builder = null
var _done__ = false
while (!_done__) {
val _tag__ = _input__.readTag()
_tag__ match {
case 0 => _done__ = true
case 10 =>
__host = _input__.readStringRequireUtf8()
case 26 =>
__messageRequest = grpc.reflection.v1alpha.reflection.ServerReflectionRequest.MessageRequest.FileByFilename(_input__.readStringRequireUtf8())
case 34 =>
__messageRequest = grpc.reflection.v1alpha.reflection.ServerReflectionRequest.MessageRequest.FileContainingSymbol(_input__.readStringRequireUtf8())
case 42 =>
__messageRequest = grpc.reflection.v1alpha.reflection.ServerReflectionRequest.MessageRequest.FileContainingExtension(__messageRequest.fileContainingExtension.fold(_root_.scalapb.LiteParser.readMessage[grpc.reflection.v1alpha.reflection.ExtensionRequest](_input__))(_root_.scalapb.LiteParser.readMessage(_input__, _)))
case 50 =>
__messageRequest = grpc.reflection.v1alpha.reflection.ServerReflectionRequest.MessageRequest.AllExtensionNumbersOfType(_input__.readStringRequireUtf8())
case 58 =>
__messageRequest = grpc.reflection.v1alpha.reflection.ServerReflectionRequest.MessageRequest.ListServices(_input__.readStringRequireUtf8())
case tag =>
if (_unknownFields__ == null) {
_unknownFields__ = new _root_.scalapb.UnknownFieldSet.Builder()
}
_unknownFields__.parseField(tag, _input__)
}
}
grpc.reflection.v1alpha.reflection.ServerReflectionRequest(
host = __host,
messageRequest = __messageRequest,
unknownFields = if (_unknownFields__ == null) _root_.scalapb.UnknownFieldSet.empty else _unknownFields__.result()
)
}
implicit def messageReads: _root_.scalapb.descriptors.Reads[grpc.reflection.v1alpha.reflection.ServerReflectionRequest] = _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.")
grpc.reflection.v1alpha.reflection.ServerReflectionRequest(
host = __fieldsMap.get(scalaDescriptor.findFieldByNumber(1).get).map(_.as[_root_.scala.Predef.String]).getOrElse(""),
messageRequest = __fieldsMap.get(scalaDescriptor.findFieldByNumber(3).get).flatMap(_.as[_root_.scala.Option[_root_.scala.Predef.String]]).map(grpc.reflection.v1alpha.reflection.ServerReflectionRequest.MessageRequest.FileByFilename(_))
.orElse[grpc.reflection.v1alpha.reflection.ServerReflectionRequest.MessageRequest](__fieldsMap.get(scalaDescriptor.findFieldByNumber(4).get).flatMap(_.as[_root_.scala.Option[_root_.scala.Predef.String]]).map(grpc.reflection.v1alpha.reflection.ServerReflectionRequest.MessageRequest.FileContainingSymbol(_)))
.orElse[grpc.reflection.v1alpha.reflection.ServerReflectionRequest.MessageRequest](__fieldsMap.get(scalaDescriptor.findFieldByNumber(5).get).flatMap(_.as[_root_.scala.Option[grpc.reflection.v1alpha.reflection.ExtensionRequest]]).map(grpc.reflection.v1alpha.reflection.ServerReflectionRequest.MessageRequest.FileContainingExtension(_)))
.orElse[grpc.reflection.v1alpha.reflection.ServerReflectionRequest.MessageRequest](__fieldsMap.get(scalaDescriptor.findFieldByNumber(6).get).flatMap(_.as[_root_.scala.Option[_root_.scala.Predef.String]]).map(grpc.reflection.v1alpha.reflection.ServerReflectionRequest.MessageRequest.AllExtensionNumbersOfType(_)))
.orElse[grpc.reflection.v1alpha.reflection.ServerReflectionRequest.MessageRequest](__fieldsMap.get(scalaDescriptor.findFieldByNumber(7).get).flatMap(_.as[_root_.scala.Option[_root_.scala.Predef.String]]).map(grpc.reflection.v1alpha.reflection.ServerReflectionRequest.MessageRequest.ListServices(_)))
.getOrElse(grpc.reflection.v1alpha.reflection.ServerReflectionRequest.MessageRequest.Empty)
)
case _ => throw new RuntimeException("Expected PMessage")
}
def javaDescriptor: _root_.com.google.protobuf.Descriptors.Descriptor = ReflectionProto.javaDescriptor.getMessageTypes().get(0)
def scalaDescriptor: _root_.scalapb.descriptors.Descriptor = ReflectionProto.scalaDescriptor.messages(0)
def messageCompanionForFieldNumber(__number: _root_.scala.Int): _root_.scalapb.GeneratedMessageCompanion[_] = {
var __out: _root_.scalapb.GeneratedMessageCompanion[_] = null
(__number: @_root_.scala.unchecked) match {
case 5 => __out = grpc.reflection.v1alpha.reflection.ExtensionRequest
}
__out
}
lazy val nestedMessagesCompanions: Seq[_root_.scalapb.GeneratedMessageCompanion[_ <: _root_.scalapb.GeneratedMessage]] = Seq.empty
def enumCompanionForFieldNumber(__fieldNumber: _root_.scala.Int): _root_.scalapb.GeneratedEnumCompanion[_] = throw new MatchError(__fieldNumber)
lazy val defaultInstance = grpc.reflection.v1alpha.reflection.ServerReflectionRequest(
host = "",
messageRequest = grpc.reflection.v1alpha.reflection.ServerReflectionRequest.MessageRequest.Empty
)
sealed trait MessageRequest extends _root_.scalapb.GeneratedOneof {
def isEmpty: _root_.scala.Boolean = false
def isDefined: _root_.scala.Boolean = true
def isFileByFilename: _root_.scala.Boolean = false
def isFileContainingSymbol: _root_.scala.Boolean = false
def isFileContainingExtension: _root_.scala.Boolean = false
def isAllExtensionNumbersOfType: _root_.scala.Boolean = false
def isListServices: _root_.scala.Boolean = false
def fileByFilename: _root_.scala.Option[_root_.scala.Predef.String] = _root_.scala.None
def fileContainingSymbol: _root_.scala.Option[_root_.scala.Predef.String] = _root_.scala.None
def fileContainingExtension: _root_.scala.Option[grpc.reflection.v1alpha.reflection.ExtensionRequest] = _root_.scala.None
def allExtensionNumbersOfType: _root_.scala.Option[_root_.scala.Predef.String] = _root_.scala.None
def listServices: _root_.scala.Option[_root_.scala.Predef.String] = _root_.scala.None
}
object MessageRequest {
@SerialVersionUID(0L)
case object Empty extends grpc.reflection.v1alpha.reflection.ServerReflectionRequest.MessageRequest {
type ValueType = _root_.scala.Nothing
override def isEmpty: _root_.scala.Boolean = true
override def isDefined: _root_.scala.Boolean = false
override def number: _root_.scala.Int = 0
override def value: _root_.scala.Nothing = throw new java.util.NoSuchElementException("Empty.value")
}
@SerialVersionUID(0L)
final case class FileByFilename(value: _root_.scala.Predef.String) extends grpc.reflection.v1alpha.reflection.ServerReflectionRequest.MessageRequest {
type ValueType = _root_.scala.Predef.String
override def isFileByFilename: _root_.scala.Boolean = true
override def fileByFilename: _root_.scala.Option[_root_.scala.Predef.String] = Some(value)
override def number: _root_.scala.Int = 3
}
@SerialVersionUID(0L)
final case class FileContainingSymbol(value: _root_.scala.Predef.String) extends grpc.reflection.v1alpha.reflection.ServerReflectionRequest.MessageRequest {
type ValueType = _root_.scala.Predef.String
override def isFileContainingSymbol: _root_.scala.Boolean = true
override def fileContainingSymbol: _root_.scala.Option[_root_.scala.Predef.String] = Some(value)
override def number: _root_.scala.Int = 4
}
@SerialVersionUID(0L)
final case class FileContainingExtension(value: grpc.reflection.v1alpha.reflection.ExtensionRequest) extends grpc.reflection.v1alpha.reflection.ServerReflectionRequest.MessageRequest {
type ValueType = grpc.reflection.v1alpha.reflection.ExtensionRequest
override def isFileContainingExtension: _root_.scala.Boolean = true
override def fileContainingExtension: _root_.scala.Option[grpc.reflection.v1alpha.reflection.ExtensionRequest] = Some(value)
override def number: _root_.scala.Int = 5
}
@SerialVersionUID(0L)
final case class AllExtensionNumbersOfType(value: _root_.scala.Predef.String) extends grpc.reflection.v1alpha.reflection.ServerReflectionRequest.MessageRequest {
type ValueType = _root_.scala.Predef.String
override def isAllExtensionNumbersOfType: _root_.scala.Boolean = true
override def allExtensionNumbersOfType: _root_.scala.Option[_root_.scala.Predef.String] = Some(value)
override def number: _root_.scala.Int = 6
}
@SerialVersionUID(0L)
final case class ListServices(value: _root_.scala.Predef.String) extends grpc.reflection.v1alpha.reflection.ServerReflectionRequest.MessageRequest {
type ValueType = _root_.scala.Predef.String
override def isListServices: _root_.scala.Boolean = true
override def listServices: _root_.scala.Option[_root_.scala.Predef.String] = Some(value)
override def number: _root_.scala.Int = 7
}
}
implicit class ServerReflectionRequestLens[UpperPB](_l: _root_.scalapb.lenses.Lens[UpperPB, grpc.reflection.v1alpha.reflection.ServerReflectionRequest]) extends _root_.scalapb.lenses.ObjectLens[UpperPB, grpc.reflection.v1alpha.reflection.ServerReflectionRequest](_l) {
def host: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Predef.String] = field(_.host)((c_, f_) => c_.copy(host = f_))
def fileByFilename: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Predef.String] = field(_.getFileByFilename)((c_, f_) => c_.copy(messageRequest = grpc.reflection.v1alpha.reflection.ServerReflectionRequest.MessageRequest.FileByFilename(f_)))
def fileContainingSymbol: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Predef.String] = field(_.getFileContainingSymbol)((c_, f_) => c_.copy(messageRequest = grpc.reflection.v1alpha.reflection.ServerReflectionRequest.MessageRequest.FileContainingSymbol(f_)))
def fileContainingExtension: _root_.scalapb.lenses.Lens[UpperPB, grpc.reflection.v1alpha.reflection.ExtensionRequest] = field(_.getFileContainingExtension)((c_, f_) => c_.copy(messageRequest = grpc.reflection.v1alpha.reflection.ServerReflectionRequest.MessageRequest.FileContainingExtension(f_)))
def allExtensionNumbersOfType: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Predef.String] = field(_.getAllExtensionNumbersOfType)((c_, f_) => c_.copy(messageRequest = grpc.reflection.v1alpha.reflection.ServerReflectionRequest.MessageRequest.AllExtensionNumbersOfType(f_)))
def listServices: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Predef.String] = field(_.getListServices)((c_, f_) => c_.copy(messageRequest = grpc.reflection.v1alpha.reflection.ServerReflectionRequest.MessageRequest.ListServices(f_)))
def messageRequest: _root_.scalapb.lenses.Lens[UpperPB, grpc.reflection.v1alpha.reflection.ServerReflectionRequest.MessageRequest] = field(_.messageRequest)((c_, f_) => c_.copy(messageRequest = f_))
}
final val HOST_FIELD_NUMBER = 1
final val FILE_BY_FILENAME_FIELD_NUMBER = 3
final val FILE_CONTAINING_SYMBOL_FIELD_NUMBER = 4
final val FILE_CONTAINING_EXTENSION_FIELD_NUMBER = 5
final val ALL_EXTENSION_NUMBERS_OF_TYPE_FIELD_NUMBER = 6
final val LIST_SERVICES_FIELD_NUMBER = 7
def of(
host: _root_.scala.Predef.String,
messageRequest: grpc.reflection.v1alpha.reflection.ServerReflectionRequest.MessageRequest
): _root_.grpc.reflection.v1alpha.reflection.ServerReflectionRequest = _root_.grpc.reflection.v1alpha.reflection.ServerReflectionRequest(
host,
messageRequest
)
// @@protoc_insertion_point(GeneratedMessageCompanion[grpc.reflection.v1alpha.ServerReflectionRequest])
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy