// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: frc_gazebo_plugin/msgs/driver-station.proto

package gazebo.msgs;

public final class GzDriverStation {
  private GzDriverStation() {}
  public static void registerAllExtensions(
      com.google.protobuf.ExtensionRegistry registry) {
  }
  public interface DriverStationOrBuilder
      extends com.google.protobuf.MessageOrBuilder {

    // required bool enabled = 1;
    /**
     * <code>required bool enabled = 1;</code>
     */
    boolean hasEnabled();
    /**
     * <code>required bool enabled = 1;</code>
     */
    boolean getEnabled();

    // required .gazebo.msgs.DriverStation.State state = 2;
    /**
     * <code>required .gazebo.msgs.DriverStation.State state = 2;</code>
     */
    boolean hasState();
    /**
     * <code>required .gazebo.msgs.DriverStation.State state = 2;</code>
     */
    gazebo.msgs.GzDriverStation.DriverStation.State getState();
  }
  /**
   * Protobuf type {@code gazebo.msgs.DriverStation}
   */
  public static final class DriverStation extends
      com.google.protobuf.GeneratedMessage
      implements DriverStationOrBuilder {
    // Use DriverStation.newBuilder() to construct.
    private DriverStation(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
      super(builder);
      this.unknownFields = builder.getUnknownFields();
    }
    private DriverStation(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); }

    private static final DriverStation defaultInstance;
    public static DriverStation getDefaultInstance() {
      return defaultInstance;
    }

    public DriverStation getDefaultInstanceForType() {
      return defaultInstance;
    }

    private final com.google.protobuf.UnknownFieldSet unknownFields;
    @java.lang.Override
    public final com.google.protobuf.UnknownFieldSet
        getUnknownFields() {
      return this.unknownFields;
    }
    private DriverStation(
        com.google.protobuf.CodedInputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      initFields();
      int mutable_bitField0_ = 0;
      com.google.protobuf.UnknownFieldSet.Builder unknownFields =
          com.google.protobuf.UnknownFieldSet.newBuilder();
      try {
        boolean done = false;
        while (!done) {
          int tag = input.readTag();
          switch (tag) {
            case 0:
              done = true;
              break;
            default: {
              if (!parseUnknownField(input, unknownFields,
                                     extensionRegistry, tag)) {
                done = true;
              }
              break;
            }
            case 8: {
              bitField0_ |= 0x00000001;
              enabled_ = input.readBool();
              break;
            }
            case 16: {
              int rawValue = input.readEnum();
              gazebo.msgs.GzDriverStation.DriverStation.State value = gazebo.msgs.GzDriverStation.DriverStation.State.valueOf(rawValue);
              if (value == null) {
                unknownFields.mergeVarintField(2, rawValue);
              } else {
                bitField0_ |= 0x00000002;
                state_ = value;
              }
              break;
            }
          }
        }
      } catch (com.google.protobuf.InvalidProtocolBufferException e) {
        throw e.setUnfinishedMessage(this);
      } catch (java.io.IOException e) {
        throw new com.google.protobuf.InvalidProtocolBufferException(
            e.getMessage()).setUnfinishedMessage(this);
      } finally {
        this.unknownFields = unknownFields.build();
        makeExtensionsImmutable();
      }
    }
    public static final com.google.protobuf.Descriptors.Descriptor
        getDescriptor() {
      return gazebo.msgs.GzDriverStation.internal_static_gazebo_msgs_DriverStation_descriptor;
    }

    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
        internalGetFieldAccessorTable() {
      return gazebo.msgs.GzDriverStation.internal_static_gazebo_msgs_DriverStation_fieldAccessorTable
          .ensureFieldAccessorsInitialized(
              gazebo.msgs.GzDriverStation.DriverStation.class, gazebo.msgs.GzDriverStation.DriverStation.Builder.class);
    }

    public static com.google.protobuf.Parser<DriverStation> PARSER =
        new com.google.protobuf.AbstractParser<DriverStation>() {
      public DriverStation parsePartialFrom(
          com.google.protobuf.CodedInputStream input,
          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
          throws com.google.protobuf.InvalidProtocolBufferException {
        return new DriverStation(input, extensionRegistry);
      }
    };

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

    /**
     * Protobuf enum {@code gazebo.msgs.DriverStation.State}
     */
    public enum State
        implements com.google.protobuf.ProtocolMessageEnum {
      /**
       * <code>AUTO = 0;</code>
       */
      AUTO(0, 0),
      /**
       * <code>TELEOP = 1;</code>
       */
      TELEOP(1, 1),
      /**
       * <code>TEST = 2;</code>
       */
      TEST(2, 2),
      ;

      /**
       * <code>AUTO = 0;</code>
       */
      public static final int AUTO_VALUE = 0;
      /**
       * <code>TELEOP = 1;</code>
       */
      public static final int TELEOP_VALUE = 1;
      /**
       * <code>TEST = 2;</code>
       */
      public static final int TEST_VALUE = 2;


      public final int getNumber() { return value; }

      public static State valueOf(int value) {
        switch (value) {
          case 0: return AUTO;
          case 1: return TELEOP;
          case 2: return TEST;
          default: return null;
        }
      }

      public static com.google.protobuf.Internal.EnumLiteMap<State>
          internalGetValueMap() {
        return internalValueMap;
      }
      private static com.google.protobuf.Internal.EnumLiteMap<State>
          internalValueMap =
            new com.google.protobuf.Internal.EnumLiteMap<State>() {
              public State findValueByNumber(int number) {
                return State.valueOf(number);
              }
            };

      public final com.google.protobuf.Descriptors.EnumValueDescriptor
          getValueDescriptor() {
        return getDescriptor().getValues().get(index);
      }
      public final com.google.protobuf.Descriptors.EnumDescriptor
          getDescriptorForType() {
        return getDescriptor();
      }
      public static final com.google.protobuf.Descriptors.EnumDescriptor
          getDescriptor() {
        return gazebo.msgs.GzDriverStation.DriverStation.getDescriptor().getEnumTypes().get(0);
      }

      private static final State[] VALUES = values();

      public static State valueOf(
          com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
        if (desc.getType() != getDescriptor()) {
          throw new java.lang.IllegalArgumentException(
            "EnumValueDescriptor is not for this type.");
        }
        return VALUES[desc.getIndex()];
      }

      private final int index;
      private final int value;

      private State(int index, int value) {
        this.index = index;
        this.value = value;
      }

      // @@protoc_insertion_point(enum_scope:gazebo.msgs.DriverStation.State)
    }

    private int bitField0_;
    // required bool enabled = 1;
    public static final int ENABLED_FIELD_NUMBER = 1;
    private boolean enabled_;
    /**
     * <code>required bool enabled = 1;</code>
     */
    public boolean hasEnabled() {
      return ((bitField0_ & 0x00000001) == 0x00000001);
    }
    /**
     * <code>required bool enabled = 1;</code>
     */
    public boolean getEnabled() {
      return enabled_;
    }

    // required .gazebo.msgs.DriverStation.State state = 2;
    public static final int STATE_FIELD_NUMBER = 2;
    private gazebo.msgs.GzDriverStation.DriverStation.State state_;
    /**
     * <code>required .gazebo.msgs.DriverStation.State state = 2;</code>
     */
    public boolean hasState() {
      return ((bitField0_ & 0x00000002) == 0x00000002);
    }
    /**
     * <code>required .gazebo.msgs.DriverStation.State state = 2;</code>
     */
    public gazebo.msgs.GzDriverStation.DriverStation.State getState() {
      return state_;
    }

    private void initFields() {
      enabled_ = false;
      state_ = gazebo.msgs.GzDriverStation.DriverStation.State.AUTO;
    }
    private byte memoizedIsInitialized = -1;
    public final boolean isInitialized() {
      byte isInitialized = memoizedIsInitialized;
      if (isInitialized != -1) return isInitialized == 1;

      if (!hasEnabled()) {
        memoizedIsInitialized = 0;
        return false;
      }
      if (!hasState()) {
        memoizedIsInitialized = 0;
        return false;
      }
      memoizedIsInitialized = 1;
      return true;
    }

    public void writeTo(com.google.protobuf.CodedOutputStream output)
                        throws java.io.IOException {
      getSerializedSize();
      if (((bitField0_ & 0x00000001) == 0x00000001)) {
        output.writeBool(1, enabled_);
      }
      if (((bitField0_ & 0x00000002) == 0x00000002)) {
        output.writeEnum(2, state_.getNumber());
      }
      getUnknownFields().writeTo(output);
    }

    private int memoizedSerializedSize = -1;
    public int getSerializedSize() {
      int size = memoizedSerializedSize;
      if (size != -1) return size;

      size = 0;
      if (((bitField0_ & 0x00000001) == 0x00000001)) {
        size += com.google.protobuf.CodedOutputStream
          .computeBoolSize(1, enabled_);
      }
      if (((bitField0_ & 0x00000002) == 0x00000002)) {
        size += com.google.protobuf.CodedOutputStream
          .computeEnumSize(2, state_.getNumber());
      }
      size += getUnknownFields().getSerializedSize();
      memoizedSerializedSize = size;
      return size;
    }

    private static final long serialVersionUID = 0L;
    @java.lang.Override
    protected java.lang.Object writeReplace()
        throws java.io.ObjectStreamException {
      return super.writeReplace();
    }

    public static gazebo.msgs.GzDriverStation.DriverStation parseFrom(
        com.google.protobuf.ByteString data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }
    public static gazebo.msgs.GzDriverStation.DriverStation parseFrom(
        com.google.protobuf.ByteString data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data, extensionRegistry);
    }
    public static gazebo.msgs.GzDriverStation.DriverStation parseFrom(byte[] data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }
    public static gazebo.msgs.GzDriverStation.DriverStation parseFrom(
        byte[] data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data, extensionRegistry);
    }
    public static gazebo.msgs.GzDriverStation.DriverStation parseFrom(java.io.InputStream input)
        throws java.io.IOException {
      return PARSER.parseFrom(input);
    }
    public static gazebo.msgs.GzDriverStation.DriverStation parseFrom(
        java.io.InputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      return PARSER.parseFrom(input, extensionRegistry);
    }
    public static gazebo.msgs.GzDriverStation.DriverStation parseDelimitedFrom(java.io.InputStream input)
        throws java.io.IOException {
      return PARSER.parseDelimitedFrom(input);
    }
    public static gazebo.msgs.GzDriverStation.DriverStation parseDelimitedFrom(
        java.io.InputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      return PARSER.parseDelimitedFrom(input, extensionRegistry);
    }
    public static gazebo.msgs.GzDriverStation.DriverStation parseFrom(
        com.google.protobuf.CodedInputStream input)
        throws java.io.IOException {
      return PARSER.parseFrom(input);
    }
    public static gazebo.msgs.GzDriverStation.DriverStation parseFrom(
        com.google.protobuf.CodedInputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      return PARSER.parseFrom(input, extensionRegistry);
    }

    public static Builder newBuilder() { return Builder.create(); }
    public Builder newBuilderForType() { return newBuilder(); }
    public static Builder newBuilder(gazebo.msgs.GzDriverStation.DriverStation prototype) {
      return newBuilder().mergeFrom(prototype);
    }
    public Builder toBuilder() { return newBuilder(this); }

    @java.lang.Override
    protected Builder newBuilderForType(
        com.google.protobuf.GeneratedMessage.BuilderParent parent) {
      Builder builder = new Builder(parent);
      return builder;
    }
    /**
     * Protobuf type {@code gazebo.msgs.DriverStation}
     */
    public static final class Builder extends
        com.google.protobuf.GeneratedMessage.Builder<Builder>
       implements gazebo.msgs.GzDriverStation.DriverStationOrBuilder {
      public static final com.google.protobuf.Descriptors.Descriptor
          getDescriptor() {
        return gazebo.msgs.GzDriverStation.internal_static_gazebo_msgs_DriverStation_descriptor;
      }

      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
          internalGetFieldAccessorTable() {
        return gazebo.msgs.GzDriverStation.internal_static_gazebo_msgs_DriverStation_fieldAccessorTable
            .ensureFieldAccessorsInitialized(
                gazebo.msgs.GzDriverStation.DriverStation.class, gazebo.msgs.GzDriverStation.DriverStation.Builder.class);
      }

      // Construct using gazebo.msgs.GzDriveStation.DriverStation.newBuilder()
      private Builder() {
        maybeForceBuilderInitialization();
      }

      private Builder(
          com.google.protobuf.GeneratedMessage.BuilderParent parent) {
        super(parent);
        maybeForceBuilderInitialization();
      }
      private void maybeForceBuilderInitialization() {
        if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) {
        }
      }
      private static Builder create() {
        return new Builder();
      }

      public Builder clear() {
        super.clear();
        enabled_ = false;
        bitField0_ = (bitField0_ & ~0x00000001);
        state_ = gazebo.msgs.GzDriverStation.DriverStation.State.AUTO;
        bitField0_ = (bitField0_ & ~0x00000002);
        return this;
      }

      public Builder clone() {
        return create().mergeFrom(buildPartial());
      }

      public com.google.protobuf.Descriptors.Descriptor
          getDescriptorForType() {
        return gazebo.msgs.GzDriverStation.internal_static_gazebo_msgs_DriverStation_descriptor;
      }

      public gazebo.msgs.GzDriverStation.DriverStation getDefaultInstanceForType() {
        return gazebo.msgs.GzDriverStation.DriverStation.getDefaultInstance();
      }

      public gazebo.msgs.GzDriverStation.DriverStation build() {
        gazebo.msgs.GzDriverStation.DriverStation result = buildPartial();
        if (!result.isInitialized()) {
          throw newUninitializedMessageException(result);
        }
        return result;
      }

      public gazebo.msgs.GzDriverStation.DriverStation buildPartial() {
        gazebo.msgs.GzDriverStation.DriverStation result = new gazebo.msgs.GzDriverStation.DriverStation(this);
        int from_bitField0_ = bitField0_;
        int to_bitField0_ = 0;
        if (((from_bitField0_ & 0x00000001) == 0x00000001)) {
          to_bitField0_ |= 0x00000001;
        }
        result.enabled_ = enabled_;
        if (((from_bitField0_ & 0x00000002) == 0x00000002)) {
          to_bitField0_ |= 0x00000002;
        }
        result.state_ = state_;
        result.bitField0_ = to_bitField0_;
        onBuilt();
        return result;
      }

      public Builder mergeFrom(com.google.protobuf.Message other) {
        if (other instanceof gazebo.msgs.GzDriverStation.DriverStation) {
          return mergeFrom((gazebo.msgs.GzDriverStation.DriverStation)other);
        } else {
          super.mergeFrom(other);
          return this;
        }
      }

      public Builder mergeFrom(gazebo.msgs.GzDriverStation.DriverStation other) {
        if (other == gazebo.msgs.GzDriverStation.DriverStation.getDefaultInstance()) return this;
        if (other.hasEnabled()) {
          setEnabled(other.getEnabled());
        }
        if (other.hasState()) {
          setState(other.getState());
        }
        this.mergeUnknownFields(other.getUnknownFields());
        return this;
      }

      public final boolean isInitialized() {
        if (!hasEnabled()) {
          
          return false;
        }
        if (!hasState()) {
          
          return false;
        }
        return true;
      }

      public Builder mergeFrom(
          com.google.protobuf.CodedInputStream input,
          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
          throws java.io.IOException {
        gazebo.msgs.GzDriverStation.DriverStation parsedMessage = null;
        try {
          parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
        } catch (com.google.protobuf.InvalidProtocolBufferException e) {
          parsedMessage = (gazebo.msgs.GzDriverStation.DriverStation) e.getUnfinishedMessage();
          throw e;
        } finally {
          if (parsedMessage != null) {
            mergeFrom(parsedMessage);
          }
        }
        return this;
      }
      private int bitField0_;

      // required bool enabled = 1;
      private boolean enabled_ ;
      /**
       * <code>required bool enabled = 1;</code>
       */
      public boolean hasEnabled() {
        return ((bitField0_ & 0x00000001) == 0x00000001);
      }
      /**
       * <code>required bool enabled = 1;</code>
       */
      public boolean getEnabled() {
        return enabled_;
      }
      /**
       * <code>required bool enabled = 1;</code>
       */
      public Builder setEnabled(boolean value) {
        bitField0_ |= 0x00000001;
        enabled_ = value;
        onChanged();
        return this;
      }
      /**
       * <code>required bool enabled = 1;</code>
       */
      public Builder clearEnabled() {
        bitField0_ = (bitField0_ & ~0x00000001);
        enabled_ = false;
        onChanged();
        return this;
      }

      // required .gazebo.msgs.DriverStation.State state = 2;
      private gazebo.msgs.GzDriverStation.DriverStation.State state_ = gazebo.msgs.GzDriverStation.DriverStation.State.AUTO;
      /**
       * <code>required .gazebo.msgs.DriverStation.State state = 2;</code>
       */
      public boolean hasState() {
        return ((bitField0_ & 0x00000002) == 0x00000002);
      }
      /**
       * <code>required .gazebo.msgs.DriverStation.State state = 2;</code>
       */
      public gazebo.msgs.GzDriverStation.DriverStation.State getState() {
        return state_;
      }
      /**
       * <code>required .gazebo.msgs.DriverStation.State state = 2;</code>
       */
      public Builder setState(gazebo.msgs.GzDriverStation.DriverStation.State value) {
        if (value == null) {
          throw new NullPointerException();
        }
        bitField0_ |= 0x00000002;
        state_ = value;
        onChanged();
        return this;
      }
      /**
       * <code>required .gazebo.msgs.DriverStation.State state = 2;</code>
       */
      public Builder clearState() {
        bitField0_ = (bitField0_ & ~0x00000002);
        state_ = gazebo.msgs.GzDriverStation.DriverStation.State.AUTO;
        onChanged();
        return this;
      }

      // @@protoc_insertion_point(builder_scope:gazebo.msgs.DriverStation)
    }

    static {
      defaultInstance = new DriverStation(true);
      defaultInstance.initFields();
    }

    // @@protoc_insertion_point(class_scope:gazebo.msgs.DriverStation)
  }

  private static com.google.protobuf.Descriptors.Descriptor
    internal_static_gazebo_msgs_DriverStation_descriptor;
  private static
    com.google.protobuf.GeneratedMessage.FieldAccessorTable
      internal_static_gazebo_msgs_DriverStation_fieldAccessorTable;

  public static com.google.protobuf.Descriptors.FileDescriptor
      getDescriptor() {
    return descriptor;
  }
  private static com.google.protobuf.Descriptors.FileDescriptor
      descriptor;
  static {
    java.lang.String[] descriptorData = {
      "\n+frc_gazebo_plugin/msgs/driver-station." +
      "proto\022\013gazebo.msgs\"z\n\rDriverStation\022\017\n\007e" +
      "nabled\030\001 \002(\010\022/\n\005state\030\002 \002(\0162 .gazebo.msg" +
      "s.DriverStation.State\"\'\n\005State\022\010\n\004AUTO\020\000" +
      "\022\n\n\006TELEOP\020\001\022\010\n\004TEST\020\002B\020B\016GzDriveStation"
    };
    com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner =
      new com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner() {
        public com.google.protobuf.ExtensionRegistry assignDescriptors(
            com.google.protobuf.Descriptors.FileDescriptor root) {
          descriptor = root;
          internal_static_gazebo_msgs_DriverStation_descriptor =
            getDescriptor().getMessageTypes().get(0);
          internal_static_gazebo_msgs_DriverStation_fieldAccessorTable = new
            com.google.protobuf.GeneratedMessage.FieldAccessorTable(
              internal_static_gazebo_msgs_DriverStation_descriptor,
              new java.lang.String[] { "Enabled", "State", });
          return null;
        }
      };
    com.google.protobuf.Descriptors.FileDescriptor
      .internalBuildGeneratedFileFrom(descriptorData,
        new com.google.protobuf.Descriptors.FileDescriptor[] {
        }, assigner);
  }

  // @@protoc_insertion_point(outer_class_scope)
}
