proto2_test_check_utf8.TestCheckUtf8 Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of protobufel-protobuf-test-protos Show documentation
Show all versions of protobufel-protobuf-test-protos Show documentation
Shared Test Resources - test .proto files
The newest version!
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: com/google/protobuf/test_check_utf8.proto
package proto2_test_check_utf8;
public final class TestCheckUtf8 {
private TestCheckUtf8() {}
public static void registerAllExtensions(
com.google.protobuf.ExtensionRegistry registry) {
}
public interface StringWrapperOrBuilder extends
// @@protoc_insertion_point(interface_extends:proto2_test_check_utf8.StringWrapper)
com.google.protobuf.MessageOrBuilder {
/**
* required string req = 1;
*/
boolean hasReq();
/**
* required string req = 1;
*/
java.lang.String getReq();
/**
* required string req = 1;
*/
com.google.protobuf.ByteString
getReqBytes();
/**
* optional string opt = 2;
*/
boolean hasOpt();
/**
* optional string opt = 2;
*/
java.lang.String getOpt();
/**
* optional string opt = 2;
*/
com.google.protobuf.ByteString
getOptBytes();
/**
* repeated string rep = 3;
*/
com.google.protobuf.ProtocolStringList
getRepList();
/**
* repeated string rep = 3;
*/
int getRepCount();
/**
* repeated string rep = 3;
*/
java.lang.String getRep(int index);
/**
* repeated string rep = 3;
*/
com.google.protobuf.ByteString
getRepBytes(int index);
}
/**
* Protobuf type {@code proto2_test_check_utf8.StringWrapper}
*/
public static final class StringWrapper extends
com.google.protobuf.GeneratedMessage implements
// @@protoc_insertion_point(message_implements:proto2_test_check_utf8.StringWrapper)
StringWrapperOrBuilder {
// Use StringWrapper.newBuilder() to construct.
private StringWrapper(com.google.protobuf.GeneratedMessage.Builder> builder) {
super(builder);
this.unknownFields = builder.getUnknownFields();
}
private StringWrapper(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); }
private static final StringWrapper defaultInstance;
public static StringWrapper getDefaultInstance() {
return defaultInstance;
}
public StringWrapper getDefaultInstanceForType() {
return defaultInstance;
}
private final com.google.protobuf.UnknownFieldSet unknownFields;
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private StringWrapper(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
initFields();
int mutable_bitField0_ = 0;
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
default: {
if (!parseUnknownField(input, unknownFields,
extensionRegistry, tag)) {
done = true;
}
break;
}
case 10: {
String s = input.readStringRequireUtf8();
bitField0_ |= 0x00000001;
req_ = s;
break;
}
case 18: {
String s = input.readStringRequireUtf8();
bitField0_ |= 0x00000002;
opt_ = s;
break;
}
case 26: {
String s = input.readStringRequireUtf8();
if (!((mutable_bitField0_ & 0x00000004) == 0x00000004)) {
rep_ = new com.google.protobuf.LazyStringArrayList();
mutable_bitField0_ |= 0x00000004;
}
rep_.add(s);
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e.getMessage()).setUnfinishedMessage(this);
} finally {
if (((mutable_bitField0_ & 0x00000004) == 0x00000004)) {
rep_ = rep_.getUnmodifiableView();
}
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return proto2_test_check_utf8.TestCheckUtf8.internal_static_proto2_test_check_utf8_StringWrapper_descriptor;
}
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
internalGetFieldAccessorTable() {
return proto2_test_check_utf8.TestCheckUtf8.internal_static_proto2_test_check_utf8_StringWrapper_fieldAccessorTable
.ensureFieldAccessorsInitialized(
proto2_test_check_utf8.TestCheckUtf8.StringWrapper.class, proto2_test_check_utf8.TestCheckUtf8.StringWrapper.Builder.class);
}
public static com.google.protobuf.Parser PARSER =
new com.google.protobuf.AbstractParser() {
public StringWrapper parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new StringWrapper(input, extensionRegistry);
}
};
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
private int bitField0_;
public static final int REQ_FIELD_NUMBER = 1;
private java.lang.Object req_;
/**
* required string req = 1;
*/
public boolean hasReq() {
return ((bitField0_ & 0x00000001) == 0x00000001);
}
/**
* required string req = 1;
*/
public java.lang.String getReq() {
java.lang.Object ref = req_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
req_ = s;
return s;
}
}
/**
* required string req = 1;
*/
public com.google.protobuf.ByteString
getReqBytes() {
java.lang.Object ref = req_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
req_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int OPT_FIELD_NUMBER = 2;
private java.lang.Object opt_;
/**
* optional string opt = 2;
*/
public boolean hasOpt() {
return ((bitField0_ & 0x00000002) == 0x00000002);
}
/**
* optional string opt = 2;
*/
public java.lang.String getOpt() {
java.lang.Object ref = opt_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
opt_ = s;
return s;
}
}
/**
* optional string opt = 2;
*/
public com.google.protobuf.ByteString
getOptBytes() {
java.lang.Object ref = opt_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
opt_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int REP_FIELD_NUMBER = 3;
private com.google.protobuf.LazyStringList rep_;
/**
* repeated string rep = 3;
*/
public com.google.protobuf.ProtocolStringList
getRepList() {
return rep_;
}
/**
* repeated string rep = 3;
*/
public int getRepCount() {
return rep_.size();
}
/**
* repeated string rep = 3;
*/
public java.lang.String getRep(int index) {
return rep_.get(index);
}
/**
* repeated string rep = 3;
*/
public com.google.protobuf.ByteString
getRepBytes(int index) {
return rep_.getByteString(index);
}
private void initFields() {
req_ = "";
opt_ = "";
rep_ = com.google.protobuf.LazyStringArrayList.EMPTY;
}
private byte memoizedIsInitialized = -1;
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
if (!hasReq()) {
memoizedIsInitialized = 0;
return false;
}
memoizedIsInitialized = 1;
return true;
}
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
getSerializedSize();
if (((bitField0_ & 0x00000001) == 0x00000001)) {
output.writeBytes(1, getReqBytes());
}
if (((bitField0_ & 0x00000002) == 0x00000002)) {
output.writeBytes(2, getOptBytes());
}
for (int i = 0; i < rep_.size(); i++) {
output.writeBytes(3, rep_.getByteString(i));
}
getUnknownFields().writeTo(output);
}
private int memoizedSerializedSize = -1;
public int getSerializedSize() {
int size = memoizedSerializedSize;
if (size != -1) return size;
size = 0;
if (((bitField0_ & 0x00000001) == 0x00000001)) {
size += com.google.protobuf.CodedOutputStream
.computeBytesSize(1, getReqBytes());
}
if (((bitField0_ & 0x00000002) == 0x00000002)) {
size += com.google.protobuf.CodedOutputStream
.computeBytesSize(2, getOptBytes());
}
{
int dataSize = 0;
for (int i = 0; i < rep_.size(); i++) {
dataSize += com.google.protobuf.CodedOutputStream
.computeBytesSizeNoTag(rep_.getByteString(i));
}
size += dataSize;
size += 1 * getRepList().size();
}
size += getUnknownFields().getSerializedSize();
memoizedSerializedSize = size;
return size;
}
private static final long serialVersionUID = 0L;
@java.lang.Override
protected java.lang.Object writeReplace()
throws java.io.ObjectStreamException {
return super.writeReplace();
}
public static proto2_test_check_utf8.TestCheckUtf8.StringWrapper parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static proto2_test_check_utf8.TestCheckUtf8.StringWrapper parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static proto2_test_check_utf8.TestCheckUtf8.StringWrapper parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static proto2_test_check_utf8.TestCheckUtf8.StringWrapper parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static proto2_test_check_utf8.TestCheckUtf8.StringWrapper parseFrom(java.io.InputStream input)
throws java.io.IOException {
return PARSER.parseFrom(input);
}
public static proto2_test_check_utf8.TestCheckUtf8.StringWrapper parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return PARSER.parseFrom(input, extensionRegistry);
}
public static proto2_test_check_utf8.TestCheckUtf8.StringWrapper parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return PARSER.parseDelimitedFrom(input);
}
public static proto2_test_check_utf8.TestCheckUtf8.StringWrapper parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return PARSER.parseDelimitedFrom(input, extensionRegistry);
}
public static proto2_test_check_utf8.TestCheckUtf8.StringWrapper parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return PARSER.parseFrom(input);
}
public static proto2_test_check_utf8.TestCheckUtf8.StringWrapper parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return PARSER.parseFrom(input, extensionRegistry);
}
public static Builder newBuilder() { return Builder.create(); }
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder(proto2_test_check_utf8.TestCheckUtf8.StringWrapper prototype) {
return newBuilder().mergeFrom(prototype);
}
public Builder toBuilder() { return newBuilder(this); }
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessage.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
* Protobuf type {@code proto2_test_check_utf8.StringWrapper}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessage.Builder implements
// @@protoc_insertion_point(builder_implements:proto2_test_check_utf8.StringWrapper)
proto2_test_check_utf8.TestCheckUtf8.StringWrapperOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return proto2_test_check_utf8.TestCheckUtf8.internal_static_proto2_test_check_utf8_StringWrapper_descriptor;
}
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
internalGetFieldAccessorTable() {
return proto2_test_check_utf8.TestCheckUtf8.internal_static_proto2_test_check_utf8_StringWrapper_fieldAccessorTable
.ensureFieldAccessorsInitialized(
proto2_test_check_utf8.TestCheckUtf8.StringWrapper.class, proto2_test_check_utf8.TestCheckUtf8.StringWrapper.Builder.class);
}
// Construct using proto2_test_check_utf8.TestCheckUtf8.StringWrapper.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessage.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) {
}
}
private static Builder create() {
return new Builder();
}
public Builder clear() {
super.clear();
req_ = "";
bitField0_ = (bitField0_ & ~0x00000001);
opt_ = "";
bitField0_ = (bitField0_ & ~0x00000002);
rep_ = com.google.protobuf.LazyStringArrayList.EMPTY;
bitField0_ = (bitField0_ & ~0x00000004);
return this;
}
public Builder clone() {
return create().mergeFrom(buildPartial());
}
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return proto2_test_check_utf8.TestCheckUtf8.internal_static_proto2_test_check_utf8_StringWrapper_descriptor;
}
public proto2_test_check_utf8.TestCheckUtf8.StringWrapper getDefaultInstanceForType() {
return proto2_test_check_utf8.TestCheckUtf8.StringWrapper.getDefaultInstance();
}
public proto2_test_check_utf8.TestCheckUtf8.StringWrapper build() {
proto2_test_check_utf8.TestCheckUtf8.StringWrapper result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
public proto2_test_check_utf8.TestCheckUtf8.StringWrapper buildPartial() {
proto2_test_check_utf8.TestCheckUtf8.StringWrapper result = new proto2_test_check_utf8.TestCheckUtf8.StringWrapper(this);
int from_bitField0_ = bitField0_;
int to_bitField0_ = 0;
if (((from_bitField0_ & 0x00000001) == 0x00000001)) {
to_bitField0_ |= 0x00000001;
}
result.req_ = req_;
if (((from_bitField0_ & 0x00000002) == 0x00000002)) {
to_bitField0_ |= 0x00000002;
}
result.opt_ = opt_;
if (((bitField0_ & 0x00000004) == 0x00000004)) {
rep_ = rep_.getUnmodifiableView();
bitField0_ = (bitField0_ & ~0x00000004);
}
result.rep_ = rep_;
result.bitField0_ = to_bitField0_;
onBuilt();
return result;
}
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof proto2_test_check_utf8.TestCheckUtf8.StringWrapper) {
return mergeFrom((proto2_test_check_utf8.TestCheckUtf8.StringWrapper)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(proto2_test_check_utf8.TestCheckUtf8.StringWrapper other) {
if (other == proto2_test_check_utf8.TestCheckUtf8.StringWrapper.getDefaultInstance()) return this;
if (other.hasReq()) {
bitField0_ |= 0x00000001;
req_ = other.req_;
onChanged();
}
if (other.hasOpt()) {
bitField0_ |= 0x00000002;
opt_ = other.opt_;
onChanged();
}
if (!other.rep_.isEmpty()) {
if (rep_.isEmpty()) {
rep_ = other.rep_;
bitField0_ = (bitField0_ & ~0x00000004);
} else {
ensureRepIsMutable();
rep_.addAll(other.rep_);
}
onChanged();
}
this.mergeUnknownFields(other.getUnknownFields());
return this;
}
public final boolean isInitialized() {
if (!hasReq()) {
return false;
}
return true;
}
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
proto2_test_check_utf8.TestCheckUtf8.StringWrapper parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (proto2_test_check_utf8.TestCheckUtf8.StringWrapper) e.getUnfinishedMessage();
throw e;
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int bitField0_;
private java.lang.Object req_ = "";
/**
* required string req = 1;
*/
public boolean hasReq() {
return ((bitField0_ & 0x00000001) == 0x00000001);
}
/**
* required string req = 1;
*/
public java.lang.String getReq() {
java.lang.Object ref = req_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
req_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
* required string req = 1;
*/
public com.google.protobuf.ByteString
getReqBytes() {
java.lang.Object ref = req_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
req_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
* required string req = 1;
*/
public Builder setReq(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000001;
req_ = value;
onChanged();
return this;
}
/**
* required string req = 1;
*/
public Builder clearReq() {
bitField0_ = (bitField0_ & ~0x00000001);
req_ = getDefaultInstance().getReq();
onChanged();
return this;
}
/**
* required string req = 1;
*/
public Builder setReqBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
bitField0_ |= 0x00000001;
req_ = value;
onChanged();
return this;
}
private java.lang.Object opt_ = "";
/**
* optional string opt = 2;
*/
public boolean hasOpt() {
return ((bitField0_ & 0x00000002) == 0x00000002);
}
/**
* optional string opt = 2;
*/
public java.lang.String getOpt() {
java.lang.Object ref = opt_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
opt_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
* optional string opt = 2;
*/
public com.google.protobuf.ByteString
getOptBytes() {
java.lang.Object ref = opt_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
opt_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
* optional string opt = 2;
*/
public Builder setOpt(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000002;
opt_ = value;
onChanged();
return this;
}
/**
* optional string opt = 2;
*/
public Builder clearOpt() {
bitField0_ = (bitField0_ & ~0x00000002);
opt_ = getDefaultInstance().getOpt();
onChanged();
return this;
}
/**
* optional string opt = 2;
*/
public Builder setOptBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
bitField0_ |= 0x00000002;
opt_ = value;
onChanged();
return this;
}
private com.google.protobuf.LazyStringList rep_ = com.google.protobuf.LazyStringArrayList.EMPTY;
private void ensureRepIsMutable() {
if (!((bitField0_ & 0x00000004) == 0x00000004)) {
rep_ = new com.google.protobuf.LazyStringArrayList(rep_);
bitField0_ |= 0x00000004;
}
}
/**
* repeated string rep = 3;
*/
public com.google.protobuf.ProtocolStringList
getRepList() {
return rep_.getUnmodifiableView();
}
/**
* repeated string rep = 3;
*/
public int getRepCount() {
return rep_.size();
}
/**
* repeated string rep = 3;
*/
public java.lang.String getRep(int index) {
return rep_.get(index);
}
/**
* repeated string rep = 3;
*/
public com.google.protobuf.ByteString
getRepBytes(int index) {
return rep_.getByteString(index);
}
/**
* repeated string rep = 3;
*/
public Builder setRep(
int index, java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
ensureRepIsMutable();
rep_.set(index, value);
onChanged();
return this;
}
/**
* repeated string rep = 3;
*/
public Builder addRep(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
ensureRepIsMutable();
rep_.add(value);
onChanged();
return this;
}
/**
* repeated string rep = 3;
*/
public Builder addAllRep(
java.lang.Iterable values) {
ensureRepIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, rep_);
onChanged();
return this;
}
/**
* repeated string rep = 3;
*/
public Builder clearRep() {
rep_ = com.google.protobuf.LazyStringArrayList.EMPTY;
bitField0_ = (bitField0_ & ~0x00000004);
onChanged();
return this;
}
/**
* repeated string rep = 3;
*/
public Builder addRepBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
ensureRepIsMutable();
rep_.add(value);
onChanged();
return this;
}
// @@protoc_insertion_point(builder_scope:proto2_test_check_utf8.StringWrapper)
}
static {
defaultInstance = new StringWrapper(true);
defaultInstance.initFields();
}
// @@protoc_insertion_point(class_scope:proto2_test_check_utf8.StringWrapper)
}
public interface BytesWrapperOrBuilder extends
// @@protoc_insertion_point(interface_extends:proto2_test_check_utf8.BytesWrapper)
com.google.protobuf.MessageOrBuilder {
/**
* required bytes req = 1;
*/
boolean hasReq();
/**
* required bytes req = 1;
*/
com.google.protobuf.ByteString getReq();
/**
* optional bytes opt = 2;
*/
boolean hasOpt();
/**
* optional bytes opt = 2;
*/
com.google.protobuf.ByteString getOpt();
/**
* repeated bytes rep = 3;
*/
java.util.List getRepList();
/**
* repeated bytes rep = 3;
*/
int getRepCount();
/**
* repeated bytes rep = 3;
*/
com.google.protobuf.ByteString getRep(int index);
}
/**
* Protobuf type {@code proto2_test_check_utf8.BytesWrapper}
*/
public static final class BytesWrapper extends
com.google.protobuf.GeneratedMessage implements
// @@protoc_insertion_point(message_implements:proto2_test_check_utf8.BytesWrapper)
BytesWrapperOrBuilder {
// Use BytesWrapper.newBuilder() to construct.
private BytesWrapper(com.google.protobuf.GeneratedMessage.Builder> builder) {
super(builder);
this.unknownFields = builder.getUnknownFields();
}
private BytesWrapper(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); }
private static final BytesWrapper defaultInstance;
public static BytesWrapper getDefaultInstance() {
return defaultInstance;
}
public BytesWrapper getDefaultInstanceForType() {
return defaultInstance;
}
private final com.google.protobuf.UnknownFieldSet unknownFields;
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private BytesWrapper(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
initFields();
int mutable_bitField0_ = 0;
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
default: {
if (!parseUnknownField(input, unknownFields,
extensionRegistry, tag)) {
done = true;
}
break;
}
case 10: {
bitField0_ |= 0x00000001;
req_ = input.readBytes();
break;
}
case 18: {
bitField0_ |= 0x00000002;
opt_ = input.readBytes();
break;
}
case 26: {
if (!((mutable_bitField0_ & 0x00000004) == 0x00000004)) {
rep_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000004;
}
rep_.add(input.readBytes());
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e.getMessage()).setUnfinishedMessage(this);
} finally {
if (((mutable_bitField0_ & 0x00000004) == 0x00000004)) {
rep_ = java.util.Collections.unmodifiableList(rep_);
}
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return proto2_test_check_utf8.TestCheckUtf8.internal_static_proto2_test_check_utf8_BytesWrapper_descriptor;
}
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
internalGetFieldAccessorTable() {
return proto2_test_check_utf8.TestCheckUtf8.internal_static_proto2_test_check_utf8_BytesWrapper_fieldAccessorTable
.ensureFieldAccessorsInitialized(
proto2_test_check_utf8.TestCheckUtf8.BytesWrapper.class, proto2_test_check_utf8.TestCheckUtf8.BytesWrapper.Builder.class);
}
public static com.google.protobuf.Parser PARSER =
new com.google.protobuf.AbstractParser() {
public BytesWrapper parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new BytesWrapper(input, extensionRegistry);
}
};
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
private int bitField0_;
public static final int REQ_FIELD_NUMBER = 1;
private com.google.protobuf.ByteString req_;
/**
* required bytes req = 1;
*/
public boolean hasReq() {
return ((bitField0_ & 0x00000001) == 0x00000001);
}
/**
* required bytes req = 1;
*/
public com.google.protobuf.ByteString getReq() {
return req_;
}
public static final int OPT_FIELD_NUMBER = 2;
private com.google.protobuf.ByteString opt_;
/**
* optional bytes opt = 2;
*/
public boolean hasOpt() {
return ((bitField0_ & 0x00000002) == 0x00000002);
}
/**
* optional bytes opt = 2;
*/
public com.google.protobuf.ByteString getOpt() {
return opt_;
}
public static final int REP_FIELD_NUMBER = 3;
private java.util.List rep_;
/**
* repeated bytes rep = 3;
*/
public java.util.List
getRepList() {
return rep_;
}
/**
* repeated bytes rep = 3;
*/
public int getRepCount() {
return rep_.size();
}
/**
* repeated bytes rep = 3;
*/
public com.google.protobuf.ByteString getRep(int index) {
return rep_.get(index);
}
private void initFields() {
req_ = com.google.protobuf.ByteString.EMPTY;
opt_ = com.google.protobuf.ByteString.EMPTY;
rep_ = java.util.Collections.emptyList();
}
private byte memoizedIsInitialized = -1;
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
if (!hasReq()) {
memoizedIsInitialized = 0;
return false;
}
memoizedIsInitialized = 1;
return true;
}
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
getSerializedSize();
if (((bitField0_ & 0x00000001) == 0x00000001)) {
output.writeBytes(1, req_);
}
if (((bitField0_ & 0x00000002) == 0x00000002)) {
output.writeBytes(2, opt_);
}
for (int i = 0; i < rep_.size(); i++) {
output.writeBytes(3, rep_.get(i));
}
getUnknownFields().writeTo(output);
}
private int memoizedSerializedSize = -1;
public int getSerializedSize() {
int size = memoizedSerializedSize;
if (size != -1) return size;
size = 0;
if (((bitField0_ & 0x00000001) == 0x00000001)) {
size += com.google.protobuf.CodedOutputStream
.computeBytesSize(1, req_);
}
if (((bitField0_ & 0x00000002) == 0x00000002)) {
size += com.google.protobuf.CodedOutputStream
.computeBytesSize(2, opt_);
}
{
int dataSize = 0;
for (int i = 0; i < rep_.size(); i++) {
dataSize += com.google.protobuf.CodedOutputStream
.computeBytesSizeNoTag(rep_.get(i));
}
size += dataSize;
size += 1 * getRepList().size();
}
size += getUnknownFields().getSerializedSize();
memoizedSerializedSize = size;
return size;
}
private static final long serialVersionUID = 0L;
@java.lang.Override
protected java.lang.Object writeReplace()
throws java.io.ObjectStreamException {
return super.writeReplace();
}
public static proto2_test_check_utf8.TestCheckUtf8.BytesWrapper parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static proto2_test_check_utf8.TestCheckUtf8.BytesWrapper parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static proto2_test_check_utf8.TestCheckUtf8.BytesWrapper parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static proto2_test_check_utf8.TestCheckUtf8.BytesWrapper parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static proto2_test_check_utf8.TestCheckUtf8.BytesWrapper parseFrom(java.io.InputStream input)
throws java.io.IOException {
return PARSER.parseFrom(input);
}
public static proto2_test_check_utf8.TestCheckUtf8.BytesWrapper parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return PARSER.parseFrom(input, extensionRegistry);
}
public static proto2_test_check_utf8.TestCheckUtf8.BytesWrapper parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return PARSER.parseDelimitedFrom(input);
}
public static proto2_test_check_utf8.TestCheckUtf8.BytesWrapper parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return PARSER.parseDelimitedFrom(input, extensionRegistry);
}
public static proto2_test_check_utf8.TestCheckUtf8.BytesWrapper parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return PARSER.parseFrom(input);
}
public static proto2_test_check_utf8.TestCheckUtf8.BytesWrapper parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return PARSER.parseFrom(input, extensionRegistry);
}
public static Builder newBuilder() { return Builder.create(); }
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder(proto2_test_check_utf8.TestCheckUtf8.BytesWrapper prototype) {
return newBuilder().mergeFrom(prototype);
}
public Builder toBuilder() { return newBuilder(this); }
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessage.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
* Protobuf type {@code proto2_test_check_utf8.BytesWrapper}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessage.Builder implements
// @@protoc_insertion_point(builder_implements:proto2_test_check_utf8.BytesWrapper)
proto2_test_check_utf8.TestCheckUtf8.BytesWrapperOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return proto2_test_check_utf8.TestCheckUtf8.internal_static_proto2_test_check_utf8_BytesWrapper_descriptor;
}
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
internalGetFieldAccessorTable() {
return proto2_test_check_utf8.TestCheckUtf8.internal_static_proto2_test_check_utf8_BytesWrapper_fieldAccessorTable
.ensureFieldAccessorsInitialized(
proto2_test_check_utf8.TestCheckUtf8.BytesWrapper.class, proto2_test_check_utf8.TestCheckUtf8.BytesWrapper.Builder.class);
}
// Construct using proto2_test_check_utf8.TestCheckUtf8.BytesWrapper.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessage.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) {
}
}
private static Builder create() {
return new Builder();
}
public Builder clear() {
super.clear();
req_ = com.google.protobuf.ByteString.EMPTY;
bitField0_ = (bitField0_ & ~0x00000001);
opt_ = com.google.protobuf.ByteString.EMPTY;
bitField0_ = (bitField0_ & ~0x00000002);
rep_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000004);
return this;
}
public Builder clone() {
return create().mergeFrom(buildPartial());
}
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return proto2_test_check_utf8.TestCheckUtf8.internal_static_proto2_test_check_utf8_BytesWrapper_descriptor;
}
public proto2_test_check_utf8.TestCheckUtf8.BytesWrapper getDefaultInstanceForType() {
return proto2_test_check_utf8.TestCheckUtf8.BytesWrapper.getDefaultInstance();
}
public proto2_test_check_utf8.TestCheckUtf8.BytesWrapper build() {
proto2_test_check_utf8.TestCheckUtf8.BytesWrapper result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
public proto2_test_check_utf8.TestCheckUtf8.BytesWrapper buildPartial() {
proto2_test_check_utf8.TestCheckUtf8.BytesWrapper result = new proto2_test_check_utf8.TestCheckUtf8.BytesWrapper(this);
int from_bitField0_ = bitField0_;
int to_bitField0_ = 0;
if (((from_bitField0_ & 0x00000001) == 0x00000001)) {
to_bitField0_ |= 0x00000001;
}
result.req_ = req_;
if (((from_bitField0_ & 0x00000002) == 0x00000002)) {
to_bitField0_ |= 0x00000002;
}
result.opt_ = opt_;
if (((bitField0_ & 0x00000004) == 0x00000004)) {
rep_ = java.util.Collections.unmodifiableList(rep_);
bitField0_ = (bitField0_ & ~0x00000004);
}
result.rep_ = rep_;
result.bitField0_ = to_bitField0_;
onBuilt();
return result;
}
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof proto2_test_check_utf8.TestCheckUtf8.BytesWrapper) {
return mergeFrom((proto2_test_check_utf8.TestCheckUtf8.BytesWrapper)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(proto2_test_check_utf8.TestCheckUtf8.BytesWrapper other) {
if (other == proto2_test_check_utf8.TestCheckUtf8.BytesWrapper.getDefaultInstance()) return this;
if (other.hasReq()) {
setReq(other.getReq());
}
if (other.hasOpt()) {
setOpt(other.getOpt());
}
if (!other.rep_.isEmpty()) {
if (rep_.isEmpty()) {
rep_ = other.rep_;
bitField0_ = (bitField0_ & ~0x00000004);
} else {
ensureRepIsMutable();
rep_.addAll(other.rep_);
}
onChanged();
}
this.mergeUnknownFields(other.getUnknownFields());
return this;
}
public final boolean isInitialized() {
if (!hasReq()) {
return false;
}
return true;
}
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
proto2_test_check_utf8.TestCheckUtf8.BytesWrapper parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (proto2_test_check_utf8.TestCheckUtf8.BytesWrapper) e.getUnfinishedMessage();
throw e;
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int bitField0_;
private com.google.protobuf.ByteString req_ = com.google.protobuf.ByteString.EMPTY;
/**
* required bytes req = 1;
*/
public boolean hasReq() {
return ((bitField0_ & 0x00000001) == 0x00000001);
}
/**
* required bytes req = 1;
*/
public com.google.protobuf.ByteString getReq() {
return req_;
}
/**
* required bytes req = 1;
*/
public Builder setReq(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000001;
req_ = value;
onChanged();
return this;
}
/**
* required bytes req = 1;
*/
public Builder clearReq() {
bitField0_ = (bitField0_ & ~0x00000001);
req_ = getDefaultInstance().getReq();
onChanged();
return this;
}
private com.google.protobuf.ByteString opt_ = com.google.protobuf.ByteString.EMPTY;
/**
* optional bytes opt = 2;
*/
public boolean hasOpt() {
return ((bitField0_ & 0x00000002) == 0x00000002);
}
/**
* optional bytes opt = 2;
*/
public com.google.protobuf.ByteString getOpt() {
return opt_;
}
/**
* optional bytes opt = 2;
*/
public Builder setOpt(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000002;
opt_ = value;
onChanged();
return this;
}
/**
* optional bytes opt = 2;
*/
public Builder clearOpt() {
bitField0_ = (bitField0_ & ~0x00000002);
opt_ = getDefaultInstance().getOpt();
onChanged();
return this;
}
private java.util.List rep_ = java.util.Collections.emptyList();
private void ensureRepIsMutable() {
if (!((bitField0_ & 0x00000004) == 0x00000004)) {
rep_ = new java.util.ArrayList(rep_);
bitField0_ |= 0x00000004;
}
}
/**
* repeated bytes rep = 3;
*/
public java.util.List
getRepList() {
return java.util.Collections.unmodifiableList(rep_);
}
/**
* repeated bytes rep = 3;
*/
public int getRepCount() {
return rep_.size();
}
/**
* repeated bytes rep = 3;
*/
public com.google.protobuf.ByteString getRep(int index) {
return rep_.get(index);
}
/**
* repeated bytes rep = 3;
*/
public Builder setRep(
int index, com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
ensureRepIsMutable();
rep_.set(index, value);
onChanged();
return this;
}
/**
* repeated bytes rep = 3;
*/
public Builder addRep(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
ensureRepIsMutable();
rep_.add(value);
onChanged();
return this;
}
/**
* repeated bytes rep = 3;
*/
public Builder addAllRep(
java.lang.Iterable extends com.google.protobuf.ByteString> values) {
ensureRepIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, rep_);
onChanged();
return this;
}
/**
* repeated bytes rep = 3;
*/
public Builder clearRep() {
rep_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000004);
onChanged();
return this;
}
// @@protoc_insertion_point(builder_scope:proto2_test_check_utf8.BytesWrapper)
}
static {
defaultInstance = new BytesWrapper(true);
defaultInstance.initFields();
}
// @@protoc_insertion_point(class_scope:proto2_test_check_utf8.BytesWrapper)
}
private static final com.google.protobuf.Descriptors.Descriptor
internal_static_proto2_test_check_utf8_StringWrapper_descriptor;
private static
com.google.protobuf.GeneratedMessage.FieldAccessorTable
internal_static_proto2_test_check_utf8_StringWrapper_fieldAccessorTable;
private static final com.google.protobuf.Descriptors.Descriptor
internal_static_proto2_test_check_utf8_BytesWrapper_descriptor;
private static
com.google.protobuf.GeneratedMessage.FieldAccessorTable
internal_static_proto2_test_check_utf8_BytesWrapper_fieldAccessorTable;
public static com.google.protobuf.Descriptors.FileDescriptor
getDescriptor() {
return descriptor;
}
private static com.google.protobuf.Descriptors.FileDescriptor
descriptor;
static {
java.lang.String[] descriptorData = {
"\n)com/google/protobuf/test_check_utf8.pr" +
"oto\022\026proto2_test_check_utf8\"6\n\rStringWra" +
"pper\022\013\n\003req\030\001 \002(\t\022\013\n\003opt\030\002 \001(\t\022\013\n\003rep\030\003 " +
"\003(\t\"5\n\014BytesWrapper\022\013\n\003req\030\001 \002(\014\022\013\n\003opt\030" +
"\002 \001(\014\022\013\n\003rep\030\003 \003(\014B\022B\rTestCheckUtf8\330\001\001"
};
com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner =
new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() {
public com.google.protobuf.ExtensionRegistry assignDescriptors(
com.google.protobuf.Descriptors.FileDescriptor root) {
descriptor = root;
return null;
}
};
com.google.protobuf.Descriptors.FileDescriptor
.internalBuildGeneratedFileFrom(descriptorData,
new com.google.protobuf.Descriptors.FileDescriptor[] {
}, assigner);
internal_static_proto2_test_check_utf8_StringWrapper_descriptor =
getDescriptor().getMessageTypes().get(0);
internal_static_proto2_test_check_utf8_StringWrapper_fieldAccessorTable = new
com.google.protobuf.GeneratedMessage.FieldAccessorTable(
internal_static_proto2_test_check_utf8_StringWrapper_descriptor,
new java.lang.String[] { "Req", "Opt", "Rep", });
internal_static_proto2_test_check_utf8_BytesWrapper_descriptor =
getDescriptor().getMessageTypes().get(1);
internal_static_proto2_test_check_utf8_BytesWrapper_fieldAccessorTable = new
com.google.protobuf.GeneratedMessage.FieldAccessorTable(
internal_static_proto2_test_check_utf8_BytesWrapper_descriptor,
new java.lang.String[] { "Req", "Opt", "Rep", });
}
// @@protoc_insertion_point(outer_class_scope)
}