All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.googlecode.mobilityrpc.protocol.protobuf.MessageEnvelope Maven / Gradle / Ivy

// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: message_envelope.proto

package com.googlecode.mobilityrpc.protocol.protobuf;

public final class MessageEnvelope {
  private MessageEnvelope() {}
  public static void registerAllExtensions(
      com.google.protobuf.ExtensionRegistry registry) {
  }
  public interface EnvelopeOrBuilder extends
      // @@protoc_insertion_point(interface_extends:com.googlecode.mobilityrpc.protocol.protobuf.Envelope)
      com.google.protobuf.MessageOrBuilder {

    /**
     * required .com.googlecode.mobilityrpc.protocol.protobuf.Envelope.MessageType message_type = 1;
     */
    boolean hasMessageType();
    /**
     * required .com.googlecode.mobilityrpc.protocol.protobuf.Envelope.MessageType message_type = 1;
     */
    com.googlecode.mobilityrpc.protocol.protobuf.MessageEnvelope.Envelope.MessageType getMessageType();

    /**
     * required bytes message_bytes = 2;
     */
    boolean hasMessageBytes();
    /**
     * required bytes message_bytes = 2;
     */
    com.google.protobuf.ByteString getMessageBytes();
  }
  /**
   * Protobuf type {@code com.googlecode.mobilityrpc.protocol.protobuf.Envelope}
   *
   * 
   * Encapsulates protobuf data and indicates the type of message which has been
   * serialized, so that the relevant protobuf class can be chosen to deserialize it
   * 
*/ public static final class Envelope extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:com.googlecode.mobilityrpc.protocol.protobuf.Envelope) EnvelopeOrBuilder { // Use Envelope.newBuilder() to construct. private Envelope(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } private Envelope() { messageType_ = 1; messageBytes_ = com.google.protobuf.ByteString.EMPTY; } @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } private Envelope( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) { this(); 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.googlecode.mobilityrpc.protocol.protobuf.MessageEnvelope.Envelope.MessageType value = com.googlecode.mobilityrpc.protocol.protobuf.MessageEnvelope.Envelope.MessageType.valueOf(rawValue); if (value == null) { unknownFields.mergeVarintField(1, rawValue); } else { bitField0_ |= 0x00000001; messageType_ = rawValue; } break; } case 18: { bitField0_ |= 0x00000002; messageBytes_ = input.readBytes(); break; } } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw new RuntimeException(e.setUnfinishedMessage(this)); } catch (java.io.IOException e) { throw new RuntimeException( 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.googlecode.mobilityrpc.protocol.protobuf.MessageEnvelope.internal_static_com_googlecode_mobilityrpc_protocol_protobuf_Envelope_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.googlecode.mobilityrpc.protocol.protobuf.MessageEnvelope.internal_static_com_googlecode_mobilityrpc_protocol_protobuf_Envelope_fieldAccessorTable .ensureFieldAccessorsInitialized( com.googlecode.mobilityrpc.protocol.protobuf.MessageEnvelope.Envelope.class, com.googlecode.mobilityrpc.protocol.protobuf.MessageEnvelope.Envelope.Builder.class); } /** * Protobuf enum {@code com.googlecode.mobilityrpc.protocol.protobuf.Envelope.MessageType} */ public enum MessageType implements com.google.protobuf.ProtocolMessageEnum { /** * EXECUTION_REQUEST = 1; */ EXECUTION_REQUEST(0, 1), /** * EXECUTION_RESPONSE = 2; */ EXECUTION_RESPONSE(1, 2), /** * RESOURCE_REQUEST = 3; */ RESOURCE_REQUEST(2, 3), /** * RESOURCE_RESPONSE = 4; */ RESOURCE_RESPONSE(3, 4), /** * PING = 5; */ PING(4, 5), /** * PONG = 6; */ PONG(5, 6), ; /** * EXECUTION_REQUEST = 1; */ public static final int EXECUTION_REQUEST_VALUE = 1; /** * EXECUTION_RESPONSE = 2; */ public static final int EXECUTION_RESPONSE_VALUE = 2; /** * RESOURCE_REQUEST = 3; */ public static final int RESOURCE_REQUEST_VALUE = 3; /** * RESOURCE_RESPONSE = 4; */ public static final int RESOURCE_RESPONSE_VALUE = 4; /** * PING = 5; */ public static final int PING_VALUE = 5; /** * PONG = 6; */ public static final int PONG_VALUE = 6; public final int getNumber() { return value; } public static MessageType valueOf(int value) { switch (value) { case 1: return EXECUTION_REQUEST; case 2: return EXECUTION_RESPONSE; case 3: return RESOURCE_REQUEST; case 4: return RESOURCE_RESPONSE; case 5: return PING; case 6: return PONG; default: return null; } } public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { return internalValueMap; } private static final com.google.protobuf.Internal.EnumLiteMap< MessageType> 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.googlecode.mobilityrpc.protocol.protobuf.MessageEnvelope.Envelope.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.googlecode.mobilityrpc.protocol.protobuf.Envelope.MessageType) } private int bitField0_; public static final int MESSAGE_TYPE_FIELD_NUMBER = 1; private int messageType_; /** * required .com.googlecode.mobilityrpc.protocol.protobuf.Envelope.MessageType message_type = 1; */ public boolean hasMessageType() { return ((bitField0_ & 0x00000001) == 0x00000001); } /** * required .com.googlecode.mobilityrpc.protocol.protobuf.Envelope.MessageType message_type = 1; */ public com.googlecode.mobilityrpc.protocol.protobuf.MessageEnvelope.Envelope.MessageType getMessageType() { com.googlecode.mobilityrpc.protocol.protobuf.MessageEnvelope.Envelope.MessageType result = com.googlecode.mobilityrpc.protocol.protobuf.MessageEnvelope.Envelope.MessageType.valueOf(messageType_); return result == null ? com.googlecode.mobilityrpc.protocol.protobuf.MessageEnvelope.Envelope.MessageType.EXECUTION_REQUEST : result; } public static final int MESSAGE_BYTES_FIELD_NUMBER = 2; private com.google.protobuf.ByteString messageBytes_; /** * required bytes message_bytes = 2; */ public boolean hasMessageBytes() { return ((bitField0_ & 0x00000002) == 0x00000002); } /** * required bytes message_bytes = 2; */ public com.google.protobuf.ByteString getMessageBytes() { return messageBytes_; } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized == 1) return true; if (isInitialized == 0) return false; if (!hasMessageType()) { memoizedIsInitialized = 0; return false; } if (!hasMessageBytes()) { memoizedIsInitialized = 0; return false; } memoizedIsInitialized = 1; return true; } public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { if (((bitField0_ & 0x00000001) == 0x00000001)) { output.writeEnum(1, messageType_); } if (((bitField0_ & 0x00000002) == 0x00000002)) { output.writeBytes(2, messageBytes_); } unknownFields.writeTo(output); } public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (((bitField0_ & 0x00000001) == 0x00000001)) { size += com.google.protobuf.CodedOutputStream .computeEnumSize(1, messageType_); } if (((bitField0_ & 0x00000002) == 0x00000002)) { size += com.google.protobuf.CodedOutputStream .computeBytesSize(2, messageBytes_); } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; } private static final long serialVersionUID = 0L; public static com.googlecode.mobilityrpc.protocol.protobuf.MessageEnvelope.Envelope parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.googlecode.mobilityrpc.protocol.protobuf.MessageEnvelope.Envelope parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.googlecode.mobilityrpc.protocol.protobuf.MessageEnvelope.Envelope parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.googlecode.mobilityrpc.protocol.protobuf.MessageEnvelope.Envelope parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.googlecode.mobilityrpc.protocol.protobuf.MessageEnvelope.Envelope parseFrom(java.io.InputStream input) throws java.io.IOException { return PARSER.parseFrom(input); } public static com.googlecode.mobilityrpc.protocol.protobuf.MessageEnvelope.Envelope parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseFrom(input, extensionRegistry); } public static com.googlecode.mobilityrpc.protocol.protobuf.MessageEnvelope.Envelope parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return PARSER.parseDelimitedFrom(input); } public static com.googlecode.mobilityrpc.protocol.protobuf.MessageEnvelope.Envelope parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseDelimitedFrom(input, extensionRegistry); } public static com.googlecode.mobilityrpc.protocol.protobuf.MessageEnvelope.Envelope parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return PARSER.parseFrom(input); } public static com.googlecode.mobilityrpc.protocol.protobuf.MessageEnvelope.Envelope parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseFrom(input, extensionRegistry); } public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } public static Builder newBuilder(com.googlecode.mobilityrpc.protocol.protobuf.MessageEnvelope.Envelope prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } public Builder toBuilder() { return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); } @java.lang.Override protected Builder newBuilderForType( com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } /** * Protobuf type {@code com.googlecode.mobilityrpc.protocol.protobuf.Envelope} * *
     * Encapsulates protobuf data and indicates the type of message which has been
     * serialized, so that the relevant protobuf class can be chosen to deserialize it
     * 
*/ public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:com.googlecode.mobilityrpc.protocol.protobuf.Envelope) com.googlecode.mobilityrpc.protocol.protobuf.MessageEnvelope.EnvelopeOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.googlecode.mobilityrpc.protocol.protobuf.MessageEnvelope.internal_static_com_googlecode_mobilityrpc_protocol_protobuf_Envelope_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.googlecode.mobilityrpc.protocol.protobuf.MessageEnvelope.internal_static_com_googlecode_mobilityrpc_protocol_protobuf_Envelope_fieldAccessorTable .ensureFieldAccessorsInitialized( com.googlecode.mobilityrpc.protocol.protobuf.MessageEnvelope.Envelope.class, com.googlecode.mobilityrpc.protocol.protobuf.MessageEnvelope.Envelope.Builder.class); } // Construct using com.googlecode.mobilityrpc.protocol.protobuf.MessageEnvelope.Envelope.newBuilder() private Builder() { maybeForceBuilderInitialization(); } private Builder( com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { } } public Builder clear() { super.clear(); messageType_ = 1; bitField0_ = (bitField0_ & ~0x00000001); messageBytes_ = com.google.protobuf.ByteString.EMPTY; bitField0_ = (bitField0_ & ~0x00000002); return this; } public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return com.googlecode.mobilityrpc.protocol.protobuf.MessageEnvelope.internal_static_com_googlecode_mobilityrpc_protocol_protobuf_Envelope_descriptor; } public com.googlecode.mobilityrpc.protocol.protobuf.MessageEnvelope.Envelope getDefaultInstanceForType() { return com.googlecode.mobilityrpc.protocol.protobuf.MessageEnvelope.Envelope.getDefaultInstance(); } public com.googlecode.mobilityrpc.protocol.protobuf.MessageEnvelope.Envelope build() { com.googlecode.mobilityrpc.protocol.protobuf.MessageEnvelope.Envelope result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } public com.googlecode.mobilityrpc.protocol.protobuf.MessageEnvelope.Envelope buildPartial() { com.googlecode.mobilityrpc.protocol.protobuf.MessageEnvelope.Envelope result = new com.googlecode.mobilityrpc.protocol.protobuf.MessageEnvelope.Envelope(this); int from_bitField0_ = bitField0_; int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000001) == 0x00000001)) { to_bitField0_ |= 0x00000001; } result.messageType_ = messageType_; if (((from_bitField0_ & 0x00000002) == 0x00000002)) { to_bitField0_ |= 0x00000002; } result.messageBytes_ = messageBytes_; result.bitField0_ = to_bitField0_; onBuilt(); return result; } public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.googlecode.mobilityrpc.protocol.protobuf.MessageEnvelope.Envelope) { return mergeFrom((com.googlecode.mobilityrpc.protocol.protobuf.MessageEnvelope.Envelope)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(com.googlecode.mobilityrpc.protocol.protobuf.MessageEnvelope.Envelope other) { if (other == com.googlecode.mobilityrpc.protocol.protobuf.MessageEnvelope.Envelope.getDefaultInstance()) return this; if (other.hasMessageType()) { setMessageType(other.getMessageType()); } if (other.hasMessageBytes()) { setMessageBytes(other.getMessageBytes()); } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; } public final boolean isInitialized() { if (!hasMessageType()) { return false; } if (!hasMessageBytes()) { return false; } return true; } public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { com.googlecode.mobilityrpc.protocol.protobuf.MessageEnvelope.Envelope parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (com.googlecode.mobilityrpc.protocol.protobuf.MessageEnvelope.Envelope) e.getUnfinishedMessage(); throw e; } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; } private int bitField0_; private int messageType_ = 1; /** * required .com.googlecode.mobilityrpc.protocol.protobuf.Envelope.MessageType message_type = 1; */ public boolean hasMessageType() { return ((bitField0_ & 0x00000001) == 0x00000001); } /** * required .com.googlecode.mobilityrpc.protocol.protobuf.Envelope.MessageType message_type = 1; */ public com.googlecode.mobilityrpc.protocol.protobuf.MessageEnvelope.Envelope.MessageType getMessageType() { com.googlecode.mobilityrpc.protocol.protobuf.MessageEnvelope.Envelope.MessageType result = com.googlecode.mobilityrpc.protocol.protobuf.MessageEnvelope.Envelope.MessageType.valueOf(messageType_); return result == null ? com.googlecode.mobilityrpc.protocol.protobuf.MessageEnvelope.Envelope.MessageType.EXECUTION_REQUEST : result; } /** * required .com.googlecode.mobilityrpc.protocol.protobuf.Envelope.MessageType message_type = 1; */ public Builder setMessageType(com.googlecode.mobilityrpc.protocol.protobuf.MessageEnvelope.Envelope.MessageType value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000001; messageType_ = value.getNumber(); onChanged(); return this; } /** * required .com.googlecode.mobilityrpc.protocol.protobuf.Envelope.MessageType message_type = 1; */ public Builder clearMessageType() { bitField0_ = (bitField0_ & ~0x00000001); messageType_ = 1; onChanged(); return this; } private com.google.protobuf.ByteString messageBytes_ = com.google.protobuf.ByteString.EMPTY; /** * required bytes message_bytes = 2; */ public boolean hasMessageBytes() { return ((bitField0_ & 0x00000002) == 0x00000002); } /** * required bytes message_bytes = 2; */ public com.google.protobuf.ByteString getMessageBytes() { return messageBytes_; } /** * required bytes message_bytes = 2; */ public Builder setMessageBytes(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000002; messageBytes_ = value; onChanged(); return this; } /** * required bytes message_bytes = 2; */ public Builder clearMessageBytes() { bitField0_ = (bitField0_ & ~0x00000002); messageBytes_ = getDefaultInstance().getMessageBytes(); onChanged(); return this; } // @@protoc_insertion_point(builder_scope:com.googlecode.mobilityrpc.protocol.protobuf.Envelope) } // @@protoc_insertion_point(class_scope:com.googlecode.mobilityrpc.protocol.protobuf.Envelope) private static final com.googlecode.mobilityrpc.protocol.protobuf.MessageEnvelope.Envelope DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new com.googlecode.mobilityrpc.protocol.protobuf.MessageEnvelope.Envelope(); } public static com.googlecode.mobilityrpc.protocol.protobuf.MessageEnvelope.Envelope getDefaultInstance() { return DEFAULT_INSTANCE; } @java.lang.Deprecated public static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { public Envelope parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { try { return new Envelope(input, extensionRegistry); } catch (RuntimeException e) { if (e.getCause() instanceof com.google.protobuf.InvalidProtocolBufferException) { throw (com.google.protobuf.InvalidProtocolBufferException) e.getCause(); } throw e; } } }; public static com.google.protobuf.Parser parser() { return PARSER; } @java.lang.Override public com.google.protobuf.Parser getParserForType() { return PARSER; } public com.googlecode.mobilityrpc.protocol.protobuf.MessageEnvelope.Envelope getDefaultInstanceForType() { return DEFAULT_INSTANCE; } } private static com.google.protobuf.Descriptors.Descriptor internal_static_com_googlecode_mobilityrpc_protocol_protobuf_Envelope_descriptor; private static com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_com_googlecode_mobilityrpc_protocol_protobuf_Envelope_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\026message_envelope.proto\022,com.googlecode" + ".mobilityrpc.protocol.protobuf\"\372\001\n\010Envel" + "ope\022X\n\014message_type\030\001 \002(\0162B.com.googleco" + "de.mobilityrpc.protocol.protobuf.Envelop" + "e.MessageType\022\025\n\rmessage_bytes\030\002 \002(\014\"}\n\013" + "MessageType\022\025\n\021EXECUTION_REQUEST\020\001\022\026\n\022EX" + "ECUTION_RESPONSE\020\002\022\024\n\020RESOURCE_REQUEST\020\003" + "\022\025\n\021RESOURCE_RESPONSE\020\004\022\010\n\004PING\020\005\022\010\n\004PON" + "G\020\006" }; 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_googlecode_mobilityrpc_protocol_protobuf_Envelope_descriptor = getDescriptor().getMessageTypes().get(0); internal_static_com_googlecode_mobilityrpc_protocol_protobuf_Envelope_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_com_googlecode_mobilityrpc_protocol_protobuf_Envelope_descriptor, new java.lang.String[] { "MessageType", "MessageBytes", }); } // @@protoc_insertion_point(outer_class_scope) }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy