Please wait. This can take some minutes ...
Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance.
Project price only 1 $
You can buy this project and download/modify it how often you want.
protobuf_unittest.TestAnyProto Maven / Gradle / Ivy
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: google/protobuf/any_test.proto
// Protobuf Java Version: 3.25.3
package protobuf_unittest;
public final class TestAnyProto {
private TestAnyProto() {}
public static void registerAllExtensions(
com.google.protobuf.ExtensionRegistryLite registry) {
}
public static void registerAllExtensions(
com.google.protobuf.ExtensionRegistry registry) {
registerAllExtensions(
(com.google.protobuf.ExtensionRegistryLite) registry);
}
public interface TestAnyOrBuilder extends
// @@protoc_insertion_point(interface_extends:protobuf_unittest.TestAny)
com.google.protobuf.MessageOrBuilder {
/**
* int32 int32_value = 1;
* @return The int32Value.
*/
int getInt32Value();
/**
* .google.protobuf.Any any_value = 2;
* @return Whether the anyValue field is set.
*/
boolean hasAnyValue();
/**
* .google.protobuf.Any any_value = 2;
* @return The anyValue.
*/
com.google.protobuf.Any getAnyValue();
/**
* .google.protobuf.Any any_value = 2;
*/
com.google.protobuf.AnyOrBuilder getAnyValueOrBuilder();
/**
* repeated .google.protobuf.Any repeated_any_value = 3;
*/
java.util.List
getRepeatedAnyValueList();
/**
* repeated .google.protobuf.Any repeated_any_value = 3;
*/
com.google.protobuf.Any getRepeatedAnyValue(int index);
/**
* repeated .google.protobuf.Any repeated_any_value = 3;
*/
int getRepeatedAnyValueCount();
/**
* repeated .google.protobuf.Any repeated_any_value = 3;
*/
java.util.List extends com.google.protobuf.AnyOrBuilder>
getRepeatedAnyValueOrBuilderList();
/**
* repeated .google.protobuf.Any repeated_any_value = 3;
*/
com.google.protobuf.AnyOrBuilder getRepeatedAnyValueOrBuilder(
int index);
/**
* string text = 4;
* @return The text.
*/
java.lang.String getText();
/**
* string text = 4;
* @return The bytes for text.
*/
com.google.protobuf.ByteString
getTextBytes();
}
/**
* Protobuf type {@code protobuf_unittest.TestAny}
*/
public static final class TestAny extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:protobuf_unittest.TestAny)
TestAnyOrBuilder {
private static final long serialVersionUID = 0L;
// Use TestAny.newBuilder() to construct.
private TestAny(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private TestAny() {
repeatedAnyValue_ = java.util.Collections.emptyList();
text_ = "";
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new TestAny();
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return protobuf_unittest.TestAnyProto.internal_static_protobuf_unittest_TestAny_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return protobuf_unittest.TestAnyProto.internal_static_protobuf_unittest_TestAny_fieldAccessorTable
.ensureFieldAccessorsInitialized(
protobuf_unittest.TestAnyProto.TestAny.class, protobuf_unittest.TestAnyProto.TestAny.Builder.class);
}
private int bitField0_;
public static final int INT32_VALUE_FIELD_NUMBER = 1;
private int int32Value_ = 0;
/**
* int32 int32_value = 1;
* @return The int32Value.
*/
@java.lang.Override
public int getInt32Value() {
return int32Value_;
}
public static final int ANY_VALUE_FIELD_NUMBER = 2;
private com.google.protobuf.Any anyValue_;
/**
* .google.protobuf.Any any_value = 2;
* @return Whether the anyValue field is set.
*/
@java.lang.Override
public boolean hasAnyValue() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
* .google.protobuf.Any any_value = 2;
* @return The anyValue.
*/
@java.lang.Override
public com.google.protobuf.Any getAnyValue() {
return anyValue_ == null ? com.google.protobuf.Any.getDefaultInstance() : anyValue_;
}
/**
* .google.protobuf.Any any_value = 2;
*/
@java.lang.Override
public com.google.protobuf.AnyOrBuilder getAnyValueOrBuilder() {
return anyValue_ == null ? com.google.protobuf.Any.getDefaultInstance() : anyValue_;
}
public static final int REPEATED_ANY_VALUE_FIELD_NUMBER = 3;
@SuppressWarnings("serial")
private java.util.List repeatedAnyValue_;
/**
* repeated .google.protobuf.Any repeated_any_value = 3;
*/
@java.lang.Override
public java.util.List getRepeatedAnyValueList() {
return repeatedAnyValue_;
}
/**
* repeated .google.protobuf.Any repeated_any_value = 3;
*/
@java.lang.Override
public java.util.List extends com.google.protobuf.AnyOrBuilder>
getRepeatedAnyValueOrBuilderList() {
return repeatedAnyValue_;
}
/**
* repeated .google.protobuf.Any repeated_any_value = 3;
*/
@java.lang.Override
public int getRepeatedAnyValueCount() {
return repeatedAnyValue_.size();
}
/**
* repeated .google.protobuf.Any repeated_any_value = 3;
*/
@java.lang.Override
public com.google.protobuf.Any getRepeatedAnyValue(int index) {
return repeatedAnyValue_.get(index);
}
/**
* repeated .google.protobuf.Any repeated_any_value = 3;
*/
@java.lang.Override
public com.google.protobuf.AnyOrBuilder getRepeatedAnyValueOrBuilder(
int index) {
return repeatedAnyValue_.get(index);
}
public static final int TEXT_FIELD_NUMBER = 4;
@SuppressWarnings("serial")
private volatile java.lang.Object text_ = "";
/**
* string text = 4;
* @return The text.
*/
@java.lang.Override
public java.lang.String getText() {
java.lang.Object ref = text_;
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();
text_ = s;
return s;
}
}
/**
* string text = 4;
* @return The bytes for text.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getTextBytes() {
java.lang.Object ref = text_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
text_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (int32Value_ != 0) {
output.writeInt32(1, int32Value_);
}
if (((bitField0_ & 0x00000001) != 0)) {
output.writeMessage(2, getAnyValue());
}
for (int i = 0; i < repeatedAnyValue_.size(); i++) {
output.writeMessage(3, repeatedAnyValue_.get(i));
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(text_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 4, text_);
}
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (int32Value_ != 0) {
size += com.google.protobuf.CodedOutputStream
.computeInt32Size(1, int32Value_);
}
if (((bitField0_ & 0x00000001) != 0)) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(2, getAnyValue());
}
for (int i = 0; i < repeatedAnyValue_.size(); i++) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(3, repeatedAnyValue_.get(i));
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(text_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, text_);
}
size += getUnknownFields().getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof protobuf_unittest.TestAnyProto.TestAny)) {
return super.equals(obj);
}
protobuf_unittest.TestAnyProto.TestAny other = (protobuf_unittest.TestAnyProto.TestAny) obj;
if (getInt32Value()
!= other.getInt32Value()) return false;
if (hasAnyValue() != other.hasAnyValue()) return false;
if (hasAnyValue()) {
if (!getAnyValue()
.equals(other.getAnyValue())) return false;
}
if (!getRepeatedAnyValueList()
.equals(other.getRepeatedAnyValueList())) return false;
if (!getText()
.equals(other.getText())) return false;
if (!getUnknownFields().equals(other.getUnknownFields())) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
hash = (37 * hash) + INT32_VALUE_FIELD_NUMBER;
hash = (53 * hash) + getInt32Value();
if (hasAnyValue()) {
hash = (37 * hash) + ANY_VALUE_FIELD_NUMBER;
hash = (53 * hash) + getAnyValue().hashCode();
}
if (getRepeatedAnyValueCount() > 0) {
hash = (37 * hash) + REPEATED_ANY_VALUE_FIELD_NUMBER;
hash = (53 * hash) + getRepeatedAnyValueList().hashCode();
}
hash = (37 * hash) + TEXT_FIELD_NUMBER;
hash = (53 * hash) + getText().hashCode();
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static protobuf_unittest.TestAnyProto.TestAny parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static protobuf_unittest.TestAnyProto.TestAny parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static protobuf_unittest.TestAnyProto.TestAny parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static protobuf_unittest.TestAnyProto.TestAny parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static protobuf_unittest.TestAnyProto.TestAny parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static protobuf_unittest.TestAnyProto.TestAny parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static protobuf_unittest.TestAnyProto.TestAny parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static protobuf_unittest.TestAnyProto.TestAny parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public static protobuf_unittest.TestAnyProto.TestAny parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static protobuf_unittest.TestAnyProto.TestAny parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
}
public static protobuf_unittest.TestAnyProto.TestAny parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static protobuf_unittest.TestAnyProto.TestAny parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
@java.lang.Override
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(protobuf_unittest.TestAnyProto.TestAny prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
public Builder toBuilder() {
return this == DEFAULT_INSTANCE
? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
* Protobuf type {@code protobuf_unittest.TestAny}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:protobuf_unittest.TestAny)
protobuf_unittest.TestAnyProto.TestAnyOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return protobuf_unittest.TestAnyProto.internal_static_protobuf_unittest_TestAny_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return protobuf_unittest.TestAnyProto.internal_static_protobuf_unittest_TestAny_fieldAccessorTable
.ensureFieldAccessorsInitialized(
protobuf_unittest.TestAnyProto.TestAny.class, protobuf_unittest.TestAnyProto.TestAny.Builder.class);
}
// Construct using protobuf_unittest.TestAnyProto.TestAny.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
getAnyValueFieldBuilder();
getRepeatedAnyValueFieldBuilder();
}
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
int32Value_ = 0;
anyValue_ = null;
if (anyValueBuilder_ != null) {
anyValueBuilder_.dispose();
anyValueBuilder_ = null;
}
if (repeatedAnyValueBuilder_ == null) {
repeatedAnyValue_ = java.util.Collections.emptyList();
} else {
repeatedAnyValue_ = null;
repeatedAnyValueBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000004);
text_ = "";
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return protobuf_unittest.TestAnyProto.internal_static_protobuf_unittest_TestAny_descriptor;
}
@java.lang.Override
public protobuf_unittest.TestAnyProto.TestAny getDefaultInstanceForType() {
return protobuf_unittest.TestAnyProto.TestAny.getDefaultInstance();
}
@java.lang.Override
public protobuf_unittest.TestAnyProto.TestAny build() {
protobuf_unittest.TestAnyProto.TestAny result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public protobuf_unittest.TestAnyProto.TestAny buildPartial() {
protobuf_unittest.TestAnyProto.TestAny result = new protobuf_unittest.TestAnyProto.TestAny(this);
buildPartialRepeatedFields(result);
if (bitField0_ != 0) { buildPartial0(result); }
onBuilt();
return result;
}
private void buildPartialRepeatedFields(protobuf_unittest.TestAnyProto.TestAny result) {
if (repeatedAnyValueBuilder_ == null) {
if (((bitField0_ & 0x00000004) != 0)) {
repeatedAnyValue_ = java.util.Collections.unmodifiableList(repeatedAnyValue_);
bitField0_ = (bitField0_ & ~0x00000004);
}
result.repeatedAnyValue_ = repeatedAnyValue_;
} else {
result.repeatedAnyValue_ = repeatedAnyValueBuilder_.build();
}
}
private void buildPartial0(protobuf_unittest.TestAnyProto.TestAny result) {
int from_bitField0_ = bitField0_;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.int32Value_ = int32Value_;
}
int to_bitField0_ = 0;
if (((from_bitField0_ & 0x00000002) != 0)) {
result.anyValue_ = anyValueBuilder_ == null
? anyValue_
: anyValueBuilder_.build();
to_bitField0_ |= 0x00000001;
}
if (((from_bitField0_ & 0x00000008) != 0)) {
result.text_ = text_;
}
result.bitField0_ |= to_bitField0_;
}
@java.lang.Override
public Builder clone() {
return super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.setField(field, value);
}
@java.lang.Override
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, java.lang.Object value) {
return super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof protobuf_unittest.TestAnyProto.TestAny) {
return mergeFrom((protobuf_unittest.TestAnyProto.TestAny)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(protobuf_unittest.TestAnyProto.TestAny other) {
if (other == protobuf_unittest.TestAnyProto.TestAny.getDefaultInstance()) return this;
if (other.getInt32Value() != 0) {
setInt32Value(other.getInt32Value());
}
if (other.hasAnyValue()) {
mergeAnyValue(other.getAnyValue());
}
if (repeatedAnyValueBuilder_ == null) {
if (!other.repeatedAnyValue_.isEmpty()) {
if (repeatedAnyValue_.isEmpty()) {
repeatedAnyValue_ = other.repeatedAnyValue_;
bitField0_ = (bitField0_ & ~0x00000004);
} else {
ensureRepeatedAnyValueIsMutable();
repeatedAnyValue_.addAll(other.repeatedAnyValue_);
}
onChanged();
}
} else {
if (!other.repeatedAnyValue_.isEmpty()) {
if (repeatedAnyValueBuilder_.isEmpty()) {
repeatedAnyValueBuilder_.dispose();
repeatedAnyValueBuilder_ = null;
repeatedAnyValue_ = other.repeatedAnyValue_;
bitField0_ = (bitField0_ & ~0x00000004);
repeatedAnyValueBuilder_ =
com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
getRepeatedAnyValueFieldBuilder() : null;
} else {
repeatedAnyValueBuilder_.addAllMessages(other.repeatedAnyValue_);
}
}
}
if (!other.getText().isEmpty()) {
text_ = other.text_;
bitField0_ |= 0x00000008;
onChanged();
}
this.mergeUnknownFields(other.getUnknownFields());
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 8: {
int32Value_ = input.readInt32();
bitField0_ |= 0x00000001;
break;
} // case 8
case 18: {
input.readMessage(
getAnyValueFieldBuilder().getBuilder(),
extensionRegistry);
bitField0_ |= 0x00000002;
break;
} // case 18
case 26: {
com.google.protobuf.Any m =
input.readMessage(
com.google.protobuf.Any.parser(),
extensionRegistry);
if (repeatedAnyValueBuilder_ == null) {
ensureRepeatedAnyValueIsMutable();
repeatedAnyValue_.add(m);
} else {
repeatedAnyValueBuilder_.addMessage(m);
}
break;
} // case 26
case 34: {
text_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000008;
break;
} // case 34
default: {
if (!super.parseUnknownField(input, extensionRegistry, tag)) {
done = true; // was an endgroup tag
}
break;
} // default:
} // switch (tag)
} // while (!done)
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.unwrapIOException();
} finally {
onChanged();
} // finally
return this;
}
private int bitField0_;
private int int32Value_ ;
/**
* int32 int32_value = 1;
* @return The int32Value.
*/
@java.lang.Override
public int getInt32Value() {
return int32Value_;
}
/**
* int32 int32_value = 1;
* @param value The int32Value to set.
* @return This builder for chaining.
*/
public Builder setInt32Value(int value) {
int32Value_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
* int32 int32_value = 1;
* @return This builder for chaining.
*/
public Builder clearInt32Value() {
bitField0_ = (bitField0_ & ~0x00000001);
int32Value_ = 0;
onChanged();
return this;
}
private com.google.protobuf.Any anyValue_;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Any, com.google.protobuf.Any.Builder, com.google.protobuf.AnyOrBuilder> anyValueBuilder_;
/**
* .google.protobuf.Any any_value = 2;
* @return Whether the anyValue field is set.
*/
public boolean hasAnyValue() {
return ((bitField0_ & 0x00000002) != 0);
}
/**
* .google.protobuf.Any any_value = 2;
* @return The anyValue.
*/
public com.google.protobuf.Any getAnyValue() {
if (anyValueBuilder_ == null) {
return anyValue_ == null ? com.google.protobuf.Any.getDefaultInstance() : anyValue_;
} else {
return anyValueBuilder_.getMessage();
}
}
/**
* .google.protobuf.Any any_value = 2;
*/
public Builder setAnyValue(com.google.protobuf.Any value) {
if (anyValueBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
anyValue_ = value;
} else {
anyValueBuilder_.setMessage(value);
}
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
* .google.protobuf.Any any_value = 2;
*/
public Builder setAnyValue(
com.google.protobuf.Any.Builder builderForValue) {
if (anyValueBuilder_ == null) {
anyValue_ = builderForValue.build();
} else {
anyValueBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
* .google.protobuf.Any any_value = 2;
*/
public Builder mergeAnyValue(com.google.protobuf.Any value) {
if (anyValueBuilder_ == null) {
if (((bitField0_ & 0x00000002) != 0) &&
anyValue_ != null &&
anyValue_ != com.google.protobuf.Any.getDefaultInstance()) {
getAnyValueBuilder().mergeFrom(value);
} else {
anyValue_ = value;
}
} else {
anyValueBuilder_.mergeFrom(value);
}
if (anyValue_ != null) {
bitField0_ |= 0x00000002;
onChanged();
}
return this;
}
/**
* .google.protobuf.Any any_value = 2;
*/
public Builder clearAnyValue() {
bitField0_ = (bitField0_ & ~0x00000002);
anyValue_ = null;
if (anyValueBuilder_ != null) {
anyValueBuilder_.dispose();
anyValueBuilder_ = null;
}
onChanged();
return this;
}
/**
* .google.protobuf.Any any_value = 2;
*/
public com.google.protobuf.Any.Builder getAnyValueBuilder() {
bitField0_ |= 0x00000002;
onChanged();
return getAnyValueFieldBuilder().getBuilder();
}
/**
* .google.protobuf.Any any_value = 2;
*/
public com.google.protobuf.AnyOrBuilder getAnyValueOrBuilder() {
if (anyValueBuilder_ != null) {
return anyValueBuilder_.getMessageOrBuilder();
} else {
return anyValue_ == null ?
com.google.protobuf.Any.getDefaultInstance() : anyValue_;
}
}
/**
* .google.protobuf.Any any_value = 2;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Any, com.google.protobuf.Any.Builder, com.google.protobuf.AnyOrBuilder>
getAnyValueFieldBuilder() {
if (anyValueBuilder_ == null) {
anyValueBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Any, com.google.protobuf.Any.Builder, com.google.protobuf.AnyOrBuilder>(
getAnyValue(),
getParentForChildren(),
isClean());
anyValue_ = null;
}
return anyValueBuilder_;
}
private java.util.List repeatedAnyValue_ =
java.util.Collections.emptyList();
private void ensureRepeatedAnyValueIsMutable() {
if (!((bitField0_ & 0x00000004) != 0)) {
repeatedAnyValue_ = new java.util.ArrayList(repeatedAnyValue_);
bitField0_ |= 0x00000004;
}
}
private com.google.protobuf.RepeatedFieldBuilderV3<
com.google.protobuf.Any, com.google.protobuf.Any.Builder, com.google.protobuf.AnyOrBuilder> repeatedAnyValueBuilder_;
/**
* repeated .google.protobuf.Any repeated_any_value = 3;
*/
public java.util.List getRepeatedAnyValueList() {
if (repeatedAnyValueBuilder_ == null) {
return java.util.Collections.unmodifiableList(repeatedAnyValue_);
} else {
return repeatedAnyValueBuilder_.getMessageList();
}
}
/**
* repeated .google.protobuf.Any repeated_any_value = 3;
*/
public int getRepeatedAnyValueCount() {
if (repeatedAnyValueBuilder_ == null) {
return repeatedAnyValue_.size();
} else {
return repeatedAnyValueBuilder_.getCount();
}
}
/**
* repeated .google.protobuf.Any repeated_any_value = 3;
*/
public com.google.protobuf.Any getRepeatedAnyValue(int index) {
if (repeatedAnyValueBuilder_ == null) {
return repeatedAnyValue_.get(index);
} else {
return repeatedAnyValueBuilder_.getMessage(index);
}
}
/**
* repeated .google.protobuf.Any repeated_any_value = 3;
*/
public Builder setRepeatedAnyValue(
int index, com.google.protobuf.Any value) {
if (repeatedAnyValueBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureRepeatedAnyValueIsMutable();
repeatedAnyValue_.set(index, value);
onChanged();
} else {
repeatedAnyValueBuilder_.setMessage(index, value);
}
return this;
}
/**
* repeated .google.protobuf.Any repeated_any_value = 3;
*/
public Builder setRepeatedAnyValue(
int index, com.google.protobuf.Any.Builder builderForValue) {
if (repeatedAnyValueBuilder_ == null) {
ensureRepeatedAnyValueIsMutable();
repeatedAnyValue_.set(index, builderForValue.build());
onChanged();
} else {
repeatedAnyValueBuilder_.setMessage(index, builderForValue.build());
}
return this;
}
/**
* repeated .google.protobuf.Any repeated_any_value = 3;
*/
public Builder addRepeatedAnyValue(com.google.protobuf.Any value) {
if (repeatedAnyValueBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureRepeatedAnyValueIsMutable();
repeatedAnyValue_.add(value);
onChanged();
} else {
repeatedAnyValueBuilder_.addMessage(value);
}
return this;
}
/**
* repeated .google.protobuf.Any repeated_any_value = 3;
*/
public Builder addRepeatedAnyValue(
int index, com.google.protobuf.Any value) {
if (repeatedAnyValueBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureRepeatedAnyValueIsMutable();
repeatedAnyValue_.add(index, value);
onChanged();
} else {
repeatedAnyValueBuilder_.addMessage(index, value);
}
return this;
}
/**
* repeated .google.protobuf.Any repeated_any_value = 3;
*/
public Builder addRepeatedAnyValue(
com.google.protobuf.Any.Builder builderForValue) {
if (repeatedAnyValueBuilder_ == null) {
ensureRepeatedAnyValueIsMutable();
repeatedAnyValue_.add(builderForValue.build());
onChanged();
} else {
repeatedAnyValueBuilder_.addMessage(builderForValue.build());
}
return this;
}
/**
* repeated .google.protobuf.Any repeated_any_value = 3;
*/
public Builder addRepeatedAnyValue(
int index, com.google.protobuf.Any.Builder builderForValue) {
if (repeatedAnyValueBuilder_ == null) {
ensureRepeatedAnyValueIsMutable();
repeatedAnyValue_.add(index, builderForValue.build());
onChanged();
} else {
repeatedAnyValueBuilder_.addMessage(index, builderForValue.build());
}
return this;
}
/**
* repeated .google.protobuf.Any repeated_any_value = 3;
*/
public Builder addAllRepeatedAnyValue(
java.lang.Iterable extends com.google.protobuf.Any> values) {
if (repeatedAnyValueBuilder_ == null) {
ensureRepeatedAnyValueIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, repeatedAnyValue_);
onChanged();
} else {
repeatedAnyValueBuilder_.addAllMessages(values);
}
return this;
}
/**
* repeated .google.protobuf.Any repeated_any_value = 3;
*/
public Builder clearRepeatedAnyValue() {
if (repeatedAnyValueBuilder_ == null) {
repeatedAnyValue_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000004);
onChanged();
} else {
repeatedAnyValueBuilder_.clear();
}
return this;
}
/**
* repeated .google.protobuf.Any repeated_any_value = 3;
*/
public Builder removeRepeatedAnyValue(int index) {
if (repeatedAnyValueBuilder_ == null) {
ensureRepeatedAnyValueIsMutable();
repeatedAnyValue_.remove(index);
onChanged();
} else {
repeatedAnyValueBuilder_.remove(index);
}
return this;
}
/**
* repeated .google.protobuf.Any repeated_any_value = 3;
*/
public com.google.protobuf.Any.Builder getRepeatedAnyValueBuilder(
int index) {
return getRepeatedAnyValueFieldBuilder().getBuilder(index);
}
/**
* repeated .google.protobuf.Any repeated_any_value = 3;
*/
public com.google.protobuf.AnyOrBuilder getRepeatedAnyValueOrBuilder(
int index) {
if (repeatedAnyValueBuilder_ == null) {
return repeatedAnyValue_.get(index); } else {
return repeatedAnyValueBuilder_.getMessageOrBuilder(index);
}
}
/**
* repeated .google.protobuf.Any repeated_any_value = 3;
*/
public java.util.List extends com.google.protobuf.AnyOrBuilder>
getRepeatedAnyValueOrBuilderList() {
if (repeatedAnyValueBuilder_ != null) {
return repeatedAnyValueBuilder_.getMessageOrBuilderList();
} else {
return java.util.Collections.unmodifiableList(repeatedAnyValue_);
}
}
/**
* repeated .google.protobuf.Any repeated_any_value = 3;
*/
public com.google.protobuf.Any.Builder addRepeatedAnyValueBuilder() {
return getRepeatedAnyValueFieldBuilder().addBuilder(
com.google.protobuf.Any.getDefaultInstance());
}
/**
* repeated .google.protobuf.Any repeated_any_value = 3;
*/
public com.google.protobuf.Any.Builder addRepeatedAnyValueBuilder(
int index) {
return getRepeatedAnyValueFieldBuilder().addBuilder(
index, com.google.protobuf.Any.getDefaultInstance());
}
/**
* repeated .google.protobuf.Any repeated_any_value = 3;
*/
public java.util.List
getRepeatedAnyValueBuilderList() {
return getRepeatedAnyValueFieldBuilder().getBuilderList();
}
private com.google.protobuf.RepeatedFieldBuilderV3<
com.google.protobuf.Any, com.google.protobuf.Any.Builder, com.google.protobuf.AnyOrBuilder>
getRepeatedAnyValueFieldBuilder() {
if (repeatedAnyValueBuilder_ == null) {
repeatedAnyValueBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
com.google.protobuf.Any, com.google.protobuf.Any.Builder, com.google.protobuf.AnyOrBuilder>(
repeatedAnyValue_,
((bitField0_ & 0x00000004) != 0),
getParentForChildren(),
isClean());
repeatedAnyValue_ = null;
}
return repeatedAnyValueBuilder_;
}
private java.lang.Object text_ = "";
/**
* string text = 4;
* @return The text.
*/
public java.lang.String getText() {
java.lang.Object ref = text_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
text_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
* string text = 4;
* @return The bytes for text.
*/
public com.google.protobuf.ByteString
getTextBytes() {
java.lang.Object ref = text_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
text_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
* string text = 4;
* @param value The text to set.
* @return This builder for chaining.
*/
public Builder setText(
java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
text_ = value;
bitField0_ |= 0x00000008;
onChanged();
return this;
}
/**
* string text = 4;
* @return This builder for chaining.
*/
public Builder clearText() {
text_ = getDefaultInstance().getText();
bitField0_ = (bitField0_ & ~0x00000008);
onChanged();
return this;
}
/**
* string text = 4;
* @param value The bytes for text to set.
* @return This builder for chaining.
*/
public Builder setTextBytes(
com.google.protobuf.ByteString value) {
if (value == null) { throw new NullPointerException(); }
checkByteStringIsUtf8(value);
text_ = value;
bitField0_ |= 0x00000008;
onChanged();
return this;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:protobuf_unittest.TestAny)
}
// @@protoc_insertion_point(class_scope:protobuf_unittest.TestAny)
private static final protobuf_unittest.TestAnyProto.TestAny DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new protobuf_unittest.TestAnyProto.TestAny();
}
public static protobuf_unittest.TestAnyProto.TestAny getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public TestAny parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
Builder builder = newBuilder();
try {
builder.mergeFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(builder.buildPartial());
} catch (com.google.protobuf.UninitializedMessageException e) {
throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e)
.setUnfinishedMessage(builder.buildPartial());
}
return builder.buildPartial();
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public protobuf_unittest.TestAnyProto.TestAny getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
private static final com.google.protobuf.Descriptors.Descriptor
internal_static_protobuf_unittest_TestAny_descriptor;
private static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_protobuf_unittest_TestAny_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\036google/protobuf/any_test.proto\022\021protob" +
"uf_unittest\032\031google/protobuf/any.proto\"\207" +
"\001\n\007TestAny\022\023\n\013int32_value\030\001 \001(\005\022\'\n\tany_v" +
"alue\030\002 \001(\0132\024.google.protobuf.Any\0220\n\022repe" +
"ated_any_value\030\003 \003(\0132\024.google.protobuf.A" +
"ny\022\014\n\004text\030\004 \001(\tB\016B\014TestAnyProtob\006proto3"
};
descriptor = com.google.protobuf.Descriptors.FileDescriptor
.internalBuildGeneratedFileFrom(descriptorData,
new com.google.protobuf.Descriptors.FileDescriptor[] {
com.google.protobuf.AnyProto.getDescriptor(),
});
internal_static_protobuf_unittest_TestAny_descriptor =
getDescriptor().getMessageTypes().get(0);
internal_static_protobuf_unittest_TestAny_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_protobuf_unittest_TestAny_descriptor,
new java.lang.String[] { "Int32Value", "AnyValue", "RepeatedAnyValue", "Text", });
com.google.protobuf.AnyProto.getDescriptor();
}
// @@protoc_insertion_point(outer_class_scope)
}