// Copyright (c) FIRST and other WPILib contributors.
// Open Source Software; you can modify and/or share it under the terms of
// the WPILib BSD license file in the root directory of this project.
// Code generated by protocol buffer compiler. Do not edit!
package edu.wpi.first.math.proto;

import java.io.IOException;
import us.hebi.quickbuf.Descriptors;
import us.hebi.quickbuf.FieldName;
import us.hebi.quickbuf.InvalidProtocolBufferException;
import us.hebi.quickbuf.JsonSink;
import us.hebi.quickbuf.JsonSource;
import us.hebi.quickbuf.MessageFactory;
import us.hebi.quickbuf.ProtoMessage;
import us.hebi.quickbuf.ProtoSink;
import us.hebi.quickbuf.ProtoSource;
import us.hebi.quickbuf.ProtoUtil;
import us.hebi.quickbuf.RepeatedByte;

public final class Geometry3D {
  private static final RepeatedByte descriptorData = ProtoUtil.decodeBase64(1875,
    "ChBnZW9tZXRyeTNkLnByb3RvEgl3cGkucHJvdG8iQQoVUHJvdG9idWZUcmFuc2xhdGlvbjNkEgwKAXgY" + 
    "ASABKAFSAXgSDAoBeRgCIAEoAVIBeRIMCgF6GAMgASgBUgF6IkwKElByb3RvYnVmUXVhdGVybmlvbhIM" + 
    "CgF3GAEgASgBUgF3EgwKAXgYAiABKAFSAXgSDAoBeRgDIAEoAVIBeRIMCgF6GAQgASgBUgF6IkEKElBy" + 
    "b3RvYnVmUm90YXRpb24zZBIrCgFxGAEgASgLMh0ud3BpLnByb3RvLlByb3RvYnVmUXVhdGVybmlvblIB" + 
    "cSKPAQoOUHJvdG9idWZQb3NlM2QSQgoLdHJhbnNsYXRpb24YASABKAsyIC53cGkucHJvdG8uUHJvdG9i" + 
    "dWZUcmFuc2xhdGlvbjNkUgt0cmFuc2xhdGlvbhI5Cghyb3RhdGlvbhgCIAEoCzIdLndwaS5wcm90by5Q" + 
    "cm90b2J1ZlJvdGF0aW9uM2RSCHJvdGF0aW9uIpQBChNQcm90b2J1ZlRyYW5zZm9ybTNkEkIKC3RyYW5z" + 
    "bGF0aW9uGAEgASgLMiAud3BpLnByb3RvLlByb3RvYnVmVHJhbnNsYXRpb24zZFILdHJhbnNsYXRpb24S" + 
    "OQoIcm90YXRpb24YAiABKAsyHS53cGkucHJvdG8uUHJvdG9idWZSb3RhdGlvbjNkUghyb3RhdGlvbiJx" + 
    "Cg9Qcm90b2J1ZlR3aXN0M2QSDgoCZHgYASABKAFSAmR4Eg4KAmR5GAIgASgBUgJkeRIOCgJkehgDIAEo" + 
    "AVICZHoSDgoCcngYBCABKAFSAnJ4Eg4KAnJ5GAUgASgBUgJyeRIOCgJyehgGIAEoAVICcnpCGgoYZWR1" + 
    "LndwaS5maXJzdC5tYXRoLnByb3RvSp8JCgYSBAAAKAEKCAoBDBIDAAASCggKAQISAwIAEgoICgEIEgME" + 
    "ADEKCQoCCAESAwQAMQoKCgIEABIEBgAKAQoKCgMEAAESAwYIHQoLCgQEAAIAEgMHAg8KDAoFBAACAAUS" + 
    "AwcCCAoMCgUEAAIAARIDBwkKCgwKBQQAAgADEgMHDQ4KCwoEBAACARIDCAIPCgwKBQQAAgEFEgMIAggK" + 
    "DAoFBAACAQESAwgJCgoMCgUEAAIBAxIDCA0OCgsKBAQAAgISAwkCDwoMCgUEAAICBRIDCQIICgwKBQQA" + 
    "AgIBEgMJCQoKDAoFBAACAgMSAwkNDgoKCgIEARIEDAARAQoKCgMEAQESAwwIGgoLCgQEAQIAEgMNAg8K" + 
    "DAoFBAECAAUSAw0CCAoMCgUEAQIAARIDDQkKCgwKBQQBAgADEgMNDQ4KCwoEBAECARIDDgIPCgwKBQQB" + 
    "AgEFEgMOAggKDAoFBAECAQESAw4JCgoMCgUEAQIBAxIDDg0OCgsKBAQBAgISAw8CDwoMCgUEAQICBRID" + 
    "DwIICgwKBQQBAgIBEgMPCQoKDAoFBAECAgMSAw8NDgoLCgQEAQIDEgMQAg8KDAoFBAECAwUSAxACCAoM" + 
    "CgUEAQIDARIDEAkKCgwKBQQBAgMDEgMQDQ4KCgoCBAISBBMAFQEKCgoDBAIBEgMTCBoKCwoEBAICABID",
    "FAIbCgwKBQQCAgAGEgMUAhQKDAoFBAICAAESAxQVFgoMCgUEAgIAAxIDFBkaCgoKAgQDEgQXABoBCgoK" + 
    "AwQDARIDFwgWCgsKBAQDAgASAxgCKAoMCgUEAwIABhIDGAIXCgwKBQQDAgABEgMYGCMKDAoFBAMCAAMS" + 
    "AxgmJwoLCgQEAwIBEgMZAiIKDAoFBAMCAQYSAxkCFAoMCgUEAwIBARIDGRUdCgwKBQQDAgEDEgMZICEK" + 
    "CgoCBAQSBBwAHwEKCgoDBAQBEgMcCBsKCwoEBAQCABIDHQIoCgwKBQQEAgAGEgMdAhcKDAoFBAQCAAES" + 
    "Ax0YIwoMCgUEBAIAAxIDHSYnCgsKBAQEAgESAx4CIgoMCgUEBAIBBhIDHgIUCgwKBQQEAgEBEgMeFR0K" + 
    "DAoFBAQCAQMSAx4gIQoKCgIEBRIEIQAoAQoKCgMEBQESAyEIFwoLCgQEBQIAEgMiAhAKDAoFBAUCAAUS" + 
    "AyICCAoMCgUEBQIAARIDIgkLCgwKBQQFAgADEgMiDg8KCwoEBAUCARIDIwIQCgwKBQQFAgEFEgMjAggK" + 
    "DAoFBAUCAQESAyMJCwoMCgUEBQIBAxIDIw4PCgsKBAQFAgISAyQCEAoMCgUEBQICBRIDJAIICgwKBQQF" + 
    "AgIBEgMkCQsKDAoFBAUCAgMSAyQODwoLCgQEBQIDEgMlAhAKDAoFBAUCAwUSAyUCCAoMCgUEBQIDARID" + 
    "JQkLCgwKBQQFAgMDEgMlDg8KCwoEBAUCBBIDJgIQCgwKBQQFAgQFEgMmAggKDAoFBAUCBAESAyYJCwoM" + 
    "CgUEBQIEAxIDJg4PCgsKBAQFAgUSAycCEAoMCgUEBQIFBRIDJwIICgwKBQQFAgUBEgMnCQsKDAoFBAUC" + 
    "BQMSAycOD2IGcHJvdG8z");

  static final Descriptors.FileDescriptor descriptor = Descriptors.FileDescriptor.internalBuildGeneratedFileFrom("geometry3d.proto", "wpi.proto", descriptorData);

  static final Descriptors.Descriptor wpi_proto_ProtobufTranslation3d_descriptor = descriptor.internalContainedType(31, 65, "ProtobufTranslation3d", "wpi.proto.ProtobufTranslation3d");

  static final Descriptors.Descriptor wpi_proto_ProtobufQuaternion_descriptor = descriptor.internalContainedType(98, 76, "ProtobufQuaternion", "wpi.proto.ProtobufQuaternion");

  static final Descriptors.Descriptor wpi_proto_ProtobufRotation3d_descriptor = descriptor.internalContainedType(176, 65, "ProtobufRotation3d", "wpi.proto.ProtobufRotation3d");

  static final Descriptors.Descriptor wpi_proto_ProtobufPose3d_descriptor = descriptor.internalContainedType(244, 143, "ProtobufPose3d", "wpi.proto.ProtobufPose3d");

  static final Descriptors.Descriptor wpi_proto_ProtobufTransform3d_descriptor = descriptor.internalContainedType(390, 148, "ProtobufTransform3d", "wpi.proto.ProtobufTransform3d");

  static final Descriptors.Descriptor wpi_proto_ProtobufTwist3d_descriptor = descriptor.internalContainedType(540, 113, "ProtobufTwist3d", "wpi.proto.ProtobufTwist3d");

  /**
   * @return this proto file's descriptor.
   */
  public static Descriptors.FileDescriptor getDescriptor() {
    return descriptor;
  }

  /**
   * Protobuf type {@code ProtobufTranslation3d}
   */
  public static final class ProtobufTranslation3d extends ProtoMessage<ProtobufTranslation3d> implements Cloneable {
    private static final long serialVersionUID = 0L;

    /**
     * <code>optional double x = 1;</code>
     */
    private double x;

    /**
     * <code>optional double y = 2;</code>
     */
    private double y;

    /**
     * <code>optional double z = 3;</code>
     */
    private double z;

    private ProtobufTranslation3d() {
    }

    /**
     * @return a new empty instance of {@code ProtobufTranslation3d}
     */
    public static ProtobufTranslation3d newInstance() {
      return new ProtobufTranslation3d();
    }

    /**
     * <code>optional double x = 1;</code>
     * @return whether the x field is set
     */
    public boolean hasX() {
      return (bitField0_ & 0x00000001) != 0;
    }

    /**
     * <code>optional double x = 1;</code>
     * @return this
     */
    public ProtobufTranslation3d clearX() {
      bitField0_ &= ~0x00000001;
      x = 0D;
      return this;
    }

    /**
     * <code>optional double x = 1;</code>
     * @return the x
     */
    public double getX() {
      return x;
    }

    /**
     * <code>optional double x = 1;</code>
     * @param value the x to set
     * @return this
     */
    public ProtobufTranslation3d setX(final double value) {
      bitField0_ |= 0x00000001;
      x = value;
      return this;
    }

    /**
     * <code>optional double y = 2;</code>
     * @return whether the y field is set
     */
    public boolean hasY() {
      return (bitField0_ & 0x00000002) != 0;
    }

    /**
     * <code>optional double y = 2;</code>
     * @return this
     */
    public ProtobufTranslation3d clearY() {
      bitField0_ &= ~0x00000002;
      y = 0D;
      return this;
    }

    /**
     * <code>optional double y = 2;</code>
     * @return the y
     */
    public double getY() {
      return y;
    }

    /**
     * <code>optional double y = 2;</code>
     * @param value the y to set
     * @return this
     */
    public ProtobufTranslation3d setY(final double value) {
      bitField0_ |= 0x00000002;
      y = value;
      return this;
    }

    /**
     * <code>optional double z = 3;</code>
     * @return whether the z field is set
     */
    public boolean hasZ() {
      return (bitField0_ & 0x00000004) != 0;
    }

    /**
     * <code>optional double z = 3;</code>
     * @return this
     */
    public ProtobufTranslation3d clearZ() {
      bitField0_ &= ~0x00000004;
      z = 0D;
      return this;
    }

    /**
     * <code>optional double z = 3;</code>
     * @return the z
     */
    public double getZ() {
      return z;
    }

    /**
     * <code>optional double z = 3;</code>
     * @param value the z to set
     * @return this
     */
    public ProtobufTranslation3d setZ(final double value) {
      bitField0_ |= 0x00000004;
      z = value;
      return this;
    }

    @Override
    public ProtobufTranslation3d copyFrom(final ProtobufTranslation3d other) {
      cachedSize = other.cachedSize;
      if ((bitField0_ | other.bitField0_) != 0) {
        bitField0_ = other.bitField0_;
        x = other.x;
        y = other.y;
        z = other.z;
      }
      return this;
    }

    @Override
    public ProtobufTranslation3d mergeFrom(final ProtobufTranslation3d other) {
      if (other.isEmpty()) {
        return this;
      }
      cachedSize = -1;
      if (other.hasX()) {
        setX(other.x);
      }
      if (other.hasY()) {
        setY(other.y);
      }
      if (other.hasZ()) {
        setZ(other.z);
      }
      return this;
    }

    @Override
    public ProtobufTranslation3d clear() {
      if (isEmpty()) {
        return this;
      }
      cachedSize = -1;
      bitField0_ = 0;
      x = 0D;
      y = 0D;
      z = 0D;
      return this;
    }

    @Override
    public ProtobufTranslation3d clearQuick() {
      if (isEmpty()) {
        return this;
      }
      cachedSize = -1;
      bitField0_ = 0;
      return this;
    }

    @Override
    public boolean equals(Object o) {
      if (o == this) {
        return true;
      }
      if (!(o instanceof ProtobufTranslation3d)) {
        return false;
      }
      ProtobufTranslation3d other = (ProtobufTranslation3d) o;
      return bitField0_ == other.bitField0_
        && (!hasX() || ProtoUtil.isEqual(x, other.x))
        && (!hasY() || ProtoUtil.isEqual(y, other.y))
        && (!hasZ() || ProtoUtil.isEqual(z, other.z));
    }

    @Override
    public void writeTo(final ProtoSink output) throws IOException {
      if ((bitField0_ & 0x00000001) != 0) {
        output.writeRawByte((byte) 9);
        output.writeDoubleNoTag(x);
      }
      if ((bitField0_ & 0x00000002) != 0) {
        output.writeRawByte((byte) 17);
        output.writeDoubleNoTag(y);
      }
      if ((bitField0_ & 0x00000004) != 0) {
        output.writeRawByte((byte) 25);
        output.writeDoubleNoTag(z);
      }
    }

    @Override
    protected int computeSerializedSize() {
      int size = 0;
      if ((bitField0_ & 0x00000001) != 0) {
        size += 9;
      }
      if ((bitField0_ & 0x00000002) != 0) {
        size += 9;
      }
      if ((bitField0_ & 0x00000004) != 0) {
        size += 9;
      }
      return size;
    }

    @Override
    @SuppressWarnings("fallthrough")
    public ProtobufTranslation3d mergeFrom(final ProtoSource input) throws IOException {
      // Enabled Fall-Through Optimization (QuickBuffers)
      int tag = input.readTag();
      while (true) {
        switch (tag) {
          case 9: {
            // x
            x = input.readDouble();
            bitField0_ |= 0x00000001;
            tag = input.readTag();
            if (tag != 17) {
              break;
            }
          }
          case 17: {
            // y
            y = input.readDouble();
            bitField0_ |= 0x00000002;
            tag = input.readTag();
            if (tag != 25) {
              break;
            }
          }
          case 25: {
            // z
            z = input.readDouble();
            bitField0_ |= 0x00000004;
            tag = input.readTag();
            if (tag != 0) {
              break;
            }
          }
          case 0: {
            return this;
          }
          default: {
            if (!input.skipField(tag)) {
              return this;
            }
            tag = input.readTag();
            break;
          }
        }
      }
    }

    @Override
    public void writeTo(final JsonSink output) throws IOException {
      output.beginObject();
      if ((bitField0_ & 0x00000001) != 0) {
        output.writeDouble(FieldNames.x, x);
      }
      if ((bitField0_ & 0x00000002) != 0) {
        output.writeDouble(FieldNames.y, y);
      }
      if ((bitField0_ & 0x00000004) != 0) {
        output.writeDouble(FieldNames.z, z);
      }
      output.endObject();
    }

    @Override
    public ProtobufTranslation3d mergeFrom(final JsonSource input) throws IOException {
      if (!input.beginObject()) {
        return this;
      }
      while (!input.isAtEnd()) {
        switch (input.readFieldHash()) {
          case 120: {
            if (input.isAtField(FieldNames.x)) {
              if (!input.trySkipNullValue()) {
                x = input.readDouble();
                bitField0_ |= 0x00000001;
              }
            } else {
              input.skipUnknownField();
            }
            break;
          }
          case 121: {
            if (input.isAtField(FieldNames.y)) {
              if (!input.trySkipNullValue()) {
                y = input.readDouble();
                bitField0_ |= 0x00000002;
              }
            } else {
              input.skipUnknownField();
            }
            break;
          }
          case 122: {
            if (input.isAtField(FieldNames.z)) {
              if (!input.trySkipNullValue()) {
                z = input.readDouble();
                bitField0_ |= 0x00000004;
              }
            } else {
              input.skipUnknownField();
            }
            break;
          }
          default: {
            input.skipUnknownField();
            break;
          }
        }
      }
      input.endObject();
      return this;
    }

    @Override
    public ProtobufTranslation3d clone() {
      return new ProtobufTranslation3d().copyFrom(this);
    }

    @Override
    public boolean isEmpty() {
      return ((bitField0_) == 0);
    }

    public static ProtobufTranslation3d parseFrom(final byte[] data) throws
        InvalidProtocolBufferException {
      return ProtoMessage.mergeFrom(new ProtobufTranslation3d(), data).checkInitialized();
    }

    public static ProtobufTranslation3d parseFrom(final ProtoSource input) throws IOException {
      return ProtoMessage.mergeFrom(new ProtobufTranslation3d(), input).checkInitialized();
    }

    public static ProtobufTranslation3d parseFrom(final JsonSource input) throws IOException {
      return ProtoMessage.mergeFrom(new ProtobufTranslation3d(), input).checkInitialized();
    }

    /**
     * @return factory for creating ProtobufTranslation3d messages
     */
    public static MessageFactory<ProtobufTranslation3d> getFactory() {
      return ProtobufTranslation3dFactory.INSTANCE;
    }

    /**
     * @return this type's descriptor.
     */
    public static Descriptors.Descriptor getDescriptor() {
      return Geometry3D.wpi_proto_ProtobufTranslation3d_descriptor;
    }

    private enum ProtobufTranslation3dFactory implements MessageFactory<ProtobufTranslation3d> {
      INSTANCE;

      @Override
      public ProtobufTranslation3d create() {
        return ProtobufTranslation3d.newInstance();
      }
    }

    /**
     * Contains name constants used for serializing JSON
     */
    static class FieldNames {
      static final FieldName x = FieldName.forField("x");

      static final FieldName y = FieldName.forField("y");

      static final FieldName z = FieldName.forField("z");
    }
  }

  /**
   * Protobuf type {@code ProtobufQuaternion}
   */
  public static final class ProtobufQuaternion extends ProtoMessage<ProtobufQuaternion> implements Cloneable {
    private static final long serialVersionUID = 0L;

    /**
     * <code>optional double w = 1;</code>
     */
    private double w;

    /**
     * <code>optional double x = 2;</code>
     */
    private double x;

    /**
     * <code>optional double y = 3;</code>
     */
    private double y;

    /**
     * <code>optional double z = 4;</code>
     */
    private double z;

    private ProtobufQuaternion() {
    }

    /**
     * @return a new empty instance of {@code ProtobufQuaternion}
     */
    public static ProtobufQuaternion newInstance() {
      return new ProtobufQuaternion();
    }

    /**
     * <code>optional double w = 1;</code>
     * @return whether the w field is set
     */
    public boolean hasW() {
      return (bitField0_ & 0x00000001) != 0;
    }

    /**
     * <code>optional double w = 1;</code>
     * @return this
     */
    public ProtobufQuaternion clearW() {
      bitField0_ &= ~0x00000001;
      w = 0D;
      return this;
    }

    /**
     * <code>optional double w = 1;</code>
     * @return the w
     */
    public double getW() {
      return w;
    }

    /**
     * <code>optional double w = 1;</code>
     * @param value the w to set
     * @return this
     */
    public ProtobufQuaternion setW(final double value) {
      bitField0_ |= 0x00000001;
      w = value;
      return this;
    }

    /**
     * <code>optional double x = 2;</code>
     * @return whether the x field is set
     */
    public boolean hasX() {
      return (bitField0_ & 0x00000002) != 0;
    }

    /**
     * <code>optional double x = 2;</code>
     * @return this
     */
    public ProtobufQuaternion clearX() {
      bitField0_ &= ~0x00000002;
      x = 0D;
      return this;
    }

    /**
     * <code>optional double x = 2;</code>
     * @return the x
     */
    public double getX() {
      return x;
    }

    /**
     * <code>optional double x = 2;</code>
     * @param value the x to set
     * @return this
     */
    public ProtobufQuaternion setX(final double value) {
      bitField0_ |= 0x00000002;
      x = value;
      return this;
    }

    /**
     * <code>optional double y = 3;</code>
     * @return whether the y field is set
     */
    public boolean hasY() {
      return (bitField0_ & 0x00000004) != 0;
    }

    /**
     * <code>optional double y = 3;</code>
     * @return this
     */
    public ProtobufQuaternion clearY() {
      bitField0_ &= ~0x00000004;
      y = 0D;
      return this;
    }

    /**
     * <code>optional double y = 3;</code>
     * @return the y
     */
    public double getY() {
      return y;
    }

    /**
     * <code>optional double y = 3;</code>
     * @param value the y to set
     * @return this
     */
    public ProtobufQuaternion setY(final double value) {
      bitField0_ |= 0x00000004;
      y = value;
      return this;
    }

    /**
     * <code>optional double z = 4;</code>
     * @return whether the z field is set
     */
    public boolean hasZ() {
      return (bitField0_ & 0x00000008) != 0;
    }

    /**
     * <code>optional double z = 4;</code>
     * @return this
     */
    public ProtobufQuaternion clearZ() {
      bitField0_ &= ~0x00000008;
      z = 0D;
      return this;
    }

    /**
     * <code>optional double z = 4;</code>
     * @return the z
     */
    public double getZ() {
      return z;
    }

    /**
     * <code>optional double z = 4;</code>
     * @param value the z to set
     * @return this
     */
    public ProtobufQuaternion setZ(final double value) {
      bitField0_ |= 0x00000008;
      z = value;
      return this;
    }

    @Override
    public ProtobufQuaternion copyFrom(final ProtobufQuaternion other) {
      cachedSize = other.cachedSize;
      if ((bitField0_ | other.bitField0_) != 0) {
        bitField0_ = other.bitField0_;
        w = other.w;
        x = other.x;
        y = other.y;
        z = other.z;
      }
      return this;
    }

    @Override
    public ProtobufQuaternion mergeFrom(final ProtobufQuaternion other) {
      if (other.isEmpty()) {
        return this;
      }
      cachedSize = -1;
      if (other.hasW()) {
        setW(other.w);
      }
      if (other.hasX()) {
        setX(other.x);
      }
      if (other.hasY()) {
        setY(other.y);
      }
      if (other.hasZ()) {
        setZ(other.z);
      }
      return this;
    }

    @Override
    public ProtobufQuaternion clear() {
      if (isEmpty()) {
        return this;
      }
      cachedSize = -1;
      bitField0_ = 0;
      w = 0D;
      x = 0D;
      y = 0D;
      z = 0D;
      return this;
    }

    @Override
    public ProtobufQuaternion clearQuick() {
      if (isEmpty()) {
        return this;
      }
      cachedSize = -1;
      bitField0_ = 0;
      return this;
    }

    @Override
    public boolean equals(Object o) {
      if (o == this) {
        return true;
      }
      if (!(o instanceof ProtobufQuaternion)) {
        return false;
      }
      ProtobufQuaternion other = (ProtobufQuaternion) o;
      return bitField0_ == other.bitField0_
        && (!hasW() || ProtoUtil.isEqual(w, other.w))
        && (!hasX() || ProtoUtil.isEqual(x, other.x))
        && (!hasY() || ProtoUtil.isEqual(y, other.y))
        && (!hasZ() || ProtoUtil.isEqual(z, other.z));
    }

    @Override
    public void writeTo(final ProtoSink output) throws IOException {
      if ((bitField0_ & 0x00000001) != 0) {
        output.writeRawByte((byte) 9);
        output.writeDoubleNoTag(w);
      }
      if ((bitField0_ & 0x00000002) != 0) {
        output.writeRawByte((byte) 17);
        output.writeDoubleNoTag(x);
      }
      if ((bitField0_ & 0x00000004) != 0) {
        output.writeRawByte((byte) 25);
        output.writeDoubleNoTag(y);
      }
      if ((bitField0_ & 0x00000008) != 0) {
        output.writeRawByte((byte) 33);
        output.writeDoubleNoTag(z);
      }
    }

    @Override
    protected int computeSerializedSize() {
      int size = 0;
      if ((bitField0_ & 0x00000001) != 0) {
        size += 9;
      }
      if ((bitField0_ & 0x00000002) != 0) {
        size += 9;
      }
      if ((bitField0_ & 0x00000004) != 0) {
        size += 9;
      }
      if ((bitField0_ & 0x00000008) != 0) {
        size += 9;
      }
      return size;
    }

    @Override
    @SuppressWarnings("fallthrough")
    public ProtobufQuaternion mergeFrom(final ProtoSource input) throws IOException {
      // Enabled Fall-Through Optimization (QuickBuffers)
      int tag = input.readTag();
      while (true) {
        switch (tag) {
          case 9: {
            // w
            w = input.readDouble();
            bitField0_ |= 0x00000001;
            tag = input.readTag();
            if (tag != 17) {
              break;
            }
          }
          case 17: {
            // x
            x = input.readDouble();
            bitField0_ |= 0x00000002;
            tag = input.readTag();
            if (tag != 25) {
              break;
            }
          }
          case 25: {
            // y
            y = input.readDouble();
            bitField0_ |= 0x00000004;
            tag = input.readTag();
            if (tag != 33) {
              break;
            }
          }
          case 33: {
            // z
            z = input.readDouble();
            bitField0_ |= 0x00000008;
            tag = input.readTag();
            if (tag != 0) {
              break;
            }
          }
          case 0: {
            return this;
          }
          default: {
            if (!input.skipField(tag)) {
              return this;
            }
            tag = input.readTag();
            break;
          }
        }
      }
    }

    @Override
    public void writeTo(final JsonSink output) throws IOException {
      output.beginObject();
      if ((bitField0_ & 0x00000001) != 0) {
        output.writeDouble(FieldNames.w, w);
      }
      if ((bitField0_ & 0x00000002) != 0) {
        output.writeDouble(FieldNames.x, x);
      }
      if ((bitField0_ & 0x00000004) != 0) {
        output.writeDouble(FieldNames.y, y);
      }
      if ((bitField0_ & 0x00000008) != 0) {
        output.writeDouble(FieldNames.z, z);
      }
      output.endObject();
    }

    @Override
    public ProtobufQuaternion mergeFrom(final JsonSource input) throws IOException {
      if (!input.beginObject()) {
        return this;
      }
      while (!input.isAtEnd()) {
        switch (input.readFieldHash()) {
          case 119: {
            if (input.isAtField(FieldNames.w)) {
              if (!input.trySkipNullValue()) {
                w = input.readDouble();
                bitField0_ |= 0x00000001;
              }
            } else {
              input.skipUnknownField();
            }
            break;
          }
          case 120: {
            if (input.isAtField(FieldNames.x)) {
              if (!input.trySkipNullValue()) {
                x = input.readDouble();
                bitField0_ |= 0x00000002;
              }
            } else {
              input.skipUnknownField();
            }
            break;
          }
          case 121: {
            if (input.isAtField(FieldNames.y)) {
              if (!input.trySkipNullValue()) {
                y = input.readDouble();
                bitField0_ |= 0x00000004;
              }
            } else {
              input.skipUnknownField();
            }
            break;
          }
          case 122: {
            if (input.isAtField(FieldNames.z)) {
              if (!input.trySkipNullValue()) {
                z = input.readDouble();
                bitField0_ |= 0x00000008;
              }
            } else {
              input.skipUnknownField();
            }
            break;
          }
          default: {
            input.skipUnknownField();
            break;
          }
        }
      }
      input.endObject();
      return this;
    }

    @Override
    public ProtobufQuaternion clone() {
      return new ProtobufQuaternion().copyFrom(this);
    }

    @Override
    public boolean isEmpty() {
      return ((bitField0_) == 0);
    }

    public static ProtobufQuaternion parseFrom(final byte[] data) throws
        InvalidProtocolBufferException {
      return ProtoMessage.mergeFrom(new ProtobufQuaternion(), data).checkInitialized();
    }

    public static ProtobufQuaternion parseFrom(final ProtoSource input) throws IOException {
      return ProtoMessage.mergeFrom(new ProtobufQuaternion(), input).checkInitialized();
    }

    public static ProtobufQuaternion parseFrom(final JsonSource input) throws IOException {
      return ProtoMessage.mergeFrom(new ProtobufQuaternion(), input).checkInitialized();
    }

    /**
     * @return factory for creating ProtobufQuaternion messages
     */
    public static MessageFactory<ProtobufQuaternion> getFactory() {
      return ProtobufQuaternionFactory.INSTANCE;
    }

    /**
     * @return this type's descriptor.
     */
    public static Descriptors.Descriptor getDescriptor() {
      return Geometry3D.wpi_proto_ProtobufQuaternion_descriptor;
    }

    private enum ProtobufQuaternionFactory implements MessageFactory<ProtobufQuaternion> {
      INSTANCE;

      @Override
      public ProtobufQuaternion create() {
        return ProtobufQuaternion.newInstance();
      }
    }

    /**
     * Contains name constants used for serializing JSON
     */
    static class FieldNames {
      static final FieldName w = FieldName.forField("w");

      static final FieldName x = FieldName.forField("x");

      static final FieldName y = FieldName.forField("y");

      static final FieldName z = FieldName.forField("z");
    }
  }

  /**
   * Protobuf type {@code ProtobufRotation3d}
   */
  public static final class ProtobufRotation3d extends ProtoMessage<ProtobufRotation3d> implements Cloneable {
    private static final long serialVersionUID = 0L;

    /**
     * <code>optional .wpi.proto.ProtobufQuaternion q = 1;</code>
     */
    private final ProtobufQuaternion q = ProtobufQuaternion.newInstance();

    private ProtobufRotation3d() {
    }

    /**
     * @return a new empty instance of {@code ProtobufRotation3d}
     */
    public static ProtobufRotation3d newInstance() {
      return new ProtobufRotation3d();
    }

    /**
     * <code>optional .wpi.proto.ProtobufQuaternion q = 1;</code>
     * @return whether the q field is set
     */
    public boolean hasQ() {
      return (bitField0_ & 0x00000001) != 0;
    }

    /**
     * <code>optional .wpi.proto.ProtobufQuaternion q = 1;</code>
     * @return this
     */
    public ProtobufRotation3d clearQ() {
      bitField0_ &= ~0x00000001;
      q.clear();
      return this;
    }

    /**
     * <code>optional .wpi.proto.ProtobufQuaternion q = 1;</code>
     *
     * This method returns the internal storage object without modifying any has state.
     * The returned object should not be modified and be treated as read-only.
     *
     * Use {@link #getMutableQ()} if you want to modify it.
     *
     * @return internal storage object for reading
     */
    public ProtobufQuaternion getQ() {
      return q;
    }

    /**
     * <code>optional .wpi.proto.ProtobufQuaternion q = 1;</code>
     *
     * This method returns the internal storage object and sets the corresponding
     * has state. The returned object will become part of this message and its
     * contents may be modified as long as the has state is not cleared.
     *
     * @return internal storage object for modifications
     */
    public ProtobufQuaternion getMutableQ() {
      bitField0_ |= 0x00000001;
      return q;
    }

    /**
     * <code>optional .wpi.proto.ProtobufQuaternion q = 1;</code>
     * @param value the q to set
     * @return this
     */
    public ProtobufRotation3d setQ(final ProtobufQuaternion value) {
      bitField0_ |= 0x00000001;
      q.copyFrom(value);
      return this;
    }

    @Override
    public ProtobufRotation3d copyFrom(final ProtobufRotation3d other) {
      cachedSize = other.cachedSize;
      if ((bitField0_ | other.bitField0_) != 0) {
        bitField0_ = other.bitField0_;
        q.copyFrom(other.q);
      }
      return this;
    }

    @Override
    public ProtobufRotation3d mergeFrom(final ProtobufRotation3d other) {
      if (other.isEmpty()) {
        return this;
      }
      cachedSize = -1;
      if (other.hasQ()) {
        getMutableQ().mergeFrom(other.q);
      }
      return this;
    }

    @Override
    public ProtobufRotation3d clear() {
      if (isEmpty()) {
        return this;
      }
      cachedSize = -1;
      bitField0_ = 0;
      q.clear();
      return this;
    }

    @Override
    public ProtobufRotation3d clearQuick() {
      if (isEmpty()) {
        return this;
      }
      cachedSize = -1;
      bitField0_ = 0;
      q.clearQuick();
      return this;
    }

    @Override
    public boolean equals(Object o) {
      if (o == this) {
        return true;
      }
      if (!(o instanceof ProtobufRotation3d)) {
        return false;
      }
      ProtobufRotation3d other = (ProtobufRotation3d) o;
      return bitField0_ == other.bitField0_
        && (!hasQ() || q.equals(other.q));
    }

    @Override
    public void writeTo(final ProtoSink output) throws IOException {
      if ((bitField0_ & 0x00000001) != 0) {
        output.writeRawByte((byte) 10);
        output.writeMessageNoTag(q);
      }
    }

    @Override
    protected int computeSerializedSize() {
      int size = 0;
      if ((bitField0_ & 0x00000001) != 0) {
        size += 1 + ProtoSink.computeMessageSizeNoTag(q);
      }
      return size;
    }

    @Override
    @SuppressWarnings("fallthrough")
    public ProtobufRotation3d mergeFrom(final ProtoSource input) throws IOException {
      // Enabled Fall-Through Optimization (QuickBuffers)
      int tag = input.readTag();
      while (true) {
        switch (tag) {
          case 10: {
            // q
            input.readMessage(q);
            bitField0_ |= 0x00000001;
            tag = input.readTag();
            if (tag != 0) {
              break;
            }
          }
          case 0: {
            return this;
          }
          default: {
            if (!input.skipField(tag)) {
              return this;
            }
            tag = input.readTag();
            break;
          }
        }
      }
    }

    @Override
    public void writeTo(final JsonSink output) throws IOException {
      output.beginObject();
      if ((bitField0_ & 0x00000001) != 0) {
        output.writeMessage(FieldNames.q, q);
      }
      output.endObject();
    }

    @Override
    public ProtobufRotation3d mergeFrom(final JsonSource input) throws IOException {
      if (!input.beginObject()) {
        return this;
      }
      while (!input.isAtEnd()) {
        switch (input.readFieldHash()) {
          case 113: {
            if (input.isAtField(FieldNames.q)) {
              if (!input.trySkipNullValue()) {
                input.readMessage(q);
                bitField0_ |= 0x00000001;
              }
            } else {
              input.skipUnknownField();
            }
            break;
          }
          default: {
            input.skipUnknownField();
            break;
          }
        }
      }
      input.endObject();
      return this;
    }

    @Override
    public ProtobufRotation3d clone() {
      return new ProtobufRotation3d().copyFrom(this);
    }

    @Override
    public boolean isEmpty() {
      return ((bitField0_) == 0);
    }

    public static ProtobufRotation3d parseFrom(final byte[] data) throws
        InvalidProtocolBufferException {
      return ProtoMessage.mergeFrom(new ProtobufRotation3d(), data).checkInitialized();
    }

    public static ProtobufRotation3d parseFrom(final ProtoSource input) throws IOException {
      return ProtoMessage.mergeFrom(new ProtobufRotation3d(), input).checkInitialized();
    }

    public static ProtobufRotation3d parseFrom(final JsonSource input) throws IOException {
      return ProtoMessage.mergeFrom(new ProtobufRotation3d(), input).checkInitialized();
    }

    /**
     * @return factory for creating ProtobufRotation3d messages
     */
    public static MessageFactory<ProtobufRotation3d> getFactory() {
      return ProtobufRotation3dFactory.INSTANCE;
    }

    /**
     * @return this type's descriptor.
     */
    public static Descriptors.Descriptor getDescriptor() {
      return Geometry3D.wpi_proto_ProtobufRotation3d_descriptor;
    }

    private enum ProtobufRotation3dFactory implements MessageFactory<ProtobufRotation3d> {
      INSTANCE;

      @Override
      public ProtobufRotation3d create() {
        return ProtobufRotation3d.newInstance();
      }
    }

    /**
     * Contains name constants used for serializing JSON
     */
    static class FieldNames {
      static final FieldName q = FieldName.forField("q");
    }
  }

  /**
   * Protobuf type {@code ProtobufPose3d}
   */
  public static final class ProtobufPose3d extends ProtoMessage<ProtobufPose3d> implements Cloneable {
    private static final long serialVersionUID = 0L;

    /**
     * <code>optional .wpi.proto.ProtobufTranslation3d translation = 1;</code>
     */
    private final ProtobufTranslation3d translation = ProtobufTranslation3d.newInstance();

    /**
     * <code>optional .wpi.proto.ProtobufRotation3d rotation = 2;</code>
     */
    private final ProtobufRotation3d rotation = ProtobufRotation3d.newInstance();

    private ProtobufPose3d() {
    }

    /**
     * @return a new empty instance of {@code ProtobufPose3d}
     */
    public static ProtobufPose3d newInstance() {
      return new ProtobufPose3d();
    }

    /**
     * <code>optional .wpi.proto.ProtobufTranslation3d translation = 1;</code>
     * @return whether the translation field is set
     */
    public boolean hasTranslation() {
      return (bitField0_ & 0x00000001) != 0;
    }

    /**
     * <code>optional .wpi.proto.ProtobufTranslation3d translation = 1;</code>
     * @return this
     */
    public ProtobufPose3d clearTranslation() {
      bitField0_ &= ~0x00000001;
      translation.clear();
      return this;
    }

    /**
     * <code>optional .wpi.proto.ProtobufTranslation3d translation = 1;</code>
     *
     * This method returns the internal storage object without modifying any has state.
     * The returned object should not be modified and be treated as read-only.
     *
     * Use {@link #getMutableTranslation()} if you want to modify it.
     *
     * @return internal storage object for reading
     */
    public ProtobufTranslation3d getTranslation() {
      return translation;
    }

    /**
     * <code>optional .wpi.proto.ProtobufTranslation3d translation = 1;</code>
     *
     * This method returns the internal storage object and sets the corresponding
     * has state. The returned object will become part of this message and its
     * contents may be modified as long as the has state is not cleared.
     *
     * @return internal storage object for modifications
     */
    public ProtobufTranslation3d getMutableTranslation() {
      bitField0_ |= 0x00000001;
      return translation;
    }

    /**
     * <code>optional .wpi.proto.ProtobufTranslation3d translation = 1;</code>
     * @param value the translation to set
     * @return this
     */
    public ProtobufPose3d setTranslation(final ProtobufTranslation3d value) {
      bitField0_ |= 0x00000001;
      translation.copyFrom(value);
      return this;
    }

    /**
     * <code>optional .wpi.proto.ProtobufRotation3d rotation = 2;</code>
     * @return whether the rotation field is set
     */
    public boolean hasRotation() {
      return (bitField0_ & 0x00000002) != 0;
    }

    /**
     * <code>optional .wpi.proto.ProtobufRotation3d rotation = 2;</code>
     * @return this
     */
    public ProtobufPose3d clearRotation() {
      bitField0_ &= ~0x00000002;
      rotation.clear();
      return this;
    }

    /**
     * <code>optional .wpi.proto.ProtobufRotation3d rotation = 2;</code>
     *
     * This method returns the internal storage object without modifying any has state.
     * The returned object should not be modified and be treated as read-only.
     *
     * Use {@link #getMutableRotation()} if you want to modify it.
     *
     * @return internal storage object for reading
     */
    public ProtobufRotation3d getRotation() {
      return rotation;
    }

    /**
     * <code>optional .wpi.proto.ProtobufRotation3d rotation = 2;</code>
     *
     * This method returns the internal storage object and sets the corresponding
     * has state. The returned object will become part of this message and its
     * contents may be modified as long as the has state is not cleared.
     *
     * @return internal storage object for modifications
     */
    public ProtobufRotation3d getMutableRotation() {
      bitField0_ |= 0x00000002;
      return rotation;
    }

    /**
     * <code>optional .wpi.proto.ProtobufRotation3d rotation = 2;</code>
     * @param value the rotation to set
     * @return this
     */
    public ProtobufPose3d setRotation(final ProtobufRotation3d value) {
      bitField0_ |= 0x00000002;
      rotation.copyFrom(value);
      return this;
    }

    @Override
    public ProtobufPose3d copyFrom(final ProtobufPose3d other) {
      cachedSize = other.cachedSize;
      if ((bitField0_ | other.bitField0_) != 0) {
        bitField0_ = other.bitField0_;
        translation.copyFrom(other.translation);
        rotation.copyFrom(other.rotation);
      }
      return this;
    }

    @Override
    public ProtobufPose3d mergeFrom(final ProtobufPose3d other) {
      if (other.isEmpty()) {
        return this;
      }
      cachedSize = -1;
      if (other.hasTranslation()) {
        getMutableTranslation().mergeFrom(other.translation);
      }
      if (other.hasRotation()) {
        getMutableRotation().mergeFrom(other.rotation);
      }
      return this;
    }

    @Override
    public ProtobufPose3d clear() {
      if (isEmpty()) {
        return this;
      }
      cachedSize = -1;
      bitField0_ = 0;
      translation.clear();
      rotation.clear();
      return this;
    }

    @Override
    public ProtobufPose3d clearQuick() {
      if (isEmpty()) {
        return this;
      }
      cachedSize = -1;
      bitField0_ = 0;
      translation.clearQuick();
      rotation.clearQuick();
      return this;
    }

    @Override
    public boolean equals(Object o) {
      if (o == this) {
        return true;
      }
      if (!(o instanceof ProtobufPose3d)) {
        return false;
      }
      ProtobufPose3d other = (ProtobufPose3d) o;
      return bitField0_ == other.bitField0_
        && (!hasTranslation() || translation.equals(other.translation))
        && (!hasRotation() || rotation.equals(other.rotation));
    }

    @Override
    public void writeTo(final ProtoSink output) throws IOException {
      if ((bitField0_ & 0x00000001) != 0) {
        output.writeRawByte((byte) 10);
        output.writeMessageNoTag(translation);
      }
      if ((bitField0_ & 0x00000002) != 0) {
        output.writeRawByte((byte) 18);
        output.writeMessageNoTag(rotation);
      }
    }

    @Override
    protected int computeSerializedSize() {
      int size = 0;
      if ((bitField0_ & 0x00000001) != 0) {
        size += 1 + ProtoSink.computeMessageSizeNoTag(translation);
      }
      if ((bitField0_ & 0x00000002) != 0) {
        size += 1 + ProtoSink.computeMessageSizeNoTag(rotation);
      }
      return size;
    }

    @Override
    @SuppressWarnings("fallthrough")
    public ProtobufPose3d mergeFrom(final ProtoSource input) throws IOException {
      // Enabled Fall-Through Optimization (QuickBuffers)
      int tag = input.readTag();
      while (true) {
        switch (tag) {
          case 10: {
            // translation
            input.readMessage(translation);
            bitField0_ |= 0x00000001;
            tag = input.readTag();
            if (tag != 18) {
              break;
            }
          }
          case 18: {
            // rotation
            input.readMessage(rotation);
            bitField0_ |= 0x00000002;
            tag = input.readTag();
            if (tag != 0) {
              break;
            }
          }
          case 0: {
            return this;
          }
          default: {
            if (!input.skipField(tag)) {
              return this;
            }
            tag = input.readTag();
            break;
          }
        }
      }
    }

    @Override
    public void writeTo(final JsonSink output) throws IOException {
      output.beginObject();
      if ((bitField0_ & 0x00000001) != 0) {
        output.writeMessage(FieldNames.translation, translation);
      }
      if ((bitField0_ & 0x00000002) != 0) {
        output.writeMessage(FieldNames.rotation, rotation);
      }
      output.endObject();
    }

    @Override
    public ProtobufPose3d mergeFrom(final JsonSource input) throws IOException {
      if (!input.beginObject()) {
        return this;
      }
      while (!input.isAtEnd()) {
        switch (input.readFieldHash()) {
          case -1840647503: {
            if (input.isAtField(FieldNames.translation)) {
              if (!input.trySkipNullValue()) {
                input.readMessage(translation);
                bitField0_ |= 0x00000001;
              }
            } else {
              input.skipUnknownField();
            }
            break;
          }
          case -40300674: {
            if (input.isAtField(FieldNames.rotation)) {
              if (!input.trySkipNullValue()) {
                input.readMessage(rotation);
                bitField0_ |= 0x00000002;
              }
            } else {
              input.skipUnknownField();
            }
            break;
          }
          default: {
            input.skipUnknownField();
            break;
          }
        }
      }
      input.endObject();
      return this;
    }

