io.envoyproxy.envoy.admin.v2alpha.Memory.scala Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of envoy-scala-control-plane_2.13 Show documentation
Show all versions of envoy-scala-control-plane_2.13 Show documentation
ScalaPB generated bindings for Envoy
// Generated by the Scala Plugin for the Protocol Buffer Compiler.
// Do not edit!
//
// Protofile syntax: PROTO3
package io.envoyproxy.envoy.admin.v2alpha
/** Proto representation of the internal memory consumption of an Envoy instance. These represent
* values extracted from an internal TCMalloc instance. For more information, see the section of the
* docs entitled ["Generic Tcmalloc Status"](https://gperftools.github.io/gperftools/tcmalloc.html).
* [#next-free-field: 7]
*
* @param allocated
* The number of bytes allocated by the heap for Envoy. This is an alias for
* `generic.current_allocated_bytes`.
* @param heapSize
* The number of bytes reserved by the heap but not necessarily allocated. This is an alias for
* `generic.heap_size`.
* @param pageheapUnmapped
* The number of bytes in free, unmapped pages in the page heap. These bytes always count towards
* virtual memory usage, and depending on the OS, typically do not count towards physical memory
* usage. This is an alias for `tcmalloc.pageheap_unmapped_bytes`.
* @param pageheapFree
* The number of bytes in free, mapped pages in the page heap. These bytes always count towards
* virtual memory usage, and unless the underlying memory is swapped out by the OS, they also
* count towards physical memory usage. This is an alias for `tcmalloc.pageheap_free_bytes`.
* @param totalThreadCache
* The amount of memory used by the TCMalloc thread caches (for small objects). This is an alias
* for `tcmalloc.current_total_thread_cache_bytes`.
* @param totalPhysicalBytes
* The number of bytes of the physical memory usage by the allocator. This is an alias for
* `generic.total_physical_bytes`.
*/
@SerialVersionUID(0L)
final case class Memory(
allocated: _root_.scala.Long = 0L,
heapSize: _root_.scala.Long = 0L,
pageheapUnmapped: _root_.scala.Long = 0L,
pageheapFree: _root_.scala.Long = 0L,
totalThreadCache: _root_.scala.Long = 0L,
totalPhysicalBytes: _root_.scala.Long = 0L,
unknownFields: _root_.scalapb.UnknownFieldSet = _root_.scalapb.UnknownFieldSet.empty
) extends scalapb.GeneratedMessage with scalapb.lenses.Updatable[Memory] {
@transient
private[this] var __serializedSizeMemoized: _root_.scala.Int = 0
private[this] def __computeSerializedSize(): _root_.scala.Int = {
var __size = 0
{
val __value = allocated
if (__value != 0L) {
__size += _root_.com.google.protobuf.CodedOutputStream.computeUInt64Size(1, __value)
}
};
{
val __value = heapSize
if (__value != 0L) {
__size += _root_.com.google.protobuf.CodedOutputStream.computeUInt64Size(2, __value)
}
};
{
val __value = pageheapUnmapped
if (__value != 0L) {
__size += _root_.com.google.protobuf.CodedOutputStream.computeUInt64Size(3, __value)
}
};
{
val __value = pageheapFree
if (__value != 0L) {
__size += _root_.com.google.protobuf.CodedOutputStream.computeUInt64Size(4, __value)
}
};
{
val __value = totalThreadCache
if (__value != 0L) {
__size += _root_.com.google.protobuf.CodedOutputStream.computeUInt64Size(5, __value)
}
};
{
val __value = totalPhysicalBytes
if (__value != 0L) {
__size += _root_.com.google.protobuf.CodedOutputStream.computeUInt64Size(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 = {
{
val __v = allocated
if (__v != 0L) {
_output__.writeUInt64(1, __v)
}
};
{
val __v = heapSize
if (__v != 0L) {
_output__.writeUInt64(2, __v)
}
};
{
val __v = pageheapUnmapped
if (__v != 0L) {
_output__.writeUInt64(3, __v)
}
};
{
val __v = pageheapFree
if (__v != 0L) {
_output__.writeUInt64(4, __v)
}
};
{
val __v = totalThreadCache
if (__v != 0L) {
_output__.writeUInt64(5, __v)
}
};
{
val __v = totalPhysicalBytes
if (__v != 0L) {
_output__.writeUInt64(6, __v)
}
};
unknownFields.writeTo(_output__)
}
def withAllocated(__v: _root_.scala.Long): Memory = copy(allocated = __v)
def withHeapSize(__v: _root_.scala.Long): Memory = copy(heapSize = __v)
def withPageheapUnmapped(__v: _root_.scala.Long): Memory = copy(pageheapUnmapped = __v)
def withPageheapFree(__v: _root_.scala.Long): Memory = copy(pageheapFree = __v)
def withTotalThreadCache(__v: _root_.scala.Long): Memory = copy(totalThreadCache = __v)
def withTotalPhysicalBytes(__v: _root_.scala.Long): Memory = copy(totalPhysicalBytes = __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 = allocated
if (__t != 0L) __t else null
}
case 2 => {
val __t = heapSize
if (__t != 0L) __t else null
}
case 3 => {
val __t = pageheapUnmapped
if (__t != 0L) __t else null
}
case 4 => {
val __t = pageheapFree
if (__t != 0L) __t else null
}
case 5 => {
val __t = totalThreadCache
if (__t != 0L) __t else null
}
case 6 => {
val __t = totalPhysicalBytes
if (__t != 0L) __t else null
}
}
}
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.PLong(allocated)
case 2 => _root_.scalapb.descriptors.PLong(heapSize)
case 3 => _root_.scalapb.descriptors.PLong(pageheapUnmapped)
case 4 => _root_.scalapb.descriptors.PLong(pageheapFree)
case 5 => _root_.scalapb.descriptors.PLong(totalThreadCache)
case 6 => _root_.scalapb.descriptors.PLong(totalPhysicalBytes)
}
}
def toProtoString: _root_.scala.Predef.String = _root_.scalapb.TextFormat.printToUnicodeString(this)
def companion: io.envoyproxy.envoy.admin.v2alpha.Memory.type = io.envoyproxy.envoy.admin.v2alpha.Memory
// @@protoc_insertion_point(GeneratedMessage[envoy.admin.v2alpha.Memory])
}
object Memory extends scalapb.GeneratedMessageCompanion[io.envoyproxy.envoy.admin.v2alpha.Memory] {
implicit def messageCompanion: scalapb.GeneratedMessageCompanion[io.envoyproxy.envoy.admin.v2alpha.Memory] = this
def parseFrom(`_input__`: _root_.com.google.protobuf.CodedInputStream): io.envoyproxy.envoy.admin.v2alpha.Memory = {
var __allocated: _root_.scala.Long = 0L
var __heapSize: _root_.scala.Long = 0L
var __pageheapUnmapped: _root_.scala.Long = 0L
var __pageheapFree: _root_.scala.Long = 0L
var __totalThreadCache: _root_.scala.Long = 0L
var __totalPhysicalBytes: _root_.scala.Long = 0L
var `_unknownFields__`: _root_.scalapb.UnknownFieldSet.Builder = null
var _done__ = false
while (!_done__) {
val _tag__ = _input__.readTag()
_tag__ match {
case 0 => _done__ = true
case 8 =>
__allocated = _input__.readUInt64()
case 16 =>
__heapSize = _input__.readUInt64()
case 24 =>
__pageheapUnmapped = _input__.readUInt64()
case 32 =>
__pageheapFree = _input__.readUInt64()
case 40 =>
__totalThreadCache = _input__.readUInt64()
case 48 =>
__totalPhysicalBytes = _input__.readUInt64()
case tag =>
if (_unknownFields__ == null) {
_unknownFields__ = new _root_.scalapb.UnknownFieldSet.Builder()
}
_unknownFields__.parseField(tag, _input__)
}
}
io.envoyproxy.envoy.admin.v2alpha.Memory(
allocated = __allocated,
heapSize = __heapSize,
pageheapUnmapped = __pageheapUnmapped,
pageheapFree = __pageheapFree,
totalThreadCache = __totalThreadCache,
totalPhysicalBytes = __totalPhysicalBytes,
unknownFields = if (_unknownFields__ == null) _root_.scalapb.UnknownFieldSet.empty else _unknownFields__.result()
)
}
implicit def messageReads: _root_.scalapb.descriptors.Reads[io.envoyproxy.envoy.admin.v2alpha.Memory] = _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.")
io.envoyproxy.envoy.admin.v2alpha.Memory(
allocated = __fieldsMap.get(scalaDescriptor.findFieldByNumber(1).get).map(_.as[_root_.scala.Long]).getOrElse(0L),
heapSize = __fieldsMap.get(scalaDescriptor.findFieldByNumber(2).get).map(_.as[_root_.scala.Long]).getOrElse(0L),
pageheapUnmapped = __fieldsMap.get(scalaDescriptor.findFieldByNumber(3).get).map(_.as[_root_.scala.Long]).getOrElse(0L),
pageheapFree = __fieldsMap.get(scalaDescriptor.findFieldByNumber(4).get).map(_.as[_root_.scala.Long]).getOrElse(0L),
totalThreadCache = __fieldsMap.get(scalaDescriptor.findFieldByNumber(5).get).map(_.as[_root_.scala.Long]).getOrElse(0L),
totalPhysicalBytes = __fieldsMap.get(scalaDescriptor.findFieldByNumber(6).get).map(_.as[_root_.scala.Long]).getOrElse(0L)
)
case _ => throw new RuntimeException("Expected PMessage")
}
def javaDescriptor: _root_.com.google.protobuf.Descriptors.Descriptor = MemoryProto.javaDescriptor.getMessageTypes().get(0)
def scalaDescriptor: _root_.scalapb.descriptors.Descriptor = MemoryProto.scalaDescriptor.messages(0)
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[_] = throw new MatchError(__fieldNumber)
lazy val defaultInstance = io.envoyproxy.envoy.admin.v2alpha.Memory(
allocated = 0L,
heapSize = 0L,
pageheapUnmapped = 0L,
pageheapFree = 0L,
totalThreadCache = 0L,
totalPhysicalBytes = 0L
)
implicit class MemoryLens[UpperPB](_l: _root_.scalapb.lenses.Lens[UpperPB, io.envoyproxy.envoy.admin.v2alpha.Memory]) extends _root_.scalapb.lenses.ObjectLens[UpperPB, io.envoyproxy.envoy.admin.v2alpha.Memory](_l) {
def allocated: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Long] = field(_.allocated)((c_, f_) => c_.copy(allocated = f_))
def heapSize: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Long] = field(_.heapSize)((c_, f_) => c_.copy(heapSize = f_))
def pageheapUnmapped: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Long] = field(_.pageheapUnmapped)((c_, f_) => c_.copy(pageheapUnmapped = f_))
def pageheapFree: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Long] = field(_.pageheapFree)((c_, f_) => c_.copy(pageheapFree = f_))
def totalThreadCache: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Long] = field(_.totalThreadCache)((c_, f_) => c_.copy(totalThreadCache = f_))
def totalPhysicalBytes: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Long] = field(_.totalPhysicalBytes)((c_, f_) => c_.copy(totalPhysicalBytes = f_))
}
final val ALLOCATED_FIELD_NUMBER = 1
final val HEAP_SIZE_FIELD_NUMBER = 2
final val PAGEHEAP_UNMAPPED_FIELD_NUMBER = 3
final val PAGEHEAP_FREE_FIELD_NUMBER = 4
final val TOTAL_THREAD_CACHE_FIELD_NUMBER = 5
final val TOTAL_PHYSICAL_BYTES_FIELD_NUMBER = 6
def of(
allocated: _root_.scala.Long,
heapSize: _root_.scala.Long,
pageheapUnmapped: _root_.scala.Long,
pageheapFree: _root_.scala.Long,
totalThreadCache: _root_.scala.Long,
totalPhysicalBytes: _root_.scala.Long
): _root_.io.envoyproxy.envoy.admin.v2alpha.Memory = _root_.io.envoyproxy.envoy.admin.v2alpha.Memory(
allocated,
heapSize,
pageheapUnmapped,
pageheapFree,
totalThreadCache,
totalPhysicalBytes
)
// @@protoc_insertion_point(GeneratedMessageCompanion[envoy.admin.v2alpha.Memory])
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy