com.github.keenon.lense.human_server.HumanAPIProto Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of lense Show documentation
Show all versions of lense Show documentation
A research framework for real-time learning from humans
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: src/main/proto/HumanAPI.proto
package com.github.keenon.lense.human_server;
public final class HumanAPIProto {
private HumanAPIProto() {}
public static void registerAllExtensions(
com.google.protobuf.ExtensionRegistry registry) {
}
public interface APIRequestOrBuilder extends
// @@protoc_insertion_point(interface_extends:com.github.keenon.lense.human_server.APIRequest)
com.google.protobuf.MessageOrBuilder {
/**
* required .com.github.keenon.lense.human_server.APIRequest.MessageType type = 1;
*/
boolean hasType();
/**
* required .com.github.keenon.lense.human_server.APIRequest.MessageType type = 1;
*/
com.github.keenon.lense.human_server.HumanAPIProto.APIRequest.MessageType getType();
/**
* required int32 jobID = 2;
*
*
* This is the ID that will be included in all responses, so that they can be routed correctly
*
*/
boolean hasJobID();
/**
* required int32 jobID = 2;
*
*
* This is the ID that will be included in all responses, so that they can be routed correctly
*
*/
int getJobID();
/**
* optional int32 onlyOnceID = 3;
*
*
* For jobs, the same worker can't do two jobs with the same OnlyOnceID, for cases where multiple *independent*
* labels are requested
*
*/
boolean hasOnlyOnceID();
/**
* optional int32 onlyOnceID = 3;
*
*
* For jobs, the same worker can't do two jobs with the same OnlyOnceID, for cases where multiple *independent*
* labels are requested
*
*/
int getOnlyOnceID();
/**
* optional int32 queryID = 4;
*
*
* For queries
*
*/
boolean hasQueryID();
/**
* optional int32 queryID = 4;
*
*
* For queries
*
*/
int getQueryID();
/**
* optional string JSON = 5;
*
*
* This is the bit that will be forwarded directly to the client once they are in the system
*
*/
boolean hasJSON();
/**
* optional string JSON = 5;
*
*
* This is the bit that will be forwarded directly to the client once they are in the system
*
*/
java.lang.String getJSON();
/**
* optional string JSON = 5;
*
*
* This is the bit that will be forwarded directly to the client once they are in the system
*
*/
com.google.protobuf.ByteString
getJSONBytes();
}
/**
* Protobuf type {@code com.github.keenon.lense.human_server.APIRequest}
*/
public static final class APIRequest extends
com.google.protobuf.GeneratedMessage implements
// @@protoc_insertion_point(message_implements:com.github.keenon.lense.human_server.APIRequest)
APIRequestOrBuilder {
// Use APIRequest.newBuilder() to construct.
private APIRequest(com.google.protobuf.GeneratedMessage.Builder> builder) {
super(builder);
this.unknownFields = builder.getUnknownFields();
}
private APIRequest(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); }
private static final APIRequest defaultInstance;
public static APIRequest getDefaultInstance() {
return defaultInstance;
}
public APIRequest getDefaultInstanceForType() {
return defaultInstance;
}
private final com.google.protobuf.UnknownFieldSet unknownFields;
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private APIRequest(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
initFields();
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;
default: {
if (!parseUnknownField(input, unknownFields,
extensionRegistry, tag)) {
done = true;
}
break;
}
case 8: {
int rawValue = input.readEnum();
com.github.keenon.lense.human_server.HumanAPIProto.APIRequest.MessageType value = com.github.keenon.lense.human_server.HumanAPIProto.APIRequest.MessageType.valueOf(rawValue);
if (value == null) {
unknownFields.mergeVarintField(1, rawValue);
} else {
bitField0_ |= 0x00000001;
type_ = value;
}
break;
}
case 16: {
bitField0_ |= 0x00000002;
jobID_ = input.readInt32();
break;
}
case 24: {
bitField0_ |= 0x00000004;
onlyOnceID_ = input.readInt32();
break;
}
case 32: {
bitField0_ |= 0x00000008;
queryID_ = input.readInt32();
break;
}
case 42: {
com.google.protobuf.ByteString bs = input.readBytes();
bitField0_ |= 0x00000010;
jSON_ = bs;
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e.getMessage()).setUnfinishedMessage(this);
} finally {
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.github.keenon.lense.human_server.HumanAPIProto.internal_static_com_github_keenon_lense_human_server_APIRequest_descriptor;
}
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.github.keenon.lense.human_server.HumanAPIProto.internal_static_com_github_keenon_lense_human_server_APIRequest_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.github.keenon.lense.human_server.HumanAPIProto.APIRequest.class, com.github.keenon.lense.human_server.HumanAPIProto.APIRequest.Builder.class);
}
public static com.google.protobuf.Parser PARSER =
new com.google.protobuf.AbstractParser() {
public APIRequest parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new APIRequest(input, extensionRegistry);
}
};
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
/**
* Protobuf enum {@code com.github.keenon.lense.human_server.APIRequest.MessageType}
*/
public enum MessageType
implements com.google.protobuf.ProtocolMessageEnum {
/**
* JobPosting = 1;
*/
JobPosting(0, 1),
/**
* Query = 2;
*/
Query(1, 2),
/**
* JobRelease = 3;
*/
JobRelease(2, 3),
;
/**
* JobPosting = 1;
*/
public static final int JobPosting_VALUE = 1;
/**
* Query = 2;
*/
public static final int Query_VALUE = 2;
/**
* JobRelease = 3;
*/
public static final int JobRelease_VALUE = 3;
public final int getNumber() { return value; }
public static MessageType valueOf(int value) {
switch (value) {
case 1: return JobPosting;
case 2: return Query;
case 3: return JobRelease;
default: return null;
}
}
public static com.google.protobuf.Internal.EnumLiteMap
internalGetValueMap() {
return internalValueMap;
}
private static com.google.protobuf.Internal.EnumLiteMap
internalValueMap =
new com.google.protobuf.Internal.EnumLiteMap() {
public MessageType findValueByNumber(int number) {
return MessageType.valueOf(number);
}
};
public final com.google.protobuf.Descriptors.EnumValueDescriptor
getValueDescriptor() {
return getDescriptor().getValues().get(index);
}
public final com.google.protobuf.Descriptors.EnumDescriptor
getDescriptorForType() {
return getDescriptor();
}
public static final com.google.protobuf.Descriptors.EnumDescriptor
getDescriptor() {
return com.github.keenon.lense.human_server.HumanAPIProto.APIRequest.getDescriptor().getEnumTypes().get(0);
}
private static final MessageType[] VALUES = values();
public static MessageType 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 index;
private final int value;
private MessageType(int index, int value) {
this.index = index;
this.value = value;
}
// @@protoc_insertion_point(enum_scope:com.github.keenon.lense.human_server.APIRequest.MessageType)
}
private int bitField0_;
public static final int TYPE_FIELD_NUMBER = 1;
private com.github.keenon.lense.human_server.HumanAPIProto.APIRequest.MessageType type_;
/**
* required .com.github.keenon.lense.human_server.APIRequest.MessageType type = 1;
*/
public boolean hasType() {
return ((bitField0_ & 0x00000001) == 0x00000001);
}
/**
* required .com.github.keenon.lense.human_server.APIRequest.MessageType type = 1;
*/
public com.github.keenon.lense.human_server.HumanAPIProto.APIRequest.MessageType getType() {
return type_;
}
public static final int JOBID_FIELD_NUMBER = 2;
private int jobID_;
/**
* required int32 jobID = 2;
*
*
* This is the ID that will be included in all responses, so that they can be routed correctly
*
*/
public boolean hasJobID() {
return ((bitField0_ & 0x00000002) == 0x00000002);
}
/**
* required int32 jobID = 2;
*
*
* This is the ID that will be included in all responses, so that they can be routed correctly
*
*/
public int getJobID() {
return jobID_;
}
public static final int ONLYONCEID_FIELD_NUMBER = 3;
private int onlyOnceID_;
/**
* optional int32 onlyOnceID = 3;
*
*
* For jobs, the same worker can't do two jobs with the same OnlyOnceID, for cases where multiple *independent*
* labels are requested
*
*/
public boolean hasOnlyOnceID() {
return ((bitField0_ & 0x00000004) == 0x00000004);
}
/**
* optional int32 onlyOnceID = 3;
*
*
* For jobs, the same worker can't do two jobs with the same OnlyOnceID, for cases where multiple *independent*
* labels are requested
*
*/
public int getOnlyOnceID() {
return onlyOnceID_;
}
public static final int QUERYID_FIELD_NUMBER = 4;
private int queryID_;
/**
* optional int32 queryID = 4;
*
*
* For queries
*
*/
public boolean hasQueryID() {
return ((bitField0_ & 0x00000008) == 0x00000008);
}
/**
* optional int32 queryID = 4;
*
*
* For queries
*
*/
public int getQueryID() {
return queryID_;
}
public static final int JSON_FIELD_NUMBER = 5;
private java.lang.Object jSON_;
/**
* optional string JSON = 5;
*
*
* This is the bit that will be forwarded directly to the client once they are in the system
*
*/
public boolean hasJSON() {
return ((bitField0_ & 0x00000010) == 0x00000010);
}
/**
* optional string JSON = 5;
*
*
* This is the bit that will be forwarded directly to the client once they are in the system
*
*/
public java.lang.String getJSON() {
java.lang.Object ref = jSON_;
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()) {
jSON_ = s;
}
return s;
}
}
/**
* optional string JSON = 5;
*
*
* This is the bit that will be forwarded directly to the client once they are in the system
*
*/
public com.google.protobuf.ByteString
getJSONBytes() {
java.lang.Object ref = jSON_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
jSON_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
private void initFields() {
type_ = com.github.keenon.lense.human_server.HumanAPIProto.APIRequest.MessageType.JobPosting;
jobID_ = 0;
onlyOnceID_ = 0;
queryID_ = 0;
jSON_ = "";
}
private byte memoizedIsInitialized = -1;
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
if (!hasType()) {
memoizedIsInitialized = 0;
return false;
}
if (!hasJobID()) {
memoizedIsInitialized = 0;
return false;
}
memoizedIsInitialized = 1;
return true;
}
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
getSerializedSize();
if (((bitField0_ & 0x00000001) == 0x00000001)) {
output.writeEnum(1, type_.getNumber());
}
if (((bitField0_ & 0x00000002) == 0x00000002)) {
output.writeInt32(2, jobID_);
}
if (((bitField0_ & 0x00000004) == 0x00000004)) {
output.writeInt32(3, onlyOnceID_);
}
if (((bitField0_ & 0x00000008) == 0x00000008)) {
output.writeInt32(4, queryID_);
}
if (((bitField0_ & 0x00000010) == 0x00000010)) {
output.writeBytes(5, getJSONBytes());
}
getUnknownFields().writeTo(output);
}
private int memoizedSerializedSize = -1;
public int getSerializedSize() {
int size = memoizedSerializedSize;
if (size != -1) return size;
size = 0;
if (((bitField0_ & 0x00000001) == 0x00000001)) {
size += com.google.protobuf.CodedOutputStream
.computeEnumSize(1, type_.getNumber());
}
if (((bitField0_ & 0x00000002) == 0x00000002)) {
size += com.google.protobuf.CodedOutputStream
.computeInt32Size(2, jobID_);
}
if (((bitField0_ & 0x00000004) == 0x00000004)) {
size += com.google.protobuf.CodedOutputStream
.computeInt32Size(3, onlyOnceID_);
}
if (((bitField0_ & 0x00000008) == 0x00000008)) {
size += com.google.protobuf.CodedOutputStream
.computeInt32Size(4, queryID_);
}
if (((bitField0_ & 0x00000010) == 0x00000010)) {
size += com.google.protobuf.CodedOutputStream
.computeBytesSize(5, getJSONBytes());
}
size += getUnknownFields().getSerializedSize();
memoizedSerializedSize = size;
return size;
}
private static final long serialVersionUID = 0L;
@java.lang.Override
protected java.lang.Object writeReplace()
throws java.io.ObjectStreamException {
return super.writeReplace();
}
public static com.github.keenon.lense.human_server.HumanAPIProto.APIRequest parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.github.keenon.lense.human_server.HumanAPIProto.APIRequest 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.keenon.lense.human_server.HumanAPIProto.APIRequest parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.github.keenon.lense.human_server.HumanAPIProto.APIRequest parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.github.keenon.lense.human_server.HumanAPIProto.APIRequest parseFrom(java.io.InputStream input)
throws java.io.IOException {
return PARSER.parseFrom(input);
}
public static com.github.keenon.lense.human_server.HumanAPIProto.APIRequest parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return PARSER.parseFrom(input, extensionRegistry);
}
public static com.github.keenon.lense.human_server.HumanAPIProto.APIRequest parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return PARSER.parseDelimitedFrom(input);
}
public static com.github.keenon.lense.human_server.HumanAPIProto.APIRequest parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return PARSER.parseDelimitedFrom(input, extensionRegistry);
}
public static com.github.keenon.lense.human_server.HumanAPIProto.APIRequest parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return PARSER.parseFrom(input);
}
public static com.github.keenon.lense.human_server.HumanAPIProto.APIRequest parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return PARSER.parseFrom(input, extensionRegistry);
}
public static Builder newBuilder() { return Builder.create(); }
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder(com.github.keenon.lense.human_server.HumanAPIProto.APIRequest prototype) {
return newBuilder().mergeFrom(prototype);
}
public Builder toBuilder() { return newBuilder(this); }
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessage.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
* Protobuf type {@code com.github.keenon.lense.human_server.APIRequest}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessage.Builder implements
// @@protoc_insertion_point(builder_implements:com.github.keenon.lense.human_server.APIRequest)
com.github.keenon.lense.human_server.HumanAPIProto.APIRequestOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.github.keenon.lense.human_server.HumanAPIProto.internal_static_com_github_keenon_lense_human_server_APIRequest_descriptor;
}
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.github.keenon.lense.human_server.HumanAPIProto.internal_static_com_github_keenon_lense_human_server_APIRequest_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.github.keenon.lense.human_server.HumanAPIProto.APIRequest.class, com.github.keenon.lense.human_server.HumanAPIProto.APIRequest.Builder.class);
}
// Construct using com.github.keenon.lense.human_server.HumanAPIProto.APIRequest.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessage.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) {
}
}
private static Builder create() {
return new Builder();
}
public Builder clear() {
super.clear();
type_ = com.github.keenon.lense.human_server.HumanAPIProto.APIRequest.MessageType.JobPosting;
bitField0_ = (bitField0_ & ~0x00000001);
jobID_ = 0;
bitField0_ = (bitField0_ & ~0x00000002);
onlyOnceID_ = 0;
bitField0_ = (bitField0_ & ~0x00000004);
queryID_ = 0;
bitField0_ = (bitField0_ & ~0x00000008);
jSON_ = "";
bitField0_ = (bitField0_ & ~0x00000010);
return this;
}
public Builder clone() {
return create().mergeFrom(buildPartial());
}
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return com.github.keenon.lense.human_server.HumanAPIProto.internal_static_com_github_keenon_lense_human_server_APIRequest_descriptor;
}
public com.github.keenon.lense.human_server.HumanAPIProto.APIRequest getDefaultInstanceForType() {
return com.github.keenon.lense.human_server.HumanAPIProto.APIRequest.getDefaultInstance();
}
public com.github.keenon.lense.human_server.HumanAPIProto.APIRequest build() {
com.github.keenon.lense.human_server.HumanAPIProto.APIRequest result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
public com.github.keenon.lense.human_server.HumanAPIProto.APIRequest buildPartial() {
com.github.keenon.lense.human_server.HumanAPIProto.APIRequest result = new com.github.keenon.lense.human_server.HumanAPIProto.APIRequest(this);
int from_bitField0_ = bitField0_;
int to_bitField0_ = 0;
if (((from_bitField0_ & 0x00000001) == 0x00000001)) {
to_bitField0_ |= 0x00000001;
}
result.type_ = type_;
if (((from_bitField0_ & 0x00000002) == 0x00000002)) {
to_bitField0_ |= 0x00000002;
}
result.jobID_ = jobID_;
if (((from_bitField0_ & 0x00000004) == 0x00000004)) {
to_bitField0_ |= 0x00000004;
}
result.onlyOnceID_ = onlyOnceID_;
if (((from_bitField0_ & 0x00000008) == 0x00000008)) {
to_bitField0_ |= 0x00000008;
}
result.queryID_ = queryID_;
if (((from_bitField0_ & 0x00000010) == 0x00000010)) {
to_bitField0_ |= 0x00000010;
}
result.jSON_ = jSON_;
result.bitField0_ = to_bitField0_;
onBuilt();
return result;
}
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof com.github.keenon.lense.human_server.HumanAPIProto.APIRequest) {
return mergeFrom((com.github.keenon.lense.human_server.HumanAPIProto.APIRequest)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.github.keenon.lense.human_server.HumanAPIProto.APIRequest other) {
if (other == com.github.keenon.lense.human_server.HumanAPIProto.APIRequest.getDefaultInstance()) return this;
if (other.hasType()) {
setType(other.getType());
}
if (other.hasJobID()) {
setJobID(other.getJobID());
}
if (other.hasOnlyOnceID()) {
setOnlyOnceID(other.getOnlyOnceID());
}
if (other.hasQueryID()) {
setQueryID(other.getQueryID());
}
if (other.hasJSON()) {
bitField0_ |= 0x00000010;
jSON_ = other.jSON_;
onChanged();
}
this.mergeUnknownFields(other.getUnknownFields());
return this;
}
public final boolean isInitialized() {
if (!hasType()) {
return false;
}
if (!hasJobID()) {
return false;
}
return true;
}
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
com.github.keenon.lense.human_server.HumanAPIProto.APIRequest parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (com.github.keenon.lense.human_server.HumanAPIProto.APIRequest) e.getUnfinishedMessage();
throw e;
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int bitField0_;
private com.github.keenon.lense.human_server.HumanAPIProto.APIRequest.MessageType type_ = com.github.keenon.lense.human_server.HumanAPIProto.APIRequest.MessageType.JobPosting;
/**
* required .com.github.keenon.lense.human_server.APIRequest.MessageType type = 1;
*/
public boolean hasType() {
return ((bitField0_ & 0x00000001) == 0x00000001);
}
/**
* required .com.github.keenon.lense.human_server.APIRequest.MessageType type = 1;
*/
public com.github.keenon.lense.human_server.HumanAPIProto.APIRequest.MessageType getType() {
return type_;
}
/**
* required .com.github.keenon.lense.human_server.APIRequest.MessageType type = 1;
*/
public Builder setType(com.github.keenon.lense.human_server.HumanAPIProto.APIRequest.MessageType value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000001;
type_ = value;
onChanged();
return this;
}
/**
* required .com.github.keenon.lense.human_server.APIRequest.MessageType type = 1;
*/
public Builder clearType() {
bitField0_ = (bitField0_ & ~0x00000001);
type_ = com.github.keenon.lense.human_server.HumanAPIProto.APIRequest.MessageType.JobPosting;
onChanged();
return this;
}
private int jobID_ ;
/**
* required int32 jobID = 2;
*
*
* This is the ID that will be included in all responses, so that they can be routed correctly
*
*/
public boolean hasJobID() {
return ((bitField0_ & 0x00000002) == 0x00000002);
}
/**
* required int32 jobID = 2;
*
*
* This is the ID that will be included in all responses, so that they can be routed correctly
*
*/
public int getJobID() {
return jobID_;
}
/**
* required int32 jobID = 2;
*
*
* This is the ID that will be included in all responses, so that they can be routed correctly
*
*/
public Builder setJobID(int value) {
bitField0_ |= 0x00000002;
jobID_ = value;
onChanged();
return this;
}
/**
* required int32 jobID = 2;
*
*
* This is the ID that will be included in all responses, so that they can be routed correctly
*
*/
public Builder clearJobID() {
bitField0_ = (bitField0_ & ~0x00000002);
jobID_ = 0;
onChanged();
return this;
}
private int onlyOnceID_ ;
/**
* optional int32 onlyOnceID = 3;
*
*
* For jobs, the same worker can't do two jobs with the same OnlyOnceID, for cases where multiple *independent*
* labels are requested
*
*/
public boolean hasOnlyOnceID() {
return ((bitField0_ & 0x00000004) == 0x00000004);
}
/**
* optional int32 onlyOnceID = 3;
*
*
* For jobs, the same worker can't do two jobs with the same OnlyOnceID, for cases where multiple *independent*
* labels are requested
*
*/
public int getOnlyOnceID() {
return onlyOnceID_;
}
/**
* optional int32 onlyOnceID = 3;
*
*
* For jobs, the same worker can't do two jobs with the same OnlyOnceID, for cases where multiple *independent*
* labels are requested
*
*/
public Builder setOnlyOnceID(int value) {
bitField0_ |= 0x00000004;
onlyOnceID_ = value;
onChanged();
return this;
}
/**
* optional int32 onlyOnceID = 3;
*
*
* For jobs, the same worker can't do two jobs with the same OnlyOnceID, for cases where multiple *independent*
* labels are requested
*
*/
public Builder clearOnlyOnceID() {
bitField0_ = (bitField0_ & ~0x00000004);
onlyOnceID_ = 0;
onChanged();
return this;
}
private int queryID_ ;
/**
* optional int32 queryID = 4;
*
*
* For queries
*
*/
public boolean hasQueryID() {
return ((bitField0_ & 0x00000008) == 0x00000008);
}
/**
* optional int32 queryID = 4;
*
*
* For queries
*
*/
public int getQueryID() {
return queryID_;
}
/**
* optional int32 queryID = 4;
*
*
* For queries
*
*/
public Builder setQueryID(int value) {
bitField0_ |= 0x00000008;
queryID_ = value;
onChanged();
return this;
}
/**
* optional int32 queryID = 4;
*
*
* For queries
*
*/
public Builder clearQueryID() {
bitField0_ = (bitField0_ & ~0x00000008);
queryID_ = 0;
onChanged();
return this;
}
private java.lang.Object jSON_ = "";
/**
* optional string JSON = 5;
*
*
* This is the bit that will be forwarded directly to the client once they are in the system
*
*/
public boolean hasJSON() {
return ((bitField0_ & 0x00000010) == 0x00000010);
}
/**
* optional string JSON = 5;
*
*
* This is the bit that will be forwarded directly to the client once they are in the system
*
*/
public java.lang.String getJSON() {
java.lang.Object ref = jSON_;
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()) {
jSON_ = s;
}
return s;
} else {
return (java.lang.String) ref;
}
}
/**
* optional string JSON = 5;
*
*
* This is the bit that will be forwarded directly to the client once they are in the system
*
*/
public com.google.protobuf.ByteString
getJSONBytes() {
java.lang.Object ref = jSON_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
jSON_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
* optional string JSON = 5;
*
*
* This is the bit that will be forwarded directly to the client once they are in the system
*
*/
public Builder setJSON(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000010;
jSON_ = value;
onChanged();
return this;
}
/**
* optional string JSON = 5;
*
*
* This is the bit that will be forwarded directly to the client once they are in the system
*
*/
public Builder clearJSON() {
bitField0_ = (bitField0_ & ~0x00000010);
jSON_ = getDefaultInstance().getJSON();
onChanged();
return this;
}
/**
* optional string JSON = 5;
*
*
* This is the bit that will be forwarded directly to the client once they are in the system
*
*/
public Builder setJSONBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000010;
jSON_ = value;
onChanged();
return this;
}
// @@protoc_insertion_point(builder_scope:com.github.keenon.lense.human_server.APIRequest)
}
static {
defaultInstance = new APIRequest(true);
defaultInstance.initFields();
}
// @@protoc_insertion_point(class_scope:com.github.keenon.lense.human_server.APIRequest)
}
public interface APIResponseOrBuilder extends
// @@protoc_insertion_point(interface_extends:com.github.keenon.lense.human_server.APIResponse)
com.google.protobuf.MessageOrBuilder {
/**
* required .com.github.keenon.lense.human_server.APIResponse.MessageType type = 1;
*/
boolean hasType();
/**
* required .com.github.keenon.lense.human_server.APIResponse.MessageType type = 1;
*/
com.github.keenon.lense.human_server.HumanAPIProto.APIResponse.MessageType getType();
/**
* required int32 jobID = 2;
*
*
* All communication needs to reference the ID of the job being done
*
*/
boolean hasJobID();
/**
* required int32 jobID = 2;
*
*
* All communication needs to reference the ID of the job being done
*
*/
int getJobID();
/**
* optional int32 queryID = 3;
*
*
* Query responses
*
*/
boolean hasQueryID();
/**
* optional int32 queryID = 3;
*
*
* Query responses
*
*/
int getQueryID();
/**
* optional int32 queryAnswer = 4;
*/
boolean hasQueryAnswer();
/**
* optional int32 queryAnswer = 4;
*/
int getQueryAnswer();
}
/**
* Protobuf type {@code com.github.keenon.lense.human_server.APIResponse}
*/
public static final class APIResponse extends
com.google.protobuf.GeneratedMessage implements
// @@protoc_insertion_point(message_implements:com.github.keenon.lense.human_server.APIResponse)
APIResponseOrBuilder {
// Use APIResponse.newBuilder() to construct.
private APIResponse(com.google.protobuf.GeneratedMessage.Builder> builder) {
super(builder);
this.unknownFields = builder.getUnknownFields();
}
private APIResponse(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); }
private static final APIResponse defaultInstance;
public static APIResponse getDefaultInstance() {
return defaultInstance;
}
public APIResponse getDefaultInstanceForType() {
return defaultInstance;
}
private final com.google.protobuf.UnknownFieldSet unknownFields;
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private APIResponse(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
initFields();
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;
default: {
if (!parseUnknownField(input, unknownFields,
extensionRegistry, tag)) {
done = true;
}
break;
}
case 8: {
int rawValue = input.readEnum();
com.github.keenon.lense.human_server.HumanAPIProto.APIResponse.MessageType value = com.github.keenon.lense.human_server.HumanAPIProto.APIResponse.MessageType.valueOf(rawValue);
if (value == null) {
unknownFields.mergeVarintField(1, rawValue);
} else {
bitField0_ |= 0x00000001;
type_ = value;
}
break;
}
case 16: {
bitField0_ |= 0x00000002;
jobID_ = input.readInt32();
break;
}
case 24: {
bitField0_ |= 0x00000004;
queryID_ = input.readInt32();
break;
}
case 32: {
bitField0_ |= 0x00000008;
queryAnswer_ = input.readInt32();
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e.getMessage()).setUnfinishedMessage(this);
} finally {
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.github.keenon.lense.human_server.HumanAPIProto.internal_static_com_github_keenon_lense_human_server_APIResponse_descriptor;
}
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.github.keenon.lense.human_server.HumanAPIProto.internal_static_com_github_keenon_lense_human_server_APIResponse_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.github.keenon.lense.human_server.HumanAPIProto.APIResponse.class, com.github.keenon.lense.human_server.HumanAPIProto.APIResponse.Builder.class);
}
public static com.google.protobuf.Parser PARSER =
new com.google.protobuf.AbstractParser() {
public APIResponse parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new APIResponse(input, extensionRegistry);
}
};
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
/**
* Protobuf enum {@code com.github.keenon.lense.human_server.APIResponse.MessageType}
*/
public enum MessageType
implements com.google.protobuf.ProtocolMessageEnum {
/**
* HumanArrival = 1;
*/
HumanArrival(0, 1),
/**
* QueryAnswer = 2;
*/
QueryAnswer(1, 2),
/**
* HumanExit = 3;
*/
HumanExit(2, 3),
/**
* QueryFailure = 4;
*/
QueryFailure(3, 4),
;
/**
* HumanArrival = 1;
*/
public static final int HumanArrival_VALUE = 1;
/**
* QueryAnswer = 2;
*/
public static final int QueryAnswer_VALUE = 2;
/**
* HumanExit = 3;
*/
public static final int HumanExit_VALUE = 3;
/**
* QueryFailure = 4;
*/
public static final int QueryFailure_VALUE = 4;
public final int getNumber() { return value; }
public static MessageType valueOf(int value) {
switch (value) {
case 1: return HumanArrival;
case 2: return QueryAnswer;
case 3: return HumanExit;
case 4: return QueryFailure;
default: return null;
}
}
public static com.google.protobuf.Internal.EnumLiteMap
internalGetValueMap() {
return internalValueMap;
}
private static com.google.protobuf.Internal.EnumLiteMap
internalValueMap =
new com.google.protobuf.Internal.EnumLiteMap() {
public MessageType findValueByNumber(int number) {
return MessageType.valueOf(number);
}
};
public final com.google.protobuf.Descriptors.EnumValueDescriptor
getValueDescriptor() {
return getDescriptor().getValues().get(index);
}
public final com.google.protobuf.Descriptors.EnumDescriptor
getDescriptorForType() {
return getDescriptor();
}
public static final com.google.protobuf.Descriptors.EnumDescriptor
getDescriptor() {
return com.github.keenon.lense.human_server.HumanAPIProto.APIResponse.getDescriptor().getEnumTypes().get(0);
}
private static final MessageType[] VALUES = values();
public static MessageType 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 index;
private final int value;
private MessageType(int index, int value) {
this.index = index;
this.value = value;
}
// @@protoc_insertion_point(enum_scope:com.github.keenon.lense.human_server.APIResponse.MessageType)
}
private int bitField0_;
public static final int TYPE_FIELD_NUMBER = 1;
private com.github.keenon.lense.human_server.HumanAPIProto.APIResponse.MessageType type_;
/**
* required .com.github.keenon.lense.human_server.APIResponse.MessageType type = 1;
*/
public boolean hasType() {
return ((bitField0_ & 0x00000001) == 0x00000001);
}
/**
* required .com.github.keenon.lense.human_server.APIResponse.MessageType type = 1;
*/
public com.github.keenon.lense.human_server.HumanAPIProto.APIResponse.MessageType getType() {
return type_;
}
public static final int JOBID_FIELD_NUMBER = 2;
private int jobID_;
/**
* required int32 jobID = 2;
*
*
* All communication needs to reference the ID of the job being done
*
*/
public boolean hasJobID() {
return ((bitField0_ & 0x00000002) == 0x00000002);
}
/**
* required int32 jobID = 2;
*
*
* All communication needs to reference the ID of the job being done
*
*/
public int getJobID() {
return jobID_;
}
public static final int QUERYID_FIELD_NUMBER = 3;
private int queryID_;
/**
* optional int32 queryID = 3;
*
*
* Query responses
*
*/
public boolean hasQueryID() {
return ((bitField0_ & 0x00000004) == 0x00000004);
}
/**
* optional int32 queryID = 3;
*
*
* Query responses
*
*/
public int getQueryID() {
return queryID_;
}
public static final int QUERYANSWER_FIELD_NUMBER = 4;
private int queryAnswer_;
/**
* optional int32 queryAnswer = 4;
*/
public boolean hasQueryAnswer() {
return ((bitField0_ & 0x00000008) == 0x00000008);
}
/**
* optional int32 queryAnswer = 4;
*/
public int getQueryAnswer() {
return queryAnswer_;
}
private void initFields() {
type_ = com.github.keenon.lense.human_server.HumanAPIProto.APIResponse.MessageType.HumanArrival;
jobID_ = 0;
queryID_ = 0;
queryAnswer_ = 0;
}
private byte memoizedIsInitialized = -1;
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
if (!hasType()) {
memoizedIsInitialized = 0;
return false;
}
if (!hasJobID()) {
memoizedIsInitialized = 0;
return false;
}
memoizedIsInitialized = 1;
return true;
}
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
getSerializedSize();
if (((bitField0_ & 0x00000001) == 0x00000001)) {
output.writeEnum(1, type_.getNumber());
}
if (((bitField0_ & 0x00000002) == 0x00000002)) {
output.writeInt32(2, jobID_);
}
if (((bitField0_ & 0x00000004) == 0x00000004)) {
output.writeInt32(3, queryID_);
}
if (((bitField0_ & 0x00000008) == 0x00000008)) {
output.writeInt32(4, queryAnswer_);
}
getUnknownFields().writeTo(output);
}
private int memoizedSerializedSize = -1;
public int getSerializedSize() {
int size = memoizedSerializedSize;
if (size != -1) return size;
size = 0;
if (((bitField0_ & 0x00000001) == 0x00000001)) {
size += com.google.protobuf.CodedOutputStream
.computeEnumSize(1, type_.getNumber());
}
if (((bitField0_ & 0x00000002) == 0x00000002)) {
size += com.google.protobuf.CodedOutputStream
.computeInt32Size(2, jobID_);
}
if (((bitField0_ & 0x00000004) == 0x00000004)) {
size += com.google.protobuf.CodedOutputStream
.computeInt32Size(3, queryID_);
}
if (((bitField0_ & 0x00000008) == 0x00000008)) {
size += com.google.protobuf.CodedOutputStream
.computeInt32Size(4, queryAnswer_);
}
size += getUnknownFields().getSerializedSize();
memoizedSerializedSize = size;
return size;
}
private static final long serialVersionUID = 0L;
@java.lang.Override
protected java.lang.Object writeReplace()
throws java.io.ObjectStreamException {
return super.writeReplace();
}
public static com.github.keenon.lense.human_server.HumanAPIProto.APIResponse parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.github.keenon.lense.human_server.HumanAPIProto.APIResponse 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.keenon.lense.human_server.HumanAPIProto.APIResponse parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.github.keenon.lense.human_server.HumanAPIProto.APIResponse parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.github.keenon.lense.human_server.HumanAPIProto.APIResponse parseFrom(java.io.InputStream input)
throws java.io.IOException {
return PARSER.parseFrom(input);
}
public static com.github.keenon.lense.human_server.HumanAPIProto.APIResponse parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return PARSER.parseFrom(input, extensionRegistry);
}
public static com.github.keenon.lense.human_server.HumanAPIProto.APIResponse parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return PARSER.parseDelimitedFrom(input);
}
public static com.github.keenon.lense.human_server.HumanAPIProto.APIResponse parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return PARSER.parseDelimitedFrom(input, extensionRegistry);
}
public static com.github.keenon.lense.human_server.HumanAPIProto.APIResponse parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return PARSER.parseFrom(input);
}
public static com.github.keenon.lense.human_server.HumanAPIProto.APIResponse parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return PARSER.parseFrom(input, extensionRegistry);
}
public static Builder newBuilder() { return Builder.create(); }
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder(com.github.keenon.lense.human_server.HumanAPIProto.APIResponse prototype) {
return newBuilder().mergeFrom(prototype);
}
public Builder toBuilder() { return newBuilder(this); }
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessage.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
* Protobuf type {@code com.github.keenon.lense.human_server.APIResponse}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessage.Builder implements
// @@protoc_insertion_point(builder_implements:com.github.keenon.lense.human_server.APIResponse)
com.github.keenon.lense.human_server.HumanAPIProto.APIResponseOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.github.keenon.lense.human_server.HumanAPIProto.internal_static_com_github_keenon_lense_human_server_APIResponse_descriptor;
}
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.github.keenon.lense.human_server.HumanAPIProto.internal_static_com_github_keenon_lense_human_server_APIResponse_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.github.keenon.lense.human_server.HumanAPIProto.APIResponse.class, com.github.keenon.lense.human_server.HumanAPIProto.APIResponse.Builder.class);
}
// Construct using com.github.keenon.lense.human_server.HumanAPIProto.APIResponse.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessage.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) {
}
}
private static Builder create() {
return new Builder();
}
public Builder clear() {
super.clear();
type_ = com.github.keenon.lense.human_server.HumanAPIProto.APIResponse.MessageType.HumanArrival;
bitField0_ = (bitField0_ & ~0x00000001);
jobID_ = 0;
bitField0_ = (bitField0_ & ~0x00000002);
queryID_ = 0;
bitField0_ = (bitField0_ & ~0x00000004);
queryAnswer_ = 0;
bitField0_ = (bitField0_ & ~0x00000008);
return this;
}
public Builder clone() {
return create().mergeFrom(buildPartial());
}
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return com.github.keenon.lense.human_server.HumanAPIProto.internal_static_com_github_keenon_lense_human_server_APIResponse_descriptor;
}
public com.github.keenon.lense.human_server.HumanAPIProto.APIResponse getDefaultInstanceForType() {
return com.github.keenon.lense.human_server.HumanAPIProto.APIResponse.getDefaultInstance();
}
public com.github.keenon.lense.human_server.HumanAPIProto.APIResponse build() {
com.github.keenon.lense.human_server.HumanAPIProto.APIResponse result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
public com.github.keenon.lense.human_server.HumanAPIProto.APIResponse buildPartial() {
com.github.keenon.lense.human_server.HumanAPIProto.APIResponse result = new com.github.keenon.lense.human_server.HumanAPIProto.APIResponse(this);
int from_bitField0_ = bitField0_;
int to_bitField0_ = 0;
if (((from_bitField0_ & 0x00000001) == 0x00000001)) {
to_bitField0_ |= 0x00000001;
}
result.type_ = type_;
if (((from_bitField0_ & 0x00000002) == 0x00000002)) {
to_bitField0_ |= 0x00000002;
}
result.jobID_ = jobID_;
if (((from_bitField0_ & 0x00000004) == 0x00000004)) {
to_bitField0_ |= 0x00000004;
}
result.queryID_ = queryID_;
if (((from_bitField0_ & 0x00000008) == 0x00000008)) {
to_bitField0_ |= 0x00000008;
}
result.queryAnswer_ = queryAnswer_;
result.bitField0_ = to_bitField0_;
onBuilt();
return result;
}
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof com.github.keenon.lense.human_server.HumanAPIProto.APIResponse) {
return mergeFrom((com.github.keenon.lense.human_server.HumanAPIProto.APIResponse)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.github.keenon.lense.human_server.HumanAPIProto.APIResponse other) {
if (other == com.github.keenon.lense.human_server.HumanAPIProto.APIResponse.getDefaultInstance()) return this;
if (other.hasType()) {
setType(other.getType());
}
if (other.hasJobID()) {
setJobID(other.getJobID());
}
if (other.hasQueryID()) {
setQueryID(other.getQueryID());
}
if (other.hasQueryAnswer()) {
setQueryAnswer(other.getQueryAnswer());
}
this.mergeUnknownFields(other.getUnknownFields());
return this;
}
public final boolean isInitialized() {
if (!hasType()) {
return false;
}
if (!hasJobID()) {
return false;
}
return true;
}
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
com.github.keenon.lense.human_server.HumanAPIProto.APIResponse parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (com.github.keenon.lense.human_server.HumanAPIProto.APIResponse) e.getUnfinishedMessage();
throw e;
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int bitField0_;
private com.github.keenon.lense.human_server.HumanAPIProto.APIResponse.MessageType type_ = com.github.keenon.lense.human_server.HumanAPIProto.APIResponse.MessageType.HumanArrival;
/**
* required .com.github.keenon.lense.human_server.APIResponse.MessageType type = 1;
*/
public boolean hasType() {
return ((bitField0_ & 0x00000001) == 0x00000001);
}
/**
* required .com.github.keenon.lense.human_server.APIResponse.MessageType type = 1;
*/
public com.github.keenon.lense.human_server.HumanAPIProto.APIResponse.MessageType getType() {
return type_;
}
/**
* required .com.github.keenon.lense.human_server.APIResponse.MessageType type = 1;
*/
public Builder setType(com.github.keenon.lense.human_server.HumanAPIProto.APIResponse.MessageType value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000001;
type_ = value;
onChanged();
return this;
}
/**
* required .com.github.keenon.lense.human_server.APIResponse.MessageType type = 1;
*/
public Builder clearType() {
bitField0_ = (bitField0_ & ~0x00000001);
type_ = com.github.keenon.lense.human_server.HumanAPIProto.APIResponse.MessageType.HumanArrival;
onChanged();
return this;
}
private int jobID_ ;
/**
* required int32 jobID = 2;
*
*
* All communication needs to reference the ID of the job being done
*
*/
public boolean hasJobID() {
return ((bitField0_ & 0x00000002) == 0x00000002);
}
/**
* required int32 jobID = 2;
*
*
* All communication needs to reference the ID of the job being done
*
*/
public int getJobID() {
return jobID_;
}
/**
* required int32 jobID = 2;
*
*
* All communication needs to reference the ID of the job being done
*
*/
public Builder setJobID(int value) {
bitField0_ |= 0x00000002;
jobID_ = value;
onChanged();
return this;
}
/**
* required int32 jobID = 2;
*
*
* All communication needs to reference the ID of the job being done
*
*/
public Builder clearJobID() {
bitField0_ = (bitField0_ & ~0x00000002);
jobID_ = 0;
onChanged();
return this;
}
private int queryID_ ;
/**
* optional int32 queryID = 3;
*
*
* Query responses
*
*/
public boolean hasQueryID() {
return ((bitField0_ & 0x00000004) == 0x00000004);
}
/**
* optional int32 queryID = 3;
*
*
* Query responses
*
*/
public int getQueryID() {
return queryID_;
}
/**
* optional int32 queryID = 3;
*
*
* Query responses
*
*/
public Builder setQueryID(int value) {
bitField0_ |= 0x00000004;
queryID_ = value;
onChanged();
return this;
}
/**
* optional int32 queryID = 3;
*
*
* Query responses
*
*/
public Builder clearQueryID() {
bitField0_ = (bitField0_ & ~0x00000004);
queryID_ = 0;
onChanged();
return this;
}
private int queryAnswer_ ;
/**
* optional int32 queryAnswer = 4;
*/
public boolean hasQueryAnswer() {
return ((bitField0_ & 0x00000008) == 0x00000008);
}
/**
* optional int32 queryAnswer = 4;
*/
public int getQueryAnswer() {
return queryAnswer_;
}
/**
* optional int32 queryAnswer = 4;
*/
public Builder setQueryAnswer(int value) {
bitField0_ |= 0x00000008;
queryAnswer_ = value;
onChanged();
return this;
}
/**
* optional int32 queryAnswer = 4;
*/
public Builder clearQueryAnswer() {
bitField0_ = (bitField0_ & ~0x00000008);
queryAnswer_ = 0;
onChanged();
return this;
}
// @@protoc_insertion_point(builder_scope:com.github.keenon.lense.human_server.APIResponse)
}
static {
defaultInstance = new APIResponse(true);
defaultInstance.initFields();
}
// @@protoc_insertion_point(class_scope:com.github.keenon.lense.human_server.APIResponse)
}
private static final com.google.protobuf.Descriptors.Descriptor
internal_static_com_github_keenon_lense_human_server_APIRequest_descriptor;
private static
com.google.protobuf.GeneratedMessage.FieldAccessorTable
internal_static_com_github_keenon_lense_human_server_APIRequest_fieldAccessorTable;
private static final com.google.protobuf.Descriptors.Descriptor
internal_static_com_github_keenon_lense_human_server_APIResponse_descriptor;
private static
com.google.protobuf.GeneratedMessage.FieldAccessorTable
internal_static_com_github_keenon_lense_human_server_APIResponse_fieldAccessorTable;
public static com.google.protobuf.Descriptors.FileDescriptor
getDescriptor() {
return descriptor;
}
private static com.google.protobuf.Descriptors.FileDescriptor
descriptor;
static {
java.lang.String[] descriptorData = {
"\n\035src/main/proto/HumanAPI.proto\022$com.git" +
"hub.keenon.lense.human_server\"\324\001\n\nAPIReq" +
"uest\022J\n\004type\030\001 \002(\0162<.com.github.keenon.l" +
"ense.human_server.APIRequest.MessageType" +
"\022\r\n\005jobID\030\002 \002(\005\022\022\n\nonlyOnceID\030\003 \001(\005\022\017\n\007q" +
"ueryID\030\004 \001(\005\022\014\n\004JSON\030\005 \001(\t\"8\n\013MessageTyp" +
"e\022\016\n\nJobPosting\020\001\022\t\n\005Query\020\002\022\016\n\nJobRelea" +
"se\020\003\"\342\001\n\013APIResponse\022K\n\004type\030\001 \002(\0162=.com" +
".github.keenon.lense.human_server.APIRes" +
"ponse.MessageType\022\r\n\005jobID\030\002 \002(\005\022\017\n\007quer",
"yID\030\003 \001(\005\022\023\n\013queryAnswer\030\004 \001(\005\"Q\n\013Messag" +
"eType\022\020\n\014HumanArrival\020\001\022\017\n\013QueryAnswer\020\002" +
"\022\r\n\tHumanExit\020\003\022\020\n\014QueryFailure\020\004B5\n$com" +
".github.keenon.lense.human_serverB\rHuman" +
"APIProto"
};
com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner =
new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() {
public com.google.protobuf.ExtensionRegistry assignDescriptors(
com.google.protobuf.Descriptors.FileDescriptor root) {
descriptor = root;
return null;
}
};
com.google.protobuf.Descriptors.FileDescriptor
.internalBuildGeneratedFileFrom(descriptorData,
new com.google.protobuf.Descriptors.FileDescriptor[] {
}, assigner);
internal_static_com_github_keenon_lense_human_server_APIRequest_descriptor =
getDescriptor().getMessageTypes().get(0);
internal_static_com_github_keenon_lense_human_server_APIRequest_fieldAccessorTable = new
com.google.protobuf.GeneratedMessage.FieldAccessorTable(
internal_static_com_github_keenon_lense_human_server_APIRequest_descriptor,
new java.lang.String[] { "Type", "JobID", "OnlyOnceID", "QueryID", "JSON", });
internal_static_com_github_keenon_lense_human_server_APIResponse_descriptor =
getDescriptor().getMessageTypes().get(1);
internal_static_com_github_keenon_lense_human_server_APIResponse_fieldAccessorTable = new
com.google.protobuf.GeneratedMessage.FieldAccessorTable(
internal_static_com_github_keenon_lense_human_server_APIResponse_descriptor,
new java.lang.String[] { "Type", "JobID", "QueryID", "QueryAnswer", });
}
// @@protoc_insertion_point(outer_class_scope)
}