    @Override
    public ProtobufPose3d clone() {
      return new ProtobufPose3d().copyFrom(this);
    }

    @Override
    public boolean isEmpty() {
      return ((bitField0_) == 0);
    }

    public static ProtobufPose3d parseFrom(final byte[] data) throws
        InvalidProtocolBufferException {
      return ProtoMessage.mergeFrom(new ProtobufPose3d(), data).checkInitialized();
    }

    public static ProtobufPose3d parseFrom(final ProtoSource input) throws IOException {
      return ProtoMessage.mergeFrom(new ProtobufPose3d(), input).checkInitialized();
    }

    public static ProtobufPose3d parseFrom(final JsonSource input) throws IOException {
      return ProtoMessage.mergeFrom(new ProtobufPose3d(), input).checkInitialized();
    }

    /**
     * @return factory for creating ProtobufPose3d messages
     */
    public static MessageFactory<ProtobufPose3d> getFactory() {
      return ProtobufPose3dFactory.INSTANCE;
    }

    /**
     * @return this type's descriptor.
     */
    public static Descriptors.Descriptor getDescriptor() {
      return Geometry3D.wpi_proto_ProtobufPose3d_descriptor;
    }

    private enum ProtobufPose3dFactory implements MessageFactory<ProtobufPose3d> {
      INSTANCE;

      @Override
      public ProtobufPose3d create() {
        return ProtobufPose3d.newInstance();
      }
    }

    /**
     * Contains name constants used for serializing JSON
     */
    static class FieldNames {
      static final FieldName translation = FieldName.forField("translation");

      static final FieldName rotation = FieldName.forField("rotation");
    }
  }

  /**
   * Protobuf type {@code ProtobufTransform3d}
   */
  public static final class ProtobufTransform3d extends ProtoMessage<ProtobufTransform3d> implements Cloneable {
    private static final long serialVersionUID = 0L;

    /**
     * <code>optional .wpi.proto.ProtobufTranslation3d translation = 1;</code>
     */
    private final ProtobufTranslation3d translation = ProtobufTranslation3d.newInstance();

    /**
     * <code>optional .wpi.proto.ProtobufRotation3d rotation = 2;</code>
     */
    private final ProtobufRotation3d rotation = ProtobufRotation3d.newInstance();

    private ProtobufTransform3d() {
    }

    /**
     * @return a new empty instance of {@code ProtobufTransform3d}
     */
    public static ProtobufTransform3d newInstance() {
      return new ProtobufTransform3d();
    }

    /**
     * <code>optional .wpi.proto.ProtobufTranslation3d translation = 1;</code>
     * @return whether the translation field is set
     */
    public boolean hasTranslation() {
      return (bitField0_ & 0x00000001) != 0;
    }

    /**
     * <code>optional .wpi.proto.ProtobufTranslation3d translation = 1;</code>
     * @return this
     */
    public ProtobufTransform3d clearTranslation() {
      bitField0_ &= ~0x00000001;
      translation.clear();
      return this;
    }

    /**
     * <code>optional .wpi.proto.ProtobufTranslation3d translation = 1;</code>
     *
     * This method returns the internal storage object without modifying any has state.
     * The returned object should not be modified and be treated as read-only.
     *
     * Use {@link #getMutableTranslation()} if you want to modify it.
     *
     * @return internal storage object for reading
     */
    public ProtobufTranslation3d getTranslation() {
      return translation;
    }

    /**
     * <code>optional .wpi.proto.ProtobufTranslation3d translation = 1;</code>
     *
     * This method returns the internal storage object and sets the corresponding
     * has state. The returned object will become part of this message and its
     * contents may be modified as long as the has state is not cleared.
     *
     * @return internal storage object for modifications
     */
    public ProtobufTranslation3d getMutableTranslation() {
      bitField0_ |= 0x00000001;
      return translation;
    }

    /**
     * <code>optional .wpi.proto.ProtobufTranslation3d translation = 1;</code>
     * @param value the translation to set
     * @return this
     */
    public ProtobufTransform3d setTranslation(final ProtobufTranslation3d value) {
      bitField0_ |= 0x00000001;
      translation.copyFrom(value);
      return this;
    }

    /**
     * <code>optional .wpi.proto.ProtobufRotation3d rotation = 2;</code>
     * @return whether the rotation field is set
     */
    public boolean hasRotation() {
      return (bitField0_ & 0x00000002) != 0;
    }

    /**
     * <code>optional .wpi.proto.ProtobufRotation3d rotation = 2;</code>
     * @return this
     */
    public ProtobufTransform3d clearRotation() {
      bitField0_ &= ~0x00000002;
      rotation.clear();
      return this;
    }

    /**
     * <code>optional .wpi.proto.ProtobufRotation3d rotation = 2;</code>
     *
     * This method returns the internal storage object without modifying any has state.
     * The returned object should not be modified and be treated as read-only.
     *
     * Use {@link #getMutableRotation()} if you want to modify it.
     *
     * @return internal storage object for reading
     */
    public ProtobufRotation3d getRotation() {
      return rotation;
    }

    /**
     * <code>optional .wpi.proto.ProtobufRotation3d rotation = 2;</code>
     *
     * This method returns the internal storage object and sets the corresponding
     * has state. The returned object will become part of this message and its
     * contents may be modified as long as the has state is not cleared.
     *
     * @return internal storage object for modifications
     */
    public ProtobufRotation3d getMutableRotation() {
      bitField0_ |= 0x00000002;
      return rotation;
    }

    /**
     * <code>optional .wpi.proto.ProtobufRotation3d rotation = 2;</code>
     * @param value the rotation to set
     * @return this
     */
    public ProtobufTransform3d setRotation(final ProtobufRotation3d value) {
      bitField0_ |= 0x00000002;
      rotation.copyFrom(value);
      return this;
    }

    @Override
    public ProtobufTransform3d copyFrom(final ProtobufTransform3d other) {
      cachedSize = other.cachedSize;
      if ((bitField0_ | other.bitField0_) != 0) {
        bitField0_ = other.bitField0_;
        translation.copyFrom(other.translation);
        rotation.copyFrom(other.rotation);
      }
      return this;
    }

    @Override
    public ProtobufTransform3d mergeFrom(final ProtobufTransform3d other) {
      if (other.isEmpty()) {
        return this;
      }
      cachedSize = -1;
      if (other.hasTranslation()) {
        getMutableTranslation().mergeFrom(other.translation);
      }
      if (other.hasRotation()) {
        getMutableRotation().mergeFrom(other.rotation);
      }
      return this;
    }

    @Override
    public ProtobufTransform3d clear() {
      if (isEmpty()) {
        return this;
      }
      cachedSize = -1;
      bitField0_ = 0;
      translation.clear();
      rotation.clear();
      return this;
    }

    @Override
    public ProtobufTransform3d clearQuick() {
      if (isEmpty()) {
        return this;
      }
      cachedSize = -1;
      bitField0_ = 0;
      translation.clearQuick();
      rotation.clearQuick();
      return this;
    }

    @Override
    public boolean equals(Object o) {
      if (o == this) {
        return true;
      }
      if (!(o instanceof ProtobufTransform3d)) {
        return false;
      }
      ProtobufTransform3d other = (ProtobufTransform3d) o;
      return bitField0_ == other.bitField0_
        && (!hasTranslation() || translation.equals(other.translation))
        && (!hasRotation() || rotation.equals(other.rotation));
    }

    @Override
    public void writeTo(final ProtoSink output) throws IOException {
      if ((bitField0_ & 0x00000001) != 0) {
        output.writeRawByte((byte) 10);
        output.writeMessageNoTag(translation);
      }
      if ((bitField0_ & 0x00000002) != 0) {
        output.writeRawByte((byte) 18);
        output.writeMessageNoTag(rotation);
      }
    }

    @Override
    protected int computeSerializedSize() {
      int size = 0;
      if ((bitField0_ & 0x00000001) != 0) {
        size += 1 + ProtoSink.computeMessageSizeNoTag(translation);
      }
      if ((bitField0_ & 0x00000002) != 0) {
        size += 1 + ProtoSink.computeMessageSizeNoTag(rotation);
      }
      return size;
    }

    @Override
    @SuppressWarnings("fallthrough")
    public ProtobufTransform3d mergeFrom(final ProtoSource input) throws IOException {
      // Enabled Fall-Through Optimization (QuickBuffers)
      int tag = input.readTag();
      while (true) {
        switch (tag) {
          case 10: {
            // translation
            input.readMessage(translation);
            bitField0_ |= 0x00000001;
            tag = input.readTag();
            if (tag != 18) {
              break;
            }
          }
          case 18: {
            // rotation
            input.readMessage(rotation);
            bitField0_ |= 0x00000002;
            tag = input.readTag();
            if (tag != 0) {
              break;
            }
          }
          case 0: {
            return this;
          }
          default: {
            if (!input.skipField(tag)) {
              return this;
            }
            tag = input.readTag();
            break;
          }
        }
      }
    }

    @Override
    public void writeTo(final JsonSink output) throws IOException {
      output.beginObject();
      if ((bitField0_ & 0x00000001) != 0) {
        output.writeMessage(FieldNames.translation, translation);
      }
      if ((bitField0_ & 0x00000002) != 0) {
        output.writeMessage(FieldNames.rotation, rotation);
      }
      output.endObject();
    }

    @Override
    public ProtobufTransform3d mergeFrom(final JsonSource input) throws IOException {
      if (!input.beginObject()) {
        return this;
      }
      while (!input.isAtEnd()) {
        switch (input.readFieldHash()) {
          case -1840647503: {
            if (input.isAtField(FieldNames.translation)) {
              if (!input.trySkipNullValue()) {
                input.readMessage(translation);
                bitField0_ |= 0x00000001;
              }
            } else {
              input.skipUnknownField();
            }
            break;
          }
          case -40300674: {
            if (input.isAtField(FieldNames.rotation)) {
              if (!input.trySkipNullValue()) {
                input.readMessage(rotation);
                bitField0_ |= 0x00000002;
              }
            } else {
              input.skipUnknownField();
            }
            break;
          }
          default: {
            input.skipUnknownField();
            break;
          }
        }
      }
      input.endObject();
      return this;
    }

    @Override
    public ProtobufTransform3d clone() {
      return new ProtobufTransform3d().copyFrom(this);
    }

    @Override
    public boolean isEmpty() {
      return ((bitField0_) == 0);
    }

    public static ProtobufTransform3d parseFrom(final byte[] data) throws
        InvalidProtocolBufferException {
      return ProtoMessage.mergeFrom(new ProtobufTransform3d(), data).checkInitialized();
    }

    public static ProtobufTransform3d parseFrom(final ProtoSource input) throws IOException {
      return ProtoMessage.mergeFrom(new ProtobufTransform3d(), input).checkInitialized();
    }

    public static ProtobufTransform3d parseFrom(final JsonSource input) throws IOException {
      return ProtoMessage.mergeFrom(new ProtobufTransform3d(), input).checkInitialized();
    }

    /**
     * @return factory for creating ProtobufTransform3d messages
     */
    public static MessageFactory<ProtobufTransform3d> getFactory() {
      return ProtobufTransform3dFactory.INSTANCE;
    }

    /**
     * @return this type's descriptor.
     */
    public static Descriptors.Descriptor getDescriptor() {
      return Geometry3D.wpi_proto_ProtobufTransform3d_descriptor;
    }

    private enum ProtobufTransform3dFactory implements MessageFactory<ProtobufTransform3d> {
      INSTANCE;

      @Override
      public ProtobufTransform3d create() {
        return ProtobufTransform3d.newInstance();
      }
    }

    /**
     * Contains name constants used for serializing JSON
     */
    static class FieldNames {
      static final FieldName translation = FieldName.forField("translation");

      static final FieldName rotation = FieldName.forField("rotation");
    }
  }

  /**
   * Protobuf type {@code ProtobufTwist3d}
   */
  public static final class ProtobufTwist3d extends ProtoMessage<ProtobufTwist3d> implements Cloneable {
    private static final long serialVersionUID = 0L;

    /**
     * <code>optional double dx = 1;</code>
     */
    private double dx;

    /**
     * <code>optional double dy = 2;</code>
     */
    private double dy;

    /**
     * <code>optional double dz = 3;</code>
     */
    private double dz;

    /**
     * <code>optional double rx = 4;</code>
     */
    private double rx;

    /**
     * <code>optional double ry = 5;</code>
     */
    private double ry;

    /**
     * <code>optional double rz = 6;</code>
     */
    private double rz;

    private ProtobufTwist3d() {
    }

    /**
     * @return a new empty instance of {@code ProtobufTwist3d}
     */
    public static ProtobufTwist3d newInstance() {
      return new ProtobufTwist3d();
    }

    /**
     * <code>optional double dx = 1;</code>
     * @return whether the dx field is set
     */
    public boolean hasDx() {
      return (bitField0_ & 0x00000001) != 0;
    }

    /**
     * <code>optional double dx = 1;</code>
     * @return this
     */
    public ProtobufTwist3d clearDx() {
      bitField0_ &= ~0x00000001;
      dx = 0D;
      return this;
    }

    /**
     * <code>optional double dx = 1;</code>
     * @return the dx
     */
    public double getDx() {
      return dx;
    }

    /**
     * <code>optional double dx = 1;</code>
     * @param value the dx to set
     * @return this
     */
    public ProtobufTwist3d setDx(final double value) {
      bitField0_ |= 0x00000001;
      dx = value;
      return this;
    }

    /**
     * <code>optional double dy = 2;</code>
     * @return whether the dy field is set
     */
    public boolean hasDy() {
      return (bitField0_ & 0x00000002) != 0;
    }

    /**
     * <code>optional double dy = 2;</code>
     * @return this
     */
    public ProtobufTwist3d clearDy() {
      bitField0_ &= ~0x00000002;
      dy = 0D;
      return this;
    }

    /**
     * <code>optional double dy = 2;</code>
     * @return the dy
     */
    public double getDy() {
      return dy;
    }

    /**
     * <code>optional double dy = 2;</code>
     * @param value the dy to set
     * @return this
     */
    public ProtobufTwist3d setDy(final double value) {
      bitField0_ |= 0x00000002;
      dy = value;
      return this;
    }

    /**
     * <code>optional double dz = 3;</code>
     * @return whether the dz field is set
     */
    public boolean hasDz() {
      return (bitField0_ & 0x00000004) != 0;
    }

    /**
     * <code>optional double dz = 3;</code>
     * @return this
     */
    public ProtobufTwist3d clearDz() {
      bitField0_ &= ~0x00000004;
      dz = 0D;
      return this;
    }

    /**
     * <code>optional double dz = 3;</code>
     * @return the dz
     */
    public double getDz() {
      return dz;
    }

    /**
     * <code>optional double dz = 3;</code>
     * @param value the dz to set
     * @return this
     */
    public ProtobufTwist3d setDz(final double value) {
      bitField0_ |= 0x00000004;
      dz = value;
      return this;
    }

    /**
     * <code>optional double rx = 4;</code>
     * @return whether the rx field is set
     */
    public boolean hasRx() {
      return (bitField0_ & 0x00000008) != 0;
    }

    /**
     * <code>optional double rx = 4;</code>
     * @return this
     */
    public ProtobufTwist3d clearRx() {
      bitField0_ &= ~0x00000008;
      rx = 0D;
      return this;
    }

    /**
     * <code>optional double rx = 4;</code>
     * @return the rx
     */
    public double getRx() {
      return rx;
    }

    /**
     * <code>optional double rx = 4;</code>
     * @param value the rx to set
     * @return this
     */
    public ProtobufTwist3d setRx(final double value) {
      bitField0_ |= 0x00000008;
      rx = value;
      return this;
    }

    /**
     * <code>optional double ry = 5;</code>
     * @return whether the ry field is set
     */
    public boolean hasRy() {
      return (bitField0_ & 0x00000010) != 0;
    }

    /**
     * <code>optional double ry = 5;</code>
     * @return this
     */
    public ProtobufTwist3d clearRy() {
      bitField0_ &= ~0x00000010;
      ry = 0D;
      return this;
    }

    /**
     * <code>optional double ry = 5;</code>
     * @return the ry
     */
    public double getRy() {
      return ry;
    }

    /**
     * <code>optional double ry = 5;</code>
     * @param value the ry to set
     * @return this
     */
    public ProtobufTwist3d setRy(final double value) {
      bitField0_ |= 0x00000010;
      ry = value;
      return this;
    }

    /**
     * <code>optional double rz = 6;</code>
     * @return whether the rz field is set
     */
    public boolean hasRz() {
      return (bitField0_ & 0x00000020) != 0;
    }

    /**
     * <code>optional double rz = 6;</code>
     * @return this
     */
    public ProtobufTwist3d clearRz() {
      bitField0_ &= ~0x00000020;
      rz = 0D;
      return this;
    }

    /**
     * <code>optional double rz = 6;</code>
     * @return the rz
     */
    public double getRz() {
      return rz;
    }

    /**
     * <code>optional double rz = 6;</code>
     * @param value the rz to set
     * @return this
     */
    public ProtobufTwist3d setRz(final double value) {
      bitField0_ |= 0x00000020;
      rz = value;
      return this;
    }

    @Override
    public ProtobufTwist3d copyFrom(final ProtobufTwist3d other) {
      cachedSize = other.cachedSize;
      if ((bitField0_ | other.bitField0_) != 0) {
        bitField0_ = other.bitField0_;
        dx = other.dx;
        dy = other.dy;
        dz = other.dz;
        rx = other.rx;
        ry = other.ry;
        rz = other.rz;
      }
      return this;
    }

    @Override
    public ProtobufTwist3d mergeFrom(final ProtobufTwist3d other) {
      if (other.isEmpty()) {
        return this;
      }
      cachedSize = -1;
      if (other.hasDx()) {
        setDx(other.dx);
      }
      if (other.hasDy()) {
        setDy(other.dy);
      }
      if (other.hasDz()) {
        setDz(other.dz);
      }
      if (other.hasRx()) {
        setRx(other.rx);
      }
      if (other.hasRy()) {
        setRy(other.ry);
      }
      if (other.hasRz()) {
        setRz(other.rz);
      }
      return this;
    }

