Class PluginProtos.CodeGeneratorResponse.Builder

java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder<MessageType,BuilderType>
com.google.protobuf.GeneratedMessageLite.Builder<PluginProtos.CodeGeneratorResponse,PluginProtos.CodeGeneratorResponse.Builder>
com.google.protobuf.compiler.PluginProtos.CodeGeneratorResponse.Builder
All Implemented Interfaces:
PluginProtos.CodeGeneratorResponseOrBuilder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, Cloneable
Enclosing class:
PluginProtos.CodeGeneratorResponse

public static final class PluginProtos.CodeGeneratorResponse.Builder extends com.google.protobuf.GeneratedMessageLite.Builder<PluginProtos.CodeGeneratorResponse,PluginProtos.CodeGeneratorResponse.Builder> implements PluginProtos.CodeGeneratorResponseOrBuilder
 The plugin writes an encoded CodeGeneratorResponse to stdout.
 
Protobuf type google.protobuf.compiler.CodeGeneratorResponse
  • Method Details

    • hasError

      public boolean hasError()
       Error message.  If non-empty, code generation failed.  The plugin process
       should exit with status code zero even if it reports an error in this way.
      
       This should be used to indicate errors in .proto files which prevent the
       code generator from generating correct code.  Errors which indicate a
       problem in protoc itself -- such as the input CodeGeneratorRequest being
       unparseable -- should be reported by writing a message to stderr and
       exiting with a non-zero status code.
       
      optional string error = 1 [json_name = "error"];
      Specified by:
      hasError in interface PluginProtos.CodeGeneratorResponseOrBuilder
      Returns:
      Whether the error field is set.
    • getError

      public String getError()
       Error message.  If non-empty, code generation failed.  The plugin process
       should exit with status code zero even if it reports an error in this way.
      
       This should be used to indicate errors in .proto files which prevent the
       code generator from generating correct code.  Errors which indicate a
       problem in protoc itself -- such as the input CodeGeneratorRequest being
       unparseable -- should be reported by writing a message to stderr and
       exiting with a non-zero status code.
       
      optional string error = 1 [json_name = "error"];
      Specified by:
      getError in interface PluginProtos.CodeGeneratorResponseOrBuilder
      Returns:
      The error.
    • getErrorBytes

      public com.google.protobuf.ByteString getErrorBytes()
       Error message.  If non-empty, code generation failed.  The plugin process
       should exit with status code zero even if it reports an error in this way.
      
       This should be used to indicate errors in .proto files which prevent the
       code generator from generating correct code.  Errors which indicate a
       problem in protoc itself -- such as the input CodeGeneratorRequest being
       unparseable -- should be reported by writing a message to stderr and
       exiting with a non-zero status code.
       
      optional string error = 1 [json_name = "error"];
      Specified by:
      getErrorBytes in interface PluginProtos.CodeGeneratorResponseOrBuilder
      Returns:
      The bytes for error.
    • setError

       Error message.  If non-empty, code generation failed.  The plugin process
       should exit with status code zero even if it reports an error in this way.
      
       This should be used to indicate errors in .proto files which prevent the
       code generator from generating correct code.  Errors which indicate a
       problem in protoc itself -- such as the input CodeGeneratorRequest being
       unparseable -- should be reported by writing a message to stderr and
       exiting with a non-zero status code.
       
      optional string error = 1 [json_name = "error"];
      Parameters:
      value - The error to set.
      Returns:
      This builder for chaining.
    • clearError

       Error message.  If non-empty, code generation failed.  The plugin process
       should exit with status code zero even if it reports an error in this way.
      
       This should be used to indicate errors in .proto files which prevent the
       code generator from generating correct code.  Errors which indicate a
       problem in protoc itself -- such as the input CodeGeneratorRequest being
       unparseable -- should be reported by writing a message to stderr and
       exiting with a non-zero status code.
       
      optional string error = 1 [json_name = "error"];
      Returns:
      This builder for chaining.
    • setErrorBytes

      public PluginProtos.CodeGeneratorResponse.Builder setErrorBytes(com.google.protobuf.ByteString value)
       Error message.  If non-empty, code generation failed.  The plugin process
       should exit with status code zero even if it reports an error in this way.
      
       This should be used to indicate errors in .proto files which prevent the
       code generator from generating correct code.  Errors which indicate a
       problem in protoc itself -- such as the input CodeGeneratorRequest being
       unparseable -- should be reported by writing a message to stderr and
       exiting with a non-zero status code.
       
      optional string error = 1 [json_name = "error"];
      Parameters:
      value - The bytes for error to set.
      Returns:
      This builder for chaining.
    • hasSupportedFeatures

      public boolean hasSupportedFeatures()
       A bitmask of supported features that the code generator supports.
       This is a bitwise "or" of values from the Feature enum.
       
      optional uint64 supported_features = 2 [json_name = "supportedFeatures"];
      Specified by:
      hasSupportedFeatures in interface PluginProtos.CodeGeneratorResponseOrBuilder
      Returns:
      Whether the supportedFeatures field is set.
    • getSupportedFeatures

      public long getSupportedFeatures()
       A bitmask of supported features that the code generator supports.
       This is a bitwise "or" of values from the Feature enum.
       
      optional uint64 supported_features = 2 [json_name = "supportedFeatures"];
      Specified by:
      getSupportedFeatures in interface PluginProtos.CodeGeneratorResponseOrBuilder
      Returns:
      The supportedFeatures.
    • setSupportedFeatures

      public PluginProtos.CodeGeneratorResponse.Builder setSupportedFeatures(long value)
       A bitmask of supported features that the code generator supports.
       This is a bitwise "or" of values from the Feature enum.
       
      optional uint64 supported_features = 2 [json_name = "supportedFeatures"];
      Parameters:
      value - The supportedFeatures to set.
      Returns:
      This builder for chaining.
    • clearSupportedFeatures

      public PluginProtos.CodeGeneratorResponse.Builder clearSupportedFeatures()
       A bitmask of supported features that the code generator supports.
       This is a bitwise "or" of values from the Feature enum.
       
      optional uint64 supported_features = 2 [json_name = "supportedFeatures"];
      Returns:
      This builder for chaining.
    • getFileList

      repeated .google.protobuf.compiler.CodeGeneratorResponse.File file = 15 [json_name = "file"];
      Specified by:
      getFileList in interface PluginProtos.CodeGeneratorResponseOrBuilder
    • getFileCount

      public int getFileCount()
      repeated .google.protobuf.compiler.CodeGeneratorResponse.File file = 15 [json_name = "file"];
      Specified by:
      getFileCount in interface PluginProtos.CodeGeneratorResponseOrBuilder
    • getFile

      public PluginProtos.CodeGeneratorResponse.File getFile(int index)
      repeated .google.protobuf.compiler.CodeGeneratorResponse.File file = 15 [json_name = "file"];
      Specified by:
      getFile in interface PluginProtos.CodeGeneratorResponseOrBuilder
    • setFile

      repeated .google.protobuf.compiler.CodeGeneratorResponse.File file = 15 [json_name = "file"];
    • setFile

      repeated .google.protobuf.compiler.CodeGeneratorResponse.File file = 15 [json_name = "file"];
    • addFile

      repeated .google.protobuf.compiler.CodeGeneratorResponse.File file = 15 [json_name = "file"];
    • addFile

      repeated .google.protobuf.compiler.CodeGeneratorResponse.File file = 15 [json_name = "file"];
    • addFile

      repeated .google.protobuf.compiler.CodeGeneratorResponse.File file = 15 [json_name = "file"];
    • addFile

      repeated .google.protobuf.compiler.CodeGeneratorResponse.File file = 15 [json_name = "file"];
    • addAllFile

      repeated .google.protobuf.compiler.CodeGeneratorResponse.File file = 15 [json_name = "file"];
    • clearFile

      repeated .google.protobuf.compiler.CodeGeneratorResponse.File file = 15 [json_name = "file"];
    • removeFile

      public PluginProtos.CodeGeneratorResponse.Builder removeFile(int index)
      repeated .google.protobuf.compiler.CodeGeneratorResponse.File file = 15 [json_name = "file"];