Please wait. This can take some minutes ...
Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance.
Project price only 1 $
You can buy this project and download/modify it how often you want.
com.github.xds.data.orca.v3.OrcaLoadReport Maven / Gradle / Ivy
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: xds/data/orca/v3/orca_load_report.proto
package com.github.xds.data.orca.v3;
/**
* Protobuf type {@code xds.data.orca.v3.OrcaLoadReport}
*/
public final class OrcaLoadReport extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:xds.data.orca.v3.OrcaLoadReport)
OrcaLoadReportOrBuilder {
private static final long serialVersionUID = 0L;
// Use OrcaLoadReport.newBuilder() to construct.
private OrcaLoadReport(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private OrcaLoadReport() {
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new OrcaLoadReport();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private OrcaLoadReport(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
int mutable_bitField0_ = 0;
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 9: {
cpuUtilization_ = input.readDouble();
break;
}
case 17: {
memUtilization_ = input.readDouble();
break;
}
case 24: {
rps_ = input.readUInt64();
break;
}
case 34: {
if (!((mutable_bitField0_ & 0x00000001) != 0)) {
requestCost_ = com.google.protobuf.MapField.newMapField(
RequestCostDefaultEntryHolder.defaultEntry);
mutable_bitField0_ |= 0x00000001;
}
com.google.protobuf.MapEntry
requestCost__ = input.readMessage(
RequestCostDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry);
requestCost_.getMutableMap().put(
requestCost__.getKey(), requestCost__.getValue());
break;
}
case 42: {
if (!((mutable_bitField0_ & 0x00000002) != 0)) {
utilization_ = com.google.protobuf.MapField.newMapField(
UtilizationDefaultEntryHolder.defaultEntry);
mutable_bitField0_ |= 0x00000002;
}
com.google.protobuf.MapEntry
utilization__ = input.readMessage(
UtilizationDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry);
utilization_.getMutableMap().put(
utilization__.getKey(), utilization__.getValue());
break;
}
default: {
if (!parseUnknownField(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (com.google.protobuf.UninitializedMessageException e) {
throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.github.xds.data.orca.v3.OrcaLoadReportProto.internal_static_xds_data_orca_v3_OrcaLoadReport_descriptor;
}
@SuppressWarnings({"rawtypes"})
@java.lang.Override
protected com.google.protobuf.MapField internalGetMapField(
int number) {
switch (number) {
case 4:
return internalGetRequestCost();
case 5:
return internalGetUtilization();
default:
throw new RuntimeException(
"Invalid map field number: " + number);
}
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.github.xds.data.orca.v3.OrcaLoadReportProto.internal_static_xds_data_orca_v3_OrcaLoadReport_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.github.xds.data.orca.v3.OrcaLoadReport.class, com.github.xds.data.orca.v3.OrcaLoadReport.Builder.class);
}
public static final int CPU_UTILIZATION_FIELD_NUMBER = 1;
private double cpuUtilization_;
/**
*
* CPU utilization expressed as a fraction of available CPU resources. This
* should be derived from the latest sample or measurement.
*
*
* double cpu_utilization = 1 [(.validate.rules) = { ... }
* @return The cpuUtilization.
*/
@java.lang.Override
public double getCpuUtilization() {
return cpuUtilization_;
}
public static final int MEM_UTILIZATION_FIELD_NUMBER = 2;
private double memUtilization_;
/**
*
* Memory utilization expressed as a fraction of available memory
* resources. This should be derived from the latest sample or measurement.
*
*
* double mem_utilization = 2 [(.validate.rules) = { ... }
* @return The memUtilization.
*/
@java.lang.Override
public double getMemUtilization() {
return memUtilization_;
}
public static final int RPS_FIELD_NUMBER = 3;
private long rps_;
/**
*
* Total RPS being served by an endpoint. This should cover all services that an endpoint is
* responsible for.
*
*
* uint64 rps = 3;
* @return The rps.
*/
@java.lang.Override
public long getRps() {
return rps_;
}
public static final int REQUEST_COST_FIELD_NUMBER = 4;
private static final class RequestCostDefaultEntryHolder {
static final com.google.protobuf.MapEntry<
java.lang.String, java.lang.Double> defaultEntry =
com.google.protobuf.MapEntry
.newDefaultInstance(
com.github.xds.data.orca.v3.OrcaLoadReportProto.internal_static_xds_data_orca_v3_OrcaLoadReport_RequestCostEntry_descriptor,
com.google.protobuf.WireFormat.FieldType.STRING,
"",
com.google.protobuf.WireFormat.FieldType.DOUBLE,
0D);
}
private com.google.protobuf.MapField<
java.lang.String, java.lang.Double> requestCost_;
private com.google.protobuf.MapField
internalGetRequestCost() {
if (requestCost_ == null) {
return com.google.protobuf.MapField.emptyMapField(
RequestCostDefaultEntryHolder.defaultEntry);
}
return requestCost_;
}
public int getRequestCostCount() {
return internalGetRequestCost().getMap().size();
}
/**
*
* Application specific requests costs. Each value is an absolute cost (e.g. 3487 bytes of
* storage) associated with the request.
*
*
* map<string, double> request_cost = 4;
*/
@java.lang.Override
public boolean containsRequestCost(
java.lang.String key) {
if (key == null) { throw new NullPointerException("map key"); }
return internalGetRequestCost().getMap().containsKey(key);
}
/**
* Use {@link #getRequestCostMap()} instead.
*/
@java.lang.Override
@java.lang.Deprecated
public java.util.Map getRequestCost() {
return getRequestCostMap();
}
/**
*
* Application specific requests costs. Each value is an absolute cost (e.g. 3487 bytes of
* storage) associated with the request.
*
*
* map<string, double> request_cost = 4;
*/
@java.lang.Override
public java.util.Map getRequestCostMap() {
return internalGetRequestCost().getMap();
}
/**
*
* Application specific requests costs. Each value is an absolute cost (e.g. 3487 bytes of
* storage) associated with the request.
*
*
* map<string, double> request_cost = 4;
*/
@java.lang.Override
public double getRequestCostOrDefault(
java.lang.String key,
double defaultValue) {
if (key == null) { throw new NullPointerException("map key"); }
java.util.Map map =
internalGetRequestCost().getMap();
return map.containsKey(key) ? map.get(key) : defaultValue;
}
/**
*
* Application specific requests costs. Each value is an absolute cost (e.g. 3487 bytes of
* storage) associated with the request.
*
*
* map<string, double> request_cost = 4;
*/
@java.lang.Override
public double getRequestCostOrThrow(
java.lang.String key) {
if (key == null) { throw new NullPointerException("map key"); }
java.util.Map map =
internalGetRequestCost().getMap();
if (!map.containsKey(key)) {
throw new java.lang.IllegalArgumentException();
}
return map.get(key);
}
public static final int UTILIZATION_FIELD_NUMBER = 5;
private static final class UtilizationDefaultEntryHolder {
static final com.google.protobuf.MapEntry<
java.lang.String, java.lang.Double> defaultEntry =
com.google.protobuf.MapEntry
.newDefaultInstance(
com.github.xds.data.orca.v3.OrcaLoadReportProto.internal_static_xds_data_orca_v3_OrcaLoadReport_UtilizationEntry_descriptor,
com.google.protobuf.WireFormat.FieldType.STRING,
"",
com.google.protobuf.WireFormat.FieldType.DOUBLE,
0D);
}
private com.google.protobuf.MapField<
java.lang.String, java.lang.Double> utilization_;
private com.google.protobuf.MapField
internalGetUtilization() {
if (utilization_ == null) {
return com.google.protobuf.MapField.emptyMapField(
UtilizationDefaultEntryHolder.defaultEntry);
}
return utilization_;
}
public int getUtilizationCount() {
return internalGetUtilization().getMap().size();
}
/**
*
* Resource utilization values. Each value is expressed as a fraction of total resources
* available, derived from the latest sample or measurement.
*
*
* map<string, double> utilization = 5 [(.validate.rules) = { ... }
*/
@java.lang.Override
public boolean containsUtilization(
java.lang.String key) {
if (key == null) { throw new NullPointerException("map key"); }
return internalGetUtilization().getMap().containsKey(key);
}
/**
* Use {@link #getUtilizationMap()} instead.
*/
@java.lang.Override
@java.lang.Deprecated
public java.util.Map getUtilization() {
return getUtilizationMap();
}
/**
*
* Resource utilization values. Each value is expressed as a fraction of total resources
* available, derived from the latest sample or measurement.
*
*
* map<string, double> utilization = 5 [(.validate.rules) = { ... }
*/
@java.lang.Override
public java.util.Map getUtilizationMap() {
return internalGetUtilization().getMap();
}
/**
*
* Resource utilization values. Each value is expressed as a fraction of total resources
* available, derived from the latest sample or measurement.
*
*
* map<string, double> utilization = 5 [(.validate.rules) = { ... }
*/
@java.lang.Override
public double getUtilizationOrDefault(
java.lang.String key,
double defaultValue) {
if (key == null) { throw new NullPointerException("map key"); }
java.util.Map map =
internalGetUtilization().getMap();
return map.containsKey(key) ? map.get(key) : defaultValue;
}
/**
*
* Resource utilization values. Each value is expressed as a fraction of total resources
* available, derived from the latest sample or measurement.
*
*
* map<string, double> utilization = 5 [(.validate.rules) = { ... }
*/
@java.lang.Override
public double getUtilizationOrThrow(
java.lang.String key) {
if (key == null) { throw new NullPointerException("map key"); }
java.util.Map map =
internalGetUtilization().getMap();
if (!map.containsKey(key)) {
throw new java.lang.IllegalArgumentException();
}
return map.get(key);
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (java.lang.Double.doubleToRawLongBits(cpuUtilization_) != 0) {
output.writeDouble(1, cpuUtilization_);
}
if (java.lang.Double.doubleToRawLongBits(memUtilization_) != 0) {
output.writeDouble(2, memUtilization_);
}
if (rps_ != 0L) {
output.writeUInt64(3, rps_);
}
com.google.protobuf.GeneratedMessageV3
.serializeStringMapTo(
output,
internalGetRequestCost(),
RequestCostDefaultEntryHolder.defaultEntry,
4);
com.google.protobuf.GeneratedMessageV3
.serializeStringMapTo(
output,
internalGetUtilization(),
UtilizationDefaultEntryHolder.defaultEntry,
5);
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (java.lang.Double.doubleToRawLongBits(cpuUtilization_) != 0) {
size += com.google.protobuf.CodedOutputStream
.computeDoubleSize(1, cpuUtilization_);
}
if (java.lang.Double.doubleToRawLongBits(memUtilization_) != 0) {
size += com.google.protobuf.CodedOutputStream
.computeDoubleSize(2, memUtilization_);
}
if (rps_ != 0L) {
size += com.google.protobuf.CodedOutputStream
.computeUInt64Size(3, rps_);
}
for (java.util.Map.Entry entry
: internalGetRequestCost().getMap().entrySet()) {
com.google.protobuf.MapEntry
requestCost__ = RequestCostDefaultEntryHolder.defaultEntry.newBuilderForType()
.setKey(entry.getKey())
.setValue(entry.getValue())
.build();
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(4, requestCost__);
}
for (java.util.Map.Entry entry
: internalGetUtilization().getMap().entrySet()) {
com.google.protobuf.MapEntry
utilization__ = UtilizationDefaultEntryHolder.defaultEntry.newBuilderForType()
.setKey(entry.getKey())
.setValue(entry.getValue())
.build();
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(5, utilization__);
}
size += unknownFields.getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof com.github.xds.data.orca.v3.OrcaLoadReport)) {
return super.equals(obj);
}
com.github.xds.data.orca.v3.OrcaLoadReport other = (com.github.xds.data.orca.v3.OrcaLoadReport) obj;
if (java.lang.Double.doubleToLongBits(getCpuUtilization())
!= java.lang.Double.doubleToLongBits(
other.getCpuUtilization())) return false;
if (java.lang.Double.doubleToLongBits(getMemUtilization())
!= java.lang.Double.doubleToLongBits(
other.getMemUtilization())) return false;
if (getRps()
!= other.getRps()) return false;
if (!internalGetRequestCost().equals(
other.internalGetRequestCost())) return false;
if (!internalGetUtilization().equals(
other.internalGetUtilization())) return false;
if (!unknownFields.equals(other.unknownFields)) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
hash = (37 * hash) + CPU_UTILIZATION_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
java.lang.Double.doubleToLongBits(getCpuUtilization()));
hash = (37 * hash) + MEM_UTILIZATION_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
java.lang.Double.doubleToLongBits(getMemUtilization()));
hash = (37 * hash) + RPS_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
getRps());
if (!internalGetRequestCost().getMap().isEmpty()) {
hash = (37 * hash) + REQUEST_COST_FIELD_NUMBER;
hash = (53 * hash) + internalGetRequestCost().hashCode();
}
if (!internalGetUtilization().getMap().isEmpty()) {
hash = (37 * hash) + UTILIZATION_FIELD_NUMBER;
hash = (53 * hash) + internalGetUtilization().hashCode();
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.github.xds.data.orca.v3.OrcaLoadReport parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.github.xds.data.orca.v3.OrcaLoadReport parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.github.xds.data.orca.v3.OrcaLoadReport parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.github.xds.data.orca.v3.OrcaLoadReport parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.github.xds.data.orca.v3.OrcaLoadReport parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.github.xds.data.orca.v3.OrcaLoadReport parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.github.xds.data.orca.v3.OrcaLoadReport parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.github.xds.data.orca.v3.OrcaLoadReport parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public static com.github.xds.data.orca.v3.OrcaLoadReport parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static com.github.xds.data.orca.v3.OrcaLoadReport parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
}
public static com.github.xds.data.orca.v3.OrcaLoadReport parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.github.xds.data.orca.v3.OrcaLoadReport parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
@java.lang.Override
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(com.github.xds.data.orca.v3.OrcaLoadReport prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
public Builder toBuilder() {
return this == DEFAULT_INSTANCE
? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
* Protobuf type {@code xds.data.orca.v3.OrcaLoadReport}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:xds.data.orca.v3.OrcaLoadReport)
com.github.xds.data.orca.v3.OrcaLoadReportOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.github.xds.data.orca.v3.OrcaLoadReportProto.internal_static_xds_data_orca_v3_OrcaLoadReport_descriptor;
}
@SuppressWarnings({"rawtypes"})
protected com.google.protobuf.MapField internalGetMapField(
int number) {
switch (number) {
case 4:
return internalGetRequestCost();
case 5:
return internalGetUtilization();
default:
throw new RuntimeException(
"Invalid map field number: " + number);
}
}
@SuppressWarnings({"rawtypes"})
protected com.google.protobuf.MapField internalGetMutableMapField(
int number) {
switch (number) {
case 4:
return internalGetMutableRequestCost();
case 5:
return internalGetMutableUtilization();
default:
throw new RuntimeException(
"Invalid map field number: " + number);
}
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.github.xds.data.orca.v3.OrcaLoadReportProto.internal_static_xds_data_orca_v3_OrcaLoadReport_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.github.xds.data.orca.v3.OrcaLoadReport.class, com.github.xds.data.orca.v3.OrcaLoadReport.Builder.class);
}
// Construct using com.github.xds.data.orca.v3.OrcaLoadReport.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
}
}
@java.lang.Override
public Builder clear() {
super.clear();
cpuUtilization_ = 0D;
memUtilization_ = 0D;
rps_ = 0L;
internalGetMutableRequestCost().clear();
internalGetMutableUtilization().clear();
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return com.github.xds.data.orca.v3.OrcaLoadReportProto.internal_static_xds_data_orca_v3_OrcaLoadReport_descriptor;
}
@java.lang.Override
public com.github.xds.data.orca.v3.OrcaLoadReport getDefaultInstanceForType() {
return com.github.xds.data.orca.v3.OrcaLoadReport.getDefaultInstance();
}
@java.lang.Override
public com.github.xds.data.orca.v3.OrcaLoadReport build() {
com.github.xds.data.orca.v3.OrcaLoadReport result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.github.xds.data.orca.v3.OrcaLoadReport buildPartial() {
com.github.xds.data.orca.v3.OrcaLoadReport result = new com.github.xds.data.orca.v3.OrcaLoadReport(this);
int from_bitField0_ = bitField0_;
result.cpuUtilization_ = cpuUtilization_;
result.memUtilization_ = memUtilization_;
result.rps_ = rps_;
result.requestCost_ = internalGetRequestCost();
result.requestCost_.makeImmutable();
result.utilization_ = internalGetUtilization();
result.utilization_.makeImmutable();
onBuilt();
return result;
}
@java.lang.Override
public Builder clone() {
return super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.setField(field, value);
}
@java.lang.Override
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, java.lang.Object value) {
return super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof com.github.xds.data.orca.v3.OrcaLoadReport) {
return mergeFrom((com.github.xds.data.orca.v3.OrcaLoadReport)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.github.xds.data.orca.v3.OrcaLoadReport other) {
if (other == com.github.xds.data.orca.v3.OrcaLoadReport.getDefaultInstance()) return this;
if (other.getCpuUtilization() != 0D) {
setCpuUtilization(other.getCpuUtilization());
}
if (other.getMemUtilization() != 0D) {
setMemUtilization(other.getMemUtilization());
}
if (other.getRps() != 0L) {
setRps(other.getRps());
}
internalGetMutableRequestCost().mergeFrom(
other.internalGetRequestCost());
internalGetMutableUtilization().mergeFrom(
other.internalGetUtilization());
this.mergeUnknownFields(other.unknownFields);
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
com.github.xds.data.orca.v3.OrcaLoadReport parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (com.github.xds.data.orca.v3.OrcaLoadReport) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int bitField0_;
private double cpuUtilization_ ;
/**
*
* CPU utilization expressed as a fraction of available CPU resources. This
* should be derived from the latest sample or measurement.
*
*
* double cpu_utilization = 1 [(.validate.rules) = { ... }
* @return The cpuUtilization.
*/
@java.lang.Override
public double getCpuUtilization() {
return cpuUtilization_;
}
/**
*
* CPU utilization expressed as a fraction of available CPU resources. This
* should be derived from the latest sample or measurement.
*
*
* double cpu_utilization = 1 [(.validate.rules) = { ... }
* @param value The cpuUtilization to set.
* @return This builder for chaining.
*/
public Builder setCpuUtilization(double value) {
cpuUtilization_ = value;
onChanged();
return this;
}
/**
*
* CPU utilization expressed as a fraction of available CPU resources. This
* should be derived from the latest sample or measurement.
*
*
* double cpu_utilization = 1 [(.validate.rules) = { ... }
* @return This builder for chaining.
*/
public Builder clearCpuUtilization() {
cpuUtilization_ = 0D;
onChanged();
return this;
}
private double memUtilization_ ;
/**
*
* Memory utilization expressed as a fraction of available memory
* resources. This should be derived from the latest sample or measurement.
*
*
* double mem_utilization = 2 [(.validate.rules) = { ... }
* @return The memUtilization.
*/
@java.lang.Override
public double getMemUtilization() {
return memUtilization_;
}
/**
*
* Memory utilization expressed as a fraction of available memory
* resources. This should be derived from the latest sample or measurement.
*
*
* double mem_utilization = 2 [(.validate.rules) = { ... }
* @param value The memUtilization to set.
* @return This builder for chaining.
*/
public Builder setMemUtilization(double value) {
memUtilization_ = value;
onChanged();
return this;
}
/**
*
* Memory utilization expressed as a fraction of available memory
* resources. This should be derived from the latest sample or measurement.
*
*
* double mem_utilization = 2 [(.validate.rules) = { ... }
* @return This builder for chaining.
*/
public Builder clearMemUtilization() {
memUtilization_ = 0D;
onChanged();
return this;
}
private long rps_ ;
/**
*
* Total RPS being served by an endpoint. This should cover all services that an endpoint is
* responsible for.
*
*
* uint64 rps = 3;
* @return The rps.
*/
@java.lang.Override
public long getRps() {
return rps_;
}
/**
*
* Total RPS being served by an endpoint. This should cover all services that an endpoint is
* responsible for.
*
*
* uint64 rps = 3;
* @param value The rps to set.
* @return This builder for chaining.
*/
public Builder setRps(long value) {
rps_ = value;
onChanged();
return this;
}
/**
*
* Total RPS being served by an endpoint. This should cover all services that an endpoint is
* responsible for.
*
*
* uint64 rps = 3;
* @return This builder for chaining.
*/
public Builder clearRps() {
rps_ = 0L;
onChanged();
return this;
}
private com.google.protobuf.MapField<
java.lang.String, java.lang.Double> requestCost_;
private com.google.protobuf.MapField
internalGetRequestCost() {
if (requestCost_ == null) {
return com.google.protobuf.MapField.emptyMapField(
RequestCostDefaultEntryHolder.defaultEntry);
}
return requestCost_;
}
private com.google.protobuf.MapField
internalGetMutableRequestCost() {
onChanged();;
if (requestCost_ == null) {
requestCost_ = com.google.protobuf.MapField.newMapField(
RequestCostDefaultEntryHolder.defaultEntry);
}
if (!requestCost_.isMutable()) {
requestCost_ = requestCost_.copy();
}
return requestCost_;
}
public int getRequestCostCount() {
return internalGetRequestCost().getMap().size();
}
/**
*
* Application specific requests costs. Each value is an absolute cost (e.g. 3487 bytes of
* storage) associated with the request.
*
*
* map<string, double> request_cost = 4;
*/
@java.lang.Override
public boolean containsRequestCost(
java.lang.String key) {
if (key == null) { throw new NullPointerException("map key"); }
return internalGetRequestCost().getMap().containsKey(key);
}
/**
* Use {@link #getRequestCostMap()} instead.
*/
@java.lang.Override
@java.lang.Deprecated
public java.util.Map getRequestCost() {
return getRequestCostMap();
}
/**
*
* Application specific requests costs. Each value is an absolute cost (e.g. 3487 bytes of
* storage) associated with the request.
*
*
* map<string, double> request_cost = 4;
*/
@java.lang.Override
public java.util.Map getRequestCostMap() {
return internalGetRequestCost().getMap();
}
/**
*
* Application specific requests costs. Each value is an absolute cost (e.g. 3487 bytes of
* storage) associated with the request.
*
*
* map<string, double> request_cost = 4;
*/
@java.lang.Override
public double getRequestCostOrDefault(
java.lang.String key,
double defaultValue) {
if (key == null) { throw new NullPointerException("map key"); }
java.util.Map map =
internalGetRequestCost().getMap();
return map.containsKey(key) ? map.get(key) : defaultValue;
}
/**
*
* Application specific requests costs. Each value is an absolute cost (e.g. 3487 bytes of
* storage) associated with the request.
*
*
* map<string, double> request_cost = 4;
*/
@java.lang.Override
public double getRequestCostOrThrow(
java.lang.String key) {
if (key == null) { throw new NullPointerException("map key"); }
java.util.Map map =
internalGetRequestCost().getMap();
if (!map.containsKey(key)) {
throw new java.lang.IllegalArgumentException();
}
return map.get(key);
}
public Builder clearRequestCost() {
internalGetMutableRequestCost().getMutableMap()
.clear();
return this;
}
/**
*
* Application specific requests costs. Each value is an absolute cost (e.g. 3487 bytes of
* storage) associated with the request.
*
*
* map<string, double> request_cost = 4;
*/
public Builder removeRequestCost(
java.lang.String key) {
if (key == null) { throw new NullPointerException("map key"); }
internalGetMutableRequestCost().getMutableMap()
.remove(key);
return this;
}
/**
* Use alternate mutation accessors instead.
*/
@java.lang.Deprecated
public java.util.Map
getMutableRequestCost() {
return internalGetMutableRequestCost().getMutableMap();
}
/**
*
* Application specific requests costs. Each value is an absolute cost (e.g. 3487 bytes of
* storage) associated with the request.
*
*
* map<string, double> request_cost = 4;
*/
public Builder putRequestCost(
java.lang.String key,
double value) {
if (key == null) { throw new NullPointerException("map key"); }
internalGetMutableRequestCost().getMutableMap()
.put(key, value);
return this;
}
/**
*
* Application specific requests costs. Each value is an absolute cost (e.g. 3487 bytes of
* storage) associated with the request.
*
*
* map<string, double> request_cost = 4;
*/
public Builder putAllRequestCost(
java.util.Map values) {
internalGetMutableRequestCost().getMutableMap()
.putAll(values);
return this;
}
private com.google.protobuf.MapField<
java.lang.String, java.lang.Double> utilization_;
private com.google.protobuf.MapField
internalGetUtilization() {
if (utilization_ == null) {
return com.google.protobuf.MapField.emptyMapField(
UtilizationDefaultEntryHolder.defaultEntry);
}
return utilization_;
}
private com.google.protobuf.MapField
internalGetMutableUtilization() {
onChanged();;
if (utilization_ == null) {
utilization_ = com.google.protobuf.MapField.newMapField(
UtilizationDefaultEntryHolder.defaultEntry);
}
if (!utilization_.isMutable()) {
utilization_ = utilization_.copy();
}
return utilization_;
}
public int getUtilizationCount() {
return internalGetUtilization().getMap().size();
}
/**
*
* Resource utilization values. Each value is expressed as a fraction of total resources
* available, derived from the latest sample or measurement.
*
*
* map<string, double> utilization = 5 [(.validate.rules) = { ... }
*/
@java.lang.Override
public boolean containsUtilization(
java.lang.String key) {
if (key == null) { throw new NullPointerException("map key"); }
return internalGetUtilization().getMap().containsKey(key);
}
/**
* Use {@link #getUtilizationMap()} instead.
*/
@java.lang.Override
@java.lang.Deprecated
public java.util.Map getUtilization() {
return getUtilizationMap();
}
/**
*
* Resource utilization values. Each value is expressed as a fraction of total resources
* available, derived from the latest sample or measurement.
*
*
* map<string, double> utilization = 5 [(.validate.rules) = { ... }
*/
@java.lang.Override
public java.util.Map getUtilizationMap() {
return internalGetUtilization().getMap();
}
/**
*
* Resource utilization values. Each value is expressed as a fraction of total resources
* available, derived from the latest sample or measurement.
*
*
* map<string, double> utilization = 5 [(.validate.rules) = { ... }
*/
@java.lang.Override
public double getUtilizationOrDefault(
java.lang.String key,
double defaultValue) {
if (key == null) { throw new NullPointerException("map key"); }
java.util.Map map =
internalGetUtilization().getMap();
return map.containsKey(key) ? map.get(key) : defaultValue;
}
/**
*
* Resource utilization values. Each value is expressed as a fraction of total resources
* available, derived from the latest sample or measurement.
*
*
* map<string, double> utilization = 5 [(.validate.rules) = { ... }
*/
@java.lang.Override
public double getUtilizationOrThrow(
java.lang.String key) {
if (key == null) { throw new NullPointerException("map key"); }
java.util.Map map =
internalGetUtilization().getMap();
if (!map.containsKey(key)) {
throw new java.lang.IllegalArgumentException();
}
return map.get(key);
}
public Builder clearUtilization() {
internalGetMutableUtilization().getMutableMap()
.clear();
return this;
}
/**
*
* Resource utilization values. Each value is expressed as a fraction of total resources
* available, derived from the latest sample or measurement.
*
*
* map<string, double> utilization = 5 [(.validate.rules) = { ... }
*/
public Builder removeUtilization(
java.lang.String key) {
if (key == null) { throw new NullPointerException("map key"); }
internalGetMutableUtilization().getMutableMap()
.remove(key);
return this;
}
/**
* Use alternate mutation accessors instead.
*/
@java.lang.Deprecated
public java.util.Map
getMutableUtilization() {
return internalGetMutableUtilization().getMutableMap();
}
/**
*
* Resource utilization values. Each value is expressed as a fraction of total resources
* available, derived from the latest sample or measurement.
*
*
* map<string, double> utilization = 5 [(.validate.rules) = { ... }
*/
public Builder putUtilization(
java.lang.String key,
double value) {
if (key == null) { throw new NullPointerException("map key"); }
internalGetMutableUtilization().getMutableMap()
.put(key, value);
return this;
}
/**
*
* Resource utilization values. Each value is expressed as a fraction of total resources
* available, derived from the latest sample or measurement.
*
*
* map<string, double> utilization = 5 [(.validate.rules) = { ... }
*/
public Builder putAllUtilization(
java.util.Map values) {
internalGetMutableUtilization().getMutableMap()
.putAll(values);
return this;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:xds.data.orca.v3.OrcaLoadReport)
}
// @@protoc_insertion_point(class_scope:xds.data.orca.v3.OrcaLoadReport)
private static final com.github.xds.data.orca.v3.OrcaLoadReport DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.github.xds.data.orca.v3.OrcaLoadReport();
}
public static com.github.xds.data.orca.v3.OrcaLoadReport getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public OrcaLoadReport parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new OrcaLoadReport(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public com.github.xds.data.orca.v3.OrcaLoadReport getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}