    @Override
    public ProtobufTwist3d clear() {
      if (isEmpty()) {
        return this;
      }
      cachedSize = -1;
      bitField0_ = 0;
      dx = 0D;
      dy = 0D;
      dz = 0D;
      rx = 0D;
      ry = 0D;
      rz = 0D;
      return this;
    }

    @Override
    public ProtobufTwist3d clearQuick() {
      if (isEmpty()) {
        return this;
      }
      cachedSize = -1;
      bitField0_ = 0;
      return this;
    }

    @Override
    public boolean equals(Object o) {
      if (o == this) {
        return true;
      }
      if (!(o instanceof ProtobufTwist3d)) {
        return false;
      }
      ProtobufTwist3d other = (ProtobufTwist3d) o;
      return bitField0_ == other.bitField0_
        && (!hasDx() || ProtoUtil.isEqual(dx, other.dx))
        && (!hasDy() || ProtoUtil.isEqual(dy, other.dy))
        && (!hasDz() || ProtoUtil.isEqual(dz, other.dz))
        && (!hasRx() || ProtoUtil.isEqual(rx, other.rx))
        && (!hasRy() || ProtoUtil.isEqual(ry, other.ry))
        && (!hasRz() || ProtoUtil.isEqual(rz, other.rz));
    }

    @Override
    public void writeTo(final ProtoSink output) throws IOException {
      if ((bitField0_ & 0x00000001) != 0) {
        output.writeRawByte((byte) 9);
        output.writeDoubleNoTag(dx);
      }
      if ((bitField0_ & 0x00000002) != 0) {
        output.writeRawByte((byte) 17);
        output.writeDoubleNoTag(dy);
      }
      if ((bitField0_ & 0x00000004) != 0) {
        output.writeRawByte((byte) 25);
        output.writeDoubleNoTag(dz);
      }
      if ((bitField0_ & 0x00000008) != 0) {
        output.writeRawByte((byte) 33);
        output.writeDoubleNoTag(rx);
      }
      if ((bitField0_ & 0x00000010) != 0) {
        output.writeRawByte((byte) 41);
        output.writeDoubleNoTag(ry);
      }
      if ((bitField0_ & 0x00000020) != 0) {
        output.writeRawByte((byte) 49);
        output.writeDoubleNoTag(rz);
      }
    }

    @Override
    protected int computeSerializedSize() {
      int size = 0;
      if ((bitField0_ & 0x00000001) != 0) {
        size += 9;
      }
      if ((bitField0_ & 0x00000002) != 0) {
        size += 9;
      }
      if ((bitField0_ & 0x00000004) != 0) {
        size += 9;
      }
      if ((bitField0_ & 0x00000008) != 0) {
        size += 9;
      }
      if ((bitField0_ & 0x00000010) != 0) {
        size += 9;
      }
      if ((bitField0_ & 0x00000020) != 0) {
        size += 9;
      }
      return size;
    }

    @Override
    @SuppressWarnings("fallthrough")
    public ProtobufTwist3d mergeFrom(final ProtoSource input) throws IOException {
      // Enabled Fall-Through Optimization (QuickBuffers)
      int tag = input.readTag();
      while (true) {
        switch (tag) {
          case 9: {
            // dx
            dx = input.readDouble();
            bitField0_ |= 0x00000001;
            tag = input.readTag();
            if (tag != 17) {
              break;
            }
          }
          case 17: {
            // dy
            dy = input.readDouble();
            bitField0_ |= 0x00000002;
            tag = input.readTag();
            if (tag != 25) {
              break;
            }
          }
          case 25: {
            // dz
            dz = input.readDouble();
            bitField0_ |= 0x00000004;
            tag = input.readTag();
            if (tag != 33) {
              break;
            }
          }
          case 33: {
            // rx
            rx = input.readDouble();
            bitField0_ |= 0x00000008;
            tag = input.readTag();
            if (tag != 41) {
              break;
            }
          }
          case 41: {
            // ry
            ry = input.readDouble();
            bitField0_ |= 0x00000010;
            tag = input.readTag();
            if (tag != 49) {
              break;
            }
          }
          case 49: {
            // rz
            rz = input.readDouble();
            bitField0_ |= 0x00000020;
            tag = input.readTag();
            if (tag != 0) {
              break;
            }
          }
          case 0: {
            return this;
          }
          default: {
            if (!input.skipField(tag)) {
              return this;
            }
            tag = input.readTag();
            break;
          }
        }
      }
    }

    @Override
    public void writeTo(final JsonSink output) throws IOException {
      output.beginObject();
      if ((bitField0_ & 0x00000001) != 0) {
        output.writeDouble(FieldNames.dx, dx);
      }
      if ((bitField0_ & 0x00000002) != 0) {
        output.writeDouble(FieldNames.dy, dy);
      }
      if ((bitField0_ & 0x00000004) != 0) {
        output.writeDouble(FieldNames.dz, dz);
      }
      if ((bitField0_ & 0x00000008) != 0) {
        output.writeDouble(FieldNames.rx, rx);
      }
      if ((bitField0_ & 0x00000010) != 0) {
        output.writeDouble(FieldNames.ry, ry);
      }
      if ((bitField0_ & 0x00000020) != 0) {
        output.writeDouble(FieldNames.rz, rz);
      }
      output.endObject();
    }

    @Override
    public ProtobufTwist3d mergeFrom(final JsonSource input) throws IOException {
      if (!input.beginObject()) {
        return this;
      }
      while (!input.isAtEnd()) {
        switch (input.readFieldHash()) {
          case 3220: {
            if (input.isAtField(FieldNames.dx)) {
              if (!input.trySkipNullValue()) {
                dx = input.readDouble();
                bitField0_ |= 0x00000001;
              }
            } else {
              input.skipUnknownField();
            }
            break;
          }
          case 3221: {
            if (input.isAtField(FieldNames.dy)) {
              if (!input.trySkipNullValue()) {
                dy = input.readDouble();
                bitField0_ |= 0x00000002;
              }
            } else {
              input.skipUnknownField();
            }
            break;
          }
          case 3222: {
            if (input.isAtField(FieldNames.dz)) {
              if (!input.trySkipNullValue()) {
                dz = input.readDouble();
                bitField0_ |= 0x00000004;
              }
            } else {
              input.skipUnknownField();
            }
            break;
          }
          case 3654: {
            if (input.isAtField(FieldNames.rx)) {
              if (!input.trySkipNullValue()) {
                rx = input.readDouble();
                bitField0_ |= 0x00000008;
              }
            } else {
              input.skipUnknownField();
            }
            break;
          }
          case 3655: {
            if (input.isAtField(FieldNames.ry)) {
              if (!input.trySkipNullValue()) {
                ry = input.readDouble();
                bitField0_ |= 0x00000010;
              }
            } else {
              input.skipUnknownField();
            }
            break;
          }
          case 3656: {
            if (input.isAtField(FieldNames.rz)) {
              if (!input.trySkipNullValue()) {
                rz = input.readDouble();
                bitField0_ |= 0x00000020;
              }
            } else {
              input.skipUnknownField();
            }
            break;
          }
          default: {
            input.skipUnknownField();
            break;
          }
        }
      }
      input.endObject();
      return this;
    }

    @Override
    public ProtobufTwist3d clone() {
      return new ProtobufTwist3d().copyFrom(this);
    }

    @Override
    public boolean isEmpty() {
      return ((bitField0_) == 0);
    }

    public static ProtobufTwist3d parseFrom(final byte[] data) throws
        InvalidProtocolBufferException {
      return ProtoMessage.mergeFrom(new ProtobufTwist3d(), data).checkInitialized();
    }

    public static ProtobufTwist3d parseFrom(final ProtoSource input) throws IOException {
      return ProtoMessage.mergeFrom(new ProtobufTwist3d(), input).checkInitialized();
    }

    public static ProtobufTwist3d parseFrom(final JsonSource input) throws IOException {
      return ProtoMessage.mergeFrom(new ProtobufTwist3d(), input).checkInitialized();
    }

    /**
     * @return factory for creating ProtobufTwist3d messages
     */
    public static MessageFactory<ProtobufTwist3d> getFactory() {
      return ProtobufTwist3dFactory.INSTANCE;
    }

    /**
     * @return this type's descriptor.
     */
    public static Descriptors.Descriptor getDescriptor() {
      return Geometry3D.wpi_proto_ProtobufTwist3d_descriptor;
    }

    private enum ProtobufTwist3dFactory implements MessageFactory<ProtobufTwist3d> {
      INSTANCE;

      @Override
      public ProtobufTwist3d create() {
        return ProtobufTwist3d.newInstance();
      }
    }

    /**
     * Contains name constants used for serializing JSON
     */
    static class FieldNames {
      static final FieldName dx = FieldName.forField("dx");

      static final FieldName dy = FieldName.forField("dy");

      static final FieldName dz = FieldName.forField("dz");

      static final FieldName rx = FieldName.forField("rx");

      static final FieldName ry = FieldName.forField("ry");

      static final FieldName rz = FieldName.forField("rz");
    }
  }
}
