org.yamcs.protobuf.ClientInfo Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of yamcs-api Show documentation
Show all versions of yamcs-api Show documentation
Used by external clients to communicate with Yamcs
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: yamcs/protobuf/yamcsManagement/yamcsManagement.proto
package org.yamcs.protobuf;
/**
* Protobuf type {@code yamcs.protobuf.yamcsManagement.ClientInfo}
*/
public final class ClientInfo extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:yamcs.protobuf.yamcsManagement.ClientInfo)
ClientInfoOrBuilder {
private static final long serialVersionUID = 0L;
// Use ClientInfo.newBuilder() to construct.
private ClientInfo(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private ClientInfo() {
username_ = "";
applicationName_ = "";
address_ = "";
instance_ = "";
processorName_ = "";
state_ = 0;
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private ClientInfo(
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 10: {
com.google.protobuf.ByteString bs = input.readBytes();
bitField0_ |= 0x00000010;
instance_ = bs;
break;
}
case 16: {
bitField0_ |= 0x00000001;
id_ = input.readInt32();
break;
}
case 26: {
com.google.protobuf.ByteString bs = input.readBytes();
bitField0_ |= 0x00000002;
username_ = bs;
break;
}
case 34: {
com.google.protobuf.ByteString bs = input.readBytes();
bitField0_ |= 0x00000004;
applicationName_ = bs;
break;
}
case 42: {
com.google.protobuf.ByteString bs = input.readBytes();
bitField0_ |= 0x00000020;
processorName_ = bs;
break;
}
case 48: {
int rawValue = input.readEnum();
@SuppressWarnings("deprecation")
org.yamcs.protobuf.ClientInfo.ClientState value = org.yamcs.protobuf.ClientInfo.ClientState.valueOf(rawValue);
if (value == null) {
unknownFields.mergeVarintField(6, rawValue);
} else {
bitField0_ |= 0x00000040;
state_ = rawValue;
}
break;
}
case 82: {
com.google.protobuf.ByteString bs = input.readBytes();
bitField0_ |= 0x00000008;
address_ = bs;
break;
}
case 90: {
com.google.protobuf.Timestamp.Builder subBuilder = null;
if (((bitField0_ & 0x00000080) != 0)) {
subBuilder = loginTime_.toBuilder();
}
loginTime_ = input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(loginTime_);
loginTime_ = subBuilder.buildPartial();
}
bitField0_ |= 0x00000080;
break;
}
default: {
if (!parseUnknownField(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.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 org.yamcs.protobuf.YamcsManagementProto.internal_static_yamcs_protobuf_yamcsManagement_ClientInfo_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.yamcs.protobuf.YamcsManagementProto.internal_static_yamcs_protobuf_yamcsManagement_ClientInfo_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.yamcs.protobuf.ClientInfo.class, org.yamcs.protobuf.ClientInfo.Builder.class);
}
/**
* Protobuf enum {@code yamcs.protobuf.yamcsManagement.ClientInfo.ClientState}
*/
public enum ClientState
implements com.google.protobuf.ProtocolMessageEnum {
/**
* CONNECTED = 0;
*/
CONNECTED(0),
/**
* DISCONNECTED = 1;
*/
DISCONNECTED(1),
;
/**
* CONNECTED = 0;
*/
public static final int CONNECTED_VALUE = 0;
/**
* DISCONNECTED = 1;
*/
public static final int DISCONNECTED_VALUE = 1;
public final int getNumber() {
return value;
}
/**
* @deprecated Use {@link #forNumber(int)} instead.
*/
@java.lang.Deprecated
public static ClientState valueOf(int value) {
return forNumber(value);
}
public static ClientState forNumber(int value) {
switch (value) {
case 0: return CONNECTED;
case 1: return DISCONNECTED;
default: return null;
}
}
public static com.google.protobuf.Internal.EnumLiteMap
internalGetValueMap() {
return internalValueMap;
}
private static final com.google.protobuf.Internal.EnumLiteMap<
ClientState> internalValueMap =
new com.google.protobuf.Internal.EnumLiteMap() {
public ClientState findValueByNumber(int number) {
return ClientState.forNumber(number);
}
};
public final com.google.protobuf.Descriptors.EnumValueDescriptor
getValueDescriptor() {
return getDescriptor().getValues().get(ordinal());
}
public final com.google.protobuf.Descriptors.EnumDescriptor
getDescriptorForType() {
return getDescriptor();
}
public static final com.google.protobuf.Descriptors.EnumDescriptor
getDescriptor() {
return org.yamcs.protobuf.ClientInfo.getDescriptor().getEnumTypes().get(0);
}
private static final ClientState[] VALUES = values();
public static ClientState valueOf(
com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
if (desc.getType() != getDescriptor()) {
throw new java.lang.IllegalArgumentException(
"EnumValueDescriptor is not for this type.");
}
return VALUES[desc.getIndex()];
}
private final int value;
private ClientState(int value) {
this.value = value;
}
// @@protoc_insertion_point(enum_scope:yamcs.protobuf.yamcsManagement.ClientInfo.ClientState)
}
private int bitField0_;
public static final int ID_FIELD_NUMBER = 2;
private int id_;
/**
* optional int32 id = 2;
*/
public boolean hasId() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
* optional int32 id = 2;
*/
public int getId() {
return id_;
}
public static final int USERNAME_FIELD_NUMBER = 3;
private volatile java.lang.Object username_;
/**
* optional string username = 3;
*/
public boolean hasUsername() {
return ((bitField0_ & 0x00000002) != 0);
}
/**
* optional string username = 3;
*/
public java.lang.String getUsername() {
java.lang.Object ref = username_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
if (bs.isValidUtf8()) {
username_ = s;
}
return s;
}
}
/**
* optional string username = 3;
*/
public com.google.protobuf.ByteString
getUsernameBytes() {
java.lang.Object ref = username_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
username_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int APPLICATIONNAME_FIELD_NUMBER = 4;
private volatile java.lang.Object applicationName_;
/**
* optional string applicationName = 4;
*/
public boolean hasApplicationName() {
return ((bitField0_ & 0x00000004) != 0);
}
/**
* optional string applicationName = 4;
*/
public java.lang.String getApplicationName() {
java.lang.Object ref = applicationName_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
if (bs.isValidUtf8()) {
applicationName_ = s;
}
return s;
}
}
/**
* optional string applicationName = 4;
*/
public com.google.protobuf.ByteString
getApplicationNameBytes() {
java.lang.Object ref = applicationName_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
applicationName_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int ADDRESS_FIELD_NUMBER = 10;
private volatile java.lang.Object address_;
/**
* optional string address = 10;
*/
public boolean hasAddress() {
return ((bitField0_ & 0x00000008) != 0);
}
/**
* optional string address = 10;
*/
public java.lang.String getAddress() {
java.lang.Object ref = address_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
if (bs.isValidUtf8()) {
address_ = s;
}
return s;
}
}
/**
* optional string address = 10;
*/
public com.google.protobuf.ByteString
getAddressBytes() {
java.lang.Object ref = address_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
address_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int INSTANCE_FIELD_NUMBER = 1;
private volatile java.lang.Object instance_;
/**
* optional string instance = 1;
*/
public boolean hasInstance() {
return ((bitField0_ & 0x00000010) != 0);
}
/**
* optional string instance = 1;
*/
public java.lang.String getInstance() {
java.lang.Object ref = instance_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
if (bs.isValidUtf8()) {
instance_ = s;
}
return s;
}
}
/**
* optional string instance = 1;
*/
public com.google.protobuf.ByteString
getInstanceBytes() {
java.lang.Object ref = instance_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
instance_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int PROCESSORNAME_FIELD_NUMBER = 5;
private volatile java.lang.Object processorName_;
/**
* optional string processorName = 5;
*/
public boolean hasProcessorName() {
return ((bitField0_ & 0x00000020) != 0);
}
/**
* optional string processorName = 5;
*/
public java.lang.String getProcessorName() {
java.lang.Object ref = processorName_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
if (bs.isValidUtf8()) {
processorName_ = s;
}
return s;
}
}
/**
* optional string processorName = 5;
*/
public com.google.protobuf.ByteString
getProcessorNameBytes() {
java.lang.Object ref = processorName_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
processorName_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int STATE_FIELD_NUMBER = 6;
private int state_;
/**
* optional .yamcs.protobuf.yamcsManagement.ClientInfo.ClientState state = 6;
*/
public boolean hasState() {
return ((bitField0_ & 0x00000040) != 0);
}
/**
* optional .yamcs.protobuf.yamcsManagement.ClientInfo.ClientState state = 6;
*/
public org.yamcs.protobuf.ClientInfo.ClientState getState() {
@SuppressWarnings("deprecation")
org.yamcs.protobuf.ClientInfo.ClientState result = org.yamcs.protobuf.ClientInfo.ClientState.valueOf(state_);
return result == null ? org.yamcs.protobuf.ClientInfo.ClientState.CONNECTED : result;
}
public static final int LOGINTIME_FIELD_NUMBER = 11;
private com.google.protobuf.Timestamp loginTime_;
/**
* optional .google.protobuf.Timestamp loginTime = 11;
*/
public boolean hasLoginTime() {
return ((bitField0_ & 0x00000080) != 0);
}
/**
* optional .google.protobuf.Timestamp loginTime = 11;
*/
public com.google.protobuf.Timestamp getLoginTime() {
return loginTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : loginTime_;
}
/**
* optional .google.protobuf.Timestamp loginTime = 11;
*/
public com.google.protobuf.TimestampOrBuilder getLoginTimeOrBuilder() {
return loginTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : loginTime_;
}
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 (((bitField0_ & 0x00000010) != 0)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, instance_);
}
if (((bitField0_ & 0x00000001) != 0)) {
output.writeInt32(2, id_);
}
if (((bitField0_ & 0x00000002) != 0)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 3, username_);
}
if (((bitField0_ & 0x00000004) != 0)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 4, applicationName_);
}
if (((bitField0_ & 0x00000020) != 0)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 5, processorName_);
}
if (((bitField0_ & 0x00000040) != 0)) {
output.writeEnum(6, state_);
}
if (((bitField0_ & 0x00000008) != 0)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 10, address_);
}
if (((bitField0_ & 0x00000080) != 0)) {
output.writeMessage(11, getLoginTime());
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (((bitField0_ & 0x00000010) != 0)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, instance_);
}
if (((bitField0_ & 0x00000001) != 0)) {
size += com.google.protobuf.CodedOutputStream
.computeInt32Size(2, id_);
}
if (((bitField0_ & 0x00000002) != 0)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, username_);
}
if (((bitField0_ & 0x00000004) != 0)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, applicationName_);
}
if (((bitField0_ & 0x00000020) != 0)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, processorName_);
}
if (((bitField0_ & 0x00000040) != 0)) {
size += com.google.protobuf.CodedOutputStream
.computeEnumSize(6, state_);
}
if (((bitField0_ & 0x00000008) != 0)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(10, address_);
}
if (((bitField0_ & 0x00000080) != 0)) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(11, getLoginTime());
}
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 org.yamcs.protobuf.ClientInfo)) {
return super.equals(obj);
}
org.yamcs.protobuf.ClientInfo other = (org.yamcs.protobuf.ClientInfo) obj;
if (hasId() != other.hasId()) return false;
if (hasId()) {
if (getId()
!= other.getId()) return false;
}
if (hasUsername() != other.hasUsername()) return false;
if (hasUsername()) {
if (!getUsername()
.equals(other.getUsername())) return false;
}
if (hasApplicationName() != other.hasApplicationName()) return false;
if (hasApplicationName()) {
if (!getApplicationName()
.equals(other.getApplicationName())) return false;
}
if (hasAddress() != other.hasAddress()) return false;
if (hasAddress()) {
if (!getAddress()
.equals(other.getAddress())) return false;
}
if (hasInstance() != other.hasInstance()) return false;
if (hasInstance()) {
if (!getInstance()
.equals(other.getInstance())) return false;
}
if (hasProcessorName() != other.hasProcessorName()) return false;
if (hasProcessorName()) {
if (!getProcessorName()
.equals(other.getProcessorName())) return false;
}
if (hasState() != other.hasState()) return false;
if (hasState()) {
if (state_ != other.state_) return false;
}
if (hasLoginTime() != other.hasLoginTime()) return false;
if (hasLoginTime()) {
if (!getLoginTime()
.equals(other.getLoginTime())) 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();
if (hasId()) {
hash = (37 * hash) + ID_FIELD_NUMBER;
hash = (53 * hash) + getId();
}
if (hasUsername()) {
hash = (37 * hash) + USERNAME_FIELD_NUMBER;
hash = (53 * hash) + getUsername().hashCode();
}
if (hasApplicationName()) {
hash = (37 * hash) + APPLICATIONNAME_FIELD_NUMBER;
hash = (53 * hash) + getApplicationName().hashCode();
}
if (hasAddress()) {
hash = (37 * hash) + ADDRESS_FIELD_NUMBER;
hash = (53 * hash) + getAddress().hashCode();
}
if (hasInstance()) {
hash = (37 * hash) + INSTANCE_FIELD_NUMBER;
hash = (53 * hash) + getInstance().hashCode();
}
if (hasProcessorName()) {
hash = (37 * hash) + PROCESSORNAME_FIELD_NUMBER;
hash = (53 * hash) + getProcessorName().hashCode();
}
if (hasState()) {
hash = (37 * hash) + STATE_FIELD_NUMBER;
hash = (53 * hash) + state_;
}
if (hasLoginTime()) {
hash = (37 * hash) + LOGINTIME_FIELD_NUMBER;
hash = (53 * hash) + getLoginTime().hashCode();
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static org.yamcs.protobuf.ClientInfo parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.yamcs.protobuf.ClientInfo parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.yamcs.protobuf.ClientInfo parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.yamcs.protobuf.ClientInfo parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.yamcs.protobuf.ClientInfo parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.yamcs.protobuf.ClientInfo parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.yamcs.protobuf.ClientInfo parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static org.yamcs.protobuf.ClientInfo 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 org.yamcs.protobuf.ClientInfo parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static org.yamcs.protobuf.ClientInfo 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 org.yamcs.protobuf.ClientInfo parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static org.yamcs.protobuf.ClientInfo 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(org.yamcs.protobuf.ClientInfo 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 yamcs.protobuf.yamcsManagement.ClientInfo}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:yamcs.protobuf.yamcsManagement.ClientInfo)
org.yamcs.protobuf.ClientInfoOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.yamcs.protobuf.YamcsManagementProto.internal_static_yamcs_protobuf_yamcsManagement_ClientInfo_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.yamcs.protobuf.YamcsManagementProto.internal_static_yamcs_protobuf_yamcsManagement_ClientInfo_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.yamcs.protobuf.ClientInfo.class, org.yamcs.protobuf.ClientInfo.Builder.class);
}
// Construct using org.yamcs.protobuf.ClientInfo.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
getLoginTimeFieldBuilder();
}
}
@java.lang.Override
public Builder clear() {
super.clear();
id_ = 0;
bitField0_ = (bitField0_ & ~0x00000001);
username_ = "";
bitField0_ = (bitField0_ & ~0x00000002);
applicationName_ = "";
bitField0_ = (bitField0_ & ~0x00000004);
address_ = "";
bitField0_ = (bitField0_ & ~0x00000008);
instance_ = "";
bitField0_ = (bitField0_ & ~0x00000010);
processorName_ = "";
bitField0_ = (bitField0_ & ~0x00000020);
state_ = 0;
bitField0_ = (bitField0_ & ~0x00000040);
if (loginTimeBuilder_ == null) {
loginTime_ = null;
} else {
loginTimeBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000080);
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return org.yamcs.protobuf.YamcsManagementProto.internal_static_yamcs_protobuf_yamcsManagement_ClientInfo_descriptor;
}
@java.lang.Override
public org.yamcs.protobuf.ClientInfo getDefaultInstanceForType() {
return org.yamcs.protobuf.ClientInfo.getDefaultInstance();
}
@java.lang.Override
public org.yamcs.protobuf.ClientInfo build() {
org.yamcs.protobuf.ClientInfo result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public org.yamcs.protobuf.ClientInfo buildPartial() {
org.yamcs.protobuf.ClientInfo result = new org.yamcs.protobuf.ClientInfo(this);
int from_bitField0_ = bitField0_;
int to_bitField0_ = 0;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.id_ = id_;
to_bitField0_ |= 0x00000001;
}
if (((from_bitField0_ & 0x00000002) != 0)) {
to_bitField0_ |= 0x00000002;
}
result.username_ = username_;
if (((from_bitField0_ & 0x00000004) != 0)) {
to_bitField0_ |= 0x00000004;
}
result.applicationName_ = applicationName_;
if (((from_bitField0_ & 0x00000008) != 0)) {
to_bitField0_ |= 0x00000008;
}
result.address_ = address_;
if (((from_bitField0_ & 0x00000010) != 0)) {
to_bitField0_ |= 0x00000010;
}
result.instance_ = instance_;
if (((from_bitField0_ & 0x00000020) != 0)) {
to_bitField0_ |= 0x00000020;
}
result.processorName_ = processorName_;
if (((from_bitField0_ & 0x00000040) != 0)) {
to_bitField0_ |= 0x00000040;
}
result.state_ = state_;
if (((from_bitField0_ & 0x00000080) != 0)) {
if (loginTimeBuilder_ == null) {
result.loginTime_ = loginTime_;
} else {
result.loginTime_ = loginTimeBuilder_.build();
}
to_bitField0_ |= 0x00000080;
}
result.bitField0_ = to_bitField0_;
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 org.yamcs.protobuf.ClientInfo) {
return mergeFrom((org.yamcs.protobuf.ClientInfo)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(org.yamcs.protobuf.ClientInfo other) {
if (other == org.yamcs.protobuf.ClientInfo.getDefaultInstance()) return this;
if (other.hasId()) {
setId(other.getId());
}
if (other.hasUsername()) {
bitField0_ |= 0x00000002;
username_ = other.username_;
onChanged();
}
if (other.hasApplicationName()) {
bitField0_ |= 0x00000004;
applicationName_ = other.applicationName_;
onChanged();
}
if (other.hasAddress()) {
bitField0_ |= 0x00000008;
address_ = other.address_;
onChanged();
}
if (other.hasInstance()) {
bitField0_ |= 0x00000010;
instance_ = other.instance_;
onChanged();
}
if (other.hasProcessorName()) {
bitField0_ |= 0x00000020;
processorName_ = other.processorName_;
onChanged();
}
if (other.hasState()) {
setState(other.getState());
}
if (other.hasLoginTime()) {
mergeLoginTime(other.getLoginTime());
}
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 {
org.yamcs.protobuf.ClientInfo parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (org.yamcs.protobuf.ClientInfo) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int bitField0_;
private int id_ ;
/**
* optional int32 id = 2;
*/
public boolean hasId() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
* optional int32 id = 2;
*/
public int getId() {
return id_;
}
/**
* optional int32 id = 2;
*/
public Builder setId(int value) {
bitField0_ |= 0x00000001;
id_ = value;
onChanged();
return this;
}
/**
* optional int32 id = 2;
*/
public Builder clearId() {
bitField0_ = (bitField0_ & ~0x00000001);
id_ = 0;
onChanged();
return this;
}
private java.lang.Object username_ = "";
/**
* optional string username = 3;
*/
public boolean hasUsername() {
return ((bitField0_ & 0x00000002) != 0);
}
/**
* optional string username = 3;
*/
public java.lang.String getUsername() {
java.lang.Object ref = username_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
if (bs.isValidUtf8()) {
username_ = s;
}
return s;
} else {
return (java.lang.String) ref;
}
}
/**
* optional string username = 3;
*/
public com.google.protobuf.ByteString
getUsernameBytes() {
java.lang.Object ref = username_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
username_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
* optional string username = 3;
*/
public Builder setUsername(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000002;
username_ = value;
onChanged();
return this;
}
/**
* optional string username = 3;
*/
public Builder clearUsername() {
bitField0_ = (bitField0_ & ~0x00000002);
username_ = getDefaultInstance().getUsername();
onChanged();
return this;
}
/**
* optional string username = 3;
*/
public Builder setUsernameBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000002;
username_ = value;
onChanged();
return this;
}
private java.lang.Object applicationName_ = "";
/**
* optional string applicationName = 4;
*/
public boolean hasApplicationName() {
return ((bitField0_ & 0x00000004) != 0);
}
/**
* optional string applicationName = 4;
*/
public java.lang.String getApplicationName() {
java.lang.Object ref = applicationName_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
if (bs.isValidUtf8()) {
applicationName_ = s;
}
return s;
} else {
return (java.lang.String) ref;
}
}
/**
* optional string applicationName = 4;
*/
public com.google.protobuf.ByteString
getApplicationNameBytes() {
java.lang.Object ref = applicationName_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
applicationName_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
* optional string applicationName = 4;
*/
public Builder setApplicationName(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000004;
applicationName_ = value;
onChanged();
return this;
}
/**
* optional string applicationName = 4;
*/
public Builder clearApplicationName() {
bitField0_ = (bitField0_ & ~0x00000004);
applicationName_ = getDefaultInstance().getApplicationName();
onChanged();
return this;
}
/**
* optional string applicationName = 4;
*/
public Builder setApplicationNameBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000004;
applicationName_ = value;
onChanged();
return this;
}
private java.lang.Object address_ = "";
/**
* optional string address = 10;
*/
public boolean hasAddress() {
return ((bitField0_ & 0x00000008) != 0);
}
/**
* optional string address = 10;
*/
public java.lang.String getAddress() {
java.lang.Object ref = address_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
if (bs.isValidUtf8()) {
address_ = s;
}
return s;
} else {
return (java.lang.String) ref;
}
}
/**
* optional string address = 10;
*/
public com.google.protobuf.ByteString
getAddressBytes() {
java.lang.Object ref = address_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
address_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
* optional string address = 10;
*/
public Builder setAddress(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000008;
address_ = value;
onChanged();
return this;
}
/**
* optional string address = 10;
*/
public Builder clearAddress() {
bitField0_ = (bitField0_ & ~0x00000008);
address_ = getDefaultInstance().getAddress();
onChanged();
return this;
}
/**
* optional string address = 10;
*/
public Builder setAddressBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000008;
address_ = value;
onChanged();
return this;
}
private java.lang.Object instance_ = "";
/**
* optional string instance = 1;
*/
public boolean hasInstance() {
return ((bitField0_ & 0x00000010) != 0);
}
/**
* optional string instance = 1;
*/
public java.lang.String getInstance() {
java.lang.Object ref = instance_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
if (bs.isValidUtf8()) {
instance_ = s;
}
return s;
} else {
return (java.lang.String) ref;
}
}
/**
* optional string instance = 1;
*/
public com.google.protobuf.ByteString
getInstanceBytes() {
java.lang.Object ref = instance_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
instance_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
* optional string instance = 1;
*/
public Builder setInstance(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000010;
instance_ = value;
onChanged();
return this;
}
/**
* optional string instance = 1;
*/
public Builder clearInstance() {
bitField0_ = (bitField0_ & ~0x00000010);
instance_ = getDefaultInstance().getInstance();
onChanged();
return this;
}
/**
* optional string instance = 1;
*/
public Builder setInstanceBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000010;
instance_ = value;
onChanged();
return this;
}
private java.lang.Object processorName_ = "";
/**
* optional string processorName = 5;
*/
public boolean hasProcessorName() {
return ((bitField0_ & 0x00000020) != 0);
}
/**
* optional string processorName = 5;
*/
public java.lang.String getProcessorName() {
java.lang.Object ref = processorName_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
if (bs.isValidUtf8()) {
processorName_ = s;
}
return s;
} else {
return (java.lang.String) ref;
}
}
/**
* optional string processorName = 5;
*/
public com.google.protobuf.ByteString
getProcessorNameBytes() {
java.lang.Object ref = processorName_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
processorName_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
* optional string processorName = 5;
*/
public Builder setProcessorName(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000020;
processorName_ = value;
onChanged();
return this;
}
/**
* optional string processorName = 5;
*/
public Builder clearProcessorName() {
bitField0_ = (bitField0_ & ~0x00000020);
processorName_ = getDefaultInstance().getProcessorName();
onChanged();
return this;
}
/**
* optional string processorName = 5;
*/
public Builder setProcessorNameBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000020;
processorName_ = value;
onChanged();
return this;
}
private int state_ = 0;
/**
* optional .yamcs.protobuf.yamcsManagement.ClientInfo.ClientState state = 6;
*/
public boolean hasState() {
return ((bitField0_ & 0x00000040) != 0);
}
/**
* optional .yamcs.protobuf.yamcsManagement.ClientInfo.ClientState state = 6;
*/
public org.yamcs.protobuf.ClientInfo.ClientState getState() {
@SuppressWarnings("deprecation")
org.yamcs.protobuf.ClientInfo.ClientState result = org.yamcs.protobuf.ClientInfo.ClientState.valueOf(state_);
return result == null ? org.yamcs.protobuf.ClientInfo.ClientState.CONNECTED : result;
}
/**
* optional .yamcs.protobuf.yamcsManagement.ClientInfo.ClientState state = 6;
*/
public Builder setState(org.yamcs.protobuf.ClientInfo.ClientState value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000040;
state_ = value.getNumber();
onChanged();
return this;
}
/**
* optional .yamcs.protobuf.yamcsManagement.ClientInfo.ClientState state = 6;
*/
public Builder clearState() {
bitField0_ = (bitField0_ & ~0x00000040);
state_ = 0;
onChanged();
return this;
}
private com.google.protobuf.Timestamp loginTime_;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> loginTimeBuilder_;
/**
* optional .google.protobuf.Timestamp loginTime = 11;
*/
public boolean hasLoginTime() {
return ((bitField0_ & 0x00000080) != 0);
}
/**
* optional .google.protobuf.Timestamp loginTime = 11;
*/
public com.google.protobuf.Timestamp getLoginTime() {
if (loginTimeBuilder_ == null) {
return loginTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : loginTime_;
} else {
return loginTimeBuilder_.getMessage();
}
}
/**
* optional .google.protobuf.Timestamp loginTime = 11;
*/
public Builder setLoginTime(com.google.protobuf.Timestamp value) {
if (loginTimeBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
loginTime_ = value;
onChanged();
} else {
loginTimeBuilder_.setMessage(value);
}
bitField0_ |= 0x00000080;
return this;
}
/**
* optional .google.protobuf.Timestamp loginTime = 11;
*/
public Builder setLoginTime(
com.google.protobuf.Timestamp.Builder builderForValue) {
if (loginTimeBuilder_ == null) {
loginTime_ = builderForValue.build();
onChanged();
} else {
loginTimeBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000080;
return this;
}
/**
* optional .google.protobuf.Timestamp loginTime = 11;
*/
public Builder mergeLoginTime(com.google.protobuf.Timestamp value) {
if (loginTimeBuilder_ == null) {
if (((bitField0_ & 0x00000080) != 0) &&
loginTime_ != null &&
loginTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) {
loginTime_ =
com.google.protobuf.Timestamp.newBuilder(loginTime_).mergeFrom(value).buildPartial();
} else {
loginTime_ = value;
}
onChanged();
} else {
loginTimeBuilder_.mergeFrom(value);
}
bitField0_ |= 0x00000080;
return this;
}
/**
* optional .google.protobuf.Timestamp loginTime = 11;
*/
public Builder clearLoginTime() {
if (loginTimeBuilder_ == null) {
loginTime_ = null;
onChanged();
} else {
loginTimeBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000080);
return this;
}
/**
* optional .google.protobuf.Timestamp loginTime = 11;
*/
public com.google.protobuf.Timestamp.Builder getLoginTimeBuilder() {
bitField0_ |= 0x00000080;
onChanged();
return getLoginTimeFieldBuilder().getBuilder();
}
/**
* optional .google.protobuf.Timestamp loginTime = 11;
*/
public com.google.protobuf.TimestampOrBuilder getLoginTimeOrBuilder() {
if (loginTimeBuilder_ != null) {
return loginTimeBuilder_.getMessageOrBuilder();
} else {
return loginTime_ == null ?
com.google.protobuf.Timestamp.getDefaultInstance() : loginTime_;
}
}
/**
* optional .google.protobuf.Timestamp loginTime = 11;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>
getLoginTimeFieldBuilder() {
if (loginTimeBuilder_ == null) {
loginTimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>(
getLoginTime(),
getParentForChildren(),
isClean());
loginTime_ = null;
}
return loginTimeBuilder_;
}
@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:yamcs.protobuf.yamcsManagement.ClientInfo)
}
// @@protoc_insertion_point(class_scope:yamcs.protobuf.yamcsManagement.ClientInfo)
private static final org.yamcs.protobuf.ClientInfo DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new org.yamcs.protobuf.ClientInfo();
}
public static org.yamcs.protobuf.ClientInfo getDefaultInstance() {
return DEFAULT_INSTANCE;
}
@java.lang.Deprecated public static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public ClientInfo parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new ClientInfo(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 org.yamcs.protobuf.ClientInfo getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}