// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: dataset/imagenet-osx-x86_64.proto

package deepdsl.data.imagenet;

public final class ImagenetProtoOSX {
  private ImagenetProtoOSX() {}
  public static void registerAllExtensions(
      com.google.protobuf.ExtensionRegistryLite registry) {
  }

  public static void registerAllExtensions(
      com.google.protobuf.ExtensionRegistry registry) {
    registerAllExtensions(
        (com.google.protobuf.ExtensionRegistryLite) registry);
  }
  public interface DatumOrBuilder extends
      // @@protoc_insertion_point(interface_extends:deepdsl.Datum)
      com.google.protobuf.MessageOrBuilder {

    /**
     * <code>optional int32 channels = 1;</code>
     */
    boolean hasChannels();
    /**
     * <code>optional int32 channels = 1;</code>
     */
    int getChannels();

    /**
     * <code>optional int32 height = 2;</code>
     */
    boolean hasHeight();
    /**
     * <code>optional int32 height = 2;</code>
     */
    int getHeight();

    /**
     * <code>optional int32 width = 3;</code>
     */
    boolean hasWidth();
    /**
     * <code>optional int32 width = 3;</code>
     */
    int getWidth();

    /**
     * <pre>
     * the actual image data, in bytes
     * </pre>
     *
     * <code>optional bytes data = 4;</code>
     */
    boolean hasData();
    /**
     * <pre>
     * the actual image data, in bytes
     * </pre>
     *
     * <code>optional bytes data = 4;</code>
     */
    com.google.protobuf.ByteString getData();

    /**
     * <code>optional int32 label = 5;</code>
     */
    boolean hasLabel();
    /**
     * <code>optional int32 label = 5;</code>
     */
    int getLabel();

    /**
     * <pre>
     * Optionally, the datum could also hold float data.
     * </pre>
     *
     * <code>repeated float float_data = 6;</code>
     */
    java.util.List<java.lang.Float> getFloatDataList();
    /**
     * <pre>
     * Optionally, the datum could also hold float data.
     * </pre>
     *
     * <code>repeated float float_data = 6;</code>
     */
    int getFloatDataCount();
    /**
     * <pre>
     * Optionally, the datum could also hold float data.
     * </pre>
     *
     * <code>repeated float float_data = 6;</code>
     */
    float getFloatData(int index);

    /**
     * <pre>
     * If true data contains an encoded image that need to be decoded
     * </pre>
     *
     * <code>optional bool encoded = 7 [default = false];</code>
     */
    boolean hasEncoded();
    /**
     * <pre>
     * If true data contains an encoded image that need to be decoded
     * </pre>
     *
     * <code>optional bool encoded = 7 [default = false];</code>
     */
    boolean getEncoded();
  }
  /**
   * Protobuf type {@code deepdsl.Datum}
   */
  public  static final class Datum extends
      com.google.protobuf.GeneratedMessageV3 implements
      // @@protoc_insertion_point(message_implements:deepdsl.Datum)
      DatumOrBuilder {
    // Use Datum.newBuilder() to construct.
    private Datum(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
      super(builder);
    }
    private Datum() {
      channels_ = 0;
      height_ = 0;
      width_ = 0;
      data_ = com.google.protobuf.ByteString.EMPTY;
      label_ = 0;
      floatData_ = java.util.Collections.emptyList();
      encoded_ = false;
    }

    @java.lang.Override
    public final com.google.protobuf.UnknownFieldSet
    getUnknownFields() {
      return this.unknownFields;
    }
    private Datum(
        com.google.protobuf.CodedInputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      this();
      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;
              channels_ = input.readInt32();
              break;
            }
            case 16: {
              bitField0_ |= 0x00000002;
              height_ = input.readInt32();
              break;
            }
            case 24: {
              bitField0_ |= 0x00000004;
              width_ = input.readInt32();
              break;
            }
            case 34: {
              bitField0_ |= 0x00000008;
              data_ = input.readBytes();
              break;
            }
            case 40: {
              bitField0_ |= 0x00000010;
              label_ = input.readInt32();
              break;
            }
            case 53: {
              if (!((mutable_bitField0_ & 0x00000020) == 0x00000020)) {
                floatData_ = new java.util.ArrayList<java.lang.Float>();
                mutable_bitField0_ |= 0x00000020;
              }
              floatData_.add(input.readFloat());
              break;
            }
            case 50: {
              int length = input.readRawVarint32();
              int limit = input.pushLimit(length);
              if (!((mutable_bitField0_ & 0x00000020) == 0x00000020) && input.getBytesUntilLimit() > 0) {
                floatData_ = new java.util.ArrayList<java.lang.Float>();
                mutable_bitField0_ |= 0x00000020;
              }
              while (input.getBytesUntilLimit() > 0) {
                floatData_.add(input.readFloat());
              }
              input.popLimit(limit);
              break;
            }
            case 56: {
              bitField0_ |= 0x00000020;
              encoded_ = input.readBool();
              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 {
        if (((mutable_bitField0_ & 0x00000020) == 0x00000020)) {
          floatData_ = java.util.Collections.unmodifiableList(floatData_);
        }
        this.unknownFields = unknownFields.build();
        makeExtensionsImmutable();
      }
    }
    public static final com.google.protobuf.Descriptors.Descriptor
        getDescriptor() {
      return deepdsl.data.imagenet.ImagenetProtoOSX.internal_static_deepdsl_Datum_descriptor;
    }

    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
        internalGetFieldAccessorTable() {
      return deepdsl.data.imagenet.ImagenetProtoOSX.internal_static_deepdsl_Datum_fieldAccessorTable
          .ensureFieldAccessorsInitialized(
              deepdsl.data.imagenet.ImagenetProtoOSX.Datum.class, deepdsl.data.imagenet.ImagenetProtoOSX.Datum.Builder.class);
    }

    private int bitField0_;
    public static final int CHANNELS_FIELD_NUMBER = 1;
    private int channels_;
    /**
     * <code>optional int32 channels = 1;</code>
     */
    public boolean hasChannels() {
      return ((bitField0_ & 0x00000001) == 0x00000001);
    }
    /**
     * <code>optional int32 channels = 1;</code>
     */
    public int getChannels() {
      return channels_;
    }

    public static final int HEIGHT_FIELD_NUMBER = 2;
    private int height_;
    /**
     * <code>optional int32 height = 2;</code>
     */
    public boolean hasHeight() {
      return ((bitField0_ & 0x00000002) == 0x00000002);
    }
    /**
     * <code>optional int32 height = 2;</code>
     */
    public int getHeight() {
      return height_;
    }

    public static final int WIDTH_FIELD_NUMBER = 3;
    private int width_;
    /**
     * <code>optional int32 width = 3;</code>
     */
    public boolean hasWidth() {
      return ((bitField0_ & 0x00000004) == 0x00000004);
    }
    /**
     * <code>optional int32 width = 3;</code>
     */
    public int getWidth() {
      return width_;
    }

    public static final int DATA_FIELD_NUMBER = 4;
    private com.google.protobuf.ByteString data_;
    /**
     * <pre>
     * the actual image data, in bytes
     * </pre>
     *
     * <code>optional bytes data = 4;</code>
     */
    public boolean hasData() {
      return ((bitField0_ & 0x00000008) == 0x00000008);
    }
    /**
     * <pre>
     * the actual image data, in bytes
     * </pre>
     *
     * <code>optional bytes data = 4;</code>
     */
    public com.google.protobuf.ByteString getData() {
      return data_;
    }

    public static final int LABEL_FIELD_NUMBER = 5;
    private int label_;
    /**
     * <code>optional int32 label = 5;</code>
     */
    public boolean hasLabel() {
      return ((bitField0_ & 0x00000010) == 0x00000010);
    }
    /**
     * <code>optional int32 label = 5;</code>
     */
    public int getLabel() {
      return label_;
    }

    public static final int FLOAT_DATA_FIELD_NUMBER = 6;
    private java.util.List<java.lang.Float> floatData_;
    /**
     * <pre>
     * Optionally, the datum could also hold float data.
     * </pre>
     *
     * <code>repeated float float_data = 6;</code>
     */
    public java.util.List<java.lang.Float>
        getFloatDataList() {
      return floatData_;
    }
    /**
     * <pre>
     * Optionally, the datum could also hold float data.
     * </pre>
     *
     * <code>repeated float float_data = 6;</code>
     */
    public int getFloatDataCount() {
      return floatData_.size();
    }
    /**
     * <pre>
     * Optionally, the datum could also hold float data.
     * </pre>
     *
     * <code>repeated float float_data = 6;</code>
     */
    public float getFloatData(int index) {
      return floatData_.get(index);
    }

    public static final int ENCODED_FIELD_NUMBER = 7;
    private boolean encoded_;
    /**
     * <pre>
     * If true data contains an encoded image that need to be decoded
     * </pre>
     *
     * <code>optional bool encoded = 7 [default = false];</code>
     */
    public boolean hasEncoded() {
      return ((bitField0_ & 0x00000020) == 0x00000020);
    }
    /**
     * <pre>
     * If true data contains an encoded image that need to be decoded
     * </pre>
     *
     * <code>optional bool encoded = 7 [default = false];</code>
     */
    public boolean getEncoded() {
      return encoded_;
    }

    private byte memoizedIsInitialized = -1;
    public final boolean isInitialized() {
      byte isInitialized = memoizedIsInitialized;
      if (isInitialized == 1) return true;
      if (isInitialized == 0) return false;

      memoizedIsInitialized = 1;
      return true;
    }

    public void writeTo(com.google.protobuf.CodedOutputStream output)
                        throws java.io.IOException {
      if (((bitField0_ & 0x00000001) == 0x00000001)) {
        output.writeInt32(1, channels_);
      }
      if (((bitField0_ & 0x00000002) == 0x00000002)) {
        output.writeInt32(2, height_);
      }
      if (((bitField0_ & 0x00000004) == 0x00000004)) {
        output.writeInt32(3, width_);
      }
      if (((bitField0_ & 0x00000008) == 0x00000008)) {
        output.writeBytes(4, data_);
      }
      if (((bitField0_ & 0x00000010) == 0x00000010)) {
        output.writeInt32(5, label_);
      }
      for (int i = 0; i < floatData_.size(); i++) {
        output.writeFloat(6, floatData_.get(i));
      }
      if (((bitField0_ & 0x00000020) == 0x00000020)) {
        output.writeBool(7, encoded_);
      }
      unknownFields.writeTo(output);
    }

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

      size = 0;
      if (((bitField0_ & 0x00000001) == 0x00000001)) {
        size += com.google.protobuf.CodedOutputStream
          .computeInt32Size(1, channels_);
      }
      if (((bitField0_ & 0x00000002) == 0x00000002)) {
        size += com.google.protobuf.CodedOutputStream
          .computeInt32Size(2, height_);
      }
      if (((bitField0_ & 0x00000004) == 0x00000004)) {
        size += com.google.protobuf.CodedOutputStream
          .computeInt32Size(3, width_);
      }
      if (((bitField0_ & 0x00000008) == 0x00000008)) {
        size += com.google.protobuf.CodedOutputStream
          .computeBytesSize(4, data_);
      }
      if (((bitField0_ & 0x00000010) == 0x00000010)) {
        size += com.google.protobuf.CodedOutputStream
          .computeInt32Size(5, label_);
      }
      {
        int dataSize = 0;
        dataSize = 4 * getFloatDataList().size();
        size += dataSize;
        size += 1 * getFloatDataList().size();
      }
      if (((bitField0_ & 0x00000020) == 0x00000020)) {
        size += com.google.protobuf.CodedOutputStream
          .computeBoolSize(7, encoded_);
      }
      size += unknownFields.getSerializedSize();
      memoizedSize = size;
      return size;
    }

    private static final long serialVersionUID = 0L;
    @java.lang.Override
    public boolean equals(final java.lang.Object obj) {
      if (obj == this) {
       return true;
      }
      if (!(obj instanceof deepdsl.data.imagenet.ImagenetProtoOSX.Datum)) {
        return super.equals(obj);
      }
      deepdsl.data.imagenet.ImagenetProtoOSX.Datum other = (deepdsl.data.imagenet.ImagenetProtoOSX.Datum) obj;

      boolean result = true;
      result = result && (hasChannels() == other.hasChannels());
      if (hasChannels()) {
        result = result && (getChannels()
            == other.getChannels());
      }
      result = result && (hasHeight() == other.hasHeight());
      if (hasHeight()) {
        result = result && (getHeight()
            == other.getHeight());
      }
      result = result && (hasWidth() == other.hasWidth());
      if (hasWidth()) {
        result = result && (getWidth()
            == other.getWidth());
      }
      result = result && (hasData() == other.hasData());
      if (hasData()) {
        result = result && getData()
            .equals(other.getData());
      }
      result = result && (hasLabel() == other.hasLabel());
      if (hasLabel()) {
        result = result && (getLabel()
            == other.getLabel());
      }
      result = result && getFloatDataList()
          .equals(other.getFloatDataList());
      result = result && (hasEncoded() == other.hasEncoded());
      if (hasEncoded()) {
        result = result && (getEncoded()
            == other.getEncoded());
      }
      result = result && unknownFields.equals(other.unknownFields);
      return result;
    }

    @java.lang.Override
    public int hashCode() {
      if (memoizedHashCode != 0) {
        return memoizedHashCode;
      }
      int hash = 41;
      hash = (19 * hash) + getDescriptorForType().hashCode();
      if (hasChannels()) {
        hash = (37 * hash) + CHANNELS_FIELD_NUMBER;
        hash = (53 * hash) + getChannels();
      }
      if (hasHeight()) {
        hash = (37 * hash) + HEIGHT_FIELD_NUMBER;
        hash = (53 * hash) + getHeight();
      }
      if (hasWidth()) {
        hash = (37 * hash) + WIDTH_FIELD_NUMBER;
        hash = (53 * hash) + getWidth();
      }
      if (hasData()) {
        hash = (37 * hash) + DATA_FIELD_NUMBER;
        hash = (53 * hash) + getData().hashCode();
      }
      if (hasLabel()) {
        hash = (37 * hash) + LABEL_FIELD_NUMBER;
        hash = (53 * hash) + getLabel();
      }
      if (getFloatDataCount() > 0) {
        hash = (37 * hash) + FLOAT_DATA_FIELD_NUMBER;
        hash = (53 * hash) + getFloatDataList().hashCode();
      }
      if (hasEncoded()) {
        hash = (37 * hash) + ENCODED_FIELD_NUMBER;
        hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
            getEncoded());
      }
      hash = (29 * hash) + unknownFields.hashCode();
      memoizedHashCode = hash;
      return hash;
    }

    public static deepdsl.data.imagenet.ImagenetProtoOSX.Datum parseFrom(
        com.google.protobuf.ByteString data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }
    public static deepdsl.data.imagenet.ImagenetProtoOSX.Datum parseFrom(
        com.google.protobuf.ByteString data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data, extensionRegistry);
    }
    public static deepdsl.data.imagenet.ImagenetProtoOSX.Datum parseFrom(byte[] data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }
    public static deepdsl.data.imagenet.ImagenetProtoOSX.Datum parseFrom(
        byte[] data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data, extensionRegistry);
    }
    public static deepdsl.data.imagenet.ImagenetProtoOSX.Datum parseFrom(java.io.InputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3
          .parseWithIOException(PARSER, input);
    }
    public static deepdsl.data.imagenet.ImagenetProtoOSX.Datum 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 deepdsl.data.imagenet.ImagenetProtoOSX.Datum parseDelimitedFrom(java.io.InputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3
          .parseDelimitedWithIOException(PARSER, input);
    }
    public static deepdsl.data.imagenet.ImagenetProtoOSX.Datum 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 deepdsl.data.imagenet.ImagenetProtoOSX.Datum parseFrom(
        com.google.protobuf.CodedInputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3
          .parseWithIOException(PARSER, input);
    }
    public static deepdsl.data.imagenet.ImagenetProtoOSX.Datum parseFrom(
        com.google.protobuf.CodedInputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3
          .parseWithIOException(PARSER, input, extensionRegistry);
    }

    public Builder newBuilderForType() { return newBuilder(); }
    public static Builder newBuilder() {
      return DEFAULT_INSTANCE.toBuilder();
    }
    public static Builder newBuilder(deepdsl.data.imagenet.ImagenetProtoOSX.Datum prototype) {
      return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
    }
    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 deepdsl.Datum}
     */
    public static final class Builder extends
        com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
        // @@protoc_insertion_point(builder_implements:deepdsl.Datum)
        deepdsl.data.imagenet.ImagenetProtoOSX.DatumOrBuilder {
      public static final com.google.protobuf.Descriptors.Descriptor
          getDescriptor() {
        return deepdsl.data.imagenet.ImagenetProtoOSX.internal_static_deepdsl_Datum_descriptor;
      }

      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
          internalGetFieldAccessorTable() {
        return deepdsl.data.imagenet.ImagenetProtoOSX.internal_static_deepdsl_Datum_fieldAccessorTable
            .ensureFieldAccessorsInitialized(
                deepdsl.data.imagenet.ImagenetProtoOSX.Datum.class, deepdsl.data.imagenet.ImagenetProtoOSX.Datum.Builder.class);
      }

      // Construct using deepdsl.data.imagenet.osx.ImagenetProto.Datum.newBuilder()
      private Builder() {
        maybeForceBuilderInitialization();
      }

      private Builder(
          com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
        super(parent);
        maybeForceBuilderInitialization();
      }
      private void maybeForceBuilderInitialization() {
        if (com.google.protobuf.GeneratedMessageV3
                .alwaysUseFieldBuilders) {
        }
      }
      public Builder clear() {
        super.clear();
        channels_ = 0;
        bitField0_ = (bitField0_ & ~0x00000001);
        height_ = 0;
        bitField0_ = (bitField0_ & ~0x00000002);
        width_ = 0;
        bitField0_ = (bitField0_ & ~0x00000004);
        data_ = com.google.protobuf.ByteString.EMPTY;
        bitField0_ = (bitField0_ & ~0x00000008);
        label_ = 0;
        bitField0_ = (bitField0_ & ~0x00000010);
        floatData_ = java.util.Collections.emptyList();
        bitField0_ = (bitField0_ & ~0x00000020);
        encoded_ = false;
        bitField0_ = (bitField0_ & ~0x00000040);
        return this;
      }

      public com.google.protobuf.Descriptors.Descriptor
          getDescriptorForType() {
        return deepdsl.data.imagenet.ImagenetProtoOSX.internal_static_deepdsl_Datum_descriptor;
      }

      public deepdsl.data.imagenet.ImagenetProtoOSX.Datum getDefaultInstanceForType() {
        return deepdsl.data.imagenet.ImagenetProtoOSX.Datum.getDefaultInstance();
      }

      public deepdsl.data.imagenet.ImagenetProtoOSX.Datum build() {
        deepdsl.data.imagenet.ImagenetProtoOSX.Datum result = buildPartial();
        if (!result.isInitialized()) {
          throw newUninitializedMessageException(result);
        }
        return result;
      }

      public deepdsl.data.imagenet.ImagenetProtoOSX.Datum buildPartial() {
        deepdsl.data.imagenet.ImagenetProtoOSX.Datum result = new deepdsl.data.imagenet.ImagenetProtoOSX.Datum(this);
        int from_bitField0_ = bitField0_;
        int to_bitField0_ = 0;
        if (((from_bitField0_ & 0x00000001) == 0x00000001)) {
          to_bitField0_ |= 0x00000001;
        }
        result.channels_ = channels_;
        if (((from_bitField0_ & 0x00000002) == 0x00000002)) {
          to_bitField0_ |= 0x00000002;
        }
        result.height_ = height_;
        if (((from_bitField0_ & 0x00000004) == 0x00000004)) {
          to_bitField0_ |= 0x00000004;
        }
        result.width_ = width_;
        if (((from_bitField0_ & 0x00000008) == 0x00000008)) {
          to_bitField0_ |= 0x00000008;
        }
        result.data_ = data_;
        if (((from_bitField0_ & 0x00000010) == 0x00000010)) {
          to_bitField0_ |= 0x00000010;
        }
        result.label_ = label_;
        if (((bitField0_ & 0x00000020) == 0x00000020)) {
          floatData_ = java.util.Collections.unmodifiableList(floatData_);
          bitField0_ = (bitField0_ & ~0x00000020);
        }
        result.floatData_ = floatData_;
        if (((from_bitField0_ & 0x00000040) == 0x00000040)) {
          to_bitField0_ |= 0x00000020;
        }
        result.encoded_ = encoded_;
        result.bitField0_ = to_bitField0_;
        onBuilt();
        return result;
      }

      public Builder clone() {
        return (Builder) super.clone();
      }
      public Builder setField(
          com.google.protobuf.Descriptors.FieldDescriptor field,
          Object value) {
        return (Builder) super.setField(field, value);
      }
      public Builder clearField(
          com.google.protobuf.Descriptors.FieldDescriptor field) {
        return (Builder) super.clearField(field);
      }
      public Builder clearOneof(
          com.google.protobuf.Descriptors.OneofDescriptor oneof) {
        return (Builder) super.clearOneof(oneof);
      }
      public Builder setRepeatedField(
          com.google.protobuf.Descriptors.FieldDescriptor field,
          int index, Object value) {
        return (Builder) super.setRepeatedField(field, index, value);
      }
      public Builder addRepeatedField(
          com.google.protobuf.Descriptors.FieldDescriptor field,
          Object value) {
        return (Builder) super.addRepeatedField(field, value);
      }
      public Builder mergeFrom(com.google.protobuf.Message other) {
        if (other instanceof deepdsl.data.imagenet.ImagenetProtoOSX.Datum) {
          return mergeFrom((deepdsl.data.imagenet.ImagenetProtoOSX.Datum)other);
        } else {
          super.mergeFrom(other);
          return this;
        }
      }

      public Builder mergeFrom(deepdsl.data.imagenet.ImagenetProtoOSX.Datum other) {
        if (other == deepdsl.data.imagenet.ImagenetProtoOSX.Datum.getDefaultInstance()) return this;
        if (other.hasChannels()) {
          setChannels(other.getChannels());
        }
        if (other.hasHeight()) {
          setHeight(other.getHeight());
        }
        if (other.hasWidth()) {
          setWidth(other.getWidth());
        }
        if (other.hasData()) {
          setData(other.getData());
        }
        if (other.hasLabel()) {
          setLabel(other.getLabel());
        }
        if (!other.floatData_.isEmpty()) {
          if (floatData_.isEmpty()) {
            floatData_ = other.floatData_;
            bitField0_ = (bitField0_ & ~0x00000020);
          } else {
            ensureFloatDataIsMutable();
            floatData_.addAll(other.floatData_);
          }
          onChanged();
        }
        if (other.hasEncoded()) {
          setEncoded(other.getEncoded());
        }
        this.mergeUnknownFields(other.unknownFields);
        onChanged();
        return this;
      }

      public final boolean isInitialized() {
        return true;
      }

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

      private int channels_ ;
      /**
       * <code>optional int32 channels = 1;</code>
       */
      public boolean hasChannels() {
        return ((bitField0_ & 0x00000001) == 0x00000001);
      }
      /**
       * <code>optional int32 channels = 1;</code>
       */
      public int getChannels() {
        return channels_;
      }
      /**
       * <code>optional int32 channels = 1;</code>
       */
      public Builder setChannels(int value) {
        bitField0_ |= 0x00000001;
        channels_ = value;
        onChanged();
        return this;
      }
      /**
       * <code>optional int32 channels = 1;</code>
       */
      public Builder clearChannels() {
        bitField0_ = (bitField0_ & ~0x00000001);
        channels_ = 0;
        onChanged();
        return this;
      }

      private int height_ ;
      /**
       * <code>optional int32 height = 2;</code>
       */
      public boolean hasHeight() {
        return ((bitField0_ & 0x00000002) == 0x00000002);
      }
      /**
       * <code>optional int32 height = 2;</code>
       */
      public int getHeight() {
        return height_;
      }
      /**
       * <code>optional int32 height = 2;</code>
       */
      public Builder setHeight(int value) {
        bitField0_ |= 0x00000002;
        height_ = value;
        onChanged();
        return this;
      }
      /**
       * <code>optional int32 height = 2;</code>
       */
      public Builder clearHeight() {
        bitField0_ = (bitField0_ & ~0x00000002);
        height_ = 0;
        onChanged();
        return this;
      }

      private int width_ ;
      /**
       * <code>optional int32 width = 3;</code>
       */
      public boolean hasWidth() {
        return ((bitField0_ & 0x00000004) == 0x00000004);
      }
      /**
       * <code>optional int32 width = 3;</code>
       */
      public int getWidth() {
        return width_;
      }
      /**
       * <code>optional int32 width = 3;</code>
       */
      public Builder setWidth(int value) {
        bitField0_ |= 0x00000004;
        width_ = value;
        onChanged();
        return this;
      }
      /**
       * <code>optional int32 width = 3;</code>
       */
      public Builder clearWidth() {
        bitField0_ = (bitField0_ & ~0x00000004);
        width_ = 0;
        onChanged();
        return this;
      }

      private com.google.protobuf.ByteString data_ = com.google.protobuf.ByteString.EMPTY;
      /**
       * <pre>
       * the actual image data, in bytes
       * </pre>
       *
       * <code>optional bytes data = 4;</code>
       */
      public boolean hasData() {
        return ((bitField0_ & 0x00000008) == 0x00000008);
      }
      /**
       * <pre>
       * the actual image data, in bytes
       * </pre>
       *
       * <code>optional bytes data = 4;</code>
       */
      public com.google.protobuf.ByteString getData() {
        return data_;
      }
      /**
       * <pre>
       * the actual image data, in bytes
       * </pre>
       *
       * <code>optional bytes data = 4;</code>
       */
      public Builder setData(com.google.protobuf.ByteString value) {
        if (value == null) {
    throw new NullPointerException();
  }
  bitField0_ |= 0x00000008;
        data_ = value;
        onChanged();
        return this;
      }
      /**
       * <pre>
       * the actual image data, in bytes
       * </pre>
       *
       * <code>optional bytes data = 4;</code>
       */
      public Builder clearData() {
        bitField0_ = (bitField0_ & ~0x00000008);
        data_ = getDefaultInstance().getData();
        onChanged();
        return this;
      }

      private int label_ ;
      /**
       * <code>optional int32 label = 5;</code>
       */
      public boolean hasLabel() {
        return ((bitField0_ & 0x00000010) == 0x00000010);
      }
      /**
       * <code>optional int32 label = 5;</code>
       */
      public int getLabel() {
        return label_;
      }
      /**
       * <code>optional int32 label = 5;</code>
       */
      public Builder setLabel(int value) {
        bitField0_ |= 0x00000010;
        label_ = value;
        onChanged();
        return this;
      }
      /**
       * <code>optional int32 label = 5;</code>
       */
      public Builder clearLabel() {
        bitField0_ = (bitField0_ & ~0x00000010);
        label_ = 0;
        onChanged();
        return this;
      }

      private java.util.List<java.lang.Float> floatData_ = java.util.Collections.emptyList();
      private void ensureFloatDataIsMutable() {
        if (!((bitField0_ & 0x00000020) == 0x00000020)) {
          floatData_ = new java.util.ArrayList<java.lang.Float>(floatData_);
          bitField0_ |= 0x00000020;
         }
      }
      /**
       * <pre>
       * Optionally, the datum could also hold float data.
       * </pre>
       *
       * <code>repeated float float_data = 6;</code>
       */
      public java.util.List<java.lang.Float>
          getFloatDataList() {
        return java.util.Collections.unmodifiableList(floatData_);
      }
      /**
       * <pre>
       * Optionally, the datum could also hold float data.
       * </pre>
       *
       * <code>repeated float float_data = 6;</code>
       */
      public int getFloatDataCount() {
        return floatData_.size();
      }
      /**
       * <pre>
       * Optionally, the datum could also hold float data.
       * </pre>
       *
       * <code>repeated float float_data = 6;</code>
       */
      public float getFloatData(int index) {
        return floatData_.get(index);
      }
      /**
       * <pre>
       * Optionally, the datum could also hold float data.
       * </pre>
       *
       * <code>repeated float float_data = 6;</code>
       */
      public Builder setFloatData(
          int index, float value) {
        ensureFloatDataIsMutable();
        floatData_.set(index, value);
        onChanged();
        return this;
      }
      /**
       * <pre>
       * Optionally, the datum could also hold float data.
       * </pre>
       *
       * <code>repeated float float_data = 6;</code>
       */
      public Builder addFloatData(float value) {
        ensureFloatDataIsMutable();
        floatData_.add(value);
        onChanged();
        return this;
      }
      /**
       * <pre>
       * Optionally, the datum could also hold float data.
       * </pre>
       *
       * <code>repeated float float_data = 6;</code>
       */
      public Builder addAllFloatData(
          java.lang.Iterable<? extends java.lang.Float> values) {
        ensureFloatDataIsMutable();
        com.google.protobuf.AbstractMessageLite.Builder.addAll(
            values, floatData_);
        onChanged();
        return this;
      }
      /**
       * <pre>
       * Optionally, the datum could also hold float data.
       * </pre>
       *
       * <code>repeated float float_data = 6;</code>
       */
      public Builder clearFloatData() {
        floatData_ = java.util.Collections.emptyList();
        bitField0_ = (bitField0_ & ~0x00000020);
        onChanged();
        return this;
      }

      private boolean encoded_ ;
      /**
       * <pre>
       * If true data contains an encoded image that need to be decoded
       * </pre>
       *
       * <code>optional bool encoded = 7 [default = false];</code>
       */
      public boolean hasEncoded() {
        return ((bitField0_ & 0x00000040) == 0x00000040);
      }
      /**
       * <pre>
       * If true data contains an encoded image that need to be decoded
       * </pre>
       *
       * <code>optional bool encoded = 7 [default = false];</code>
       */
      public boolean getEncoded() {
        return encoded_;
      }
      /**
       * <pre>
       * If true data contains an encoded image that need to be decoded
       * </pre>
       *
       * <code>optional bool encoded = 7 [default = false];</code>
       */
      public Builder setEncoded(boolean value) {
        bitField0_ |= 0x00000040;
        encoded_ = value;
        onChanged();
        return this;
      }
      /**
       * <pre>
       * If true data contains an encoded image that need to be decoded
       * </pre>
       *
       * <code>optional bool encoded = 7 [default = false];</code>
       */
      public Builder clearEncoded() {
        bitField0_ = (bitField0_ & ~0x00000040);
        encoded_ = false;
        onChanged();
        return this;
      }
      public final Builder setUnknownFields(
          final com.google.protobuf.UnknownFieldSet unknownFields) {
        return super.setUnknownFields(unknownFields);
      }

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


      // @@protoc_insertion_point(builder_scope:deepdsl.Datum)
    }

    // @@protoc_insertion_point(class_scope:deepdsl.Datum)
    private static final deepdsl.data.imagenet.ImagenetProtoOSX.Datum DEFAULT_INSTANCE;
    static {
      DEFAULT_INSTANCE = new deepdsl.data.imagenet.ImagenetProtoOSX.Datum();
    }

    public static deepdsl.data.imagenet.ImagenetProtoOSX.Datum getDefaultInstance() {
      return DEFAULT_INSTANCE;
    }

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

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

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

    public deepdsl.data.imagenet.ImagenetProtoOSX.Datum getDefaultInstanceForType() {
      return DEFAULT_INSTANCE;
    }

  }

  private static final com.google.protobuf.Descriptors.Descriptor
    internal_static_deepdsl_Datum_descriptor;
  private static final 
    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
      internal_static_deepdsl_Datum_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!dataset/imagenet-osx-x86_64.proto\022\007dee" +
      "pdsl\"\201\001\n\005Datum\022\020\n\010channels\030\001 \001(\005\022\016\n\006heig" +
      "ht\030\002 \001(\005\022\r\n\005width\030\003 \001(\005\022\014\n\004data\030\004 \001(\014\022\r\n" +
      "\005label\030\005 \001(\005\022\022\n\nfloat_data\030\006 \003(\002\022\026\n\007enco" +
      "ded\030\007 \001(\010:\005falseB*\n\031deepdsl.data.imagene" +
      "t.osxB\rImagenetProto"
    };
    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;
            return null;
          }
        };
    com.google.protobuf.Descriptors.FileDescriptor
      .internalBuildGeneratedFileFrom(descriptorData,
        new com.google.protobuf.Descriptors.FileDescriptor[] {
        }, assigner);
    internal_static_deepdsl_Datum_descriptor =
      getDescriptor().getMessageTypes().get(0);
    internal_static_deepdsl_Datum_fieldAccessorTable = new
      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
        internal_static_deepdsl_Datum_descriptor,
        new java.lang.String[] { "Channels", "Height", "Width", "Data", "Label", "FloatData", "Encoded", });
  }

  // @@protoc_insertion_point(outer_class_scope)
}
