Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
   // Generated by the protocol buffer compiler.  DO NOT EDIT!
   // source: src/main/resources/protos/protoserver.proto
   
   package org.accidia.protoserver.protos;
   
   public final class ProtoServerProtos {
     private ProtoServerProtos() {}
     public static void registerAllExtensions(
         com.google.protobuf.ExtensionRegistry registry) {
    }
    public interface GuidOrBuilder
        extends com.google.protobuf.MessageOrBuilder {
  
      // required string guid = 1;
      
required string guid = 1;
  
      boolean hasGuid();
    
required string guid = 1;
  
      java.lang.String getGuid();
    
required string guid = 1;
  
          getGuidBytes();
  
      // required uint64 timestamp_utc = 2;
      
required uint64 timestamp_utc = 2;
  
      boolean hasTimestampUtc();
    
required uint64 timestamp_utc = 2;
  
      long getTimestampUtc();
    }
  
Protobuf type Guid
 this is mostly to sanity check protoserver container
 
  
    public static final class Guid extends
        implements GuidOrBuilder {
      // Use Guid.newBuilder() to construct.
      private Guid(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
        super(builder);
        this. = builder.getUnknownFields();
      }
      private Guid(boolean noInit) { this. = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); }
  
      private static final Guid defaultInstance;
      public static Guid getDefaultInstance() {
        return ;
      }
  
      public Guid getDefaultInstanceForType() {
        return ;
      }
  
      private final com.google.protobuf.UnknownFieldSet unknownFields;
      @java.lang.Override
      public final com.google.protobuf.UnknownFieldSet
          getUnknownFields() {
        return this.;
      }
      private Guid(
          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(inputunknownFields,
                                       extensionRegistrytag)) {
                  done = true;
                }
                break;
              }
              case 10: {
                 |= 0x00000001;
                 = input.readBytes();
                break;
              }
              case 16: {
                |= 0x00000002;
                = input.readUInt64();
               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.build();
         makeExtensionsImmutable();
       }
     }
     public static final com.google.protobuf.Descriptors.Descriptor
         getDescriptor() {
     }
 
         internalGetFieldAccessorTable() {
           .ensureFieldAccessorsInitialized(
     }
 
     public static com.google.protobuf.Parser<GuidPARSER =
         new com.google.protobuf.AbstractParser<Guid>() {
       public Guid parsePartialFrom(
           com.google.protobuf.CodedInputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws com.google.protobuf.InvalidProtocolBufferException {
         return new Guid(inputextensionRegistry);
       }
     };
 
     @java.lang.Override
       return ;
     }
 
     private int bitField0_;
     // required string guid = 1;
     public static final int GUID_FIELD_NUMBER = 1;
     private java.lang.Object guid_;
    
required string guid = 1;
 
     public boolean hasGuid() {
       return (( & 0x00000001) == 0x00000001);
     }
    
required string guid = 1;
 
     public java.lang.String getGuid() {
       java.lang.Object ref = ;
       if (ref instanceof java.lang.String) {
         return (java.lang.Stringref;
       } else {
         com.google.protobuf.ByteString bs = 
             (com.google.protobuf.ByteStringref;
         java.lang.String s = bs.toStringUtf8();
         if (bs.isValidUtf8()) {
            = s;
         }
         return s;
       }
     }
    
required string guid = 1;
 
     public com.google.protobuf.ByteString
         getGuidBytes() {
       java.lang.Object ref = ;
       if (ref instanceof java.lang.String) {
         com.google.protobuf.ByteString b = 
             com.google.protobuf.ByteString.copyFromUtf8(
                 (java.lang.Stringref);
          = b;
         return b;
       } else {
         return (com.google.protobuf.ByteStringref;
       }
     }
 
     // required uint64 timestamp_utc = 2;
     public static final int TIMESTAMP_UTC_FIELD_NUMBER = 2;
     private long timestampUtc_;
    
required uint64 timestamp_utc = 2;
 
     public boolean hasTimestampUtc() {
       return (( & 0x00000002) == 0x00000002);
     }
    
required uint64 timestamp_utc = 2;
 
     public long getTimestampUtc() {
       return ;
     }
 
     private void initFields() {
        = "";
        = 0L;
     }
     private byte memoizedIsInitialized = -1;
     public final boolean isInitialized() {
       byte isInitialized = ;
       if (isInitialized != -1) return isInitialized == 1;
 
       if (!hasGuid()) {
          = 0;
         return false;
       }
       if (!hasTimestampUtc()) {
          = 0;
         return false;
       }
        = 1;
       return true;
     }
 
     public void writeTo(com.google.protobuf.CodedOutputStream output)
                         throws java.io.IOException {
       getSerializedSize();
       if ((( & 0x00000001) == 0x00000001)) {
         output.writeBytes(1, getGuidBytes());
       }
       if ((( & 0x00000002) == 0x00000002)) {
         output.writeUInt64(2, );
       }
       getUnknownFields().writeTo(output);
     }
 
     private int memoizedSerializedSize = -1;
     public int getSerializedSize() {
       int size = ;
       if (size != -1) return size;
 
       size = 0;
       if ((( & 0x00000001) == 0x00000001)) {
         size += com.google.protobuf.CodedOutputStream
           .computeBytesSize(1, getGuidBytes());
       }
       if ((( & 0x00000002) == 0x00000002)) {
         size += com.google.protobuf.CodedOutputStream
           .computeUInt64Size(2, );
       }
       size += getUnknownFields().getSerializedSize();
        = size;
       return size;
     }
 
     private static final long serialVersionUID = 0L;
     @java.lang.Override
     protected java.lang.Object writeReplace()
         throws java.io.ObjectStreamException {
       return super.writeReplace();
     }
 
         com.google.protobuf.ByteString data)
       return .parseFrom(data);
     }
         com.google.protobuf.ByteString data,
         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
       return .parseFrom(dataextensionRegistry);
     }
     public static org.accidia.protoserver.protos.ProtoServerProtos.Guid parseFrom(byte[] data)
       return .parseFrom(data);
     }
         byte[] data,
         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
       return .parseFrom(dataextensionRegistry);
     }
         throws java.io.IOException {
       return .parseFrom(input);
     }
         java.io.InputStream input,
         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
         throws java.io.IOException {
       return .parseFrom(inputextensionRegistry);
     }
         throws java.io.IOException {
       return .parseDelimitedFrom(input);
     }
         java.io.InputStream input,
         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
         throws java.io.IOException {
       return .parseDelimitedFrom(inputextensionRegistry);
     }
         com.google.protobuf.CodedInputStream input)
         throws java.io.IOException {
       return .parseFrom(input);
     }
         com.google.protobuf.CodedInputStream input,
         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
         throws java.io.IOException {
       return .parseFrom(inputextensionRegistry);
     }
 
     public static Builder newBuilder() { return Builder.create(); }
     public Builder newBuilderForType() { return newBuilder(); }
     public static Builder newBuilder(org.accidia.protoserver.protos.ProtoServerProtos.Guid 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 Guid
 this is mostly to sanity check protoserver container
 
 
     public static final class Builder extends
       public static final com.google.protobuf.Descriptors.Descriptor
           getDescriptor() {
       }
 
           internalGetFieldAccessorTable() {
             .ensureFieldAccessorsInitialized(
       }
 
       // Construct using org.accidia.protoserver.protos.ProtoServerProtos.Guid.newBuilder()
       private Builder() {
       }
 
       private Builder(
           com.google.protobuf.GeneratedMessage.BuilderParent parent) {
         super(parent);
       }
       private void maybeForceBuilderInitialization() {
         }
       }
       private static Builder create() {
         return new Builder();
       }
 
       public Builder clear() {
         super.clear();
          = "";
          = ( & ~0x00000001);
          = 0L;
          = ( & ~0x00000002);
         return this;
       }
 
       public Builder clone() {
         return create().mergeFrom(buildPartial());
       }
 
           getDescriptorForType() {
       }
 
         return org.accidia.protoserver.protos.ProtoServerProtos.Guid.getDefaultInstance();
       }
 
         if (!result.isInitialized()) {
           throw newUninitializedMessageException(result);
         }
         return result;
       }
 
         int from_bitField0_ = ;
         int to_bitField0_ = 0;
         if (((from_bitField0_ & 0x00000001) == 0x00000001)) {
           to_bitField0_ |= 0x00000001;
         }
         result.guid_ = ;
         if (((from_bitField0_ & 0x00000002) == 0x00000002)) {
           to_bitField0_ |= 0x00000002;
         }
         result.timestampUtc_ = ;
         result.bitField0_ = to_bitField0_;
         onBuilt();
         return result;
       }
 
       public Builder mergeFrom(com.google.protobuf.Message other) {
         if (other instanceof org.accidia.protoserver.protos.ProtoServerProtos.Guid) {
           return mergeFrom((org.accidia.protoserver.protos.ProtoServerProtos.Guid)other);
         } else {
           super.mergeFrom(other);
           return this;
         }
       }
 
         if (other == org.accidia.protoserver.protos.ProtoServerProtos.Guid.getDefaultInstance()) return this;
         if (other.hasGuid()) {
            |= 0x00000001;
            = other.guid_;
           onChanged();
         }
         if (other.hasTimestampUtc()) {
           setTimestampUtc(other.getTimestampUtc());
         }
         this.mergeUnknownFields(other.getUnknownFields());
         return this;
       }
 
       public final boolean isInitialized() {
         if (!hasGuid()) {
           
           return false;
         }
         if (!hasTimestampUtc()) {
           
           return false;
         }
         return true;
       }
 
       public Builder mergeFrom(
           com.google.protobuf.CodedInputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
         org.accidia.protoserver.protos.ProtoServerProtos.Guid parsedMessage = null;
         try {
           parsedMessage = .parsePartialFrom(inputextensionRegistry);
         } catch (com.google.protobuf.InvalidProtocolBufferException e) {
           parsedMessage = (org.accidia.protoserver.protos.ProtoServerProtos.Guide.getUnfinishedMessage();
           throw e;
         } finally {
           if (parsedMessage != null) {
             mergeFrom(parsedMessage);
           }
         }
         return this;
       }
       private int bitField0_;
 
       // required string guid = 1;
       private java.lang.Object guid_ = "";
      
required string guid = 1;
 
       public boolean hasGuid() {
         return (( & 0x00000001) == 0x00000001);
       }
      
required string guid = 1;
 
       public java.lang.String getGuid() {
         java.lang.Object ref = ;
         if (!(ref instanceof java.lang.String)) {
           java.lang.String s = ((com.google.protobuf.ByteStringref)
               .toStringUtf8();
            = s;
           return s;
         } else {
           return (java.lang.Stringref;
         }
       }
      
required string guid = 1;
 
       public com.google.protobuf.ByteString
           getGuidBytes() {
         java.lang.Object ref = ;
         if (ref instanceof String) {
           com.google.protobuf.ByteString b = 
               com.google.protobuf.ByteString.copyFromUtf8(
                   (java.lang.Stringref);
            = b;
           return b;
         } else {
           return (com.google.protobuf.ByteStringref;
         }
       }
      
required string guid = 1;
 
       public Builder setGuid(
           java.lang.String value) {
         if (value == null) {
     throw new NullPointerException();
   }
    |= 0x00000001;
          = value;
         onChanged();
         return this;
       }
      
required string guid = 1;
 
       public Builder clearGuid() {
          = ( & ~0x00000001);
          = getDefaultInstance().getGuid();
         onChanged();
         return this;
       }
      
required string guid = 1;
 
       public Builder setGuidBytes(
           com.google.protobuf.ByteString value) {
         if (value == null) {
     throw new NullPointerException();
   }
    |= 0x00000001;
          = value;
         onChanged();
         return this;
       }
 
       // required uint64 timestamp_utc = 2;
       private long timestampUtc_ ;
      
required uint64 timestamp_utc = 2;
 
       public boolean hasTimestampUtc() {
         return (( & 0x00000002) == 0x00000002);
       }
      
required uint64 timestamp_utc = 2;
 
       public long getTimestampUtc() {
         return ;
       }
      
required uint64 timestamp_utc = 2;
 
       public Builder setTimestampUtc(long value) {
          |= 0x00000002;
          = value;
         onChanged();
         return this;
       }
      
required uint64 timestamp_utc = 2;
 
       public Builder clearTimestampUtc() {
          = ( & ~0x00000002);
          = 0L;
         onChanged();
         return this;
       }
 
       // @@protoc_insertion_point(builder_scope:Guid)
     }
 
     static {
        = new Guid(true);
     }
 
     // @@protoc_insertion_point(class_scope:Guid)
   }
 
   public interface StatusOrBuilder
       extends com.google.protobuf.MessageOrBuilder {
 
     // optional string cpu_time = 1;
     
optional string cpu_time = 1;
 
     boolean hasCpuTime();
    
optional string cpu_time = 1;
 
     java.lang.String getCpuTime();
    
optional string cpu_time = 1;
 
         getCpuTimeBytes();
 
     // optional string user_time = 2;
     
optional string user_time = 2;
 
     boolean hasUserTime();
    
optional string user_time = 2;
 
     java.lang.String getUserTime();
    
optional string user_time = 2;
 
         getUserTimeBytes();
 
     // optional string system_time = 3;
     
optional string system_time = 3;
 
     boolean hasSystemTime();
    
optional string system_time = 3;
 
     java.lang.String getSystemTime();
    
optional string system_time = 3;
 
         getSystemTimeBytes();
 
     // repeated .Status.Property properties = 4;
     
repeated .Status.Property properties = 4;
 
         getPropertiesList();
    
repeated .Status.Property properties = 4;
 
repeated .Status.Property properties = 4;
 
     int getPropertiesCount();
    
repeated .Status.Property properties = 4;
 
         getPropertiesOrBuilderList();
    
repeated .Status.Property properties = 4;
 
         int index);
 
     // repeated .Status.Environment environments = 5;
     
repeated .Status.Environment environments = 5;
 
         getEnvironmentsList();
    
repeated .Status.Environment environments = 5;
 
repeated .Status.Environment environments = 5;
 
     int getEnvironmentsCount();
    
repeated .Status.Environment environments = 5;
 
         getEnvironmentsOrBuilderList();
    
repeated .Status.Environment environments = 5;
 
         int index);
   }
  
Protobuf type Status
 contains all environment variables and properties
 
 
   public static final class Status extends
       implements StatusOrBuilder {
     // Use Status.newBuilder() to construct.
     private Status(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
       super(builder);
       this. = builder.getUnknownFields();
     }
     private Status(boolean noInit) { this. = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); }
 
     private static final Status defaultInstance;
     public static Status getDefaultInstance() {
       return ;
     }
 
     public Status getDefaultInstanceForType() {
       return ;
     }
 
     private final com.google.protobuf.UnknownFieldSet unknownFields;
     @java.lang.Override
     public final com.google.protobuf.UnknownFieldSet
         getUnknownFields() {
       return this.;
     }
     private Status(
         com.google.protobuf.CodedInputStream input,
         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
       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(inputunknownFields,
                                      extensionRegistrytag)) {
                 done = true;
               }
               break;
             }
             case 10: {
                |= 0x00000001;
                = input.readBytes();
               break;
             }
             case 18: {
                |= 0x00000002;
                = input.readBytes();
               break;
             }
             case 26: {
                |= 0x00000004;
                = input.readBytes();
               break;
             }
             case 34: {
               if (!((mutable_bitField0_ & 0x00000008) == 0x00000008)) {
                 mutable_bitField0_ |= 0x00000008;
               }
               .add(input.readMessage(.......extensionRegistry));
               break;
             }
             case 42: {
               if (!((mutable_bitField0_ & 0x00000010) == 0x00000010)) {
                 mutable_bitField0_ |= 0x00000010;
               }
               .add(input.readMessage(.......extensionRegistry));
               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 {
         if (((mutable_bitField0_ & 0x00000008) == 0x00000008)) {
            = java.util.Collections.unmodifiableList();
         }
         if (((mutable_bitField0_ & 0x00000010) == 0x00000010)) {
            = java.util.Collections.unmodifiableList();
         }
         this. = unknownFields.build();
         makeExtensionsImmutable();
       }
     }
     public static final com.google.protobuf.Descriptors.Descriptor
         getDescriptor() {
     }
 
         internalGetFieldAccessorTable() {
           .ensureFieldAccessorsInitialized(
     }
 
     public static com.google.protobuf.Parser<StatusPARSER =
         new com.google.protobuf.AbstractParser<Status>() {
       public Status parsePartialFrom(
           com.google.protobuf.CodedInputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws com.google.protobuf.InvalidProtocolBufferException {
         return new Status(inputextensionRegistry);
       }
     };
 
     @java.lang.Override
       return ;
     }
 
     public interface PropertyOrBuilder
         extends com.google.protobuf.MessageOrBuilder {
 
       // required string key = 1;
       
required string key = 1;
 
       boolean hasKey();
      
required string key = 1;
 
       java.lang.String getKey();
      
required string key = 1;
 
           getKeyBytes();
 
       // required string value = 2;
       
required string value = 2;
 
       boolean hasValue();
      
required string value = 2;
 
       java.lang.String getValue();
      
required string value = 2;
 
           getValueBytes();
     }
    
Protobuf type Status.Property
 
     public static final class Property extends
         implements PropertyOrBuilder {
       // Use Property.newBuilder() to construct.
       private Property(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
         super(builder);
         this. = builder.getUnknownFields();
       }
       private Property(boolean noInit) { this. = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); }
 
       private static final Property defaultInstance;
       public static Property getDefaultInstance() {
         return ;
       }
 
       public Property getDefaultInstanceForType() {
         return ;
       }
 
       private final com.google.protobuf.UnknownFieldSet unknownFields;
       @java.lang.Override
       public final com.google.protobuf.UnknownFieldSet
           getUnknownFields() {
         return this.;
       }
       private Property(
           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(inputunknownFields,
                                        extensionRegistrytag)) {
                   done = true;
                 }
                 break;
               }
               case 10: {
                  |= 0x00000001;
                  = input.readBytes();
                 break;
               }
               case 18: {
                  |= 0x00000002;
                  = input.readBytes();
                 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.build();
           makeExtensionsImmutable();
         }
       }
       public static final com.google.protobuf.Descriptors.Descriptor
           getDescriptor() {
       }
 
           internalGetFieldAccessorTable() {
             .ensureFieldAccessorsInitialized(
       }
 
       public static com.google.protobuf.Parser<PropertyPARSER =
           new com.google.protobuf.AbstractParser<Property>() {
         public Property parsePartialFrom(
             com.google.protobuf.CodedInputStream input,
             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
             throws com.google.protobuf.InvalidProtocolBufferException {
           return new Property(inputextensionRegistry);
         }
       };
 
       @java.lang.Override
       public com.google.protobuf.Parser<PropertygetParserForType() {
         return ;
       }
 
       private int bitField0_;
       // required string key = 1;
       public static final int KEY_FIELD_NUMBER = 1;
       private java.lang.Object key_;
      
required string key = 1;
 
       public boolean hasKey() {
         return (( & 0x00000001) == 0x00000001);
       }
      
required string key = 1;
 
       public java.lang.String getKey() {
         java.lang.Object ref = ;
         if (ref instanceof java.lang.String) {
           return (java.lang.Stringref;
         } else {
           com.google.protobuf.ByteString bs = 
               (com.google.protobuf.ByteStringref;
           java.lang.String s = bs.toStringUtf8();
           if (bs.isValidUtf8()) {
              = s;
           }
           return s;
         }
       }
      
required string key = 1;
 
       public com.google.protobuf.ByteString
           getKeyBytes() {
         java.lang.Object ref = ;
         if (ref instanceof java.lang.String) {
           com.google.protobuf.ByteString b = 
               com.google.protobuf.ByteString.copyFromUtf8(
                   (java.lang.Stringref);
            = b;
           return b;
         } else {
           return (com.google.protobuf.ByteStringref;
         }
       }
 
       // required string value = 2;
       public static final int VALUE_FIELD_NUMBER = 2;
       private java.lang.Object value_;
      
required string value = 2;
 
       public boolean hasValue() {
        return (( & 0x00000002) == 0x00000002);
      }
      
required string value = 2;
      public java.lang.String getValue() {
        java.lang.Object ref = ;
        if (ref instanceof java.lang.String) {
          return (java.lang.Stringref;
        } else {
          com.google.protobuf.ByteString bs = 
              (com.google.protobuf.ByteStringref;