com.sandpolis.core.net.Message Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of core.net Show documentation
Show all versions of core.net Show documentation
com.sandpolis.core.net module
The newest version!
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: com/sandpolis/core/net/message.proto
package com.sandpolis.core.net;
public final class Message {
private Message() {}
public static void registerAllExtensions(
com.google.protobuf.ExtensionRegistryLite registry) {
}
public interface MSGOrBuilder extends
// @@protoc_insertion_point(interface_extends:core.net.MSG)
com.google.protobuf.MessageLiteOrBuilder {
/**
*
* The final destination SID.
* Note: This field is parsed manually and therefore must not change.
*
*
* int32 to = 1;
* @return The to.
*/
int getTo();
/**
*
* The original source SID.
* Note: This field is parsed manually and therefore must not change.
*
*
* int32 from = 2;
* @return The from.
*/
int getFrom();
/**
*
* The message context ID.
* For RQ messages, this field is an independent identifier.
* For RS messages, this field is the corresponding RQ message's context ID.
* For EV messages, this field is the stream ID if applicable.
*
*
* int32 id = 3;
* @return The id.
*/
int getId();
/**
*
* The payload type
*
*
* int32 payload_type = 4;
* @return The payloadType.
*/
int getPayloadType();
/**
*
* The payload content
*
*
* bytes payload = 5;
* @return The payload.
*/
com.google.protobuf.ByteString getPayload();
}
/**
*
* A message type for all communication among instances.
* Message prefixes:
* RQ_* A request message that warrants exactly one RS_* message
* RS_* A response message for exactly one RQ_* message
* EV_* An event message that does not have a corresponding response
*
*
* Protobuf type {@code core.net.MSG}
*/
public static final class MSG extends
com.google.protobuf.GeneratedMessageLite<
MSG, MSG.Builder> implements
// @@protoc_insertion_point(message_implements:core.net.MSG)
MSGOrBuilder {
private MSG() {
payload_ = com.google.protobuf.ByteString.EMPTY;
}
public static final int TO_FIELD_NUMBER = 1;
private int to_;
/**
*
* The final destination SID.
* Note: This field is parsed manually and therefore must not change.
*
*
* int32 to = 1;
* @return The to.
*/
@java.lang.Override
public int getTo() {
return to_;
}
/**
*
* The final destination SID.
* Note: This field is parsed manually and therefore must not change.
*
*
* int32 to = 1;
* @param value The to to set.
*/
private void setTo(int value) {
to_ = value;
}
/**
*
* The final destination SID.
* Note: This field is parsed manually and therefore must not change.
*
*
* int32 to = 1;
*/
private void clearTo() {
to_ = 0;
}
public static final int FROM_FIELD_NUMBER = 2;
private int from_;
/**
*
* The original source SID.
* Note: This field is parsed manually and therefore must not change.
*
*
* int32 from = 2;
* @return The from.
*/
@java.lang.Override
public int getFrom() {
return from_;
}
/**
*
* The original source SID.
* Note: This field is parsed manually and therefore must not change.
*
*
* int32 from = 2;
* @param value The from to set.
*/
private void setFrom(int value) {
from_ = value;
}
/**
*
* The original source SID.
* Note: This field is parsed manually and therefore must not change.
*
*
* int32 from = 2;
*/
private void clearFrom() {
from_ = 0;
}
public static final int ID_FIELD_NUMBER = 3;
private int id_;
/**
*
* The message context ID.
* For RQ messages, this field is an independent identifier.
* For RS messages, this field is the corresponding RQ message's context ID.
* For EV messages, this field is the stream ID if applicable.
*
*
* int32 id = 3;
* @return The id.
*/
@java.lang.Override
public int getId() {
return id_;
}
/**
*
* The message context ID.
* For RQ messages, this field is an independent identifier.
* For RS messages, this field is the corresponding RQ message's context ID.
* For EV messages, this field is the stream ID if applicable.
*
*
* int32 id = 3;
* @param value The id to set.
*/
private void setId(int value) {
id_ = value;
}
/**
*
* The message context ID.
* For RQ messages, this field is an independent identifier.
* For RS messages, this field is the corresponding RQ message's context ID.
* For EV messages, this field is the stream ID if applicable.
*
*
* int32 id = 3;
*/
private void clearId() {
id_ = 0;
}
public static final int PAYLOAD_TYPE_FIELD_NUMBER = 4;
private int payloadType_;
/**
*
* The payload type
*
*
* int32 payload_type = 4;
* @return The payloadType.
*/
@java.lang.Override
public int getPayloadType() {
return payloadType_;
}
/**
*
* The payload type
*
*
* int32 payload_type = 4;
* @param value The payloadType to set.
*/
private void setPayloadType(int value) {
payloadType_ = value;
}
/**
*
* The payload type
*
*
* int32 payload_type = 4;
*/
private void clearPayloadType() {
payloadType_ = 0;
}
public static final int PAYLOAD_FIELD_NUMBER = 5;
private com.google.protobuf.ByteString payload_;
/**
*
* The payload content
*
*
* bytes payload = 5;
* @return The payload.
*/
@java.lang.Override
public com.google.protobuf.ByteString getPayload() {
return payload_;
}
/**
*
* The payload content
*
*
* bytes payload = 5;
* @param value The payload to set.
*/
private void setPayload(com.google.protobuf.ByteString value) {
java.lang.Class> valueClass = value.getClass();
payload_ = value;
}
/**
*
* The payload content
*
*
* bytes payload = 5;
*/
private void clearPayload() {
payload_ = getDefaultInstance().getPayload();
}
public static com.sandpolis.core.net.Message.MSG parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return com.google.protobuf.GeneratedMessageLite.parseFrom(
DEFAULT_INSTANCE, data);
}
public static com.sandpolis.core.net.Message.MSG parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return com.google.protobuf.GeneratedMessageLite.parseFrom(
DEFAULT_INSTANCE, data, extensionRegistry);
}
public static com.sandpolis.core.net.Message.MSG parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return com.google.protobuf.GeneratedMessageLite.parseFrom(
DEFAULT_INSTANCE, data);
}
public static com.sandpolis.core.net.Message.MSG parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return com.google.protobuf.GeneratedMessageLite.parseFrom(
DEFAULT_INSTANCE, data, extensionRegistry);
}
public static com.sandpolis.core.net.Message.MSG parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return com.google.protobuf.GeneratedMessageLite.parseFrom(
DEFAULT_INSTANCE, data);
}
public static com.sandpolis.core.net.Message.MSG parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return com.google.protobuf.GeneratedMessageLite.parseFrom(
DEFAULT_INSTANCE, data, extensionRegistry);
}
public static com.sandpolis.core.net.Message.MSG parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageLite.parseFrom(
DEFAULT_INSTANCE, input);
}
public static com.sandpolis.core.net.Message.MSG parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageLite.parseFrom(
DEFAULT_INSTANCE, input, extensionRegistry);
}
public static com.sandpolis.core.net.Message.MSG parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return parseDelimitedFrom(DEFAULT_INSTANCE, input);
}
public static com.sandpolis.core.net.Message.MSG parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return parseDelimitedFrom(DEFAULT_INSTANCE, input, extensionRegistry);
}
public static com.sandpolis.core.net.Message.MSG parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageLite.parseFrom(
DEFAULT_INSTANCE, input);
}
public static com.sandpolis.core.net.Message.MSG parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageLite.parseFrom(
DEFAULT_INSTANCE, input, extensionRegistry);
}
public static Builder newBuilder() {
return (Builder) DEFAULT_INSTANCE.createBuilder();
}
public static Builder newBuilder(com.sandpolis.core.net.Message.MSG prototype) {
return (Builder) DEFAULT_INSTANCE.createBuilder(prototype);
}
/**
*
* A message type for all communication among instances.
* Message prefixes:
* RQ_* A request message that warrants exactly one RS_* message
* RS_* A response message for exactly one RQ_* message
* EV_* An event message that does not have a corresponding response
*
*
* Protobuf type {@code core.net.MSG}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageLite.Builder<
com.sandpolis.core.net.Message.MSG, Builder> implements
// @@protoc_insertion_point(builder_implements:core.net.MSG)
com.sandpolis.core.net.Message.MSGOrBuilder {
// Construct using com.sandpolis.core.net.Message.MSG.newBuilder()
private Builder() {
super(DEFAULT_INSTANCE);
}
/**
*
* The final destination SID.
* Note: This field is parsed manually and therefore must not change.
*
*
* int32 to = 1;
* @return The to.
*/
@java.lang.Override
public int getTo() {
return instance.getTo();
}
/**
*
* The final destination SID.
* Note: This field is parsed manually and therefore must not change.
*
*
* int32 to = 1;
* @param value The to to set.
* @return This builder for chaining.
*/
public Builder setTo(int value) {
copyOnWrite();
instance.setTo(value);
return this;
}
/**
*
* The final destination SID.
* Note: This field is parsed manually and therefore must not change.
*
*
* int32 to = 1;
* @return This builder for chaining.
*/
public Builder clearTo() {
copyOnWrite();
instance.clearTo();
return this;
}
/**
*
* The original source SID.
* Note: This field is parsed manually and therefore must not change.
*
*
* int32 from = 2;
* @return The from.
*/
@java.lang.Override
public int getFrom() {
return instance.getFrom();
}
/**
*
* The original source SID.
* Note: This field is parsed manually and therefore must not change.
*
*
* int32 from = 2;
* @param value The from to set.
* @return This builder for chaining.
*/
public Builder setFrom(int value) {
copyOnWrite();
instance.setFrom(value);
return this;
}
/**
*
* The original source SID.
* Note: This field is parsed manually and therefore must not change.
*
*
* int32 from = 2;
* @return This builder for chaining.
*/
public Builder clearFrom() {
copyOnWrite();
instance.clearFrom();
return this;
}
/**
*
* The message context ID.
* For RQ messages, this field is an independent identifier.
* For RS messages, this field is the corresponding RQ message's context ID.
* For EV messages, this field is the stream ID if applicable.
*
*
* int32 id = 3;
* @return The id.
*/
@java.lang.Override
public int getId() {
return instance.getId();
}
/**
*
* The message context ID.
* For RQ messages, this field is an independent identifier.
* For RS messages, this field is the corresponding RQ message's context ID.
* For EV messages, this field is the stream ID if applicable.
*
*
* int32 id = 3;
* @param value The id to set.
* @return This builder for chaining.
*/
public Builder setId(int value) {
copyOnWrite();
instance.setId(value);
return this;
}
/**
*
* The message context ID.
* For RQ messages, this field is an independent identifier.
* For RS messages, this field is the corresponding RQ message's context ID.
* For EV messages, this field is the stream ID if applicable.
*
*
* int32 id = 3;
* @return This builder for chaining.
*/
public Builder clearId() {
copyOnWrite();
instance.clearId();
return this;
}
/**
*
* The payload type
*
*
* int32 payload_type = 4;
* @return The payloadType.
*/
@java.lang.Override
public int getPayloadType() {
return instance.getPayloadType();
}
/**
*
* The payload type
*
*
* int32 payload_type = 4;
* @param value The payloadType to set.
* @return This builder for chaining.
*/
public Builder setPayloadType(int value) {
copyOnWrite();
instance.setPayloadType(value);
return this;
}
/**
*
* The payload type
*
*
* int32 payload_type = 4;
* @return This builder for chaining.
*/
public Builder clearPayloadType() {
copyOnWrite();
instance.clearPayloadType();
return this;
}
/**
*
* The payload content
*
*
* bytes payload = 5;
* @return The payload.
*/
@java.lang.Override
public com.google.protobuf.ByteString getPayload() {
return instance.getPayload();
}
/**
*
* The payload content
*
*
* bytes payload = 5;
* @param value The payload to set.
* @return This builder for chaining.
*/
public Builder setPayload(com.google.protobuf.ByteString value) {
copyOnWrite();
instance.setPayload(value);
return this;
}
/**
*
* The payload content
*
*
* bytes payload = 5;
* @return This builder for chaining.
*/
public Builder clearPayload() {
copyOnWrite();
instance.clearPayload();
return this;
}
// @@protoc_insertion_point(builder_scope:core.net.MSG)
}
@java.lang.Override
@java.lang.SuppressWarnings({"unchecked", "fallthrough"})
protected final java.lang.Object dynamicMethod(
com.google.protobuf.GeneratedMessageLite.MethodToInvoke method,
java.lang.Object arg0, java.lang.Object arg1) {
switch (method) {
case NEW_MUTABLE_INSTANCE: {
return new com.sandpolis.core.net.Message.MSG();
}
case NEW_BUILDER: {
return new Builder();
}
case BUILD_MESSAGE_INFO: {
java.lang.Object[] objects = new java.lang.Object[] {
"to_",
"from_",
"id_",
"payloadType_",
"payload_",
};
java.lang.String info =
"\u0000\u0005\u0000\u0000\u0001\u0005\u0005\u0000\u0000\u0000\u0001\u0004\u0002\u0004" +
"\u0003\u0004\u0004\u0004\u0005\n";
return newMessageInfo(DEFAULT_INSTANCE, info, objects);
}
// fall through
case GET_DEFAULT_INSTANCE: {
return DEFAULT_INSTANCE;
}
case GET_PARSER: {
com.google.protobuf.Parser parser = PARSER;
if (parser == null) {
synchronized (com.sandpolis.core.net.Message.MSG.class) {
parser = PARSER;
if (parser == null) {
parser =
new DefaultInstanceBasedParser(
DEFAULT_INSTANCE);
PARSER = parser;
}
}
}
return parser;
}
case GET_MEMOIZED_IS_INITIALIZED: {
return (byte) 1;
}
case SET_MEMOIZED_IS_INITIALIZED: {
return null;
}
}
throw new UnsupportedOperationException();
}
// @@protoc_insertion_point(class_scope:core.net.MSG)
private static final com.sandpolis.core.net.Message.MSG DEFAULT_INSTANCE;
static {
MSG defaultInstance = new MSG();
// New instances are implicitly immutable so no need to make
// immutable.
DEFAULT_INSTANCE = defaultInstance;
com.google.protobuf.GeneratedMessageLite.registerDefaultInstance(
MSG.class, defaultInstance);
}
public static com.sandpolis.core.net.Message.MSG getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static volatile com.google.protobuf.Parser PARSER;
public static com.google.protobuf.Parser parser() {
return DEFAULT_INSTANCE.getParserForType();
}
}
static {
}
// @@protoc_insertion_point(outer_class_scope)
}