public Builder mergeFrom(
          com.google.protobuf.CodedInputStream input,
          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
          throws java.io.IOException {
        com.google.protobuf.UnknownFieldSet.Builder unknownFields =
          com.google.protobuf.UnknownFieldSet.newBuilder(
            this.getUnknownFields());
        while (true) {
          int tag = input.readTag();
          switch (tag) {
            case 0:
              this.setUnknownFields(unknownFields.build());
              onChanged();
              return this;
            default: {
              if (!parseUnknownField(input, unknownFields,
                                     extensionRegistry, tag)) {
                this.setUnknownFields(unknownFields.build());
                onChanged();
                return this;
              }
              break;
            }
            case 8: {
              bitField0_ |= 0x00000001;
              tag_ = input.readInt64();
              break;
            }
            case 16: {
              int rawValue = input.readEnum();
              org.box2d.proto.Box2D.PbJointType value = org.box2d.proto.Box2D.PbJointType.valueOf(rawValue);
              if (value == null) {
                unknownFields.mergeVarintField(2, rawValue);
              } else {
                bitField0_ |= 0x00000002;
                type_ = value;
              }
              break;
            }
            case 24: {
              bitField0_ |= 0x00000004;
              bodyA_ = input.readInt32();
              break;
            }
            case 32: {
              bitField0_ |= 0x00000008;
              bodyB_ = input.readInt32();
              break;
            }
            case 40: {
              bitField0_ |= 0x00000010;
              collideConnected_ = input.readBool();
              break;
            }
            case 50: {
              org.box2d.proto.Box2D.PbVec2.Builder subBuilder = org.box2d.proto.Box2D.PbVec2.newBuilder();
              if (hasLocalAnchorA()) {
                subBuilder.mergeFrom(getLocalAnchorA());
              }
              input.readMessage(subBuilder, extensionRegistry);
              setLocalAnchorA(subBuilder.buildPartial());
              break;
            }
            case 58: {
              org.box2d.proto.Box2D.PbVec2.Builder subBuilder = org.box2d.proto.Box2D.PbVec2.newBuilder();
              if (hasLocalAnchorB()) {
                subBuilder.mergeFrom(getLocalAnchorB());
              }
              input.readMessage(subBuilder, extensionRegistry);
              setLocalAnchorB(subBuilder.buildPartial());
              break;
            }
            case 85: {
              bitField0_ |= 0x00000080;
              refAngle_ = input.readFloat();
              break;
            }
            case 96: {
              bitField0_ |= 0x00000100;
              enableLimit_ = input.readBool();
              break;
            }
            case 109: {
              bitField0_ |= 0x00000200;
              lowerLimit_ = input.readFloat();
              break;
            }
            case 117: {
              bitField0_ |= 0x00000400;
              upperLimit_ = input.readFloat();
              break;
            }
            case 120: {
              bitField0_ |= 0x00000800;
              enableMotor_ = input.readBool();
              break;
            }
            case 133: {
              bitField0_ |= 0x00001000;
              motorSpeed_ = input.readFloat();
              break;
            }
            case 141: {
              bitField0_ |= 0x00002000;
              maxMotorTorque_ = input.readFloat();
              break;
            }
            case 162: {
              org.box2d.proto.Box2D.PbVec2.Builder subBuilder = org.box2d.proto.Box2D.PbVec2.newBuilder();
              if (hasLocalAxisA()) {
                subBuilder.mergeFrom(getLocalAxisA());
              }
              input.readMessage(subBuilder, extensionRegistry);
              setLocalAxisA(subBuilder.buildPartial());
              break;
            }
            case 173: {
              bitField0_ |= 0x00008000;
              maxMotorForce_ = input.readFloat();
              break;
            }
            case 245: {
              bitField0_ |= 0x00010000;
              length_ = input.readFloat();
              break;
            }
            case 253: {
              bitField0_ |= 0x00020000;
              frequency_ = input.readFloat();
              break;
            }
            case 261: {
              bitField0_ |= 0x00040000;
              dampingRatio_ = input.readFloat();
              break;
            }
            case 322: {
              org.box2d.proto.Box2D.PbVec2.Builder subBuilder = org.box2d.proto.Box2D.PbVec2.newBuilder();
              if (hasGroundAnchorA()) {
                subBuilder.mergeFrom(getGroundAnchorA());
              }
              input.readMessage(subBuilder, extensionRegistry);
              setGroundAnchorA(subBuilder.buildPartial());
              break;
            }
            case 330: {
              org.box2d.proto.Box2D.PbVec2.Builder subBuilder = org.box2d.proto.Box2D.PbVec2.newBuilder();
              if (hasGroundAnchorB()) {
                subBuilder.mergeFrom(getGroundAnchorB());
              }
              input.readMessage(subBuilder, extensionRegistry);
              setGroundAnchorB(subBuilder.buildPartial());
              break;
            }
            case 341: {
              bitField0_ |= 0x00200000;
              lengthA_ = input.readFloat();
              break;
            }
            case 349: {
              bitField0_ |= 0x00400000;
              lengthB_ = input.readFloat();
              break;
            }
            case 357: {
              bitField0_ |= 0x00800000;
              ratio_ = input.readFloat();
              break;
            }
            case 365: {
              bitField0_ |= 0x01000000;
              maxLengthA_ = input.readFloat();
              break;
            }
            case 373: {
              bitField0_ |= 0x02000000;
              maxLengthB_ = input.readFloat();
              break;
            }
            case 402: {
              org.box2d.proto.Box2D.PbVec2.Builder subBuilder = org.box2d.proto.Box2D.PbVec2.newBuilder();
              if (hasTarget()) {
                subBuilder.mergeFrom(getTarget());
              }
              input.readMessage(subBuilder, extensionRegistry);
              setTarget(subBuilder.buildPartial());
              break;
            }
            case 413: {
              bitField0_ |= 0x08000000;
              maxForce_ = input.readFloat();
              break;
            }
            case 488: {
              bitField0_ |= 0x10000000;
              joint1_ = input.readInt32();
              break;
            }
            case 496: {
              bitField0_ |= 0x20000000;
              joint2_ = input.readInt32();
              break;
            }
            case 565: {
              bitField0_ |= 0x40000000;
              springFrequency_ = input.readFloat();
              break;
            }
            case 573: {
              bitField0_ |= 0x80000000;
              springDampingRatio_ = input.readFloat();
              break;
            }
            case 725: {
              bitField1_ |= 0x00000001;
              maxTorque_ = input.readFloat();
              break;
            }
            case 805: {
              bitField1_ |= 0x00000002;
              maxLength_ = input.readFloat();
              break;
            }
            case 880: {
              ensureBodiesIsMutable();
              bodies_.add(input.readInt32());
              break;
            }
            case 882: {
              int length = input.readRawVarint32();
              int limit = input.pushLimit(length);
              while (input.getBytesUntilLimit() > 0) {
                addBodies(input.readInt32());
              }
              input.popLimit(limit);
              break;
            }
            case 888: {
              ensureJointsIsMutable();
              joints_.add(input.readInt32());
              break;
            }
            case 890: {
              int length = input.readRawVarint32();
              int limit = input.pushLimit(length);
              while (input.getBytesUntilLimit() > 0) {
                addJoints(input.readInt32());
              }
              input.popLimit(limit);
              break;
            }
            case 901: {
              bitField1_ |= 0x00000010;
              targetVolume_ = input.readFloat();
              break;
            }
          }
        }
      }