Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
  // Generated by the protocol buffer compiler.  DO NOT EDIT!
  // source: qpstest.proto
  
  package io.grpc.testing;

Protobuf type grpc.testing.SimpleRequest
  
  public  final class SimpleRequest extends
     com.google.protobuf.GeneratedMessage implements
     // @@protoc_insertion_point(message_implements:grpc.testing.SimpleRequest)
   // Use SimpleRequest.newBuilder() to construct.
     super(builder);
   }
   private SimpleRequest() {
      = 0;
      = 0;
   }
 
   public final com.google.protobuf.UnknownFieldSet
     return com.google.protobuf.UnknownFieldSet.getDefaultInstance();
   }
   private SimpleRequest(
       com.google.protobuf.CodedInputStream input,
       com.google.protobuf.ExtensionRegistryLite extensionRegistry)
     this();
     int mutable_bitField0_ = 0;
     try {
       boolean done = false;
       while (!done) {
         int tag = input.readTag();
         switch (tag) {
           case 0:
             done = true;
             break;
           default: {
             if (!input.skipField(tag)) {
               done = true;
             }
             break;
           }
           case 8: {
             int rawValue = input.readEnum();
 
              = rawValue;
             break;
           }
           case 16: {
 
              = input.readInt32();
             break;
           }
           case 26: {
             io.grpc.testing.Payload.Builder subBuilder = null;
             if ( != null) {
               subBuilder = .toBuilder();
             }
              = input.readMessage(....extensionRegistry);
             if (subBuilder != null) {
               subBuilder.mergeFrom();
                = subBuilder.buildPartial();
             }
 
             break;
           }
         }
       }
       throw e.setUnfinishedMessage(this);
     } catch (java.io.IOException e) {
           e.getMessage()).setUnfinishedMessage(this);
     } finally {
       makeExtensionsImmutable();
     }
   }
   public static final com.google.protobuf.Descriptors.Descriptor
       getDescriptor() {
   }
 
             io.grpc.testing.SimpleRequest.classio.grpc.testing.SimpleRequest.Builder.class);
   }
 
   public static final com.google.protobuf.Parser<SimpleRequestPARSER =
     public SimpleRequest parsePartialFrom(
         com.google.protobuf.CodedInputStream input,
         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      return new SimpleRequest(inputextensionRegistry);
    }
  };
    return ;
  }
  public static final int RESPONSE_TYPE_FIELD_NUMBER = 1;
  private int responseType_;
  
optional .grpc.testing.PayloadType response_type = 1;
 Desired payload type in the response from the server.
 If response_type is RANDOM, server randomly chooses one from other formats.
 
  public int getResponseTypeValue() {
    return ;
  }
  
optional .grpc.testing.PayloadType response_type = 1;
 Desired payload type in the response from the server.
 If response_type is RANDOM, server randomly chooses one from other formats.
 
    io.grpc.testing.PayloadType result = io.grpc.testing.PayloadType.valueOf();
    return result == null ? .... : result;
  }
  public static final int RESPONSE_SIZE_FIELD_NUMBER = 2;
  private int responseSize_;
  
optional int32 response_size = 2;
 Desired payload size in the response from the server.
 If response_type is COMPRESSABLE, this denotes the size before compression.
 
  public int getResponseSize() {
    return ;
  }
  public static final int PAYLOAD_FIELD_NUMBER = 3;
  private io.grpc.testing.Payload payload_;
  
optional .grpc.testing.Payload payload = 3;
 Optional input payload sent along with the request.
 
  public boolean hasPayload() {
    return  != null;
  }
  
optional .grpc.testing.Payload payload = 3;
 Optional input payload sent along with the request.
 
  public io.grpc.testing.Payload getPayload() {
    return  == null ? io.grpc.testing.Payload.getDefaultInstance() : ;
  }
  
optional .grpc.testing.Payload payload = 3;
 Optional input payload sent along with the request.
 
    return getPayload();
  }
  private byte memoizedIsInitialized = -1;
  public final boolean isInitialized() {
    byte isInitialized = ;
    if (isInitialized == 1) return true;
    if (isInitialized == 0) return false;
    return true;
  }
  public void writeTo(com.google.protobuf.CodedOutputStream output)
                      throws java.io.IOException {
      output.writeEnum(1, );
    }
    if ( != 0) {
      output.writeInt32(2, );
    }
    if ( != null) {
      output.writeMessage(3, getPayload());
    }
  }
  private int memoizedSerializedSize = -1;
  public int getSerializedSize() {
    int size = ;
    if (size != -1) return size;
    size = 0;
      size += com.google.protobuf.CodedOutputStream
        .computeEnumSize(1, );
    }
    if ( != 0) {
      size += com.google.protobuf.CodedOutputStream
        .computeInt32Size(2, );
    }
    if ( != null) {
      size += com.google.protobuf.CodedOutputStream
        .computeMessageSize(3, getPayload());
    }
     = size;
    return size;
  }
  private static final long serialVersionUID = 0L;
  public static io.grpc.testing.SimpleRequest parseFrom(
      com.google.protobuf.ByteString data)
    return .parseFrom(data);
  }
  public static io.grpc.testing.SimpleRequest parseFrom(
      com.google.protobuf.ByteString data,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
    return .parseFrom(dataextensionRegistry);
  }
  public static io.grpc.testing.SimpleRequest parseFrom(byte[] data)
    return .parseFrom(data);
  }
  public static io.grpc.testing.SimpleRequest parseFrom(
      byte[] data,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
    return .parseFrom(dataextensionRegistry);
  }
      throws java.io.IOException {
    return .parseFrom(input);
  }
  public static io.grpc.testing.SimpleRequest parseFrom(
      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);
  }
  public static io.grpc.testing.SimpleRequest parseFrom(
      throws java.io.IOException {
    return .parseFrom(input);
  }
  public static io.grpc.testing.SimpleRequest parseFrom(
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws java.io.IOException {
    return .parseFrom(inputextensionRegistry);
  }
  public static Builder newBuilder() { return new Builder(); }
  public Builder newBuilderForType() { return newBuilder(); }
  public static Builder newBuilder(io.grpc.testing.SimpleRequest prototype) {
    return newBuilder().mergeFrom(prototype);
  }
  public Builder toBuilder() { return newBuilder(this); }
  protected Builder newBuilderForType(
    Builder builder = new Builder(parent);
    return builder;
  }
  
Protobuf type grpc.testing.SimpleRequest
  public static final class Builder extends
      // @@protoc_insertion_point(builder_implements:grpc.testing.SimpleRequest)
    public static final com.google.protobuf.Descriptors.Descriptor
        getDescriptor() {
    }
              io.grpc.testing.SimpleRequest.classio.grpc.testing.SimpleRequest.Builder.class);
    }
    // Construct using io.grpc.testing.SimpleRequest.newBuilder()
    private Builder() {
    }
    private Builder(
      super(parent);
    }
    private void maybeForceBuilderInitialization() {
      }
    }
    public Builder clear() {
      super.clear();
       = 0;
       = 0;
      if ( == null) {
         = null;
      } else {
         = null;
         = null;
      }
      return this;
    }
        getDescriptorForType() {
    }
      return io.grpc.testing.SimpleRequest.getDefaultInstance();
    }
    public io.grpc.testing.SimpleRequest build() {
      io.grpc.testing.SimpleRequest result = buildPartial();
      if (!result.isInitialized()) {
        throw newUninitializedMessageException(result);
      }
      return result;
    }
      io.grpc.testing.SimpleRequest result = new io.grpc.testing.SimpleRequest(this);
      result.responseType_ = ;
      result.responseSize_ = ;
      if ( == null) {
        result.payload_ = ;
      } else {
        result.payload_ = .build();
      }
      onBuilt();
      return result;
    }
    public Builder mergeFrom(com.google.protobuf.Message other) {
      if (other instanceof io.grpc.testing.SimpleRequest) {
        return mergeFrom((io.grpc.testing.SimpleRequest)other);
      } else {
        super.mergeFrom(other);
        return this;
      }
    }
    public Builder mergeFrom(io.grpc.testing.SimpleRequest other) {
      if (other == io.grpc.testing.SimpleRequest.getDefaultInstance()) return this;
      if (other.responseType_ != 0) {
      }
      if (other.getResponseSize() != 0) {
        setResponseSize(other.getResponseSize());
      }
      if (other.hasPayload()) {
        mergePayload(other.getPayload());
      }
      onChanged();
      return this;
    }
    public final boolean isInitialized() {
      return true;
    }
    public Builder mergeFrom(
        com.google.protobuf.CodedInputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      io.grpc.testing.SimpleRequest parsedMessage = null;
      try {
        parsedMessage = .parsePartialFrom(inputextensionRegistry);
        parsedMessage = (io.grpc.testing.SimpleRequeste.getUnfinishedMessage();
        throw e;
      } finally {
        if (parsedMessage != null) {
          mergeFrom(parsedMessage);
        }
      }
      return this;
    }
    private int responseType_ = 0;
    
optional .grpc.testing.PayloadType response_type = 1;
 Desired payload type in the response from the server.
 If response_type is RANDOM, server randomly chooses one from other formats.
 
    public int getResponseTypeValue() {
      return ;
    }
    
optional .grpc.testing.PayloadType response_type = 1;
 Desired payload type in the response from the server.
 If response_type is RANDOM, server randomly chooses one from other formats.
 
    public Builder setResponseTypeValue(int value) {
       = value;
      onChanged();
      return this;
    }
    
optional .grpc.testing.PayloadType response_type = 1;
 Desired payload type in the response from the server.
 If response_type is RANDOM, server randomly chooses one from other formats.
 
      io.grpc.testing.PayloadType result = io.grpc.testing.PayloadType.valueOf();
      return result == null ? .... : result;
    }
    
optional .grpc.testing.PayloadType response_type = 1;
 Desired payload type in the response from the server.
 If response_type is RANDOM, server randomly chooses one from other formats.
 
    public Builder setResponseType(io.grpc.testing.PayloadType value) {
      if (value == null) {
        throw new NullPointerException();
      }
      
       = value.getNumber();
      onChanged();
      return this;
    }
    
optional .grpc.testing.PayloadType response_type = 1;
 Desired payload type in the response from the server.
 If response_type is RANDOM, server randomly chooses one from other formats.
 
    public Builder clearResponseType() {
      
       = 0;
      onChanged();
      return this;
    }
    private int responseSize_ ;
    
optional int32 response_size = 2;
 Desired payload size in the response from the server.
 If response_type is COMPRESSABLE, this denotes the size before compression.
 
    public int getResponseSize() {
      return ;
    }
    
optional int32 response_size = 2;
 Desired payload size in the response from the server.
 If response_type is COMPRESSABLE, this denotes the size before compression.
 
    public Builder setResponseSize(int value) {
      
       = value;
      onChanged();
      return this;
    }
    
optional int32 response_size = 2;
 Desired payload size in the response from the server.
 If response_type is COMPRESSABLE, this denotes the size before compression.
 
    public Builder clearResponseSize() {
      
       = 0;
      onChanged();
      return this;
    }
    private io.grpc.testing.Payload payload_ = null;
optional .grpc.testing.Payload payload = 3;
 Optional input payload sent along with the request.
 
    public boolean hasPayload() {
      return  != null ||  != null;
    }
    
optional .grpc.testing.Payload payload = 3;
 Optional input payload sent along with the request.
 
    public io.grpc.testing.Payload getPayload() {
      if ( == null) {
        return  == null ? io.grpc.testing.Payload.getDefaultInstance() : ;
      } else {
        return .getMessage();
      }
    }
    
optional .grpc.testing.Payload payload = 3;
 Optional input payload sent along with the request.
 
    public Builder setPayload(io.grpc.testing.Payload value) {
      if ( == null) {
        if (value == null) {
          throw new NullPointerException();
        }
         = value;
        onChanged();
      } else {
        .setMessage(value);
      }
      return this;
    }
    
optional .grpc.testing.Payload payload = 3;
 Optional input payload sent along with the request.
 
    public Builder setPayload(
        io.grpc.testing.Payload.Builder builderForValue) {
      if ( == null) {
         = builderForValue.build();
        onChanged();
      } else {
        .setMessage(builderForValue.build());
      }
      return this;
    }
    
optional .grpc.testing.Payload payload = 3;
 Optional input payload sent along with the request.
 
    public Builder mergePayload(io.grpc.testing.Payload value) {
      if ( == null) {
        if ( != null) {
           =
            io.grpc.testing.Payload.newBuilder().mergeFrom(value).buildPartial();
        } else {
           = value;
        }
        onChanged();
      } else {
        .mergeFrom(value);
      }
      return this;
    }
    
optional .grpc.testing.Payload payload = 3;
 Optional input payload sent along with the request.
 
    public Builder clearPayload() {
      if ( == null) {
         = null;
        onChanged();
      } else {
         = null;
         = null;
      }
      return this;
    }
    
optional .grpc.testing.Payload payload = 3;
 Optional input payload sent along with the request.
 
      
      onChanged();
      return getPayloadFieldBuilder().getBuilder();
    }
    
optional .grpc.testing.Payload payload = 3;
 Optional input payload sent along with the request.
 
      if ( != null) {
        return .getMessageOrBuilder();
      } else {
        return  == null ?
            io.grpc.testing.Payload.getDefaultInstance() : ;
      }
    }
    
optional .grpc.testing.Payload payload = 3;
 Optional input payload sent along with the request.
 
        getPayloadFieldBuilder() {
      if ( == null) {
                getPayload(),
                getParentForChildren(),
                isClean());
         = null;
      }
      return ;
    }
    public final Builder setUnknownFields(
        final com.google.protobuf.UnknownFieldSet unknownFields) {
      return this;
    }
    public final Builder mergeUnknownFields(
        final com.google.protobuf.UnknownFieldSet unknownFields) {
      return this;
    }
    // @@protoc_insertion_point(builder_scope:grpc.testing.SimpleRequest)
  }
  // @@protoc_insertion_point(class_scope:grpc.testing.SimpleRequest)
  private static final io.grpc.testing.SimpleRequest defaultInstance;static {
  }
    return ;
  }
    return ;
  }
New to GrepCode? Check out our FAQ X