
protobuf_unittest.Wheel 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
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: com/google/protobuf/nested_builders_test.proto
package protobuf_unittest;
/**
* Protobuf type {@code protobuf_unittest.Wheel}
*/
public final class Wheel extends
com.google.protobuf.GeneratedMessage implements
// @@protoc_insertion_point(message_implements:protobuf_unittest.Wheel)
WheelOrBuilder {
// Use Wheel.newBuilder() to construct.
private Wheel(com.google.protobuf.GeneratedMessage.Builder> builder) {
super(builder);
this.unknownFields = builder.getUnknownFields();
}
private Wheel(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); }
private static final Wheel defaultInstance;
public static Wheel getDefaultInstance() {
return defaultInstance;
}
public Wheel getDefaultInstanceForType() {
return defaultInstance;
}
private final com.google.protobuf.UnknownFieldSet unknownFields;
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private Wheel(
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 8: {
bitField0_ |= 0x00000001;
radius_ = input.readInt32();
break;
}
case 16: {
bitField0_ |= 0x00000002;
width_ = input.readInt32();
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 {
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return protobuf_unittest.NestedBuilders.internal_static_protobuf_unittest_Wheel_descriptor;
}
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
internalGetFieldAccessorTable() {
return protobuf_unittest.NestedBuilders.internal_static_protobuf_unittest_Wheel_fieldAccessorTable
.ensureFieldAccessorsInitialized(
protobuf_unittest.Wheel.class, protobuf_unittest.Wheel.Builder.class);
}
public static com.google.protobuf.Parser PARSER =
new com.google.protobuf.AbstractParser() {
public Wheel parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new Wheel(input, extensionRegistry);
}
};
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
private int bitField0_;
public static final int RADIUS_FIELD_NUMBER = 1;
private int radius_;
/**
* optional int32 radius = 1;
*/
public boolean hasRadius() {
return ((bitField0_ & 0x00000001) == 0x00000001);
}
/**
* optional int32 radius = 1;
*/
public int getRadius() {
return radius_;
}
public static final int WIDTH_FIELD_NUMBER = 2;
private int width_;
/**
* optional int32 width = 2;
*/
public boolean hasWidth() {
return ((bitField0_ & 0x00000002) == 0x00000002);
}
/**
* optional int32 width = 2;
*/
public int getWidth() {
return width_;
}
private void initFields() {
radius_ = 0;
width_ = 0;
}
private byte memoizedIsInitialized = -1;
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 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.writeInt32(1, radius_);
}
if (((bitField0_ & 0x00000002) == 0x00000002)) {
output.writeInt32(2, width_);
}
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
.computeInt32Size(1, radius_);
}
if (((bitField0_ & 0x00000002) == 0x00000002)) {
size += com.google.protobuf.CodedOutputStream
.computeInt32Size(2, width_);
}
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 protobuf_unittest.Wheel parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static protobuf_unittest.Wheel 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.Wheel parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static protobuf_unittest.Wheel parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static protobuf_unittest.Wheel parseFrom(java.io.InputStream input)
throws java.io.IOException {
return PARSER.parseFrom(input);
}
public static protobuf_unittest.Wheel parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return PARSER.parseFrom(input, extensionRegistry);
}
public static protobuf_unittest.Wheel parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return PARSER.parseDelimitedFrom(input);
}
public static protobuf_unittest.Wheel parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return PARSER.parseDelimitedFrom(input, extensionRegistry);
}
public static protobuf_unittest.Wheel parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return PARSER.parseFrom(input);
}
public static protobuf_unittest.Wheel 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(protobuf_unittest.Wheel 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 protobuf_unittest.Wheel}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessage.Builder implements
// @@protoc_insertion_point(builder_implements:protobuf_unittest.Wheel)
protobuf_unittest.WheelOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return protobuf_unittest.NestedBuilders.internal_static_protobuf_unittest_Wheel_descriptor;
}
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
internalGetFieldAccessorTable() {
return protobuf_unittest.NestedBuilders.internal_static_protobuf_unittest_Wheel_fieldAccessorTable
.ensureFieldAccessorsInitialized(
protobuf_unittest.Wheel.class, protobuf_unittest.Wheel.Builder.class);
}
// Construct using protobuf_unittest.Wheel.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();
radius_ = 0;
bitField0_ = (bitField0_ & ~0x00000001);
width_ = 0;
bitField0_ = (bitField0_ & ~0x00000002);
return this;
}
public Builder clone() {
return create().mergeFrom(buildPartial());
}
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return protobuf_unittest.NestedBuilders.internal_static_protobuf_unittest_Wheel_descriptor;
}
public protobuf_unittest.Wheel getDefaultInstanceForType() {
return protobuf_unittest.Wheel.getDefaultInstance();
}
public protobuf_unittest.Wheel build() {
protobuf_unittest.Wheel result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
public protobuf_unittest.Wheel buildPartial() {
protobuf_unittest.Wheel result = new protobuf_unittest.Wheel(this);
int from_bitField0_ = bitField0_;
int to_bitField0_ = 0;
if (((from_bitField0_ & 0x00000001) == 0x00000001)) {
to_bitField0_ |= 0x00000001;
}
result.radius_ = radius_;
if (((from_bitField0_ & 0x00000002) == 0x00000002)) {
to_bitField0_ |= 0x00000002;
}
result.width_ = width_;
result.bitField0_ = to_bitField0_;
onBuilt();
return result;
}
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof protobuf_unittest.Wheel) {
return mergeFrom((protobuf_unittest.Wheel)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(protobuf_unittest.Wheel other) {
if (other == protobuf_unittest.Wheel.getDefaultInstance()) return this;
if (other.hasRadius()) {
setRadius(other.getRadius());
}
if (other.hasWidth()) {
setWidth(other.getWidth());
}
this.mergeUnknownFields(other.getUnknownFields());
return this;
}
public final boolean isInitialized() {
return true;
}
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
protobuf_unittest.Wheel parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (protobuf_unittest.Wheel) e.getUnfinishedMessage();
throw e;
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int bitField0_;
private int radius_ ;
/**
* optional int32 radius = 1;
*/
public boolean hasRadius() {
return ((bitField0_ & 0x00000001) == 0x00000001);
}
/**
* optional int32 radius = 1;
*/
public int getRadius() {
return radius_;
}
/**
* optional int32 radius = 1;
*/
public Builder setRadius(int value) {
bitField0_ |= 0x00000001;
radius_ = value;
onChanged();
return this;
}
/**
* optional int32 radius = 1;
*/
public Builder clearRadius() {
bitField0_ = (bitField0_ & ~0x00000001);
radius_ = 0;
onChanged();
return this;
}
private int width_ ;
/**
* optional int32 width = 2;
*/
public boolean hasWidth() {
return ((bitField0_ & 0x00000002) == 0x00000002);
}
/**
* optional int32 width = 2;
*/
public int getWidth() {
return width_;
}
/**
* optional int32 width = 2;
*/
public Builder setWidth(int value) {
bitField0_ |= 0x00000002;
width_ = value;
onChanged();
return this;
}
/**
* optional int32 width = 2;
*/
public Builder clearWidth() {
bitField0_ = (bitField0_ & ~0x00000002);
width_ = 0;
onChanged();
return this;
}
// @@protoc_insertion_point(builder_scope:protobuf_unittest.Wheel)
}
static {
defaultInstance = new Wheel(true);
defaultInstance.initFields();
}
// @@protoc_insertion_point(class_scope:protobuf_unittest.Wheel)
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy