// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: pathfinding.proto

package io.grasscutter.net.proto.pathfinding;

/**
 * Protobuf type {@code ObstacleInfo}
 */
public final class ObstacleInfo extends
    com.google.protobuf.GeneratedMessageV3 implements
    // @@protoc_insertion_point(message_implements:ObstacleInfo)
    ObstacleInfoOrBuilder {
private static final long serialVersionUID = 0L;
  // Use ObstacleInfo.newBuilder() to construct.
  private ObstacleInfo(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
    super(builder);
  }
  private ObstacleInfo() {
    shape_ = 0;
  }

  @java.lang.Override
  @SuppressWarnings({"unused"})
  protected java.lang.Object newInstance(
      UnusedPrivateParameter unused) {
    return new ObstacleInfo();
  }

  @java.lang.Override
  public final com.google.protobuf.UnknownFieldSet
  getUnknownFields() {
    return this.unknownFields;
  }
  private ObstacleInfo(
      com.google.protobuf.CodedInputStream input,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    this();
    if (extensionRegistry == null) {
      throw new java.lang.NullPointerException();
    }
    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;
          case 32: {
            int rawValue = input.readEnum();

            shape_ = rawValue;
            break;
          }
          case 42: {
            io.grasscutter.net.proto.define.MathQuaternion.Builder subBuilder = null;
            if (rotation_ != null) {
              subBuilder = rotation_.toBuilder();
            }
            rotation_ = input.readMessage(io.grasscutter.net.proto.define.MathQuaternion.parser(), extensionRegistry);
            if (subBuilder != null) {
              subBuilder.mergeFrom(rotation_);
              rotation_ = subBuilder.buildPartial();
            }

            break;
          }
          case 56: {

            obstacleId_ = input.readInt32();
            break;
          }
          case 74: {
            io.grasscutter.net.proto.define.Vector.Builder subBuilder = null;
            if (center_ != null) {
              subBuilder = center_.toBuilder();
            }
            center_ = input.readMessage(io.grasscutter.net.proto.define.Vector.parser(), extensionRegistry);
            if (subBuilder != null) {
              subBuilder.mergeFrom(center_);
              center_ = subBuilder.buildPartial();
            }

            break;
          }
          case 114: {
            io.grasscutter.net.proto.define.Vector3Int.Builder subBuilder = null;
            if (extents_ != null) {
              subBuilder = extents_.toBuilder();
            }
            extents_ = input.readMessage(io.grasscutter.net.proto.define.Vector3Int.parser(), extensionRegistry);
            if (subBuilder != null) {
              subBuilder.mergeFrom(extents_);
              extents_ = subBuilder.buildPartial();
            }

            break;
          }
          default: {
            if (!parseUnknownField(
                input, unknownFields, extensionRegistry, tag)) {
              done = true;
            }
            break;
          }
        }
      }
    } catch (com.google.protobuf.InvalidProtocolBufferException e) {
      throw e.setUnfinishedMessage(this);
    } catch (java.io.IOException e) {
      throw new com.google.protobuf.InvalidProtocolBufferException(
          e).setUnfinishedMessage(this);
    } finally {
      this.unknownFields = unknownFields.build();
      makeExtensionsImmutable();
    }
  }
  public static final com.google.protobuf.Descriptors.Descriptor
      getDescriptor() {
    return io.grasscutter.net.proto.pathfinding.Pathfinding.internal_static_ObstacleInfo_descriptor;
  }

  @java.lang.Override
  protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
      internalGetFieldAccessorTable() {
    return io.grasscutter.net.proto.pathfinding.Pathfinding.internal_static_ObstacleInfo_fieldAccessorTable
        .ensureFieldAccessorsInitialized(
            io.grasscutter.net.proto.pathfinding.ObstacleInfo.class, io.grasscutter.net.proto.pathfinding.ObstacleInfo.Builder.class);
  }

  public static final int ROTATION_FIELD_NUMBER = 5;
  private io.grasscutter.net.proto.define.MathQuaternion rotation_;
  /**
   * <code>.MathQuaternion rotation = 5;</code>
   * @return Whether the rotation field is set.
   */
  @java.lang.Override
  public boolean hasRotation() {
    return rotation_ != null;
  }
  /**
   * <code>.MathQuaternion rotation = 5;</code>
   * @return The rotation.
   */
  @java.lang.Override
  public io.grasscutter.net.proto.define.MathQuaternion getRotation() {
    return rotation_ == null ? io.grasscutter.net.proto.define.MathQuaternion.getDefaultInstance() : rotation_;
  }
  /**
   * <code>.MathQuaternion rotation = 5;</code>
   */
  @java.lang.Override
  public io.grasscutter.net.proto.define.MathQuaternionOrBuilder getRotationOrBuilder() {
    return getRotation();
  }

  public static final int CENTER_FIELD_NUMBER = 9;
  private io.grasscutter.net.proto.define.Vector center_;
  /**
   * <code>.Vector center = 9;</code>
   * @return Whether the center field is set.
   */
  @java.lang.Override
  public boolean hasCenter() {
    return center_ != null;
  }
  /**
   * <code>.Vector center = 9;</code>
   * @return The center.
   */
  @java.lang.Override
  public io.grasscutter.net.proto.define.Vector getCenter() {
    return center_ == null ? io.grasscutter.net.proto.define.Vector.getDefaultInstance() : center_;
  }
  /**
   * <code>.Vector center = 9;</code>
   */
  @java.lang.Override
  public io.grasscutter.net.proto.define.VectorOrBuilder getCenterOrBuilder() {
    return getCenter();
  }

  public static final int EXTENTS_FIELD_NUMBER = 14;
  private io.grasscutter.net.proto.define.Vector3Int extents_;
  /**
   * <code>.Vector3Int extents = 14;</code>
   * @return Whether the extents field is set.
   */
  @java.lang.Override
  public boolean hasExtents() {
    return extents_ != null;
  }
  /**
   * <code>.Vector3Int extents = 14;</code>
   * @return The extents.
   */
  @java.lang.Override
  public io.grasscutter.net.proto.define.Vector3Int getExtents() {
    return extents_ == null ? io.grasscutter.net.proto.define.Vector3Int.getDefaultInstance() : extents_;
  }
  /**
   * <code>.Vector3Int extents = 14;</code>
   */
  @java.lang.Override
  public io.grasscutter.net.proto.define.Vector3IntOrBuilder getExtentsOrBuilder() {
    return getExtents();
  }

  public static final int OBSTACLE_ID_FIELD_NUMBER = 7;
  private int obstacleId_;
  /**
   * <code>int32 obstacle_id = 7;</code>
   * @return The obstacleId.
   */
  @java.lang.Override
  public int getObstacleId() {
    return obstacleId_;
  }

  public static final int SHAPE_FIELD_NUMBER = 4;
  private int shape_;
  /**
   * <code>.ShapeType shape = 4;</code>
   * @return The enum numeric value on the wire for shape.
   */
  @java.lang.Override public int getShapeValue() {
    return shape_;
  }
  /**
   * <code>.ShapeType shape = 4;</code>
   * @return The shape.
   */
  @java.lang.Override public io.grasscutter.net.proto.pathfinding_v2.ShapeType getShape() {
    @SuppressWarnings("deprecation")
    io.grasscutter.net.proto.pathfinding_v2.ShapeType result = io.grasscutter.net.proto.pathfinding_v2.ShapeType.valueOf(shape_);
    return result == null ? io.grasscutter.net.proto.pathfinding_v2.ShapeType.UNRECOGNIZED : result;
  }

  private byte memoizedIsInitialized = -1;
  @java.lang.Override
  public final boolean isInitialized() {
    byte isInitialized = memoizedIsInitialized;
    if (isInitialized == 1) return true;
    if (isInitialized == 0) return false;

    memoizedIsInitialized = 1;
    return true;
  }

  @java.lang.Override
  public void writeTo(com.google.protobuf.CodedOutputStream output)
                      throws java.io.IOException {
    if (shape_ != io.grasscutter.net.proto.pathfinding_v2.ShapeType.ShapeType_OBSTACLE_SHAPE_CAPSULE.getNumber()) {
      output.writeEnum(4, shape_);
    }
    if (rotation_ != null) {
      output.writeMessage(5, getRotation());
    }
    if (obstacleId_ != 0) {
      output.writeInt32(7, obstacleId_);
    }
    if (center_ != null) {
      output.writeMessage(9, getCenter());
    }
    if (extents_ != null) {
      output.writeMessage(14, getExtents());
    }
    unknownFields.writeTo(output);
  }

  @java.lang.Override
  public int getSerializedSize() {
    int size = memoizedSize;
    if (size != -1) return size;

    size = 0;
    if (shape_ != io.grasscutter.net.proto.pathfinding_v2.ShapeType.ShapeType_OBSTACLE_SHAPE_CAPSULE.getNumber()) {
      size += com.google.protobuf.CodedOutputStream
        .computeEnumSize(4, shape_);
    }
    if (rotation_ != null) {
      size += com.google.protobuf.CodedOutputStream
        .computeMessageSize(5, getRotation());
    }
    if (obstacleId_ != 0) {
      size += com.google.protobuf.CodedOutputStream
        .computeInt32Size(7, obstacleId_);
    }
    if (center_ != null) {
      size += com.google.protobuf.CodedOutputStream
        .computeMessageSize(9, getCenter());
    }
    if (extents_ != null) {
      size += com.google.protobuf.CodedOutputStream
        .computeMessageSize(14, getExtents());
    }
    size += unknownFields.getSerializedSize();
    memoizedSize = size;
    return size;
  }

  @java.lang.Override
  public boolean equals(final java.lang.Object obj) {
    if (obj == this) {
     return true;
    }
    if (!(obj instanceof io.grasscutter.net.proto.pathfinding.ObstacleInfo)) {
      return super.equals(obj);
    }
    io.grasscutter.net.proto.pathfinding.ObstacleInfo other = (io.grasscutter.net.proto.pathfinding.ObstacleInfo) obj;

    if (hasRotation() != other.hasRotation()) return false;
    if (hasRotation()) {
      if (!getRotation()
          .equals(other.getRotation())) return false;
    }
    if (hasCenter() != other.hasCenter()) return false;
    if (hasCenter()) {
      if (!getCenter()
          .equals(other.getCenter())) return false;
    }
    if (hasExtents() != other.hasExtents()) return false;
    if (hasExtents()) {
      if (!getExtents()
          .equals(other.getExtents())) return false;
    }
    if (getObstacleId()
        != other.getObstacleId()) return false;
    if (shape_ != other.shape_) return false;
    if (!unknownFields.equals(other.unknownFields)) return false;
    return true;
  }

  @java.lang.Override
  public int hashCode() {
    if (memoizedHashCode != 0) {
      return memoizedHashCode;
    }
    int hash = 41;
    hash = (19 * hash) + getDescriptor().hashCode();
    if (hasRotation()) {
      hash = (37 * hash) + ROTATION_FIELD_NUMBER;
      hash = (53 * hash) + getRotation().hashCode();
    }
    if (hasCenter()) {
      hash = (37 * hash) + CENTER_FIELD_NUMBER;
      hash = (53 * hash) + getCenter().hashCode();
    }
    if (hasExtents()) {
      hash = (37 * hash) + EXTENTS_FIELD_NUMBER;
      hash = (53 * hash) + getExtents().hashCode();
    }
    hash = (37 * hash) + OBSTACLE_ID_FIELD_NUMBER;
    hash = (53 * hash) + getObstacleId();
    hash = (37 * hash) + SHAPE_FIELD_NUMBER;
    hash = (53 * hash) + shape_;
    hash = (29 * hash) + unknownFields.hashCode();
    memoizedHashCode = hash;
    return hash;
  }

  public static io.grasscutter.net.proto.pathfinding.ObstacleInfo parseFrom(
      java.nio.ByteBuffer data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }
  public static io.grasscutter.net.proto.pathfinding.ObstacleInfo parseFrom(
      java.nio.ByteBuffer data,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data, extensionRegistry);
  }
  public static io.grasscutter.net.proto.pathfinding.ObstacleInfo parseFrom(
      com.google.protobuf.ByteString data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }
  public static io.grasscutter.net.proto.pathfinding.ObstacleInfo parseFrom(
      com.google.protobuf.ByteString data,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data, extensionRegistry);
  }
  public static io.grasscutter.net.proto.pathfinding.ObstacleInfo parseFrom(byte[] data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }
  public static io.grasscutter.net.proto.pathfinding.ObstacleInfo parseFrom(
      byte[] data,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data, extensionRegistry);
  }
  public static io.grasscutter.net.proto.pathfinding.ObstacleInfo parseFrom(java.io.InputStream input)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3
        .parseWithIOException(PARSER, input);
  }
  public static io.grasscutter.net.proto.pathfinding.ObstacleInfo parseFrom(
      java.io.InputStream input,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3
        .parseWithIOException(PARSER, input, extensionRegistry);
  }
  public static io.grasscutter.net.proto.pathfinding.ObstacleInfo parseDelimitedFrom(java.io.InputStream input)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3
        .parseDelimitedWithIOException(PARSER, input);
  }
  public static io.grasscutter.net.proto.pathfinding.ObstacleInfo parseDelimitedFrom(
      java.io.InputStream input,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3
        .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
  }
  public static io.grasscutter.net.proto.pathfinding.ObstacleInfo parseFrom(
      com.google.protobuf.CodedInputStream input)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3
        .parseWithIOException(PARSER, input);
  }
  public static io.grasscutter.net.proto.pathfinding.ObstacleInfo parseFrom(
      com.google.protobuf.CodedInputStream input,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3
        .parseWithIOException(PARSER, input, extensionRegistry);
  }

  @java.lang.Override
  public Builder newBuilderForType() { return newBuilder(); }
  public static Builder newBuilder() {
    return DEFAULT_INSTANCE.toBuilder();
  }
  public static Builder newBuilder(io.grasscutter.net.proto.pathfinding.ObstacleInfo prototype) {
    return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
  }
  @java.lang.Override
  public Builder toBuilder() {
    return this == DEFAULT_INSTANCE
        ? new Builder() : new Builder().mergeFrom(this);
  }

  @java.lang.Override
  protected Builder newBuilderForType(
      com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    Builder builder = new Builder(parent);
    return builder;
  }
  /**
   * Protobuf type {@code ObstacleInfo}
   */
  public static final class Builder extends
      com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
      // @@protoc_insertion_point(builder_implements:ObstacleInfo)
      io.grasscutter.net.proto.pathfinding.ObstacleInfoOrBuilder {
    public static final com.google.protobuf.Descriptors.Descriptor
        getDescriptor() {
      return io.grasscutter.net.proto.pathfinding.Pathfinding.internal_static_ObstacleInfo_descriptor;
    }

    @java.lang.Override
    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
        internalGetFieldAccessorTable() {
      return io.grasscutter.net.proto.pathfinding.Pathfinding.internal_static_ObstacleInfo_fieldAccessorTable
          .ensureFieldAccessorsInitialized(
              io.grasscutter.net.proto.pathfinding.ObstacleInfo.class, io.grasscutter.net.proto.pathfinding.ObstacleInfo.Builder.class);
    }

    // Construct using io.grasscutter.net.proto.pathfinding.ObstacleInfo.newBuilder()
    private Builder() {
      maybeForceBuilderInitialization();
    }

    private Builder(
        com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
      super(parent);
      maybeForceBuilderInitialization();
    }
    private void maybeForceBuilderInitialization() {
      if (com.google.protobuf.GeneratedMessageV3
              .alwaysUseFieldBuilders) {
      }
    }
    @java.lang.Override
    public Builder clear() {
      super.clear();
      if (rotationBuilder_ == null) {
        rotation_ = null;
      } else {
        rotation_ = null;
        rotationBuilder_ = null;
      }
      if (centerBuilder_ == null) {
        center_ = null;
      } else {
        center_ = null;
        centerBuilder_ = null;
      }
      if (extentsBuilder_ == null) {
        extents_ = null;
      } else {
        extents_ = null;
        extentsBuilder_ = null;
      }
      obstacleId_ = 0;

      shape_ = 0;

      return this;
    }

    @java.lang.Override
    public com.google.protobuf.Descriptors.Descriptor
        getDescriptorForType() {
      return io.grasscutter.net.proto.pathfinding.Pathfinding.internal_static_ObstacleInfo_descriptor;
    }

    @java.lang.Override
    public io.grasscutter.net.proto.pathfinding.ObstacleInfo getDefaultInstanceForType() {
      return io.grasscutter.net.proto.pathfinding.ObstacleInfo.getDefaultInstance();
    }

    @java.lang.Override
    public io.grasscutter.net.proto.pathfinding.ObstacleInfo build() {
      io.grasscutter.net.proto.pathfinding.ObstacleInfo result = buildPartial();
      if (!result.isInitialized()) {
        throw newUninitializedMessageException(result);
      }
      return result;
    }

    @java.lang.Override
    public io.grasscutter.net.proto.pathfinding.ObstacleInfo buildPartial() {
      io.grasscutter.net.proto.pathfinding.ObstacleInfo result = new io.grasscutter.net.proto.pathfinding.ObstacleInfo(this);
      if (rotationBuilder_ == null) {
        result.rotation_ = rotation_;
      } else {
        result.rotation_ = rotationBuilder_.build();
      }
      if (centerBuilder_ == null) {
        result.center_ = center_;
      } else {
        result.center_ = centerBuilder_.build();
      }
      if (extentsBuilder_ == null) {
        result.extents_ = extents_;
      } else {
        result.extents_ = extentsBuilder_.build();
      }
      result.obstacleId_ = obstacleId_;
      result.shape_ = shape_;
      onBuilt();
      return result;
    }

    @java.lang.Override
    public Builder clone() {
      return super.clone();
    }
    @java.lang.Override
    public Builder setField(
        com.google.protobuf.Descriptors.FieldDescriptor field,
        java.lang.Object value) {
      return super.setField(field, value);
    }
    @java.lang.Override
    public Builder clearField(
        com.google.protobuf.Descriptors.FieldDescriptor field) {
      return super.clearField(field);
    }
    @java.lang.Override
    public Builder clearOneof(
        com.google.protobuf.Descriptors.OneofDescriptor oneof) {
      return super.clearOneof(oneof);
    }
    @java.lang.Override
    public Builder setRepeatedField(
        com.google.protobuf.Descriptors.FieldDescriptor field,
        int index, java.lang.Object value) {
      return super.setRepeatedField(field, index, value);
    }
    @java.lang.Override
    public Builder addRepeatedField(
        com.google.protobuf.Descriptors.FieldDescriptor field,
        java.lang.Object value) {
      return super.addRepeatedField(field, value);
    }
    @java.lang.Override
    public Builder mergeFrom(com.google.protobuf.Message other) {
      if (other instanceof io.grasscutter.net.proto.pathfinding.ObstacleInfo) {
        return mergeFrom((io.grasscutter.net.proto.pathfinding.ObstacleInfo)other);
      } else {
        super.mergeFrom(other);
        return this;
      }
    }

    public Builder mergeFrom(io.grasscutter.net.proto.pathfinding.ObstacleInfo other) {
      if (other == io.grasscutter.net.proto.pathfinding.ObstacleInfo.getDefaultInstance()) return this;
      if (other.hasRotation()) {
        mergeRotation(other.getRotation());
      }
      if (other.hasCenter()) {
        mergeCenter(other.getCenter());
      }
      if (other.hasExtents()) {
        mergeExtents(other.getExtents());
      }
      if (other.getObstacleId() != 0) {
        setObstacleId(other.getObstacleId());
      }
      if (other.shape_ != 0) {
        setShapeValue(other.getShapeValue());
      }
      this.mergeUnknownFields(other.unknownFields);
      onChanged();
      return this;
    }

    @java.lang.Override
    public final boolean isInitialized() {
      return true;
    }

    @java.lang.Override
    public Builder mergeFrom(
        com.google.protobuf.CodedInputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      io.grasscutter.net.proto.pathfinding.ObstacleInfo parsedMessage = null;
      try {
        parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
      } catch (com.google.protobuf.InvalidProtocolBufferException e) {
        parsedMessage = (io.grasscutter.net.proto.pathfinding.ObstacleInfo) e.getUnfinishedMessage();
        throw e.unwrapIOException();
      } finally {
        if (parsedMessage != null) {
          mergeFrom(parsedMessage);
        }
      }
      return this;
    }

    private io.grasscutter.net.proto.define.MathQuaternion rotation_;
    private com.google.protobuf.SingleFieldBuilderV3<
        io.grasscutter.net.proto.define.MathQuaternion, io.grasscutter.net.proto.define.MathQuaternion.Builder, io.grasscutter.net.proto.define.MathQuaternionOrBuilder> rotationBuilder_;
    /**
     * <code>.MathQuaternion rotation = 5;</code>
     * @return Whether the rotation field is set.
     */
    public boolean hasRotation() {
      return rotationBuilder_ != null || rotation_ != null;
    }
    /**
     * <code>.MathQuaternion rotation = 5;</code>
     * @return The rotation.
     */
    public io.grasscutter.net.proto.define.MathQuaternion getRotation() {
      if (rotationBuilder_ == null) {
        return rotation_ == null ? io.grasscutter.net.proto.define.MathQuaternion.getDefaultInstance() : rotation_;
      } else {
        return rotationBuilder_.getMessage();
      }
    }
    /**
     * <code>.MathQuaternion rotation = 5;</code>
     */
    public Builder setRotation(io.grasscutter.net.proto.define.MathQuaternion value) {
      if (rotationBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        rotation_ = value;
        onChanged();
      } else {
        rotationBuilder_.setMessage(value);
      }

      return this;
    }
    /**
     * <code>.MathQuaternion rotation = 5;</code>
     */
    public Builder setRotation(
        io.grasscutter.net.proto.define.MathQuaternion.Builder builderForValue) {
      if (rotationBuilder_ == null) {
        rotation_ = builderForValue.build();
        onChanged();
      } else {
        rotationBuilder_.setMessage(builderForValue.build());
      }

      return this;
    }
    /**
     * <code>.MathQuaternion rotation = 5;</code>
     */
    public Builder mergeRotation(io.grasscutter.net.proto.define.MathQuaternion value) {
      if (rotationBuilder_ == null) {
        if (rotation_ != null) {
          rotation_ =
            io.grasscutter.net.proto.define.MathQuaternion.newBuilder(rotation_).mergeFrom(value).buildPartial();
        } else {
          rotation_ = value;
        }
        onChanged();
      } else {
        rotationBuilder_.mergeFrom(value);
      }

      return this;
    }
    /**
     * <code>.MathQuaternion rotation = 5;</code>
     */
    public Builder clearRotation() {
      if (rotationBuilder_ == null) {
        rotation_ = null;
        onChanged();
      } else {
        rotation_ = null;
        rotationBuilder_ = null;
      }

      return this;
    }
    /**
     * <code>.MathQuaternion rotation = 5;</code>
     */
    public io.grasscutter.net.proto.define.MathQuaternion.Builder getRotationBuilder() {
      
      onChanged();
      return getRotationFieldBuilder().getBuilder();
    }
    /**
     * <code>.MathQuaternion rotation = 5;</code>
     */
    public io.grasscutter.net.proto.define.MathQuaternionOrBuilder getRotationOrBuilder() {
      if (rotationBuilder_ != null) {
        return rotationBuilder_.getMessageOrBuilder();
      } else {
        return rotation_ == null ?
            io.grasscutter.net.proto.define.MathQuaternion.getDefaultInstance() : rotation_;
      }
    }
    /**
     * <code>.MathQuaternion rotation = 5;</code>
     */
    private com.google.protobuf.SingleFieldBuilderV3<
        io.grasscutter.net.proto.define.MathQuaternion, io.grasscutter.net.proto.define.MathQuaternion.Builder, io.grasscutter.net.proto.define.MathQuaternionOrBuilder> 
        getRotationFieldBuilder() {
      if (rotationBuilder_ == null) {
        rotationBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
            io.grasscutter.net.proto.define.MathQuaternion, io.grasscutter.net.proto.define.MathQuaternion.Builder, io.grasscutter.net.proto.define.MathQuaternionOrBuilder>(
                getRotation(),
                getParentForChildren(),
                isClean());
        rotation_ = null;
      }
      return rotationBuilder_;
    }

    private io.grasscutter.net.proto.define.Vector center_;
    private com.google.protobuf.SingleFieldBuilderV3<
        io.grasscutter.net.proto.define.Vector, io.grasscutter.net.proto.define.Vector.Builder, io.grasscutter.net.proto.define.VectorOrBuilder> centerBuilder_;
    /**
     * <code>.Vector center = 9;</code>
     * @return Whether the center field is set.
     */
    public boolean hasCenter() {
      return centerBuilder_ != null || center_ != null;
    }
    /**
     * <code>.Vector center = 9;</code>
     * @return The center.
     */
    public io.grasscutter.net.proto.define.Vector getCenter() {
      if (centerBuilder_ == null) {
        return center_ == null ? io.grasscutter.net.proto.define.Vector.getDefaultInstance() : center_;
      } else {
        return centerBuilder_.getMessage();
      }
    }
    /**
     * <code>.Vector center = 9;</code>
     */
    public Builder setCenter(io.grasscutter.net.proto.define.Vector value) {
      if (centerBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        center_ = value;
        onChanged();
      } else {
        centerBuilder_.setMessage(value);
      }

      return this;
    }
    /**
     * <code>.Vector center = 9;</code>
     */
    public Builder setCenter(
        io.grasscutter.net.proto.define.Vector.Builder builderForValue) {
      if (centerBuilder_ == null) {
        center_ = builderForValue.build();
        onChanged();
      } else {
        centerBuilder_.setMessage(builderForValue.build());
      }

      return this;
    }
    /**
     * <code>.Vector center = 9;</code>
     */
    public Builder mergeCenter(io.grasscutter.net.proto.define.Vector value) {
      if (centerBuilder_ == null) {
        if (center_ != null) {
          center_ =
            io.grasscutter.net.proto.define.Vector.newBuilder(center_).mergeFrom(value).buildPartial();
        } else {
          center_ = value;
        }
        onChanged();
      } else {
        centerBuilder_.mergeFrom(value);
      }

      return this;
    }
    /**
     * <code>.Vector center = 9;</code>
     */
    public Builder clearCenter() {
      if (centerBuilder_ == null) {
        center_ = null;
        onChanged();
      } else {
        center_ = null;
        centerBuilder_ = null;
      }

      return this;
    }
    /**
     * <code>.Vector center = 9;</code>
     */
    public io.grasscutter.net.proto.define.Vector.Builder getCenterBuilder() {
      
      onChanged();
      return getCenterFieldBuilder().getBuilder();
    }
    /**
     * <code>.Vector center = 9;</code>
     */
    public io.grasscutter.net.proto.define.VectorOrBuilder getCenterOrBuilder() {
      if (centerBuilder_ != null) {
        return centerBuilder_.getMessageOrBuilder();
      } else {
        return center_ == null ?
            io.grasscutter.net.proto.define.Vector.getDefaultInstance() : center_;
      }
    }
    /**
     * <code>.Vector center = 9;</code>
     */
    private com.google.protobuf.SingleFieldBuilderV3<
        io.grasscutter.net.proto.define.Vector, io.grasscutter.net.proto.define.Vector.Builder, io.grasscutter.net.proto.define.VectorOrBuilder> 
        getCenterFieldBuilder() {
      if (centerBuilder_ == null) {
        centerBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
            io.grasscutter.net.proto.define.Vector, io.grasscutter.net.proto.define.Vector.Builder, io.grasscutter.net.proto.define.VectorOrBuilder>(
                getCenter(),
                getParentForChildren(),
                isClean());
        center_ = null;
      }
      return centerBuilder_;
    }

    private io.grasscutter.net.proto.define.Vector3Int extents_;
    private com.google.protobuf.SingleFieldBuilderV3<
        io.grasscutter.net.proto.define.Vector3Int, io.grasscutter.net.proto.define.Vector3Int.Builder, io.grasscutter.net.proto.define.Vector3IntOrBuilder> extentsBuilder_;
    /**
     * <code>.Vector3Int extents = 14;</code>
     * @return Whether the extents field is set.
     */
    public boolean hasExtents() {
      return extentsBuilder_ != null || extents_ != null;
    }
    /**
     * <code>.Vector3Int extents = 14;</code>
     * @return The extents.
     */
    public io.grasscutter.net.proto.define.Vector3Int getExtents() {
      if (extentsBuilder_ == null) {
        return extents_ == null ? io.grasscutter.net.proto.define.Vector3Int.getDefaultInstance() : extents_;
      } else {
        return extentsBuilder_.getMessage();
      }
    }
    /**
     * <code>.Vector3Int extents = 14;</code>
     */
    public Builder setExtents(io.grasscutter.net.proto.define.Vector3Int value) {
      if (extentsBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        extents_ = value;
        onChanged();
      } else {
        extentsBuilder_.setMessage(value);
      }

      return this;
    }
    /**
     * <code>.Vector3Int extents = 14;</code>
     */
    public Builder setExtents(
        io.grasscutter.net.proto.define.Vector3Int.Builder builderForValue) {
      if (extentsBuilder_ == null) {
        extents_ = builderForValue.build();
        onChanged();
      } else {
        extentsBuilder_.setMessage(builderForValue.build());
      }

      return this;
    }
    /**
     * <code>.Vector3Int extents = 14;</code>
     */
    public Builder mergeExtents(io.grasscutter.net.proto.define.Vector3Int value) {
      if (extentsBuilder_ == null) {
        if (extents_ != null) {
          extents_ =
            io.grasscutter.net.proto.define.Vector3Int.newBuilder(extents_).mergeFrom(value).buildPartial();
        } else {
          extents_ = value;
        }
        onChanged();
      } else {
        extentsBuilder_.mergeFrom(value);
      }

      return this;
    }
    /**
     * <code>.Vector3Int extents = 14;</code>
     */
    public Builder clearExtents() {
      if (extentsBuilder_ == null) {
        extents_ = null;
        onChanged();
      } else {
        extents_ = null;
        extentsBuilder_ = null;
      }

      return this;
    }
    /**
     * <code>.Vector3Int extents = 14;</code>
     */
    public io.grasscutter.net.proto.define.Vector3Int.Builder getExtentsBuilder() {
      
      onChanged();
      return getExtentsFieldBuilder().getBuilder();
    }
    /**
     * <code>.Vector3Int extents = 14;</code>
     */
    public io.grasscutter.net.proto.define.Vector3IntOrBuilder getExtentsOrBuilder() {
      if (extentsBuilder_ != null) {
        return extentsBuilder_.getMessageOrBuilder();
      } else {
        return extents_ == null ?
            io.grasscutter.net.proto.define.Vector3Int.getDefaultInstance() : extents_;
      }
    }
    /**
     * <code>.Vector3Int extents = 14;</code>
     */
    private com.google.protobuf.SingleFieldBuilderV3<
        io.grasscutter.net.proto.define.Vector3Int, io.grasscutter.net.proto.define.Vector3Int.Builder, io.grasscutter.net.proto.define.Vector3IntOrBuilder> 
        getExtentsFieldBuilder() {
      if (extentsBuilder_ == null) {
        extentsBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
            io.grasscutter.net.proto.define.Vector3Int, io.grasscutter.net.proto.define.Vector3Int.Builder, io.grasscutter.net.proto.define.Vector3IntOrBuilder>(
                getExtents(),
                getParentForChildren(),
                isClean());
        extents_ = null;
      }
      return extentsBuilder_;
    }

    private int obstacleId_ ;
    /**
     * <code>int32 obstacle_id = 7;</code>
     * @return The obstacleId.
     */
    @java.lang.Override
    public int getObstacleId() {
      return obstacleId_;
    }
    /**
     * <code>int32 obstacle_id = 7;</code>
     * @param value The obstacleId to set.
     * @return This builder for chaining.
     */
    public Builder setObstacleId(int value) {
      
      obstacleId_ = value;
      onChanged();
      return this;
    }
    /**
     * <code>int32 obstacle_id = 7;</code>
     * @return This builder for chaining.
     */
    public Builder clearObstacleId() {
      
      obstacleId_ = 0;
      onChanged();
      return this;
    }

    private int shape_ = 0;
    /**
     * <code>.ShapeType shape = 4;</code>
     * @return The enum numeric value on the wire for shape.
     */
    @java.lang.Override public int getShapeValue() {
      return shape_;
    }
    /**
     * <code>.ShapeType shape = 4;</code>
     * @param value The enum numeric value on the wire for shape to set.
     * @return This builder for chaining.
     */
    public Builder setShapeValue(int value) {
      
      shape_ = value;
      onChanged();
      return this;
    }
    /**
     * <code>.ShapeType shape = 4;</code>
     * @return The shape.
     */
    @java.lang.Override
    public io.grasscutter.net.proto.pathfinding_v2.ShapeType getShape() {
      @SuppressWarnings("deprecation")
      io.grasscutter.net.proto.pathfinding_v2.ShapeType result = io.grasscutter.net.proto.pathfinding_v2.ShapeType.valueOf(shape_);
      return result == null ? io.grasscutter.net.proto.pathfinding_v2.ShapeType.UNRECOGNIZED : result;
    }
    /**
     * <code>.ShapeType shape = 4;</code>
     * @param value The shape to set.
     * @return This builder for chaining.
     */
    public Builder setShape(io.grasscutter.net.proto.pathfinding_v2.ShapeType value) {
      if (value == null) {
        throw new NullPointerException();
      }
      
      shape_ = value.getNumber();
      onChanged();
      return this;
    }
    /**
     * <code>.ShapeType shape = 4;</code>
     * @return This builder for chaining.
     */
    public Builder clearShape() {
      
      shape_ = 0;
      onChanged();
      return this;
    }
    @java.lang.Override
    public final Builder setUnknownFields(
        final com.google.protobuf.UnknownFieldSet unknownFields) {
      return super.setUnknownFields(unknownFields);
    }

    @java.lang.Override
    public final Builder mergeUnknownFields(
        final com.google.protobuf.UnknownFieldSet unknownFields) {
      return super.mergeUnknownFields(unknownFields);
    }


    // @@protoc_insertion_point(builder_scope:ObstacleInfo)
  }

  // @@protoc_insertion_point(class_scope:ObstacleInfo)
  private static final io.grasscutter.net.proto.pathfinding.ObstacleInfo DEFAULT_INSTANCE;
  static {
    DEFAULT_INSTANCE = new io.grasscutter.net.proto.pathfinding.ObstacleInfo();
  }

  public static io.grasscutter.net.proto.pathfinding.ObstacleInfo getDefaultInstance() {
    return DEFAULT_INSTANCE;
  }

  private static final com.google.protobuf.Parser<ObstacleInfo>
      PARSER = new com.google.protobuf.AbstractParser<ObstacleInfo>() {
    @java.lang.Override
    public ObstacleInfo parsePartialFrom(
        com.google.protobuf.CodedInputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return new ObstacleInfo(input, extensionRegistry);
    }
  };

  public static com.google.protobuf.Parser<ObstacleInfo> parser() {
    return PARSER;
  }

  @java.lang.Override
  public com.google.protobuf.Parser<ObstacleInfo> getParserForType() {
    return PARSER;
  }

  @java.lang.Override
  public io.grasscutter.net.proto.pathfinding.ObstacleInfo getDefaultInstanceForType() {
    return DEFAULT_INSTANCE;
  }

}

