
org.yamcs.protobuf.Reply 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/api/websocket.proto
package org.yamcs.protobuf;
/**
*
* Message to be provided in the data field of a ServerMessage if type is "reply".
*
*
* Protobuf type {@code yamcs.api.Reply}
*/
public final class Reply extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:yamcs.api.Reply)
ReplyOrBuilder {
private static final long serialVersionUID = 0L;
// Use Reply.newBuilder() to construct.
private Reply(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private Reply() {
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new Reply();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private Reply(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
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 8: {
replyTo_ = input.readInt32();
break;
}
case 18: {
org.yamcs.api.ExceptionMessage.Builder subBuilder = null;
if (exception_ != null) {
subBuilder = exception_.toBuilder();
}
exception_ = input.readMessage(org.yamcs.api.ExceptionMessage.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(exception_);
exception_ = subBuilder.buildPartial();
}
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.WebSocketProto.internal_static_yamcs_api_Reply_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.yamcs.protobuf.WebSocketProto.internal_static_yamcs_api_Reply_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.yamcs.protobuf.Reply.class, org.yamcs.protobuf.Reply.Builder.class);
}
public static final int REPLY_TO_FIELD_NUMBER = 1;
private int replyTo_;
/**
*
* The id of the original client message (if provided)
*
*
* int32 reply_to = 1;
* @return The replyTo.
*/
@java.lang.Override
public int getReplyTo() {
return replyTo_;
}
public static final int EXCEPTION_FIELD_NUMBER = 2;
private org.yamcs.api.ExceptionMessage exception_;
/**
*
* If set, the call was not successful.
*
*
* .yamcs.api.ExceptionMessage exception = 2;
* @return Whether the exception field is set.
*/
@java.lang.Override
public boolean hasException() {
return exception_ != null;
}
/**
*
* If set, the call was not successful.
*
*
* .yamcs.api.ExceptionMessage exception = 2;
* @return The exception.
*/
@java.lang.Override
public org.yamcs.api.ExceptionMessage getException() {
return exception_ == null ? org.yamcs.api.ExceptionMessage.getDefaultInstance() : exception_;
}
/**
*
* If set, the call was not successful.
*
*
* .yamcs.api.ExceptionMessage exception = 2;
*/
@java.lang.Override
public org.yamcs.api.ExceptionMessageOrBuilder getExceptionOrBuilder() {
return getException();
}
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 (replyTo_ != 0) {
output.writeInt32(1, replyTo_);
}
if (exception_ != null) {
output.writeMessage(2, getException());
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (replyTo_ != 0) {
size += com.google.protobuf.CodedOutputStream
.computeInt32Size(1, replyTo_);
}
if (exception_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(2, getException());
}
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.Reply)) {
return super.equals(obj);
}
org.yamcs.protobuf.Reply other = (org.yamcs.protobuf.Reply) obj;
if (getReplyTo()
!= other.getReplyTo()) return false;
if (hasException() != other.hasException()) return false;
if (hasException()) {
if (!getException()
.equals(other.getException())) 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) + REPLY_TO_FIELD_NUMBER;
hash = (53 * hash) + getReplyTo();
if (hasException()) {
hash = (37 * hash) + EXCEPTION_FIELD_NUMBER;
hash = (53 * hash) + getException().hashCode();
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static org.yamcs.protobuf.Reply parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.yamcs.protobuf.Reply 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.Reply parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.yamcs.protobuf.Reply 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.Reply parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.yamcs.protobuf.Reply parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.yamcs.protobuf.Reply parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static org.yamcs.protobuf.Reply 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.Reply parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static org.yamcs.protobuf.Reply 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.Reply parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static org.yamcs.protobuf.Reply 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.Reply 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;
}
/**
*
* Message to be provided in the data field of a ServerMessage if type is "reply".
*
*
* Protobuf type {@code yamcs.api.Reply}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:yamcs.api.Reply)
org.yamcs.protobuf.ReplyOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.yamcs.protobuf.WebSocketProto.internal_static_yamcs_api_Reply_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.yamcs.protobuf.WebSocketProto.internal_static_yamcs_api_Reply_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.yamcs.protobuf.Reply.class, org.yamcs.protobuf.Reply.Builder.class);
}
// Construct using org.yamcs.protobuf.Reply.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();
replyTo_ = 0;
if (exceptionBuilder_ == null) {
exception_ = null;
} else {
exception_ = null;
exceptionBuilder_ = null;
}
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return org.yamcs.protobuf.WebSocketProto.internal_static_yamcs_api_Reply_descriptor;
}
@java.lang.Override
public org.yamcs.protobuf.Reply getDefaultInstanceForType() {
return org.yamcs.protobuf.Reply.getDefaultInstance();
}
@java.lang.Override
public org.yamcs.protobuf.Reply build() {
org.yamcs.protobuf.Reply result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public org.yamcs.protobuf.Reply buildPartial() {
org.yamcs.protobuf.Reply result = new org.yamcs.protobuf.Reply(this);
result.replyTo_ = replyTo_;
if (exceptionBuilder_ == null) {
result.exception_ = exception_;
} else {
result.exception_ = exceptionBuilder_.build();
}
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.Reply) {
return mergeFrom((org.yamcs.protobuf.Reply)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(org.yamcs.protobuf.Reply other) {
if (other == org.yamcs.protobuf.Reply.getDefaultInstance()) return this;
if (other.getReplyTo() != 0) {
setReplyTo(other.getReplyTo());
}
if (other.hasException()) {
mergeException(other.getException());
}
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.Reply parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (org.yamcs.protobuf.Reply) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int replyTo_ ;
/**
*
* The id of the original client message (if provided)
*
*
* int32 reply_to = 1;
* @return The replyTo.
*/
@java.lang.Override
public int getReplyTo() {
return replyTo_;
}
/**
*
* The id of the original client message (if provided)
*
*
* int32 reply_to = 1;
* @param value The replyTo to set.
* @return This builder for chaining.
*/
public Builder setReplyTo(int value) {
replyTo_ = value;
onChanged();
return this;
}
/**
*
* The id of the original client message (if provided)
*
*
* int32 reply_to = 1;
* @return This builder for chaining.
*/
public Builder clearReplyTo() {
replyTo_ = 0;
onChanged();
return this;
}
private org.yamcs.api.ExceptionMessage exception_;
private com.google.protobuf.SingleFieldBuilderV3<
org.yamcs.api.ExceptionMessage, org.yamcs.api.ExceptionMessage.Builder, org.yamcs.api.ExceptionMessageOrBuilder> exceptionBuilder_;
/**
*
* If set, the call was not successful.
*
*
* .yamcs.api.ExceptionMessage exception = 2;
* @return Whether the exception field is set.
*/
public boolean hasException() {
return exceptionBuilder_ != null || exception_ != null;
}
/**
*
* If set, the call was not successful.
*
*
* .yamcs.api.ExceptionMessage exception = 2;
* @return The exception.
*/
public org.yamcs.api.ExceptionMessage getException() {
if (exceptionBuilder_ == null) {
return exception_ == null ? org.yamcs.api.ExceptionMessage.getDefaultInstance() : exception_;
} else {
return exceptionBuilder_.getMessage();
}
}
/**
*
* If set, the call was not successful.
*
*
* .yamcs.api.ExceptionMessage exception = 2;
*/
public Builder setException(org.yamcs.api.ExceptionMessage value) {
if (exceptionBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
exception_ = value;
onChanged();
} else {
exceptionBuilder_.setMessage(value);
}
return this;
}
/**
*
* If set, the call was not successful.
*
*
* .yamcs.api.ExceptionMessage exception = 2;
*/
public Builder setException(
org.yamcs.api.ExceptionMessage.Builder builderForValue) {
if (exceptionBuilder_ == null) {
exception_ = builderForValue.build();
onChanged();
} else {
exceptionBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
*
* If set, the call was not successful.
*
*
* .yamcs.api.ExceptionMessage exception = 2;
*/
public Builder mergeException(org.yamcs.api.ExceptionMessage value) {
if (exceptionBuilder_ == null) {
if (exception_ != null) {
exception_ =
org.yamcs.api.ExceptionMessage.newBuilder(exception_).mergeFrom(value).buildPartial();
} else {
exception_ = value;
}
onChanged();
} else {
exceptionBuilder_.mergeFrom(value);
}
return this;
}
/**
*
* If set, the call was not successful.
*
*
* .yamcs.api.ExceptionMessage exception = 2;
*/
public Builder clearException() {
if (exceptionBuilder_ == null) {
exception_ = null;
onChanged();
} else {
exception_ = null;
exceptionBuilder_ = null;
}
return this;
}
/**
*
* If set, the call was not successful.
*
*
* .yamcs.api.ExceptionMessage exception = 2;
*/
public org.yamcs.api.ExceptionMessage.Builder getExceptionBuilder() {
onChanged();
return getExceptionFieldBuilder().getBuilder();
}
/**
*
* If set, the call was not successful.
*
*
* .yamcs.api.ExceptionMessage exception = 2;
*/
public org.yamcs.api.ExceptionMessageOrBuilder getExceptionOrBuilder() {
if (exceptionBuilder_ != null) {
return exceptionBuilder_.getMessageOrBuilder();
} else {
return exception_ == null ?
org.yamcs.api.ExceptionMessage.getDefaultInstance() : exception_;
}
}
/**
*
* If set, the call was not successful.
*
*
* .yamcs.api.ExceptionMessage exception = 2;
*/
private com.google.protobuf.SingleFieldBuilderV3<
org.yamcs.api.ExceptionMessage, org.yamcs.api.ExceptionMessage.Builder, org.yamcs.api.ExceptionMessageOrBuilder>
getExceptionFieldBuilder() {
if (exceptionBuilder_ == null) {
exceptionBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
org.yamcs.api.ExceptionMessage, org.yamcs.api.ExceptionMessage.Builder, org.yamcs.api.ExceptionMessageOrBuilder>(
getException(),
getParentForChildren(),
isClean());
exception_ = null;
}
return exceptionBuilder_;
}
@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.api.Reply)
}
// @@protoc_insertion_point(class_scope:yamcs.api.Reply)
private static final org.yamcs.protobuf.Reply DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new org.yamcs.protobuf.Reply();
}
public static org.yamcs.protobuf.Reply getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public Reply parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new Reply(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.Reply getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy