com.google.protobuf.compiler.PluginProtos Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of protobuf-lite Show documentation
Show all versions of protobuf-lite Show documentation
A trimmed-down version of the Protocol Buffers library.
The newest version!
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: google/protobuf/compiler/plugin.proto
package com.google.protobuf.compiler;
public final class PluginProtos {
private PluginProtos() {}
public static void registerAllExtensions(
com.google.protobuf.ExtensionRegistryLite registry) {
}
public interface CodeGeneratorRequestOrBuilder extends
// @@protoc_insertion_point(interface_extends:google.protobuf.compiler.CodeGeneratorRequest)
com.google.protobuf.MessageLiteOrBuilder {
/**
*
* The .proto files that were explicitly listed on the command-line. The
* code generator should generate code only for these files. Each file's
* descriptor will be included in proto_file, below.
*
*
* repeated string file_to_generate = 1;
*/
java.util.List
getFileToGenerateList();
/**
*
* The .proto files that were explicitly listed on the command-line. The
* code generator should generate code only for these files. Each file's
* descriptor will be included in proto_file, below.
*
*
* repeated string file_to_generate = 1;
*/
int getFileToGenerateCount();
/**
*
* The .proto files that were explicitly listed on the command-line. The
* code generator should generate code only for these files. Each file's
* descriptor will be included in proto_file, below.
*
*
* repeated string file_to_generate = 1;
*/
java.lang.String getFileToGenerate(int index);
/**
*
* The .proto files that were explicitly listed on the command-line. The
* code generator should generate code only for these files. Each file's
* descriptor will be included in proto_file, below.
*
*
* repeated string file_to_generate = 1;
*/
com.google.protobuf.ByteString
getFileToGenerateBytes(int index);
/**
*
* The generator parameter passed on the command-line.
*
*
* optional string parameter = 2;
*/
boolean hasParameter();
/**
*
* The generator parameter passed on the command-line.
*
*
* optional string parameter = 2;
*/
java.lang.String getParameter();
/**
*
* The generator parameter passed on the command-line.
*
*
* optional string parameter = 2;
*/
com.google.protobuf.ByteString
getParameterBytes();
/**
*
* FileDescriptorProtos for all files in files_to_generate and everything
* they import. The files will appear in topological order, so each file
* appears before any file that imports it.
* protoc guarantees that all proto_files will be written after
* the fields above, even though this is not technically guaranteed by the
* protobuf wire format. This theoretically could allow a plugin to stream
* in the FileDescriptorProtos and handle them one by one rather than read
* the entire set into memory at once. However, as of this writing, this
* is not similarly optimized on protoc's end -- it will store all fields in
* memory at once before sending them to the plugin.
*
*
* repeated .google.protobuf.FileDescriptorProto proto_file = 15;
*/
java.util.List
getProtoFileList();
/**
*
* FileDescriptorProtos for all files in files_to_generate and everything
* they import. The files will appear in topological order, so each file
* appears before any file that imports it.
* protoc guarantees that all proto_files will be written after
* the fields above, even though this is not technically guaranteed by the
* protobuf wire format. This theoretically could allow a plugin to stream
* in the FileDescriptorProtos and handle them one by one rather than read
* the entire set into memory at once. However, as of this writing, this
* is not similarly optimized on protoc's end -- it will store all fields in
* memory at once before sending them to the plugin.
*
*
* repeated .google.protobuf.FileDescriptorProto proto_file = 15;
*/
com.google.protobuf.DescriptorProtos.FileDescriptorProto getProtoFile(int index);
/**
*
* FileDescriptorProtos for all files in files_to_generate and everything
* they import. The files will appear in topological order, so each file
* appears before any file that imports it.
* protoc guarantees that all proto_files will be written after
* the fields above, even though this is not technically guaranteed by the
* protobuf wire format. This theoretically could allow a plugin to stream
* in the FileDescriptorProtos and handle them one by one rather than read
* the entire set into memory at once. However, as of this writing, this
* is not similarly optimized on protoc's end -- it will store all fields in
* memory at once before sending them to the plugin.
*
*
* repeated .google.protobuf.FileDescriptorProto proto_file = 15;
*/
int getProtoFileCount();
}
/**
*
* An encoded CodeGeneratorRequest is written to the plugin's stdin.
*
*
* Protobuf type {@code google.protobuf.compiler.CodeGeneratorRequest}
*/
public static final class CodeGeneratorRequest extends
com.google.protobuf.GeneratedMessageLite<
CodeGeneratorRequest, CodeGeneratorRequest.Builder> implements
// @@protoc_insertion_point(message_implements:google.protobuf.compiler.CodeGeneratorRequest)
CodeGeneratorRequestOrBuilder {
private CodeGeneratorRequest() {
fileToGenerate_ = com.google.protobuf.GeneratedMessageLite.emptyProtobufList();
parameter_ = "";
protoFile_ = emptyProtobufList();
}
private int bitField0_;
public static final int FILE_TO_GENERATE_FIELD_NUMBER = 1;
private com.google.protobuf.Internal.ProtobufList fileToGenerate_;
/**
*
* The .proto files that were explicitly listed on the command-line. The
* code generator should generate code only for these files. Each file's
* descriptor will be included in proto_file, below.
*
*
* repeated string file_to_generate = 1;
*/
public java.util.List getFileToGenerateList() {
return fileToGenerate_;
}
/**
*
* The .proto files that were explicitly listed on the command-line. The
* code generator should generate code only for these files. Each file's
* descriptor will be included in proto_file, below.
*
*
* repeated string file_to_generate = 1;
*/
public int getFileToGenerateCount() {
return fileToGenerate_.size();
}
/**
*
* The .proto files that were explicitly listed on the command-line. The
* code generator should generate code only for these files. Each file's
* descriptor will be included in proto_file, below.
*
*
* repeated string file_to_generate = 1;
*/
public java.lang.String getFileToGenerate(int index) {
return fileToGenerate_.get(index);
}
/**
*
* The .proto files that were explicitly listed on the command-line. The
* code generator should generate code only for these files. Each file's
* descriptor will be included in proto_file, below.
*
*
* repeated string file_to_generate = 1;
*/
public com.google.protobuf.ByteString
getFileToGenerateBytes(int index) {
return com.google.protobuf.ByteString.copyFromUtf8(
fileToGenerate_.get(index));
}
private void ensureFileToGenerateIsMutable() {
if (!fileToGenerate_.isModifiable()) {
fileToGenerate_ =
com.google.protobuf.GeneratedMessageLite.mutableCopy(fileToGenerate_);
}
}
/**
*
* The .proto files that were explicitly listed on the command-line. The
* code generator should generate code only for these files. Each file's
* descriptor will be included in proto_file, below.
*
*
* repeated string file_to_generate = 1;
*/
private void setFileToGenerate(
int index, java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
ensureFileToGenerateIsMutable();
fileToGenerate_.set(index, value);
}
/**
*
* The .proto files that were explicitly listed on the command-line. The
* code generator should generate code only for these files. Each file's
* descriptor will be included in proto_file, below.
*
*
* repeated string file_to_generate = 1;
*/
private void addFileToGenerate(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
ensureFileToGenerateIsMutable();
fileToGenerate_.add(value);
}
/**
*
* The .proto files that were explicitly listed on the command-line. The
* code generator should generate code only for these files. Each file's
* descriptor will be included in proto_file, below.
*
*
* repeated string file_to_generate = 1;
*/
private void addAllFileToGenerate(
java.lang.Iterable values) {
ensureFileToGenerateIsMutable();
com.google.protobuf.AbstractMessageLite.addAll(
values, fileToGenerate_);
}
/**
*
* The .proto files that were explicitly listed on the command-line. The
* code generator should generate code only for these files. Each file's
* descriptor will be included in proto_file, below.
*
*
* repeated string file_to_generate = 1;
*/
private void clearFileToGenerate() {
fileToGenerate_ = com.google.protobuf.GeneratedMessageLite.emptyProtobufList();
}
/**
*
* The .proto files that were explicitly listed on the command-line. The
* code generator should generate code only for these files. Each file's
* descriptor will be included in proto_file, below.
*
*
* repeated string file_to_generate = 1;
*/
private void addFileToGenerateBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
ensureFileToGenerateIsMutable();
fileToGenerate_.add(value.toStringUtf8());
}
public static final int PARAMETER_FIELD_NUMBER = 2;
private java.lang.String parameter_;
/**
*
* The generator parameter passed on the command-line.
*
*
* optional string parameter = 2;
*/
public boolean hasParameter() {
return ((bitField0_ & 0x00000001) == 0x00000001);
}
/**
*
* The generator parameter passed on the command-line.
*
*
* optional string parameter = 2;
*/
public java.lang.String getParameter() {
return parameter_;
}
/**
*
* The generator parameter passed on the command-line.
*
*
* optional string parameter = 2;
*/
public com.google.protobuf.ByteString
getParameterBytes() {
return com.google.protobuf.ByteString.copyFromUtf8(parameter_);
}
/**
*
* The generator parameter passed on the command-line.
*
*
* optional string parameter = 2;
*/
private void setParameter(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000001;
parameter_ = value;
}
/**
*
* The generator parameter passed on the command-line.
*
*
* optional string parameter = 2;
*/
private void clearParameter() {
bitField0_ = (bitField0_ & ~0x00000001);
parameter_ = getDefaultInstance().getParameter();
}
/**
*
* The generator parameter passed on the command-line.
*
*
* optional string parameter = 2;
*/
private void setParameterBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000001;
parameter_ = value.toStringUtf8();
}
public static final int PROTO_FILE_FIELD_NUMBER = 15;
private com.google.protobuf.Internal.ProtobufList protoFile_;
/**
*
* FileDescriptorProtos for all files in files_to_generate and everything
* they import. The files will appear in topological order, so each file
* appears before any file that imports it.
* protoc guarantees that all proto_files will be written after
* the fields above, even though this is not technically guaranteed by the
* protobuf wire format. This theoretically could allow a plugin to stream
* in the FileDescriptorProtos and handle them one by one rather than read
* the entire set into memory at once. However, as of this writing, this
* is not similarly optimized on protoc's end -- it will store all fields in
* memory at once before sending them to the plugin.
*
*
* repeated .google.protobuf.FileDescriptorProto proto_file = 15;
*/
public java.util.List getProtoFileList() {
return protoFile_;
}
/**
*
* FileDescriptorProtos for all files in files_to_generate and everything
* they import. The files will appear in topological order, so each file
* appears before any file that imports it.
* protoc guarantees that all proto_files will be written after
* the fields above, even though this is not technically guaranteed by the
* protobuf wire format. This theoretically could allow a plugin to stream
* in the FileDescriptorProtos and handle them one by one rather than read
* the entire set into memory at once. However, as of this writing, this
* is not similarly optimized on protoc's end -- it will store all fields in
* memory at once before sending them to the plugin.
*
*
* repeated .google.protobuf.FileDescriptorProto proto_file = 15;
*/
public java.util.List extends com.google.protobuf.DescriptorProtos.FileDescriptorProtoOrBuilder>
getProtoFileOrBuilderList() {
return protoFile_;
}
/**
*
* FileDescriptorProtos for all files in files_to_generate and everything
* they import. The files will appear in topological order, so each file
* appears before any file that imports it.
* protoc guarantees that all proto_files will be written after
* the fields above, even though this is not technically guaranteed by the
* protobuf wire format. This theoretically could allow a plugin to stream
* in the FileDescriptorProtos and handle them one by one rather than read
* the entire set into memory at once. However, as of this writing, this
* is not similarly optimized on protoc's end -- it will store all fields in
* memory at once before sending them to the plugin.
*
*
* repeated .google.protobuf.FileDescriptorProto proto_file = 15;
*/
public int getProtoFileCount() {
return protoFile_.size();
}
/**
*
* FileDescriptorProtos for all files in files_to_generate and everything
* they import. The files will appear in topological order, so each file
* appears before any file that imports it.
* protoc guarantees that all proto_files will be written after
* the fields above, even though this is not technically guaranteed by the
* protobuf wire format. This theoretically could allow a plugin to stream
* in the FileDescriptorProtos and handle them one by one rather than read
* the entire set into memory at once. However, as of this writing, this
* is not similarly optimized on protoc's end -- it will store all fields in
* memory at once before sending them to the plugin.
*
*
* repeated .google.protobuf.FileDescriptorProto proto_file = 15;
*/
public com.google.protobuf.DescriptorProtos.FileDescriptorProto getProtoFile(int index) {
return protoFile_.get(index);
}
/**
*
* FileDescriptorProtos for all files in files_to_generate and everything
* they import. The files will appear in topological order, so each file
* appears before any file that imports it.
* protoc guarantees that all proto_files will be written after
* the fields above, even though this is not technically guaranteed by the
* protobuf wire format. This theoretically could allow a plugin to stream
* in the FileDescriptorProtos and handle them one by one rather than read
* the entire set into memory at once. However, as of this writing, this
* is not similarly optimized on protoc's end -- it will store all fields in
* memory at once before sending them to the plugin.
*
*
* repeated .google.protobuf.FileDescriptorProto proto_file = 15;
*/
public com.google.protobuf.DescriptorProtos.FileDescriptorProtoOrBuilder getProtoFileOrBuilder(
int index) {
return protoFile_.get(index);
}
private void ensureProtoFileIsMutable() {
if (!protoFile_.isModifiable()) {
protoFile_ =
com.google.protobuf.GeneratedMessageLite.mutableCopy(protoFile_);
}
}
/**
*
* FileDescriptorProtos for all files in files_to_generate and everything
* they import. The files will appear in topological order, so each file
* appears before any file that imports it.
* protoc guarantees that all proto_files will be written after
* the fields above, even though this is not technically guaranteed by the
* protobuf wire format. This theoretically could allow a plugin to stream
* in the FileDescriptorProtos and handle them one by one rather than read
* the entire set into memory at once. However, as of this writing, this
* is not similarly optimized on protoc's end -- it will store all fields in
* memory at once before sending them to the plugin.
*
*
* repeated .google.protobuf.FileDescriptorProto proto_file = 15;
*/
private void setProtoFile(
int index, com.google.protobuf.DescriptorProtos.FileDescriptorProto value) {
if (value == null) {
throw new NullPointerException();
}
ensureProtoFileIsMutable();
protoFile_.set(index, value);
}
/**
*
* FileDescriptorProtos for all files in files_to_generate and everything
* they import. The files will appear in topological order, so each file
* appears before any file that imports it.
* protoc guarantees that all proto_files will be written after
* the fields above, even though this is not technically guaranteed by the
* protobuf wire format. This theoretically could allow a plugin to stream
* in the FileDescriptorProtos and handle them one by one rather than read
* the entire set into memory at once. However, as of this writing, this
* is not similarly optimized on protoc's end -- it will store all fields in
* memory at once before sending them to the plugin.
*
*
* repeated .google.protobuf.FileDescriptorProto proto_file = 15;
*/
private void setProtoFile(
int index, com.google.protobuf.DescriptorProtos.FileDescriptorProto.Builder builderForValue) {
ensureProtoFileIsMutable();
protoFile_.set(index, builderForValue.build());
}
/**
*
* FileDescriptorProtos for all files in files_to_generate and everything
* they import. The files will appear in topological order, so each file
* appears before any file that imports it.
* protoc guarantees that all proto_files will be written after
* the fields above, even though this is not technically guaranteed by the
* protobuf wire format. This theoretically could allow a plugin to stream
* in the FileDescriptorProtos and handle them one by one rather than read
* the entire set into memory at once. However, as of this writing, this
* is not similarly optimized on protoc's end -- it will store all fields in
* memory at once before sending them to the plugin.
*
*
* repeated .google.protobuf.FileDescriptorProto proto_file = 15;
*/
private void addProtoFile(com.google.protobuf.DescriptorProtos.FileDescriptorProto value) {
if (value == null) {
throw new NullPointerException();
}
ensureProtoFileIsMutable();
protoFile_.add(value);
}
/**
*
* FileDescriptorProtos for all files in files_to_generate and everything
* they import. The files will appear in topological order, so each file
* appears before any file that imports it.
* protoc guarantees that all proto_files will be written after
* the fields above, even though this is not technically guaranteed by the
* protobuf wire format. This theoretically could allow a plugin to stream
* in the FileDescriptorProtos and handle them one by one rather than read
* the entire set into memory at once. However, as of this writing, this
* is not similarly optimized on protoc's end -- it will store all fields in
* memory at once before sending them to the plugin.
*
*
* repeated .google.protobuf.FileDescriptorProto proto_file = 15;
*/
private void addProtoFile(
int index, com.google.protobuf.DescriptorProtos.FileDescriptorProto value) {
if (value == null) {
throw new NullPointerException();
}
ensureProtoFileIsMutable();
protoFile_.add(index, value);
}
/**
*
* FileDescriptorProtos for all files in files_to_generate and everything
* they import. The files will appear in topological order, so each file
* appears before any file that imports it.
* protoc guarantees that all proto_files will be written after
* the fields above, even though this is not technically guaranteed by the
* protobuf wire format. This theoretically could allow a plugin to stream
* in the FileDescriptorProtos and handle them one by one rather than read
* the entire set into memory at once. However, as of this writing, this
* is not similarly optimized on protoc's end -- it will store all fields in
* memory at once before sending them to the plugin.
*
*
* repeated .google.protobuf.FileDescriptorProto proto_file = 15;
*/
private void addProtoFile(
com.google.protobuf.DescriptorProtos.FileDescriptorProto.Builder builderForValue) {
ensureProtoFileIsMutable();
protoFile_.add(builderForValue.build());
}
/**
*
* FileDescriptorProtos for all files in files_to_generate and everything
* they import. The files will appear in topological order, so each file
* appears before any file that imports it.
* protoc guarantees that all proto_files will be written after
* the fields above, even though this is not technically guaranteed by the
* protobuf wire format. This theoretically could allow a plugin to stream
* in the FileDescriptorProtos and handle them one by one rather than read
* the entire set into memory at once. However, as of this writing, this
* is not similarly optimized on protoc's end -- it will store all fields in
* memory at once before sending them to the plugin.
*
*
* repeated .google.protobuf.FileDescriptorProto proto_file = 15;
*/
private void addProtoFile(
int index, com.google.protobuf.DescriptorProtos.FileDescriptorProto.Builder builderForValue) {
ensureProtoFileIsMutable();
protoFile_.add(index, builderForValue.build());
}
/**
*
* FileDescriptorProtos for all files in files_to_generate and everything
* they import. The files will appear in topological order, so each file
* appears before any file that imports it.
* protoc guarantees that all proto_files will be written after
* the fields above, even though this is not technically guaranteed by the
* protobuf wire format. This theoretically could allow a plugin to stream
* in the FileDescriptorProtos and handle them one by one rather than read
* the entire set into memory at once. However, as of this writing, this
* is not similarly optimized on protoc's end -- it will store all fields in
* memory at once before sending them to the plugin.
*
*
* repeated .google.protobuf.FileDescriptorProto proto_file = 15;
*/
private void addAllProtoFile(
java.lang.Iterable extends com.google.protobuf.DescriptorProtos.FileDescriptorProto> values) {
ensureProtoFileIsMutable();
com.google.protobuf.AbstractMessageLite.addAll(
values, protoFile_);
}
/**
*
* FileDescriptorProtos for all files in files_to_generate and everything
* they import. The files will appear in topological order, so each file
* appears before any file that imports it.
* protoc guarantees that all proto_files will be written after
* the fields above, even though this is not technically guaranteed by the
* protobuf wire format. This theoretically could allow a plugin to stream
* in the FileDescriptorProtos and handle them one by one rather than read
* the entire set into memory at once. However, as of this writing, this
* is not similarly optimized on protoc's end -- it will store all fields in
* memory at once before sending them to the plugin.
*
*
* repeated .google.protobuf.FileDescriptorProto proto_file = 15;
*/
private void clearProtoFile() {
protoFile_ = emptyProtobufList();
}
/**
*
* FileDescriptorProtos for all files in files_to_generate and everything
* they import. The files will appear in topological order, so each file
* appears before any file that imports it.
* protoc guarantees that all proto_files will be written after
* the fields above, even though this is not technically guaranteed by the
* protobuf wire format. This theoretically could allow a plugin to stream
* in the FileDescriptorProtos and handle them one by one rather than read
* the entire set into memory at once. However, as of this writing, this
* is not similarly optimized on protoc's end -- it will store all fields in
* memory at once before sending them to the plugin.
*
*
* repeated .google.protobuf.FileDescriptorProto proto_file = 15;
*/
private void removeProtoFile(int index) {
ensureProtoFileIsMutable();
protoFile_.remove(index);
}
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
for (int i = 0; i < fileToGenerate_.size(); i++) {
output.writeString(1, fileToGenerate_.get(i));
}
if (((bitField0_ & 0x00000001) == 0x00000001)) {
output.writeString(2, getParameter());
}
for (int i = 0; i < protoFile_.size(); i++) {
output.writeMessage(15, protoFile_.get(i));
}
unknownFields.writeTo(output);
}
public int getSerializedSize() {
int size = memoizedSerializedSize;
if (size != -1) return size;
size = 0;
{
int dataSize = 0;
for (int i = 0; i < fileToGenerate_.size(); i++) {
dataSize += com.google.protobuf.CodedOutputStream
.computeStringSizeNoTag(fileToGenerate_.get(i));
}
size += dataSize;
size += 1 * getFileToGenerateList().size();
}
if (((bitField0_ & 0x00000001) == 0x00000001)) {
size += com.google.protobuf.CodedOutputStream
.computeStringSize(2, getParameter());
}
for (int i = 0; i < protoFile_.size(); i++) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(15, protoFile_.get(i));
}
size += unknownFields.getSerializedSize();
memoizedSerializedSize = size;
return size;
}
public static com.google.protobuf.compiler.PluginProtos.CodeGeneratorRequest parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return com.google.protobuf.GeneratedMessageLite.parseFrom(
DEFAULT_INSTANCE, data);
}
public static com.google.protobuf.compiler.PluginProtos.CodeGeneratorRequest 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.google.protobuf.compiler.PluginProtos.CodeGeneratorRequest parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return com.google.protobuf.GeneratedMessageLite.parseFrom(
DEFAULT_INSTANCE, data);
}
public static com.google.protobuf.compiler.PluginProtos.CodeGeneratorRequest 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.google.protobuf.compiler.PluginProtos.CodeGeneratorRequest parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageLite.parseFrom(
DEFAULT_INSTANCE, input);
}
public static com.google.protobuf.compiler.PluginProtos.CodeGeneratorRequest 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.google.protobuf.compiler.PluginProtos.CodeGeneratorRequest parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return parseDelimitedFrom(DEFAULT_INSTANCE, input);
}
public static com.google.protobuf.compiler.PluginProtos.CodeGeneratorRequest parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return parseDelimitedFrom(DEFAULT_INSTANCE, input, extensionRegistry);
}
public static com.google.protobuf.compiler.PluginProtos.CodeGeneratorRequest parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageLite.parseFrom(
DEFAULT_INSTANCE, input);
}
public static com.google.protobuf.compiler.PluginProtos.CodeGeneratorRequest 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 DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(com.google.protobuf.compiler.PluginProtos.CodeGeneratorRequest prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
/**
*
* An encoded CodeGeneratorRequest is written to the plugin's stdin.
*
*
* Protobuf type {@code google.protobuf.compiler.CodeGeneratorRequest}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageLite.Builder<
com.google.protobuf.compiler.PluginProtos.CodeGeneratorRequest, Builder> implements
// @@protoc_insertion_point(builder_implements:google.protobuf.compiler.CodeGeneratorRequest)
com.google.protobuf.compiler.PluginProtos.CodeGeneratorRequestOrBuilder {
// Construct using com.google.protobuf.compiler.PluginProtos.CodeGeneratorRequest.newBuilder()
private Builder() {
super(DEFAULT_INSTANCE);
}
/**
*
* The .proto files that were explicitly listed on the command-line. The
* code generator should generate code only for these files. Each file's
* descriptor will be included in proto_file, below.
*
*
* repeated string file_to_generate = 1;
*/
public java.util.List
getFileToGenerateList() {
return java.util.Collections.unmodifiableList(
instance.getFileToGenerateList());
}
/**
*
* The .proto files that were explicitly listed on the command-line. The
* code generator should generate code only for these files. Each file's
* descriptor will be included in proto_file, below.
*
*
* repeated string file_to_generate = 1;
*/
public int getFileToGenerateCount() {
return instance.getFileToGenerateCount();
}
/**
*
* The .proto files that were explicitly listed on the command-line. The
* code generator should generate code only for these files. Each file's
* descriptor will be included in proto_file, below.
*
*
* repeated string file_to_generate = 1;
*/
public java.lang.String getFileToGenerate(int index) {
return instance.getFileToGenerate(index);
}
/**
*
* The .proto files that were explicitly listed on the command-line. The
* code generator should generate code only for these files. Each file's
* descriptor will be included in proto_file, below.
*
*
* repeated string file_to_generate = 1;
*/
public com.google.protobuf.ByteString
getFileToGenerateBytes(int index) {
return instance.getFileToGenerateBytes(index);
}
/**
*
* The .proto files that were explicitly listed on the command-line. The
* code generator should generate code only for these files. Each file's
* descriptor will be included in proto_file, below.
*
*
* repeated string file_to_generate = 1;
*/
public Builder setFileToGenerate(
int index, java.lang.String value) {
copyOnWrite();
instance.setFileToGenerate(index, value);
return this;
}
/**
*
* The .proto files that were explicitly listed on the command-line. The
* code generator should generate code only for these files. Each file's
* descriptor will be included in proto_file, below.
*
*
* repeated string file_to_generate = 1;
*/
public Builder addFileToGenerate(
java.lang.String value) {
copyOnWrite();
instance.addFileToGenerate(value);
return this;
}
/**
*
* The .proto files that were explicitly listed on the command-line. The
* code generator should generate code only for these files. Each file's
* descriptor will be included in proto_file, below.
*
*
* repeated string file_to_generate = 1;
*/
public Builder addAllFileToGenerate(
java.lang.Iterable values) {
copyOnWrite();
instance.addAllFileToGenerate(values);
return this;
}
/**
*
* The .proto files that were explicitly listed on the command-line. The
* code generator should generate code only for these files. Each file's
* descriptor will be included in proto_file, below.
*
*
* repeated string file_to_generate = 1;
*/
public Builder clearFileToGenerate() {
copyOnWrite();
instance.clearFileToGenerate();
return this;
}
/**
*
* The .proto files that were explicitly listed on the command-line. The
* code generator should generate code only for these files. Each file's
* descriptor will be included in proto_file, below.
*
*
* repeated string file_to_generate = 1;
*/
public Builder addFileToGenerateBytes(
com.google.protobuf.ByteString value) {
copyOnWrite();
instance.addFileToGenerateBytes(value);
return this;
}
/**
*
* The generator parameter passed on the command-line.
*
*
* optional string parameter = 2;
*/
public boolean hasParameter() {
return instance.hasParameter();
}
/**
*
* The generator parameter passed on the command-line.
*
*
* optional string parameter = 2;
*/
public java.lang.String getParameter() {
return instance.getParameter();
}
/**
*
* The generator parameter passed on the command-line.
*
*
* optional string parameter = 2;
*/
public com.google.protobuf.ByteString
getParameterBytes() {
return instance.getParameterBytes();
}
/**
*
* The generator parameter passed on the command-line.
*
*
* optional string parameter = 2;
*/
public Builder setParameter(
java.lang.String value) {
copyOnWrite();
instance.setParameter(value);
return this;
}
/**
*
* The generator parameter passed on the command-line.
*
*
* optional string parameter = 2;
*/
public Builder clearParameter() {
copyOnWrite();
instance.clearParameter();
return this;
}
/**
*
* The generator parameter passed on the command-line.
*
*
* optional string parameter = 2;
*/
public Builder setParameterBytes(
com.google.protobuf.ByteString value) {
copyOnWrite();
instance.setParameterBytes(value);
return this;
}
/**
*
* FileDescriptorProtos for all files in files_to_generate and everything
* they import. The files will appear in topological order, so each file
* appears before any file that imports it.
* protoc guarantees that all proto_files will be written after
* the fields above, even though this is not technically guaranteed by the
* protobuf wire format. This theoretically could allow a plugin to stream
* in the FileDescriptorProtos and handle them one by one rather than read
* the entire set into memory at once. However, as of this writing, this
* is not similarly optimized on protoc's end -- it will store all fields in
* memory at once before sending them to the plugin.
*
*
* repeated .google.protobuf.FileDescriptorProto proto_file = 15;
*/
public java.util.List getProtoFileList() {
return java.util.Collections.unmodifiableList(
instance.getProtoFileList());
}
/**
*
* FileDescriptorProtos for all files in files_to_generate and everything
* they import. The files will appear in topological order, so each file
* appears before any file that imports it.
* protoc guarantees that all proto_files will be written after
* the fields above, even though this is not technically guaranteed by the
* protobuf wire format. This theoretically could allow a plugin to stream
* in the FileDescriptorProtos and handle them one by one rather than read
* the entire set into memory at once. However, as of this writing, this
* is not similarly optimized on protoc's end -- it will store all fields in
* memory at once before sending them to the plugin.
*
*
* repeated .google.protobuf.FileDescriptorProto proto_file = 15;
*/
public int getProtoFileCount() {
return instance.getProtoFileCount();
}/**
*
* FileDescriptorProtos for all files in files_to_generate and everything
* they import. The files will appear in topological order, so each file
* appears before any file that imports it.
* protoc guarantees that all proto_files will be written after
* the fields above, even though this is not technically guaranteed by the
* protobuf wire format. This theoretically could allow a plugin to stream
* in the FileDescriptorProtos and handle them one by one rather than read
* the entire set into memory at once. However, as of this writing, this
* is not similarly optimized on protoc's end -- it will store all fields in
* memory at once before sending them to the plugin.
*
*
* repeated .google.protobuf.FileDescriptorProto proto_file = 15;
*/
public com.google.protobuf.DescriptorProtos.FileDescriptorProto getProtoFile(int index) {
return instance.getProtoFile(index);
}
/**
*
* FileDescriptorProtos for all files in files_to_generate and everything
* they import. The files will appear in topological order, so each file
* appears before any file that imports it.
* protoc guarantees that all proto_files will be written after
* the fields above, even though this is not technically guaranteed by the
* protobuf wire format. This theoretically could allow a plugin to stream
* in the FileDescriptorProtos and handle them one by one rather than read
* the entire set into memory at once. However, as of this writing, this
* is not similarly optimized on protoc's end -- it will store all fields in
* memory at once before sending them to the plugin.
*
*
* repeated .google.protobuf.FileDescriptorProto proto_file = 15;
*/
public Builder setProtoFile(
int index, com.google.protobuf.DescriptorProtos.FileDescriptorProto value) {
copyOnWrite();
instance.setProtoFile(index, value);
return this;
}
/**
*
* FileDescriptorProtos for all files in files_to_generate and everything
* they import. The files will appear in topological order, so each file
* appears before any file that imports it.
* protoc guarantees that all proto_files will be written after
* the fields above, even though this is not technically guaranteed by the
* protobuf wire format. This theoretically could allow a plugin to stream
* in the FileDescriptorProtos and handle them one by one rather than read
* the entire set into memory at once. However, as of this writing, this
* is not similarly optimized on protoc's end -- it will store all fields in
* memory at once before sending them to the plugin.
*
*
* repeated .google.protobuf.FileDescriptorProto proto_file = 15;
*/
public Builder setProtoFile(
int index, com.google.protobuf.DescriptorProtos.FileDescriptorProto.Builder builderForValue) {
copyOnWrite();
instance.setProtoFile(index, builderForValue);
return this;
}
/**
*
* FileDescriptorProtos for all files in files_to_generate and everything
* they import. The files will appear in topological order, so each file
* appears before any file that imports it.
* protoc guarantees that all proto_files will be written after
* the fields above, even though this is not technically guaranteed by the
* protobuf wire format. This theoretically could allow a plugin to stream
* in the FileDescriptorProtos and handle them one by one rather than read
* the entire set into memory at once. However, as of this writing, this
* is not similarly optimized on protoc's end -- it will store all fields in
* memory at once before sending them to the plugin.
*
*
* repeated .google.protobuf.FileDescriptorProto proto_file = 15;
*/
public Builder addProtoFile(com.google.protobuf.DescriptorProtos.FileDescriptorProto value) {
copyOnWrite();
instance.addProtoFile(value);
return this;
}
/**
*
* FileDescriptorProtos for all files in files_to_generate and everything
* they import. The files will appear in topological order, so each file
* appears before any file that imports it.
* protoc guarantees that all proto_files will be written after
* the fields above, even though this is not technically guaranteed by the
* protobuf wire format. This theoretically could allow a plugin to stream
* in the FileDescriptorProtos and handle them one by one rather than read
* the entire set into memory at once. However, as of this writing, this
* is not similarly optimized on protoc's end -- it will store all fields in
* memory at once before sending them to the plugin.
*
*
* repeated .google.protobuf.FileDescriptorProto proto_file = 15;
*/
public Builder addProtoFile(
int index, com.google.protobuf.DescriptorProtos.FileDescriptorProto value) {
copyOnWrite();
instance.addProtoFile(index, value);
return this;
}
/**
*
* FileDescriptorProtos for all files in files_to_generate and everything
* they import. The files will appear in topological order, so each file
* appears before any file that imports it.
* protoc guarantees that all proto_files will be written after
* the fields above, even though this is not technically guaranteed by the
* protobuf wire format. This theoretically could allow a plugin to stream
* in the FileDescriptorProtos and handle them one by one rather than read
* the entire set into memory at once. However, as of this writing, this
* is not similarly optimized on protoc's end -- it will store all fields in
* memory at once before sending them to the plugin.
*
*
* repeated .google.protobuf.FileDescriptorProto proto_file = 15;
*/
public Builder addProtoFile(
com.google.protobuf.DescriptorProtos.FileDescriptorProto.Builder builderForValue) {
copyOnWrite();
instance.addProtoFile(builderForValue);
return this;
}
/**
*
* FileDescriptorProtos for all files in files_to_generate and everything
* they import. The files will appear in topological order, so each file
* appears before any file that imports it.
* protoc guarantees that all proto_files will be written after
* the fields above, even though this is not technically guaranteed by the
* protobuf wire format. This theoretically could allow a plugin to stream
* in the FileDescriptorProtos and handle them one by one rather than read
* the entire set into memory at once. However, as of this writing, this
* is not similarly optimized on protoc's end -- it will store all fields in
* memory at once before sending them to the plugin.
*
*
* repeated .google.protobuf.FileDescriptorProto proto_file = 15;
*/
public Builder addProtoFile(
int index, com.google.protobuf.DescriptorProtos.FileDescriptorProto.Builder builderForValue) {
copyOnWrite();
instance.addProtoFile(index, builderForValue);
return this;
}
/**
*
* FileDescriptorProtos for all files in files_to_generate and everything
* they import. The files will appear in topological order, so each file
* appears before any file that imports it.
* protoc guarantees that all proto_files will be written after
* the fields above, even though this is not technically guaranteed by the
* protobuf wire format. This theoretically could allow a plugin to stream
* in the FileDescriptorProtos and handle them one by one rather than read
* the entire set into memory at once. However, as of this writing, this
* is not similarly optimized on protoc's end -- it will store all fields in
* memory at once before sending them to the plugin.
*
*
* repeated .google.protobuf.FileDescriptorProto proto_file = 15;
*/
public Builder addAllProtoFile(
java.lang.Iterable extends com.google.protobuf.DescriptorProtos.FileDescriptorProto> values) {
copyOnWrite();
instance.addAllProtoFile(values);
return this;
}
/**
*
* FileDescriptorProtos for all files in files_to_generate and everything
* they import. The files will appear in topological order, so each file
* appears before any file that imports it.
* protoc guarantees that all proto_files will be written after
* the fields above, even though this is not technically guaranteed by the
* protobuf wire format. This theoretically could allow a plugin to stream
* in the FileDescriptorProtos and handle them one by one rather than read
* the entire set into memory at once. However, as of this writing, this
* is not similarly optimized on protoc's end -- it will store all fields in
* memory at once before sending them to the plugin.
*
*
* repeated .google.protobuf.FileDescriptorProto proto_file = 15;
*/
public Builder clearProtoFile() {
copyOnWrite();
instance.clearProtoFile();
return this;
}
/**
*
* FileDescriptorProtos for all files in files_to_generate and everything
* they import. The files will appear in topological order, so each file
* appears before any file that imports it.
* protoc guarantees that all proto_files will be written after
* the fields above, even though this is not technically guaranteed by the
* protobuf wire format. This theoretically could allow a plugin to stream
* in the FileDescriptorProtos and handle them one by one rather than read
* the entire set into memory at once. However, as of this writing, this
* is not similarly optimized on protoc's end -- it will store all fields in
* memory at once before sending them to the plugin.
*
*
* repeated .google.protobuf.FileDescriptorProto proto_file = 15;
*/
public Builder removeProtoFile(int index) {
copyOnWrite();
instance.removeProtoFile(index);
return this;
}
// @@protoc_insertion_point(builder_scope:google.protobuf.compiler.CodeGeneratorRequest)
}
private byte memoizedIsInitialized = -1;
protected final Object dynamicMethod(
com.google.protobuf.GeneratedMessageLite.MethodToInvoke method,
Object arg0, Object arg1) {
switch (method) {
case NEW_MUTABLE_INSTANCE: {
return new com.google.protobuf.compiler.PluginProtos.CodeGeneratorRequest();
}
case IS_INITIALIZED: {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return DEFAULT_INSTANCE;
if (isInitialized == 0) return null;
boolean shouldMemoize = ((Boolean) arg0).booleanValue();
for (int i = 0; i < getProtoFileCount(); i++) {
if (!getProtoFile(i).isInitialized()) {
if (shouldMemoize) {
memoizedIsInitialized = 0;
}
return null;
}
}
if (shouldMemoize) memoizedIsInitialized = 1;
return DEFAULT_INSTANCE;
}
case MAKE_IMMUTABLE: {
fileToGenerate_.makeImmutable();
protoFile_.makeImmutable();
return null;
}
case NEW_BUILDER: {
return new Builder();
}
case VISIT: {
Visitor visitor = (Visitor) arg0;
com.google.protobuf.compiler.PluginProtos.CodeGeneratorRequest other = (com.google.protobuf.compiler.PluginProtos.CodeGeneratorRequest) arg1;
fileToGenerate_= visitor.visitList(fileToGenerate_, other.fileToGenerate_);
parameter_ = visitor.visitString(
hasParameter(), parameter_,
other.hasParameter(), other.parameter_);
protoFile_= visitor.visitList(protoFile_, other.protoFile_);
if (visitor == com.google.protobuf.GeneratedMessageLite.MergeFromVisitor
.INSTANCE) {
bitField0_ |= other.bitField0_;
}
return this;
}
case MERGE_FROM_STREAM: {
com.google.protobuf.CodedInputStream input =
(com.google.protobuf.CodedInputStream) arg0;
com.google.protobuf.ExtensionRegistryLite extensionRegistry =
(com.google.protobuf.ExtensionRegistryLite) arg1;
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
default: {
if (!parseUnknownField(tag, input)) {
done = true;
}
break;
}
case 10: {
String s = input.readString();
if (!fileToGenerate_.isModifiable()) {
fileToGenerate_ =
com.google.protobuf.GeneratedMessageLite.mutableCopy(fileToGenerate_);
}
fileToGenerate_.add(s);
break;
}
case 18: {
String s = input.readString();
bitField0_ |= 0x00000001;
parameter_ = s;
break;
}
case 122: {
if (!protoFile_.isModifiable()) {
protoFile_ =
com.google.protobuf.GeneratedMessageLite.mutableCopy(protoFile_);
}
protoFile_.add(
input.readMessage(com.google.protobuf.DescriptorProtos.FileDescriptorProto.parser(), extensionRegistry));
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 {
}
}
case GET_DEFAULT_INSTANCE: {
return DEFAULT_INSTANCE;
}
case GET_PARSER: {
if (PARSER == null) { synchronized (com.google.protobuf.compiler.PluginProtos.CodeGeneratorRequest.class) {
if (PARSER == null) {
PARSER = new DefaultInstanceBasedParser(DEFAULT_INSTANCE);
}
}
}
return PARSER;
}
}
throw new UnsupportedOperationException();
}
// @@protoc_insertion_point(class_scope:google.protobuf.compiler.CodeGeneratorRequest)
private static final com.google.protobuf.compiler.PluginProtos.CodeGeneratorRequest DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new CodeGeneratorRequest();
DEFAULT_INSTANCE.makeImmutable();
}
public static com.google.protobuf.compiler.PluginProtos.CodeGeneratorRequest getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static volatile com.google.protobuf.Parser PARSER;
public static com.google.protobuf.Parser parser() {
return DEFAULT_INSTANCE.getParserForType();
}
}
public interface CodeGeneratorResponseOrBuilder extends
// @@protoc_insertion_point(interface_extends:google.protobuf.compiler.CodeGeneratorResponse)
com.google.protobuf.MessageLiteOrBuilder {
/**
*
* 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;
*/
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;
*/
java.lang.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;
*/
com.google.protobuf.ByteString
getErrorBytes();
/**
* repeated .google.protobuf.compiler.CodeGeneratorResponse.File file = 15;
*/
java.util.List
getFileList();
/**
* repeated .google.protobuf.compiler.CodeGeneratorResponse.File file = 15;
*/
com.google.protobuf.compiler.PluginProtos.CodeGeneratorResponse.File getFile(int index);
/**
* repeated .google.protobuf.compiler.CodeGeneratorResponse.File file = 15;
*/
int getFileCount();
}
/**
*
* The plugin writes an encoded CodeGeneratorResponse to stdout.
*
*
* Protobuf type {@code google.protobuf.compiler.CodeGeneratorResponse}
*/
public static final class CodeGeneratorResponse extends
com.google.protobuf.GeneratedMessageLite<
CodeGeneratorResponse, CodeGeneratorResponse.Builder> implements
// @@protoc_insertion_point(message_implements:google.protobuf.compiler.CodeGeneratorResponse)
CodeGeneratorResponseOrBuilder {
private CodeGeneratorResponse() {
error_ = "";
file_ = emptyProtobufList();
}
public interface FileOrBuilder extends
// @@protoc_insertion_point(interface_extends:google.protobuf.compiler.CodeGeneratorResponse.File)
com.google.protobuf.MessageLiteOrBuilder {
/**
*
* The file name, relative to the output directory. The name must not
* contain "." or ".." components and must be relative, not be absolute (so,
* the file cannot lie outside the output directory). "/" must be used as
* the path separator, not "\".
* If the name is omitted, the content will be appended to the previous
* file. This allows the generator to break large files into small chunks,
* and allows the generated text to be streamed back to protoc so that large
* files need not reside completely in memory at one time. Note that as of
* this writing protoc does not optimize for this -- it will read the entire
* CodeGeneratorResponse before writing files to disk.
*
*
* optional string name = 1;
*/
boolean hasName();
/**
*
* The file name, relative to the output directory. The name must not
* contain "." or ".." components and must be relative, not be absolute (so,
* the file cannot lie outside the output directory). "/" must be used as
* the path separator, not "\".
* If the name is omitted, the content will be appended to the previous
* file. This allows the generator to break large files into small chunks,
* and allows the generated text to be streamed back to protoc so that large
* files need not reside completely in memory at one time. Note that as of
* this writing protoc does not optimize for this -- it will read the entire
* CodeGeneratorResponse before writing files to disk.
*
*
* optional string name = 1;
*/
java.lang.String getName();
/**
*
* The file name, relative to the output directory. The name must not
* contain "." or ".." components and must be relative, not be absolute (so,
* the file cannot lie outside the output directory). "/" must be used as
* the path separator, not "\".
* If the name is omitted, the content will be appended to the previous
* file. This allows the generator to break large files into small chunks,
* and allows the generated text to be streamed back to protoc so that large
* files need not reside completely in memory at one time. Note that as of
* this writing protoc does not optimize for this -- it will read the entire
* CodeGeneratorResponse before writing files to disk.
*
*
* optional string name = 1;
*/
com.google.protobuf.ByteString
getNameBytes();
/**
*
* If non-empty, indicates that the named file should already exist, and the
* content here is to be inserted into that file at a defined insertion
* point. This feature allows a code generator to extend the output
* produced by another code generator. The original generator may provide
* insertion points by placing special annotations in the file that look
* like:
* @@protoc_insertion_point(NAME)
* The annotation can have arbitrary text before and after it on the line,
* which allows it to be placed in a comment. NAME should be replaced with
* an identifier naming the point -- this is what other generators will use
* as the insertion_point. Code inserted at this point will be placed
* immediately above the line containing the insertion point (thus multiple
* insertions to the same point will come out in the order they were added).
* The double-@ is intended to make it unlikely that the generated code
* could contain things that look like insertion points by accident.
* For example, the C++ code generator places the following line in the
* .pb.h files that it generates:
* // @@protoc_insertion_point(namespace_scope)
* This line appears within the scope of the file's package namespace, but
* outside of any particular class. Another plugin can then specify the
* insertion_point "namespace_scope" to generate additional classes or
* other declarations that should be placed in this scope.
* Note that if the line containing the insertion point begins with
* whitespace, the same whitespace will be added to every line of the
* inserted text. This is useful for languages like Python, where
* indentation matters. In these languages, the insertion point comment
* should be indented the same amount as any inserted code will need to be
* in order to work correctly in that context.
* The code generator that generates the initial file and the one which
* inserts into it must both run as part of a single invocation of protoc.
* Code generators are executed in the order in which they appear on the
* command line.
* If |insertion_point| is present, |name| must also be present.
*
*
* optional string insertion_point = 2;
*/
boolean hasInsertionPoint();
/**
*
* If non-empty, indicates that the named file should already exist, and the
* content here is to be inserted into that file at a defined insertion
* point. This feature allows a code generator to extend the output
* produced by another code generator. The original generator may provide
* insertion points by placing special annotations in the file that look
* like:
* @@protoc_insertion_point(NAME)
* The annotation can have arbitrary text before and after it on the line,
* which allows it to be placed in a comment. NAME should be replaced with
* an identifier naming the point -- this is what other generators will use
* as the insertion_point. Code inserted at this point will be placed
* immediately above the line containing the insertion point (thus multiple
* insertions to the same point will come out in the order they were added).
* The double-@ is intended to make it unlikely that the generated code
* could contain things that look like insertion points by accident.
* For example, the C++ code generator places the following line in the
* .pb.h files that it generates:
* // @@protoc_insertion_point(namespace_scope)
* This line appears within the scope of the file's package namespace, but
* outside of any particular class. Another plugin can then specify the
* insertion_point "namespace_scope" to generate additional classes or
* other declarations that should be placed in this scope.
* Note that if the line containing the insertion point begins with
* whitespace, the same whitespace will be added to every line of the
* inserted text. This is useful for languages like Python, where
* indentation matters. In these languages, the insertion point comment
* should be indented the same amount as any inserted code will need to be
* in order to work correctly in that context.
* The code generator that generates the initial file and the one which
* inserts into it must both run as part of a single invocation of protoc.
* Code generators are executed in the order in which they appear on the
* command line.
* If |insertion_point| is present, |name| must also be present.
*
*
* optional string insertion_point = 2;
*/
java.lang.String getInsertionPoint();
/**
*
* If non-empty, indicates that the named file should already exist, and the
* content here is to be inserted into that file at a defined insertion
* point. This feature allows a code generator to extend the output
* produced by another code generator. The original generator may provide
* insertion points by placing special annotations in the file that look
* like:
* @@protoc_insertion_point(NAME)
* The annotation can have arbitrary text before and after it on the line,
* which allows it to be placed in a comment. NAME should be replaced with
* an identifier naming the point -- this is what other generators will use
* as the insertion_point. Code inserted at this point will be placed
* immediately above the line containing the insertion point (thus multiple
* insertions to the same point will come out in the order they were added).
* The double-@ is intended to make it unlikely that the generated code
* could contain things that look like insertion points by accident.
* For example, the C++ code generator places the following line in the
* .pb.h files that it generates:
* // @@protoc_insertion_point(namespace_scope)
* This line appears within the scope of the file's package namespace, but
* outside of any particular class. Another plugin can then specify the
* insertion_point "namespace_scope" to generate additional classes or
* other declarations that should be placed in this scope.
* Note that if the line containing the insertion point begins with
* whitespace, the same whitespace will be added to every line of the
* inserted text. This is useful for languages like Python, where
* indentation matters. In these languages, the insertion point comment
* should be indented the same amount as any inserted code will need to be
* in order to work correctly in that context.
* The code generator that generates the initial file and the one which
* inserts into it must both run as part of a single invocation of protoc.
* Code generators are executed in the order in which they appear on the
* command line.
* If |insertion_point| is present, |name| must also be present.
*
*
* optional string insertion_point = 2;
*/
com.google.protobuf.ByteString
getInsertionPointBytes();
/**
*
* The file contents.
*
*
* optional string content = 15;
*/
boolean hasContent();
/**
*
* The file contents.
*
*
* optional string content = 15;
*/
java.lang.String getContent();
/**
*
* The file contents.
*
*
* optional string content = 15;
*/
com.google.protobuf.ByteString
getContentBytes();
}
/**
*
* Represents a single generated file.
*
*
* Protobuf type {@code google.protobuf.compiler.CodeGeneratorResponse.File}
*/
public static final class File extends
com.google.protobuf.GeneratedMessageLite<
File, File.Builder> implements
// @@protoc_insertion_point(message_implements:google.protobuf.compiler.CodeGeneratorResponse.File)
FileOrBuilder {
private File() {
name_ = "";
insertionPoint_ = "";
content_ = "";
}
private int bitField0_;
public static final int NAME_FIELD_NUMBER = 1;
private java.lang.String name_;
/**
*
* The file name, relative to the output directory. The name must not
* contain "." or ".." components and must be relative, not be absolute (so,
* the file cannot lie outside the output directory). "/" must be used as
* the path separator, not "\".
* If the name is omitted, the content will be appended to the previous
* file. This allows the generator to break large files into small chunks,
* and allows the generated text to be streamed back to protoc so that large
* files need not reside completely in memory at one time. Note that as of
* this writing protoc does not optimize for this -- it will read the entire
* CodeGeneratorResponse before writing files to disk.
*
*
* optional string name = 1;
*/
public boolean hasName() {
return ((bitField0_ & 0x00000001) == 0x00000001);
}
/**
*
* The file name, relative to the output directory. The name must not
* contain "." or ".." components and must be relative, not be absolute (so,
* the file cannot lie outside the output directory). "/" must be used as
* the path separator, not "\".
* If the name is omitted, the content will be appended to the previous
* file. This allows the generator to break large files into small chunks,
* and allows the generated text to be streamed back to protoc so that large
* files need not reside completely in memory at one time. Note that as of
* this writing protoc does not optimize for this -- it will read the entire
* CodeGeneratorResponse before writing files to disk.
*
*
* optional string name = 1;
*/
public java.lang.String getName() {
return name_;
}
/**
*
* The file name, relative to the output directory. The name must not
* contain "." or ".." components and must be relative, not be absolute (so,
* the file cannot lie outside the output directory). "/" must be used as
* the path separator, not "\".
* If the name is omitted, the content will be appended to the previous
* file. This allows the generator to break large files into small chunks,
* and allows the generated text to be streamed back to protoc so that large
* files need not reside completely in memory at one time. Note that as of
* this writing protoc does not optimize for this -- it will read the entire
* CodeGeneratorResponse before writing files to disk.
*
*
* optional string name = 1;
*/
public com.google.protobuf.ByteString
getNameBytes() {
return com.google.protobuf.ByteString.copyFromUtf8(name_);
}
/**
*
* The file name, relative to the output directory. The name must not
* contain "." or ".." components and must be relative, not be absolute (so,
* the file cannot lie outside the output directory). "/" must be used as
* the path separator, not "\".
* If the name is omitted, the content will be appended to the previous
* file. This allows the generator to break large files into small chunks,
* and allows the generated text to be streamed back to protoc so that large
* files need not reside completely in memory at one time. Note that as of
* this writing protoc does not optimize for this -- it will read the entire
* CodeGeneratorResponse before writing files to disk.
*
*
* optional string name = 1;
*/
private void setName(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000001;
name_ = value;
}
/**
*
* The file name, relative to the output directory. The name must not
* contain "." or ".." components and must be relative, not be absolute (so,
* the file cannot lie outside the output directory). "/" must be used as
* the path separator, not "\".
* If the name is omitted, the content will be appended to the previous
* file. This allows the generator to break large files into small chunks,
* and allows the generated text to be streamed back to protoc so that large
* files need not reside completely in memory at one time. Note that as of
* this writing protoc does not optimize for this -- it will read the entire
* CodeGeneratorResponse before writing files to disk.
*
*
* optional string name = 1;
*/
private void clearName() {
bitField0_ = (bitField0_ & ~0x00000001);
name_ = getDefaultInstance().getName();
}
/**
*
* The file name, relative to the output directory. The name must not
* contain "." or ".." components and must be relative, not be absolute (so,
* the file cannot lie outside the output directory). "/" must be used as
* the path separator, not "\".
* If the name is omitted, the content will be appended to the previous
* file. This allows the generator to break large files into small chunks,
* and allows the generated text to be streamed back to protoc so that large
* files need not reside completely in memory at one time. Note that as of
* this writing protoc does not optimize for this -- it will read the entire
* CodeGeneratorResponse before writing files to disk.
*
*
* optional string name = 1;
*/
private void setNameBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000001;
name_ = value.toStringUtf8();
}
public static final int INSERTION_POINT_FIELD_NUMBER = 2;
private java.lang.String insertionPoint_;
/**
*
* If non-empty, indicates that the named file should already exist, and the
* content here is to be inserted into that file at a defined insertion
* point. This feature allows a code generator to extend the output
* produced by another code generator. The original generator may provide
* insertion points by placing special annotations in the file that look
* like:
* @@protoc_insertion_point(NAME)
* The annotation can have arbitrary text before and after it on the line,
* which allows it to be placed in a comment. NAME should be replaced with
* an identifier naming the point -- this is what other generators will use
* as the insertion_point. Code inserted at this point will be placed
* immediately above the line containing the insertion point (thus multiple
* insertions to the same point will come out in the order they were added).
* The double-@ is intended to make it unlikely that the generated code
* could contain things that look like insertion points by accident.
* For example, the C++ code generator places the following line in the
* .pb.h files that it generates:
* // @@protoc_insertion_point(namespace_scope)
* This line appears within the scope of the file's package namespace, but
* outside of any particular class. Another plugin can then specify the
* insertion_point "namespace_scope" to generate additional classes or
* other declarations that should be placed in this scope.
* Note that if the line containing the insertion point begins with
* whitespace, the same whitespace will be added to every line of the
* inserted text. This is useful for languages like Python, where
* indentation matters. In these languages, the insertion point comment
* should be indented the same amount as any inserted code will need to be
* in order to work correctly in that context.
* The code generator that generates the initial file and the one which
* inserts into it must both run as part of a single invocation of protoc.
* Code generators are executed in the order in which they appear on the
* command line.
* If |insertion_point| is present, |name| must also be present.
*
*
* optional string insertion_point = 2;
*/
public boolean hasInsertionPoint() {
return ((bitField0_ & 0x00000002) == 0x00000002);
}
/**
*
* If non-empty, indicates that the named file should already exist, and the
* content here is to be inserted into that file at a defined insertion
* point. This feature allows a code generator to extend the output
* produced by another code generator. The original generator may provide
* insertion points by placing special annotations in the file that look
* like:
* @@protoc_insertion_point(NAME)
* The annotation can have arbitrary text before and after it on the line,
* which allows it to be placed in a comment. NAME should be replaced with
* an identifier naming the point -- this is what other generators will use
* as the insertion_point. Code inserted at this point will be placed
* immediately above the line containing the insertion point (thus multiple
* insertions to the same point will come out in the order they were added).
* The double-@ is intended to make it unlikely that the generated code
* could contain things that look like insertion points by accident.
* For example, the C++ code generator places the following line in the
* .pb.h files that it generates:
* // @@protoc_insertion_point(namespace_scope)
* This line appears within the scope of the file's package namespace, but
* outside of any particular class. Another plugin can then specify the
* insertion_point "namespace_scope" to generate additional classes or
* other declarations that should be placed in this scope.
* Note that if the line containing the insertion point begins with
* whitespace, the same whitespace will be added to every line of the
* inserted text. This is useful for languages like Python, where
* indentation matters. In these languages, the insertion point comment
* should be indented the same amount as any inserted code will need to be
* in order to work correctly in that context.
* The code generator that generates the initial file and the one which
* inserts into it must both run as part of a single invocation of protoc.
* Code generators are executed in the order in which they appear on the
* command line.
* If |insertion_point| is present, |name| must also be present.
*
*
* optional string insertion_point = 2;
*/
public java.lang.String getInsertionPoint() {
return insertionPoint_;
}
/**
*
* If non-empty, indicates that the named file should already exist, and the
* content here is to be inserted into that file at a defined insertion
* point. This feature allows a code generator to extend the output
* produced by another code generator. The original generator may provide
* insertion points by placing special annotations in the file that look
* like:
* @@protoc_insertion_point(NAME)
* The annotation can have arbitrary text before and after it on the line,
* which allows it to be placed in a comment. NAME should be replaced with
* an identifier naming the point -- this is what other generators will use
* as the insertion_point. Code inserted at this point will be placed
* immediately above the line containing the insertion point (thus multiple
* insertions to the same point will come out in the order they were added).
* The double-@ is intended to make it unlikely that the generated code
* could contain things that look like insertion points by accident.
* For example, the C++ code generator places the following line in the
* .pb.h files that it generates:
* // @@protoc_insertion_point(namespace_scope)
* This line appears within the scope of the file's package namespace, but
* outside of any particular class. Another plugin can then specify the
* insertion_point "namespace_scope" to generate additional classes or
* other declarations that should be placed in this scope.
* Note that if the line containing the insertion point begins with
* whitespace, the same whitespace will be added to every line of the
* inserted text. This is useful for languages like Python, where
* indentation matters. In these languages, the insertion point comment
* should be indented the same amount as any inserted code will need to be
* in order to work correctly in that context.
* The code generator that generates the initial file and the one which
* inserts into it must both run as part of a single invocation of protoc.
* Code generators are executed in the order in which they appear on the
* command line.
* If |insertion_point| is present, |name| must also be present.
*
*
* optional string insertion_point = 2;
*/
public com.google.protobuf.ByteString
getInsertionPointBytes() {
return com.google.protobuf.ByteString.copyFromUtf8(insertionPoint_);
}
/**
*
* If non-empty, indicates that the named file should already exist, and the
* content here is to be inserted into that file at a defined insertion
* point. This feature allows a code generator to extend the output
* produced by another code generator. The original generator may provide
* insertion points by placing special annotations in the file that look
* like:
* @@protoc_insertion_point(NAME)
* The annotation can have arbitrary text before and after it on the line,
* which allows it to be placed in a comment. NAME should be replaced with
* an identifier naming the point -- this is what other generators will use
* as the insertion_point. Code inserted at this point will be placed
* immediately above the line containing the insertion point (thus multiple
* insertions to the same point will come out in the order they were added).
* The double-@ is intended to make it unlikely that the generated code
* could contain things that look like insertion points by accident.
* For example, the C++ code generator places the following line in the
* .pb.h files that it generates:
* // @@protoc_insertion_point(namespace_scope)
* This line appears within the scope of the file's package namespace, but
* outside of any particular class. Another plugin can then specify the
* insertion_point "namespace_scope" to generate additional classes or
* other declarations that should be placed in this scope.
* Note that if the line containing the insertion point begins with
* whitespace, the same whitespace will be added to every line of the
* inserted text. This is useful for languages like Python, where
* indentation matters. In these languages, the insertion point comment
* should be indented the same amount as any inserted code will need to be
* in order to work correctly in that context.
* The code generator that generates the initial file and the one which
* inserts into it must both run as part of a single invocation of protoc.
* Code generators are executed in the order in which they appear on the
* command line.
* If |insertion_point| is present, |name| must also be present.
*
*
* optional string insertion_point = 2;
*/
private void setInsertionPoint(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000002;
insertionPoint_ = value;
}
/**
*
* If non-empty, indicates that the named file should already exist, and the
* content here is to be inserted into that file at a defined insertion
* point. This feature allows a code generator to extend the output
* produced by another code generator. The original generator may provide
* insertion points by placing special annotations in the file that look
* like:
* @@protoc_insertion_point(NAME)
* The annotation can have arbitrary text before and after it on the line,
* which allows it to be placed in a comment. NAME should be replaced with
* an identifier naming the point -- this is what other generators will use
* as the insertion_point. Code inserted at this point will be placed
* immediately above the line containing the insertion point (thus multiple
* insertions to the same point will come out in the order they were added).
* The double-@ is intended to make it unlikely that the generated code
* could contain things that look like insertion points by accident.
* For example, the C++ code generator places the following line in the
* .pb.h files that it generates:
* // @@protoc_insertion_point(namespace_scope)
* This line appears within the scope of the file's package namespace, but
* outside of any particular class. Another plugin can then specify the
* insertion_point "namespace_scope" to generate additional classes or
* other declarations that should be placed in this scope.
* Note that if the line containing the insertion point begins with
* whitespace, the same whitespace will be added to every line of the
* inserted text. This is useful for languages like Python, where
* indentation matters. In these languages, the insertion point comment
* should be indented the same amount as any inserted code will need to be
* in order to work correctly in that context.
* The code generator that generates the initial file and the one which
* inserts into it must both run as part of a single invocation of protoc.
* Code generators are executed in the order in which they appear on the
* command line.
* If |insertion_point| is present, |name| must also be present.
*
*
* optional string insertion_point = 2;
*/
private void clearInsertionPoint() {
bitField0_ = (bitField0_ & ~0x00000002);
insertionPoint_ = getDefaultInstance().getInsertionPoint();
}
/**
*
* If non-empty, indicates that the named file should already exist, and the
* content here is to be inserted into that file at a defined insertion
* point. This feature allows a code generator to extend the output
* produced by another code generator. The original generator may provide
* insertion points by placing special annotations in the file that look
* like:
* @@protoc_insertion_point(NAME)
* The annotation can have arbitrary text before and after it on the line,
* which allows it to be placed in a comment. NAME should be replaced with
* an identifier naming the point -- this is what other generators will use
* as the insertion_point. Code inserted at this point will be placed
* immediately above the line containing the insertion point (thus multiple
* insertions to the same point will come out in the order they were added).
* The double-@ is intended to make it unlikely that the generated code
* could contain things that look like insertion points by accident.
* For example, the C++ code generator places the following line in the
* .pb.h files that it generates:
* // @@protoc_insertion_point(namespace_scope)
* This line appears within the scope of the file's package namespace, but
* outside of any particular class. Another plugin can then specify the
* insertion_point "namespace_scope" to generate additional classes or
* other declarations that should be placed in this scope.
* Note that if the line containing the insertion point begins with
* whitespace, the same whitespace will be added to every line of the
* inserted text. This is useful for languages like Python, where
* indentation matters. In these languages, the insertion point comment
* should be indented the same amount as any inserted code will need to be
* in order to work correctly in that context.
* The code generator that generates the initial file and the one which
* inserts into it must both run as part of a single invocation of protoc.
* Code generators are executed in the order in which they appear on the
* command line.
* If |insertion_point| is present, |name| must also be present.
*
*
* optional string insertion_point = 2;
*/
private void setInsertionPointBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000002;
insertionPoint_ = value.toStringUtf8();
}
public static final int CONTENT_FIELD_NUMBER = 15;
private java.lang.String content_;
/**
*
* The file contents.
*
*
* optional string content = 15;
*/
public boolean hasContent() {
return ((bitField0_ & 0x00000004) == 0x00000004);
}
/**
*
* The file contents.
*
*
* optional string content = 15;
*/
public java.lang.String getContent() {
return content_;
}
/**
*
* The file contents.
*
*
* optional string content = 15;
*/
public com.google.protobuf.ByteString
getContentBytes() {
return com.google.protobuf.ByteString.copyFromUtf8(content_);
}
/**
*
* The file contents.
*
*
* optional string content = 15;
*/
private void setContent(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000004;
content_ = value;
}
/**
*
* The file contents.
*
*
* optional string content = 15;
*/
private void clearContent() {
bitField0_ = (bitField0_ & ~0x00000004);
content_ = getDefaultInstance().getContent();
}
/**
*
* The file contents.
*
*
* optional string content = 15;
*/
private void setContentBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000004;
content_ = value.toStringUtf8();
}
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (((bitField0_ & 0x00000001) == 0x00000001)) {
output.writeString(1, getName());
}
if (((bitField0_ & 0x00000002) == 0x00000002)) {
output.writeString(2, getInsertionPoint());
}
if (((bitField0_ & 0x00000004) == 0x00000004)) {
output.writeString(15, getContent());
}
unknownFields.writeTo(output);
}
public int getSerializedSize() {
int size = memoizedSerializedSize;
if (size != -1) return size;
size = 0;
if (((bitField0_ & 0x00000001) == 0x00000001)) {
size += com.google.protobuf.CodedOutputStream
.computeStringSize(1, getName());
}
if (((bitField0_ & 0x00000002) == 0x00000002)) {
size += com.google.protobuf.CodedOutputStream
.computeStringSize(2, getInsertionPoint());
}
if (((bitField0_ & 0x00000004) == 0x00000004)) {
size += com.google.protobuf.CodedOutputStream
.computeStringSize(15, getContent());
}
size += unknownFields.getSerializedSize();
memoizedSerializedSize = size;
return size;
}
public static com.google.protobuf.compiler.PluginProtos.CodeGeneratorResponse.File parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return com.google.protobuf.GeneratedMessageLite.parseFrom(
DEFAULT_INSTANCE, data);
}
public static com.google.protobuf.compiler.PluginProtos.CodeGeneratorResponse.File 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.google.protobuf.compiler.PluginProtos.CodeGeneratorResponse.File parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return com.google.protobuf.GeneratedMessageLite.parseFrom(
DEFAULT_INSTANCE, data);
}
public static com.google.protobuf.compiler.PluginProtos.CodeGeneratorResponse.File 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.google.protobuf.compiler.PluginProtos.CodeGeneratorResponse.File parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageLite.parseFrom(
DEFAULT_INSTANCE, input);
}
public static com.google.protobuf.compiler.PluginProtos.CodeGeneratorResponse.File 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.google.protobuf.compiler.PluginProtos.CodeGeneratorResponse.File parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return parseDelimitedFrom(DEFAULT_INSTANCE, input);
}
public static com.google.protobuf.compiler.PluginProtos.CodeGeneratorResponse.File parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return parseDelimitedFrom(DEFAULT_INSTANCE, input, extensionRegistry);
}
public static com.google.protobuf.compiler.PluginProtos.CodeGeneratorResponse.File parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageLite.parseFrom(
DEFAULT_INSTANCE, input);
}
public static com.google.protobuf.compiler.PluginProtos.CodeGeneratorResponse.File 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 DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(com.google.protobuf.compiler.PluginProtos.CodeGeneratorResponse.File prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
/**
*
* Represents a single generated file.
*
*
* Protobuf type {@code google.protobuf.compiler.CodeGeneratorResponse.File}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageLite.Builder<
com.google.protobuf.compiler.PluginProtos.CodeGeneratorResponse.File, Builder> implements
// @@protoc_insertion_point(builder_implements:google.protobuf.compiler.CodeGeneratorResponse.File)
com.google.protobuf.compiler.PluginProtos.CodeGeneratorResponse.FileOrBuilder {
// Construct using com.google.protobuf.compiler.PluginProtos.CodeGeneratorResponse.File.newBuilder()
private Builder() {
super(DEFAULT_INSTANCE);
}
/**
*
* The file name, relative to the output directory. The name must not
* contain "." or ".." components and must be relative, not be absolute (so,
* the file cannot lie outside the output directory). "/" must be used as
* the path separator, not "\".
* If the name is omitted, the content will be appended to the previous
* file. This allows the generator to break large files into small chunks,
* and allows the generated text to be streamed back to protoc so that large
* files need not reside completely in memory at one time. Note that as of
* this writing protoc does not optimize for this -- it will read the entire
* CodeGeneratorResponse before writing files to disk.
*
*
* optional string name = 1;
*/
public boolean hasName() {
return instance.hasName();
}
/**
*
* The file name, relative to the output directory. The name must not
* contain "." or ".." components and must be relative, not be absolute (so,
* the file cannot lie outside the output directory). "/" must be used as
* the path separator, not "\".
* If the name is omitted, the content will be appended to the previous
* file. This allows the generator to break large files into small chunks,
* and allows the generated text to be streamed back to protoc so that large
* files need not reside completely in memory at one time. Note that as of
* this writing protoc does not optimize for this -- it will read the entire
* CodeGeneratorResponse before writing files to disk.
*
*
* optional string name = 1;
*/
public java.lang.String getName() {
return instance.getName();
}
/**
*
* The file name, relative to the output directory. The name must not
* contain "." or ".." components and must be relative, not be absolute (so,
* the file cannot lie outside the output directory). "/" must be used as
* the path separator, not "\".
* If the name is omitted, the content will be appended to the previous
* file. This allows the generator to break large files into small chunks,
* and allows the generated text to be streamed back to protoc so that large
* files need not reside completely in memory at one time. Note that as of
* this writing protoc does not optimize for this -- it will read the entire
* CodeGeneratorResponse before writing files to disk.
*
*
* optional string name = 1;
*/
public com.google.protobuf.ByteString
getNameBytes() {
return instance.getNameBytes();
}
/**
*
* The file name, relative to the output directory. The name must not
* contain "." or ".." components and must be relative, not be absolute (so,
* the file cannot lie outside the output directory). "/" must be used as
* the path separator, not "\".
* If the name is omitted, the content will be appended to the previous
* file. This allows the generator to break large files into small chunks,
* and allows the generated text to be streamed back to protoc so that large
* files need not reside completely in memory at one time. Note that as of
* this writing protoc does not optimize for this -- it will read the entire
* CodeGeneratorResponse before writing files to disk.
*
*
* optional string name = 1;
*/
public Builder setName(
java.lang.String value) {
copyOnWrite();
instance.setName(value);
return this;
}
/**
*
* The file name, relative to the output directory. The name must not
* contain "." or ".." components and must be relative, not be absolute (so,
* the file cannot lie outside the output directory). "/" must be used as
* the path separator, not "\".
* If the name is omitted, the content will be appended to the previous
* file. This allows the generator to break large files into small chunks,
* and allows the generated text to be streamed back to protoc so that large
* files need not reside completely in memory at one time. Note that as of
* this writing protoc does not optimize for this -- it will read the entire
* CodeGeneratorResponse before writing files to disk.
*
*
* optional string name = 1;
*/
public Builder clearName() {
copyOnWrite();
instance.clearName();
return this;
}
/**
*
* The file name, relative to the output directory. The name must not
* contain "." or ".." components and must be relative, not be absolute (so,
* the file cannot lie outside the output directory). "/" must be used as
* the path separator, not "\".
* If the name is omitted, the content will be appended to the previous
* file. This allows the generator to break large files into small chunks,
* and allows the generated text to be streamed back to protoc so that large
* files need not reside completely in memory at one time. Note that as of
* this writing protoc does not optimize for this -- it will read the entire
* CodeGeneratorResponse before writing files to disk.
*
*
* optional string name = 1;
*/
public Builder setNameBytes(
com.google.protobuf.ByteString value) {
copyOnWrite();
instance.setNameBytes(value);
return this;
}
/**
*
* If non-empty, indicates that the named file should already exist, and the
* content here is to be inserted into that file at a defined insertion
* point. This feature allows a code generator to extend the output
* produced by another code generator. The original generator may provide
* insertion points by placing special annotations in the file that look
* like:
* @@protoc_insertion_point(NAME)
* The annotation can have arbitrary text before and after it on the line,
* which allows it to be placed in a comment. NAME should be replaced with
* an identifier naming the point -- this is what other generators will use
* as the insertion_point. Code inserted at this point will be placed
* immediately above the line containing the insertion point (thus multiple
* insertions to the same point will come out in the order they were added).
* The double-@ is intended to make it unlikely that the generated code
* could contain things that look like insertion points by accident.
* For example, the C++ code generator places the following line in the
* .pb.h files that it generates:
* // @@protoc_insertion_point(namespace_scope)
* This line appears within the scope of the file's package namespace, but
* outside of any particular class. Another plugin can then specify the
* insertion_point "namespace_scope" to generate additional classes or
* other declarations that should be placed in this scope.
* Note that if the line containing the insertion point begins with
* whitespace, the same whitespace will be added to every line of the
* inserted text. This is useful for languages like Python, where
* indentation matters. In these languages, the insertion point comment
* should be indented the same amount as any inserted code will need to be
* in order to work correctly in that context.
* The code generator that generates the initial file and the one which
* inserts into it must both run as part of a single invocation of protoc.
* Code generators are executed in the order in which they appear on the
* command line.
* If |insertion_point| is present, |name| must also be present.
*
*
* optional string insertion_point = 2;
*/
public boolean hasInsertionPoint() {
return instance.hasInsertionPoint();
}
/**
*
* If non-empty, indicates that the named file should already exist, and the
* content here is to be inserted into that file at a defined insertion
* point. This feature allows a code generator to extend the output
* produced by another code generator. The original generator may provide
* insertion points by placing special annotations in the file that look
* like:
* @@protoc_insertion_point(NAME)
* The annotation can have arbitrary text before and after it on the line,
* which allows it to be placed in a comment. NAME should be replaced with
* an identifier naming the point -- this is what other generators will use
* as the insertion_point. Code inserted at this point will be placed
* immediately above the line containing the insertion point (thus multiple
* insertions to the same point will come out in the order they were added).
* The double-@ is intended to make it unlikely that the generated code
* could contain things that look like insertion points by accident.
* For example, the C++ code generator places the following line in the
* .pb.h files that it generates:
* // @@protoc_insertion_point(namespace_scope)
* This line appears within the scope of the file's package namespace, but
* outside of any particular class. Another plugin can then specify the
* insertion_point "namespace_scope" to generate additional classes or
* other declarations that should be placed in this scope.
* Note that if the line containing the insertion point begins with
* whitespace, the same whitespace will be added to every line of the
* inserted text. This is useful for languages like Python, where
* indentation matters. In these languages, the insertion point comment
* should be indented the same amount as any inserted code will need to be
* in order to work correctly in that context.
* The code generator that generates the initial file and the one which
* inserts into it must both run as part of a single invocation of protoc.
* Code generators are executed in the order in which they appear on the
* command line.
* If |insertion_point| is present, |name| must also be present.
*
*
* optional string insertion_point = 2;
*/
public java.lang.String getInsertionPoint() {
return instance.getInsertionPoint();
}
/**
*
* If non-empty, indicates that the named file should already exist, and the
* content here is to be inserted into that file at a defined insertion
* point. This feature allows a code generator to extend the output
* produced by another code generator. The original generator may provide
* insertion points by placing special annotations in the file that look
* like:
* @@protoc_insertion_point(NAME)
* The annotation can have arbitrary text before and after it on the line,
* which allows it to be placed in a comment. NAME should be replaced with
* an identifier naming the point -- this is what other generators will use
* as the insertion_point. Code inserted at this point will be placed
* immediately above the line containing the insertion point (thus multiple
* insertions to the same point will come out in the order they were added).
* The double-@ is intended to make it unlikely that the generated code
* could contain things that look like insertion points by accident.
* For example, the C++ code generator places the following line in the
* .pb.h files that it generates:
* // @@protoc_insertion_point(namespace_scope)
* This line appears within the scope of the file's package namespace, but
* outside of any particular class. Another plugin can then specify the
* insertion_point "namespace_scope" to generate additional classes or
* other declarations that should be placed in this scope.
* Note that if the line containing the insertion point begins with
* whitespace, the same whitespace will be added to every line of the
* inserted text. This is useful for languages like Python, where
* indentation matters. In these languages, the insertion point comment
* should be indented the same amount as any inserted code will need to be
* in order to work correctly in that context.
* The code generator that generates the initial file and the one which
* inserts into it must both run as part of a single invocation of protoc.
* Code generators are executed in the order in which they appear on the
* command line.
* If |insertion_point| is present, |name| must also be present.
*
*
* optional string insertion_point = 2;
*/
public com.google.protobuf.ByteString
getInsertionPointBytes() {
return instance.getInsertionPointBytes();
}
/**
*
* If non-empty, indicates that the named file should already exist, and the
* content here is to be inserted into that file at a defined insertion
* point. This feature allows a code generator to extend the output
* produced by another code generator. The original generator may provide
* insertion points by placing special annotations in the file that look
* like:
* @@protoc_insertion_point(NAME)
* The annotation can have arbitrary text before and after it on the line,
* which allows it to be placed in a comment. NAME should be replaced with
* an identifier naming the point -- this is what other generators will use
* as the insertion_point. Code inserted at this point will be placed
* immediately above the line containing the insertion point (thus multiple
* insertions to the same point will come out in the order they were added).
* The double-@ is intended to make it unlikely that the generated code
* could contain things that look like insertion points by accident.
* For example, the C++ code generator places the following line in the
* .pb.h files that it generates:
* // @@protoc_insertion_point(namespace_scope)
* This line appears within the scope of the file's package namespace, but
* outside of any particular class. Another plugin can then specify the
* insertion_point "namespace_scope" to generate additional classes or
* other declarations that should be placed in this scope.
* Note that if the line containing the insertion point begins with
* whitespace, the same whitespace will be added to every line of the
* inserted text. This is useful for languages like Python, where
* indentation matters. In these languages, the insertion point comment
* should be indented the same amount as any inserted code will need to be
* in order to work correctly in that context.
* The code generator that generates the initial file and the one which
* inserts into it must both run as part of a single invocation of protoc.
* Code generators are executed in the order in which they appear on the
* command line.
* If |insertion_point| is present, |name| must also be present.
*
*
* optional string insertion_point = 2;
*/
public Builder setInsertionPoint(
java.lang.String value) {
copyOnWrite();
instance.setInsertionPoint(value);
return this;
}
/**
*
* If non-empty, indicates that the named file should already exist, and the
* content here is to be inserted into that file at a defined insertion
* point. This feature allows a code generator to extend the output
* produced by another code generator. The original generator may provide
* insertion points by placing special annotations in the file that look
* like:
* @@protoc_insertion_point(NAME)
* The annotation can have arbitrary text before and after it on the line,
* which allows it to be placed in a comment. NAME should be replaced with
* an identifier naming the point -- this is what other generators will use
* as the insertion_point. Code inserted at this point will be placed
* immediately above the line containing the insertion point (thus multiple
* insertions to the same point will come out in the order they were added).
* The double-@ is intended to make it unlikely that the generated code
* could contain things that look like insertion points by accident.
* For example, the C++ code generator places the following line in the
* .pb.h files that it generates:
* // @@protoc_insertion_point(namespace_scope)
* This line appears within the scope of the file's package namespace, but
* outside of any particular class. Another plugin can then specify the
* insertion_point "namespace_scope" to generate additional classes or
* other declarations that should be placed in this scope.
* Note that if the line containing the insertion point begins with
* whitespace, the same whitespace will be added to every line of the
* inserted text. This is useful for languages like Python, where
* indentation matters. In these languages, the insertion point comment
* should be indented the same amount as any inserted code will need to be
* in order to work correctly in that context.
* The code generator that generates the initial file and the one which
* inserts into it must both run as part of a single invocation of protoc.
* Code generators are executed in the order in which they appear on the
* command line.
* If |insertion_point| is present, |name| must also be present.
*
*
* optional string insertion_point = 2;
*/
public Builder clearInsertionPoint() {
copyOnWrite();
instance.clearInsertionPoint();
return this;
}
/**
*
* If non-empty, indicates that the named file should already exist, and the
* content here is to be inserted into that file at a defined insertion
* point. This feature allows a code generator to extend the output
* produced by another code generator. The original generator may provide
* insertion points by placing special annotations in the file that look
* like:
* @@protoc_insertion_point(NAME)
* The annotation can have arbitrary text before and after it on the line,
* which allows it to be placed in a comment. NAME should be replaced with
* an identifier naming the point -- this is what other generators will use
* as the insertion_point. Code inserted at this point will be placed
* immediately above the line containing the insertion point (thus multiple
* insertions to the same point will come out in the order they were added).
* The double-@ is intended to make it unlikely that the generated code
* could contain things that look like insertion points by accident.
* For example, the C++ code generator places the following line in the
* .pb.h files that it generates:
* // @@protoc_insertion_point(namespace_scope)
* This line appears within the scope of the file's package namespace, but
* outside of any particular class. Another plugin can then specify the
* insertion_point "namespace_scope" to generate additional classes or
* other declarations that should be placed in this scope.
* Note that if the line containing the insertion point begins with
* whitespace, the same whitespace will be added to every line of the
* inserted text. This is useful for languages like Python, where
* indentation matters. In these languages, the insertion point comment
* should be indented the same amount as any inserted code will need to be
* in order to work correctly in that context.
* The code generator that generates the initial file and the one which
* inserts into it must both run as part of a single invocation of protoc.
* Code generators are executed in the order in which they appear on the
* command line.
* If |insertion_point| is present, |name| must also be present.
*
*
* optional string insertion_point = 2;
*/
public Builder setInsertionPointBytes(
com.google.protobuf.ByteString value) {
copyOnWrite();
instance.setInsertionPointBytes(value);
return this;
}
/**
*
* The file contents.
*
*
* optional string content = 15;
*/
public boolean hasContent() {
return instance.hasContent();
}
/**
*
* The file contents.
*
*
* optional string content = 15;
*/
public java.lang.String getContent() {
return instance.getContent();
}
/**
*
* The file contents.
*
*
* optional string content = 15;
*/
public com.google.protobuf.ByteString
getContentBytes() {
return instance.getContentBytes();
}
/**
*
* The file contents.
*
*
* optional string content = 15;
*/
public Builder setContent(
java.lang.String value) {
copyOnWrite();
instance.setContent(value);
return this;
}
/**
*
* The file contents.
*
*
* optional string content = 15;
*/
public Builder clearContent() {
copyOnWrite();
instance.clearContent();
return this;
}
/**
*
* The file contents.
*
*
* optional string content = 15;
*/
public Builder setContentBytes(
com.google.protobuf.ByteString value) {
copyOnWrite();
instance.setContentBytes(value);
return this;
}
// @@protoc_insertion_point(builder_scope:google.protobuf.compiler.CodeGeneratorResponse.File)
}
protected final Object dynamicMethod(
com.google.protobuf.GeneratedMessageLite.MethodToInvoke method,
Object arg0, Object arg1) {
switch (method) {
case NEW_MUTABLE_INSTANCE: {
return new com.google.protobuf.compiler.PluginProtos.CodeGeneratorResponse.File();
}
case IS_INITIALIZED: {
return DEFAULT_INSTANCE;
}
case MAKE_IMMUTABLE: {
return null;
}
case NEW_BUILDER: {
return new Builder();
}
case VISIT: {
Visitor visitor = (Visitor) arg0;
com.google.protobuf.compiler.PluginProtos.CodeGeneratorResponse.File other = (com.google.protobuf.compiler.PluginProtos.CodeGeneratorResponse.File) arg1;
name_ = visitor.visitString(
hasName(), name_,
other.hasName(), other.name_);
insertionPoint_ = visitor.visitString(
hasInsertionPoint(), insertionPoint_,
other.hasInsertionPoint(), other.insertionPoint_);
content_ = visitor.visitString(
hasContent(), content_,
other.hasContent(), other.content_);
if (visitor == com.google.protobuf.GeneratedMessageLite.MergeFromVisitor
.INSTANCE) {
bitField0_ |= other.bitField0_;
}
return this;
}
case MERGE_FROM_STREAM: {
com.google.protobuf.CodedInputStream input =
(com.google.protobuf.CodedInputStream) arg0;
com.google.protobuf.ExtensionRegistryLite extensionRegistry =
(com.google.protobuf.ExtensionRegistryLite) arg1;
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
default: {
if (!parseUnknownField(tag, input)) {
done = true;
}
break;
}
case 10: {
String s = input.readString();
bitField0_ |= 0x00000001;
name_ = s;
break;
}
case 18: {
String s = input.readString();
bitField0_ |= 0x00000002;
insertionPoint_ = s;
break;
}
case 122: {
String s = input.readString();
bitField0_ |= 0x00000004;
content_ = s;
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 {
}
}
case GET_DEFAULT_INSTANCE: {
return DEFAULT_INSTANCE;
}
case GET_PARSER: {
if (PARSER == null) { synchronized (com.google.protobuf.compiler.PluginProtos.CodeGeneratorResponse.File.class) {
if (PARSER == null) {
PARSER = new DefaultInstanceBasedParser(DEFAULT_INSTANCE);
}
}
}
return PARSER;
}
}
throw new UnsupportedOperationException();
}
// @@protoc_insertion_point(class_scope:google.protobuf.compiler.CodeGeneratorResponse.File)
private static final com.google.protobuf.compiler.PluginProtos.CodeGeneratorResponse.File DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new File();
DEFAULT_INSTANCE.makeImmutable();
}
public static com.google.protobuf.compiler.PluginProtos.CodeGeneratorResponse.File getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static volatile com.google.protobuf.Parser PARSER;
public static com.google.protobuf.Parser parser() {
return DEFAULT_INSTANCE.getParserForType();
}
}
private int bitField0_;
public static final int ERROR_FIELD_NUMBER = 1;
private java.lang.String error_;
/**
*
* 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;
*/
public boolean hasError() {
return ((bitField0_ & 0x00000001) == 0x00000001);
}
/**
*
* 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;
*/
public java.lang.String getError() {
return error_;
}
/**
*
* 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;
*/
public com.google.protobuf.ByteString
getErrorBytes() {
return com.google.protobuf.ByteString.copyFromUtf8(error_);
}
/**
*
* 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;
*/
private void setError(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000001;
error_ = 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;
*/
private void clearError() {
bitField0_ = (bitField0_ & ~0x00000001);
error_ = getDefaultInstance().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;
*/
private void setErrorBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000001;
error_ = value.toStringUtf8();
}
public static final int FILE_FIELD_NUMBER = 15;
private com.google.protobuf.Internal.ProtobufList file_;
/**
* repeated .google.protobuf.compiler.CodeGeneratorResponse.File file = 15;
*/
public java.util.List getFileList() {
return file_;
}
/**
* repeated .google.protobuf.compiler.CodeGeneratorResponse.File file = 15;
*/
public java.util.List extends com.google.protobuf.compiler.PluginProtos.CodeGeneratorResponse.FileOrBuilder>
getFileOrBuilderList() {
return file_;
}
/**
* repeated .google.protobuf.compiler.CodeGeneratorResponse.File file = 15;
*/
public int getFileCount() {
return file_.size();
}
/**
* repeated .google.protobuf.compiler.CodeGeneratorResponse.File file = 15;
*/
public com.google.protobuf.compiler.PluginProtos.CodeGeneratorResponse.File getFile(int index) {
return file_.get(index);
}
/**
* repeated .google.protobuf.compiler.CodeGeneratorResponse.File file = 15;
*/
public com.google.protobuf.compiler.PluginProtos.CodeGeneratorResponse.FileOrBuilder getFileOrBuilder(
int index) {
return file_.get(index);
}
private void ensureFileIsMutable() {
if (!file_.isModifiable()) {
file_ =
com.google.protobuf.GeneratedMessageLite.mutableCopy(file_);
}
}
/**
* repeated .google.protobuf.compiler.CodeGeneratorResponse.File file = 15;
*/
private void setFile(
int index, com.google.protobuf.compiler.PluginProtos.CodeGeneratorResponse.File value) {
if (value == null) {
throw new NullPointerException();
}
ensureFileIsMutable();
file_.set(index, value);
}
/**
* repeated .google.protobuf.compiler.CodeGeneratorResponse.File file = 15;
*/
private void setFile(
int index, com.google.protobuf.compiler.PluginProtos.CodeGeneratorResponse.File.Builder builderForValue) {
ensureFileIsMutable();
file_.set(index, builderForValue.build());
}
/**
* repeated .google.protobuf.compiler.CodeGeneratorResponse.File file = 15;
*/
private void addFile(com.google.protobuf.compiler.PluginProtos.CodeGeneratorResponse.File value) {
if (value == null) {
throw new NullPointerException();
}
ensureFileIsMutable();
file_.add(value);
}
/**
* repeated .google.protobuf.compiler.CodeGeneratorResponse.File file = 15;
*/
private void addFile(
int index, com.google.protobuf.compiler.PluginProtos.CodeGeneratorResponse.File value) {
if (value == null) {
throw new NullPointerException();
}
ensureFileIsMutable();
file_.add(index, value);
}
/**
* repeated .google.protobuf.compiler.CodeGeneratorResponse.File file = 15;
*/
private void addFile(
com.google.protobuf.compiler.PluginProtos.CodeGeneratorResponse.File.Builder builderForValue) {
ensureFileIsMutable();
file_.add(builderForValue.build());
}
/**
* repeated .google.protobuf.compiler.CodeGeneratorResponse.File file = 15;
*/
private void addFile(
int index, com.google.protobuf.compiler.PluginProtos.CodeGeneratorResponse.File.Builder builderForValue) {
ensureFileIsMutable();
file_.add(index, builderForValue.build());
}
/**
* repeated .google.protobuf.compiler.CodeGeneratorResponse.File file = 15;
*/
private void addAllFile(
java.lang.Iterable extends com.google.protobuf.compiler.PluginProtos.CodeGeneratorResponse.File> values) {
ensureFileIsMutable();
com.google.protobuf.AbstractMessageLite.addAll(
values, file_);
}
/**
* repeated .google.protobuf.compiler.CodeGeneratorResponse.File file = 15;
*/
private void clearFile() {
file_ = emptyProtobufList();
}
/**
* repeated .google.protobuf.compiler.CodeGeneratorResponse.File file = 15;
*/
private void removeFile(int index) {
ensureFileIsMutable();
file_.remove(index);
}
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (((bitField0_ & 0x00000001) == 0x00000001)) {
output.writeString(1, getError());
}
for (int i = 0; i < file_.size(); i++) {
output.writeMessage(15, file_.get(i));
}
unknownFields.writeTo(output);
}
public int getSerializedSize() {
int size = memoizedSerializedSize;
if (size != -1) return size;
size = 0;
if (((bitField0_ & 0x00000001) == 0x00000001)) {
size += com.google.protobuf.CodedOutputStream
.computeStringSize(1, getError());
}
for (int i = 0; i < file_.size(); i++) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(15, file_.get(i));
}
size += unknownFields.getSerializedSize();
memoizedSerializedSize = size;
return size;
}
public static com.google.protobuf.compiler.PluginProtos.CodeGeneratorResponse parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return com.google.protobuf.GeneratedMessageLite.parseFrom(
DEFAULT_INSTANCE, data);
}
public static com.google.protobuf.compiler.PluginProtos.CodeGeneratorResponse 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.google.protobuf.compiler.PluginProtos.CodeGeneratorResponse parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return com.google.protobuf.GeneratedMessageLite.parseFrom(
DEFAULT_INSTANCE, data);
}
public static com.google.protobuf.compiler.PluginProtos.CodeGeneratorResponse 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.google.protobuf.compiler.PluginProtos.CodeGeneratorResponse parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageLite.parseFrom(
DEFAULT_INSTANCE, input);
}
public static com.google.protobuf.compiler.PluginProtos.CodeGeneratorResponse 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.google.protobuf.compiler.PluginProtos.CodeGeneratorResponse parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return parseDelimitedFrom(DEFAULT_INSTANCE, input);
}
public static com.google.protobuf.compiler.PluginProtos.CodeGeneratorResponse parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return parseDelimitedFrom(DEFAULT_INSTANCE, input, extensionRegistry);
}
public static com.google.protobuf.compiler.PluginProtos.CodeGeneratorResponse parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageLite.parseFrom(
DEFAULT_INSTANCE, input);
}
public static com.google.protobuf.compiler.PluginProtos.CodeGeneratorResponse 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 DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(com.google.protobuf.compiler.PluginProtos.CodeGeneratorResponse prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
/**
*
* The plugin writes an encoded CodeGeneratorResponse to stdout.
*
*
* Protobuf type {@code google.protobuf.compiler.CodeGeneratorResponse}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageLite.Builder<
com.google.protobuf.compiler.PluginProtos.CodeGeneratorResponse, Builder> implements
// @@protoc_insertion_point(builder_implements:google.protobuf.compiler.CodeGeneratorResponse)
com.google.protobuf.compiler.PluginProtos.CodeGeneratorResponseOrBuilder {
// Construct using com.google.protobuf.compiler.PluginProtos.CodeGeneratorResponse.newBuilder()
private Builder() {
super(DEFAULT_INSTANCE);
}
/**
*
* 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;
*/
public boolean hasError() {
return instance.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;
*/
public java.lang.String getError() {
return instance.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;
*/
public com.google.protobuf.ByteString
getErrorBytes() {
return instance.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;
*/
public Builder setError(
java.lang.String value) {
copyOnWrite();
instance.setError(value);
return this;
}
/**
*
* 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;
*/
public Builder clearError() {
copyOnWrite();
instance.clearError();
return this;
}
/**
*
* 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;
*/
public Builder setErrorBytes(
com.google.protobuf.ByteString value) {
copyOnWrite();
instance.setErrorBytes(value);
return this;
}
/**
* repeated .google.protobuf.compiler.CodeGeneratorResponse.File file = 15;
*/
public java.util.List getFileList() {
return java.util.Collections.unmodifiableList(
instance.getFileList());
}
/**
* repeated .google.protobuf.compiler.CodeGeneratorResponse.File file = 15;
*/
public int getFileCount() {
return instance.getFileCount();
}/**
* repeated .google.protobuf.compiler.CodeGeneratorResponse.File file = 15;
*/
public com.google.protobuf.compiler.PluginProtos.CodeGeneratorResponse.File getFile(int index) {
return instance.getFile(index);
}
/**
* repeated .google.protobuf.compiler.CodeGeneratorResponse.File file = 15;
*/
public Builder setFile(
int index, com.google.protobuf.compiler.PluginProtos.CodeGeneratorResponse.File value) {
copyOnWrite();
instance.setFile(index, value);
return this;
}
/**
* repeated .google.protobuf.compiler.CodeGeneratorResponse.File file = 15;
*/
public Builder setFile(
int index, com.google.protobuf.compiler.PluginProtos.CodeGeneratorResponse.File.Builder builderForValue) {
copyOnWrite();
instance.setFile(index, builderForValue);
return this;
}
/**
* repeated .google.protobuf.compiler.CodeGeneratorResponse.File file = 15;
*/
public Builder addFile(com.google.protobuf.compiler.PluginProtos.CodeGeneratorResponse.File value) {
copyOnWrite();
instance.addFile(value);
return this;
}
/**
* repeated .google.protobuf.compiler.CodeGeneratorResponse.File file = 15;
*/
public Builder addFile(
int index, com.google.protobuf.compiler.PluginProtos.CodeGeneratorResponse.File value) {
copyOnWrite();
instance.addFile(index, value);
return this;
}
/**
* repeated .google.protobuf.compiler.CodeGeneratorResponse.File file = 15;
*/
public Builder addFile(
com.google.protobuf.compiler.PluginProtos.CodeGeneratorResponse.File.Builder builderForValue) {
copyOnWrite();
instance.addFile(builderForValue);
return this;
}
/**
* repeated .google.protobuf.compiler.CodeGeneratorResponse.File file = 15;
*/
public Builder addFile(
int index, com.google.protobuf.compiler.PluginProtos.CodeGeneratorResponse.File.Builder builderForValue) {
copyOnWrite();
instance.addFile(index, builderForValue);
return this;
}
/**
* repeated .google.protobuf.compiler.CodeGeneratorResponse.File file = 15;
*/
public Builder addAllFile(
java.lang.Iterable extends com.google.protobuf.compiler.PluginProtos.CodeGeneratorResponse.File> values) {
copyOnWrite();
instance.addAllFile(values);
return this;
}
/**
* repeated .google.protobuf.compiler.CodeGeneratorResponse.File file = 15;
*/
public Builder clearFile() {
copyOnWrite();
instance.clearFile();
return this;
}
/**
* repeated .google.protobuf.compiler.CodeGeneratorResponse.File file = 15;
*/
public Builder removeFile(int index) {
copyOnWrite();
instance.removeFile(index);
return this;
}
// @@protoc_insertion_point(builder_scope:google.protobuf.compiler.CodeGeneratorResponse)
}
protected final Object dynamicMethod(
com.google.protobuf.GeneratedMessageLite.MethodToInvoke method,
Object arg0, Object arg1) {
switch (method) {
case NEW_MUTABLE_INSTANCE: {
return new com.google.protobuf.compiler.PluginProtos.CodeGeneratorResponse();
}
case IS_INITIALIZED: {
return DEFAULT_INSTANCE;
}
case MAKE_IMMUTABLE: {
file_.makeImmutable();
return null;
}
case NEW_BUILDER: {
return new Builder();
}
case VISIT: {
Visitor visitor = (Visitor) arg0;
com.google.protobuf.compiler.PluginProtos.CodeGeneratorResponse other = (com.google.protobuf.compiler.PluginProtos.CodeGeneratorResponse) arg1;
error_ = visitor.visitString(
hasError(), error_,
other.hasError(), other.error_);
file_= visitor.visitList(file_, other.file_);
if (visitor == com.google.protobuf.GeneratedMessageLite.MergeFromVisitor
.INSTANCE) {
bitField0_ |= other.bitField0_;
}
return this;
}
case MERGE_FROM_STREAM: {
com.google.protobuf.CodedInputStream input =
(com.google.protobuf.CodedInputStream) arg0;
com.google.protobuf.ExtensionRegistryLite extensionRegistry =
(com.google.protobuf.ExtensionRegistryLite) arg1;
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
default: {
if (!parseUnknownField(tag, input)) {
done = true;
}
break;
}
case 10: {
String s = input.readString();
bitField0_ |= 0x00000001;
error_ = s;
break;
}
case 122: {
if (!file_.isModifiable()) {
file_ =
com.google.protobuf.GeneratedMessageLite.mutableCopy(file_);
}
file_.add(
input.readMessage(com.google.protobuf.compiler.PluginProtos.CodeGeneratorResponse.File.parser(), extensionRegistry));
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 {
}
}
case GET_DEFAULT_INSTANCE: {
return DEFAULT_INSTANCE;
}
case GET_PARSER: {
if (PARSER == null) { synchronized (com.google.protobuf.compiler.PluginProtos.CodeGeneratorResponse.class) {
if (PARSER == null) {
PARSER = new DefaultInstanceBasedParser(DEFAULT_INSTANCE);
}
}
}
return PARSER;
}
}
throw new UnsupportedOperationException();
}
// @@protoc_insertion_point(class_scope:google.protobuf.compiler.CodeGeneratorResponse)
private static final com.google.protobuf.compiler.PluginProtos.CodeGeneratorResponse DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new CodeGeneratorResponse();
DEFAULT_INSTANCE.makeImmutable();
}
public static com.google.protobuf.compiler.PluginProtos.CodeGeneratorResponse 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)
}