implements
// @@protoc_insertion_point(builder_implements:grpc.channelz.v1.ServerData)
io.grpc.channelz.v1.ServerDataOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return io.grpc.channelz.v1.ChannelzProto.internal_static_grpc_channelz_v1_ServerData_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return io.grpc.channelz.v1.ChannelzProto.internal_static_grpc_channelz_v1_ServerData_fieldAccessorTable
.ensureFieldAccessorsInitialized(
io.grpc.channelz.v1.ServerData.class, io.grpc.channelz.v1.ServerData.Builder.class);
}
// Construct using io.grpc.channelz.v1.ServerData.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
getTraceFieldBuilder();
getLastCallStartedTimestampFieldBuilder();
}
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
trace_ = null;
if (traceBuilder_ != null) {
traceBuilder_.dispose();
traceBuilder_ = null;
}
callsStarted_ = 0L;
callsSucceeded_ = 0L;
callsFailed_ = 0L;
lastCallStartedTimestamp_ = null;
if (lastCallStartedTimestampBuilder_ != null) {
lastCallStartedTimestampBuilder_.dispose();
lastCallStartedTimestampBuilder_ = null;
}
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return io.grpc.channelz.v1.ChannelzProto.internal_static_grpc_channelz_v1_ServerData_descriptor;
}
@java.lang.Override
public io.grpc.channelz.v1.ServerData getDefaultInstanceForType() {
return io.grpc.channelz.v1.ServerData.getDefaultInstance();
}
@java.lang.Override
public io.grpc.channelz.v1.ServerData build() {
io.grpc.channelz.v1.ServerData result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public io.grpc.channelz.v1.ServerData buildPartial() {
io.grpc.channelz.v1.ServerData result = new io.grpc.channelz.v1.ServerData(this);
if (bitField0_ != 0) { buildPartial0(result); }
onBuilt();
return result;
}
private void buildPartial0(io.grpc.channelz.v1.ServerData result) {
int from_bitField0_ = bitField0_;
int to_bitField0_ = 0;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.trace_ = traceBuilder_ == null
? trace_
: traceBuilder_.build();
to_bitField0_ |= 0x00000001;
}
if (((from_bitField0_ & 0x00000002) != 0)) {
result.callsStarted_ = callsStarted_;
}
if (((from_bitField0_ & 0x00000004) != 0)) {
result.callsSucceeded_ = callsSucceeded_;
}
if (((from_bitField0_ & 0x00000008) != 0)) {
result.callsFailed_ = callsFailed_;
}
if (((from_bitField0_ & 0x00000010) != 0)) {
result.lastCallStartedTimestamp_ = lastCallStartedTimestampBuilder_ == null
? lastCallStartedTimestamp_
: lastCallStartedTimestampBuilder_.build();
to_bitField0_ |= 0x00000002;
}
result.bitField0_ |= to_bitField0_;
}
@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 io.grpc.channelz.v1.ServerData) {
return mergeFrom((io.grpc.channelz.v1.ServerData)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(io.grpc.channelz.v1.ServerData other) {
if (other == io.grpc.channelz.v1.ServerData.getDefaultInstance()) return this;
if (other.hasTrace()) {
mergeTrace(other.getTrace());
}
if (other.getCallsStarted() != 0L) {
setCallsStarted(other.getCallsStarted());
}
if (other.getCallsSucceeded() != 0L) {
setCallsSucceeded(other.getCallsSucceeded());
}
if (other.getCallsFailed() != 0L) {
setCallsFailed(other.getCallsFailed());
}
if (other.hasLastCallStartedTimestamp()) {
mergeLastCallStartedTimestamp(other.getLastCallStartedTimestamp());
}
this.mergeUnknownFields(other.getUnknownFields());
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 {
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10: {
input.readMessage(
getTraceFieldBuilder().getBuilder(),
extensionRegistry);
bitField0_ |= 0x00000001;
break;
} // case 10
case 16: {
callsStarted_ = input.readInt64();
bitField0_ |= 0x00000002;
break;
} // case 16
case 24: {
callsSucceeded_ = input.readInt64();
bitField0_ |= 0x00000004;
break;
} // case 24
case 32: {
callsFailed_ = input.readInt64();
bitField0_ |= 0x00000008;
break;
} // case 32
case 42: {
input.readMessage(
getLastCallStartedTimestampFieldBuilder().getBuilder(),
extensionRegistry);
bitField0_ |= 0x00000010;
break;
} // case 42
default: {
if (!super.parseUnknownField(input, extensionRegistry, tag)) {
done = true; // was an endgroup tag
}
break;
} // default:
} // switch (tag)
} // while (!done)
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.unwrapIOException();
} finally {
onChanged();
} // finally
return this;
}
private int bitField0_;
private io.grpc.channelz.v1.ChannelTrace trace_;
private com.google.protobuf.SingleFieldBuilderV3<
io.grpc.channelz.v1.ChannelTrace, io.grpc.channelz.v1.ChannelTrace.Builder, io.grpc.channelz.v1.ChannelTraceOrBuilder> traceBuilder_;
/**
*
* A trace of recent events on the server. May be absent.
*
*
* .grpc.channelz.v1.ChannelTrace trace = 1;
* @return Whether the trace field is set.
*/
public boolean hasTrace() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
*
* A trace of recent events on the server. May be absent.
*
*
* .grpc.channelz.v1.ChannelTrace trace = 1;
* @return The trace.
*/
public io.grpc.channelz.v1.ChannelTrace getTrace() {
if (traceBuilder_ == null) {
return trace_ == null ? io.grpc.channelz.v1.ChannelTrace.getDefaultInstance() : trace_;
} else {
return traceBuilder_.getMessage();
}
}
/**
*
* A trace of recent events on the server. May be absent.
*
*
* .grpc.channelz.v1.ChannelTrace trace = 1;
*/
public Builder setTrace(io.grpc.channelz.v1.ChannelTrace value) {
if (traceBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
trace_ = value;
} else {
traceBuilder_.setMessage(value);
}
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
* A trace of recent events on the server. May be absent.
*
*
* .grpc.channelz.v1.ChannelTrace trace = 1;
*/
public Builder setTrace(
io.grpc.channelz.v1.ChannelTrace.Builder builderForValue) {
if (traceBuilder_ == null) {
trace_ = builderForValue.build();
} else {
traceBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
* A trace of recent events on the server. May be absent.
*
*
* .grpc.channelz.v1.ChannelTrace trace = 1;
*/
public Builder mergeTrace(io.grpc.channelz.v1.ChannelTrace value) {
if (traceBuilder_ == null) {
if (((bitField0_ & 0x00000001) != 0) &&
trace_ != null &&
trace_ != io.grpc.channelz.v1.ChannelTrace.getDefaultInstance()) {
getTraceBuilder().mergeFrom(value);
} else {
trace_ = value;
}
} else {
traceBuilder_.mergeFrom(value);
}
if (trace_ != null) {
bitField0_ |= 0x00000001;
onChanged();
}
return this;
}
/**
*
* A trace of recent events on the server. May be absent.
*
*
* .grpc.channelz.v1.ChannelTrace trace = 1;
*/
public Builder clearTrace() {
bitField0_ = (bitField0_ & ~0x00000001);
trace_ = null;
if (traceBuilder_ != null) {
traceBuilder_.dispose();
traceBuilder_ = null;
}
onChanged();
return this;
}
/**
*
* A trace of recent events on the server. May be absent.
*
*
* .grpc.channelz.v1.ChannelTrace trace = 1;
*/
public io.grpc.channelz.v1.ChannelTrace.Builder getTraceBuilder() {
bitField0_ |= 0x00000001;
onChanged();
return getTraceFieldBuilder().getBuilder();
}
/**
*
* A trace of recent events on the server. May be absent.
*
*
* .grpc.channelz.v1.ChannelTrace trace = 1;
*/
public io.grpc.channelz.v1.ChannelTraceOrBuilder getTraceOrBuilder() {
if (traceBuilder_ != null) {
return traceBuilder_.getMessageOrBuilder();
} else {
return trace_ == null ?
io.grpc.channelz.v1.ChannelTrace.getDefaultInstance() : trace_;
}
}
/**
*
* A trace of recent events on the server. May be absent.
*
*
* .grpc.channelz.v1.ChannelTrace trace = 1;
*/
private com.google.protobuf.SingleFieldBuilderV3<
io.grpc.channelz.v1.ChannelTrace, io.grpc.channelz.v1.ChannelTrace.Builder, io.grpc.channelz.v1.ChannelTraceOrBuilder>
getTraceFieldBuilder() {
if (traceBuilder_ == null) {
traceBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
io.grpc.channelz.v1.ChannelTrace, io.grpc.channelz.v1.ChannelTrace.Builder, io.grpc.channelz.v1.ChannelTraceOrBuilder>(
getTrace(),
getParentForChildren(),
isClean());
trace_ = null;
}
return traceBuilder_;
}
private long callsStarted_ ;
/**
*
* The number of incoming calls started on the server
*
*
* int64 calls_started = 2;
* @return The callsStarted.
*/
@java.lang.Override
public long getCallsStarted() {
return callsStarted_;
}
/**
*
* The number of incoming calls started on the server
*
*
* int64 calls_started = 2;
* @param value The callsStarted to set.
* @return This builder for chaining.
*/
public Builder setCallsStarted(long value) {
callsStarted_ = value;
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
*
* The number of incoming calls started on the server
*
*
* int64 calls_started = 2;
* @return This builder for chaining.
*/
public Builder clearCallsStarted() {
bitField0_ = (bitField0_ & ~0x00000002);
callsStarted_ = 0L;
onChanged();
return this;
}
private long callsSucceeded_ ;
/**
*
* The number of incoming calls that have completed with an OK status
*
*
* int64 calls_succeeded = 3;
* @return The callsSucceeded.
*/
@java.lang.Override
public long getCallsSucceeded() {
return callsSucceeded_;
}
/**
*
* The number of incoming calls that have completed with an OK status
*
*
* int64 calls_succeeded = 3;
* @param value The callsSucceeded to set.
* @return This builder for chaining.
*/
public Builder setCallsSucceeded(long value) {
callsSucceeded_ = value;
bitField0_ |= 0x00000004;
onChanged();
return this;
}
/**
*
* The number of incoming calls that have completed with an OK status
*
*
* int64 calls_succeeded = 3;
* @return This builder for chaining.
*/
public Builder clearCallsSucceeded() {
bitField0_ = (bitField0_ & ~0x00000004);
callsSucceeded_ = 0L;
onChanged();
return this;
}
private long callsFailed_ ;
/**
*
* The number of incoming calls that have a completed with a non-OK status
*
*
* int64 calls_failed = 4;
* @return The callsFailed.
*/
@java.lang.Override
public long getCallsFailed() {
return callsFailed_;
}
/**
*
* The number of incoming calls that have a completed with a non-OK status
*
*
* int64 calls_failed = 4;
* @param value The callsFailed to set.
* @return This builder for chaining.
*/
public Builder setCallsFailed(long value) {
callsFailed_ = value;
bitField0_ |= 0x00000008;
onChanged();
return this;
}
/**
*
* The number of incoming calls that have a completed with a non-OK status
*
*
* int64 calls_failed = 4;
* @return This builder for chaining.
*/
public Builder clearCallsFailed() {
bitField0_ = (bitField0_ & ~0x00000008);
callsFailed_ = 0L;
onChanged();
return this;
}
private com.google.protobuf.Timestamp lastCallStartedTimestamp_;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> lastCallStartedTimestampBuilder_;
/**
*
* The last time a call was started on the server.
*
*
* .google.protobuf.Timestamp last_call_started_timestamp = 5;
* @return Whether the lastCallStartedTimestamp field is set.
*/
public boolean hasLastCallStartedTimestamp() {
return ((bitField0_ & 0x00000010) != 0);
}
/**
*
* The last time a call was started on the server.
*
*
* .google.protobuf.Timestamp last_call_started_timestamp = 5;
* @return The lastCallStartedTimestamp.
*/
public com.google.protobuf.Timestamp getLastCallStartedTimestamp() {
if (lastCallStartedTimestampBuilder_ == null) {
return lastCallStartedTimestamp_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : lastCallStartedTimestamp_;
} else {
return lastCallStartedTimestampBuilder_.getMessage();
}
}
/**
*
* The last time a call was started on the server.
*
*
* .google.protobuf.Timestamp last_call_started_timestamp = 5;
*/
public Builder setLastCallStartedTimestamp(com.google.protobuf.Timestamp value) {
if (lastCallStartedTimestampBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
lastCallStartedTimestamp_ = value;
} else {
lastCallStartedTimestampBuilder_.setMessage(value);
}
bitField0_ |= 0x00000010;
onChanged();
return this;
}
/**
*
* The last time a call was started on the server.
*
*
* .google.protobuf.Timestamp last_call_started_timestamp = 5;
*/
public Builder setLastCallStartedTimestamp(
com.google.protobuf.Timestamp.Builder builderForValue) {
if (lastCallStartedTimestampBuilder_ == null) {
lastCallStartedTimestamp_ = builderForValue.build();
} else {
lastCallStartedTimestampBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000010;
onChanged();
return this;
}
/**
*
* The last time a call was started on the server.
*
*
* .google.protobuf.Timestamp last_call_started_timestamp = 5;
*/
public Builder mergeLastCallStartedTimestamp(com.google.protobuf.Timestamp value) {
if (lastCallStartedTimestampBuilder_ == null) {
if (((bitField0_ & 0x00000010) != 0) &&
lastCallStartedTimestamp_ != null &&
lastCallStartedTimestamp_ != com.google.protobuf.Timestamp.getDefaultInstance()) {
getLastCallStartedTimestampBuilder().mergeFrom(value);
} else {
lastCallStartedTimestamp_ = value;
}
} else {
lastCallStartedTimestampBuilder_.mergeFrom(value);
}
if (lastCallStartedTimestamp_ != null) {
bitField0_ |= 0x00000010;
onChanged();
}
return this;
}
/**
*
* The last time a call was started on the server.
*
*
* .google.protobuf.Timestamp last_call_started_timestamp = 5;
*/
public Builder clearLastCallStartedTimestamp() {
bitField0_ = (bitField0_ & ~0x00000010);
lastCallStartedTimestamp_ = null;
if (lastCallStartedTimestampBuilder_ != null) {
lastCallStartedTimestampBuilder_.dispose();
lastCallStartedTimestampBuilder_ = null;
}
onChanged();
return this;
}
/**
*
* The last time a call was started on the server.
*
*
* .google.protobuf.Timestamp last_call_started_timestamp = 5;
*/
public com.google.protobuf.Timestamp.Builder getLastCallStartedTimestampBuilder() {
bitField0_ |= 0x00000010;
onChanged();
return getLastCallStartedTimestampFieldBuilder().getBuilder();
}
/**
*
* The last time a call was started on the server.
*
*
* .google.protobuf.Timestamp last_call_started_timestamp = 5;
*/
public com.google.protobuf.TimestampOrBuilder getLastCallStartedTimestampOrBuilder() {
if (lastCallStartedTimestampBuilder_ != null) {
return lastCallStartedTimestampBuilder_.getMessageOrBuilder();
} else {
return lastCallStartedTimestamp_ == null ?
com.google.protobuf.Timestamp.getDefaultInstance() : lastCallStartedTimestamp_;
}
}
/**
*
* The last time a call was started on the server.
*
*
* .google.protobuf.Timestamp last_call_started_timestamp = 5;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>
getLastCallStartedTimestampFieldBuilder() {
if (lastCallStartedTimestampBuilder_ == null) {
lastCallStartedTimestampBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>(
getLastCallStartedTimestamp(),
getParentForChildren(),
isClean());
lastCallStartedTimestamp_ = null;
}
return lastCallStartedTimestampBuilder_;
}
@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:grpc.channelz.v1.ServerData)
}
// @@protoc_insertion_point(class_scope:grpc.channelz.v1.ServerData)
private static final io.grpc.channelz.v1.ServerData DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new io.grpc.channelz.v1.ServerData();
}
public static io.grpc.channelz.v1.ServerData getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public ServerData parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
Builder builder = newBuilder();
try {
builder.mergeFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(builder.buildPartial());
} catch (com.google.protobuf.UninitializedMessageException e) {
throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e)
.setUnfinishedMessage(builder.buildPartial());
}
return builder.buildPartial();
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public io.grpc.channelz.v1.ServerData getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}