// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: tensorflow/core/framework/dataset_options.proto

package org.tensorflow.proto.data;

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

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

  @java.lang.Override
  public final com.google.protobuf.UnknownFieldSet
  getUnknownFields() {
    return this.unknownFields;
  }
  private OptimizationOptions(
      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 8: {
            optionalApplyDefaultOptimizationsCase_ = 1;
            optionalApplyDefaultOptimizations_ = input.readBool();
            break;
          }
          case 48: {
            optionalFilterFusionCase_ = 6;
            optionalFilterFusion_ = input.readBool();
            break;
          }
          case 72: {
            optionalMapAndBatchFusionCase_ = 9;
            optionalMapAndBatchFusion_ = input.readBool();
            break;
          }
          case 80: {
            optionalMapAndFilterFusionCase_ = 10;
            optionalMapAndFilterFusion_ = input.readBool();
            break;
          }
          case 88: {
            optionalMapFusionCase_ = 11;
            optionalMapFusion_ = input.readBool();
            break;
          }
          case 96: {
            optionalMapParallelizationCase_ = 12;
            optionalMapParallelization_ = input.readBool();
            break;
          }
          case 112: {
            optionalNoopEliminationCase_ = 14;
            optionalNoopElimination_ = input.readBool();
            break;
          }
          case 120: {
            optionalParallelBatchCase_ = 15;
            optionalParallelBatch_ = input.readBool();
            break;
          }
          case 136: {
            optionalShuffleAndRepeatFusionCase_ = 17;
            optionalShuffleAndRepeatFusion_ = input.readBool();
            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 org.tensorflow.proto.data.DatasetOptionsProtos.internal_static_tensorflow_data_OptimizationOptions_descriptor;
  }

  @java.lang.Override
  protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
      internalGetFieldAccessorTable() {
    return org.tensorflow.proto.data.DatasetOptionsProtos.internal_static_tensorflow_data_OptimizationOptions_fieldAccessorTable
        .ensureFieldAccessorsInitialized(
            org.tensorflow.proto.data.OptimizationOptions.class, org.tensorflow.proto.data.OptimizationOptions.Builder.class);
  }

  private int optionalApplyDefaultOptimizationsCase_ = 0;
  private java.lang.Object optionalApplyDefaultOptimizations_;
  public enum OptionalApplyDefaultOptimizationsCase
      implements com.google.protobuf.Internal.EnumLite {
    APPLY_DEFAULT_OPTIMIZATIONS(1),
    OPTIONALAPPLYDEFAULTOPTIMIZATIONS_NOT_SET(0);
    private final int value;
    private OptionalApplyDefaultOptimizationsCase(int value) {
      this.value = value;
    }
    /**
     * @deprecated Use {@link #forNumber(int)} instead.
     */
    @java.lang.Deprecated
    public static OptionalApplyDefaultOptimizationsCase valueOf(int value) {
      return forNumber(value);
    }

    public static OptionalApplyDefaultOptimizationsCase forNumber(int value) {
      switch (value) {
        case 1: return APPLY_DEFAULT_OPTIMIZATIONS;
        case 0: return OPTIONALAPPLYDEFAULTOPTIMIZATIONS_NOT_SET;
        default: return null;
      }
    }
    public int getNumber() {
      return this.value;
    }
  };

  public OptionalApplyDefaultOptimizationsCase
  getOptionalApplyDefaultOptimizationsCase() {
    return OptionalApplyDefaultOptimizationsCase.forNumber(
        optionalApplyDefaultOptimizationsCase_);
  }

  private int optionalFilterFusionCase_ = 0;
  private java.lang.Object optionalFilterFusion_;
  public enum OptionalFilterFusionCase
      implements com.google.protobuf.Internal.EnumLite {
    FILTER_FUSION(6),
    OPTIONALFILTERFUSION_NOT_SET(0);
    private final int value;
    private OptionalFilterFusionCase(int value) {
      this.value = value;
    }
    /**
     * @deprecated Use {@link #forNumber(int)} instead.
     */
    @java.lang.Deprecated
    public static OptionalFilterFusionCase valueOf(int value) {
      return forNumber(value);
    }

    public static OptionalFilterFusionCase forNumber(int value) {
      switch (value) {
        case 6: return FILTER_FUSION;
        case 0: return OPTIONALFILTERFUSION_NOT_SET;
        default: return null;
      }
    }
    public int getNumber() {
      return this.value;
    }
  };

  public OptionalFilterFusionCase
  getOptionalFilterFusionCase() {
    return OptionalFilterFusionCase.forNumber(
        optionalFilterFusionCase_);
  }

  private int optionalMapAndBatchFusionCase_ = 0;
  private java.lang.Object optionalMapAndBatchFusion_;
  public enum OptionalMapAndBatchFusionCase
      implements com.google.protobuf.Internal.EnumLite {
    MAP_AND_BATCH_FUSION(9),
    OPTIONALMAPANDBATCHFUSION_NOT_SET(0);
    private final int value;
    private OptionalMapAndBatchFusionCase(int value) {
      this.value = value;
    }
    /**
     * @deprecated Use {@link #forNumber(int)} instead.
     */
    @java.lang.Deprecated
    public static OptionalMapAndBatchFusionCase valueOf(int value) {
      return forNumber(value);
    }

    public static OptionalMapAndBatchFusionCase forNumber(int value) {
      switch (value) {
        case 9: return MAP_AND_BATCH_FUSION;
        case 0: return OPTIONALMAPANDBATCHFUSION_NOT_SET;
        default: return null;
      }
    }
    public int getNumber() {
      return this.value;
    }
  };

  public OptionalMapAndBatchFusionCase
  getOptionalMapAndBatchFusionCase() {
    return OptionalMapAndBatchFusionCase.forNumber(
        optionalMapAndBatchFusionCase_);
  }

  private int optionalMapAndFilterFusionCase_ = 0;
  private java.lang.Object optionalMapAndFilterFusion_;
  public enum OptionalMapAndFilterFusionCase
      implements com.google.protobuf.Internal.EnumLite {
    MAP_AND_FILTER_FUSION(10),
    OPTIONALMAPANDFILTERFUSION_NOT_SET(0);
    private final int value;
    private OptionalMapAndFilterFusionCase(int value) {
      this.value = value;
    }
    /**
     * @deprecated Use {@link #forNumber(int)} instead.
     */
    @java.lang.Deprecated
    public static OptionalMapAndFilterFusionCase valueOf(int value) {
      return forNumber(value);
    }

    public static OptionalMapAndFilterFusionCase forNumber(int value) {
      switch (value) {
        case 10: return MAP_AND_FILTER_FUSION;
        case 0: return OPTIONALMAPANDFILTERFUSION_NOT_SET;
        default: return null;
      }
    }
    public int getNumber() {
      return this.value;
    }
  };

  public OptionalMapAndFilterFusionCase
  getOptionalMapAndFilterFusionCase() {
    return OptionalMapAndFilterFusionCase.forNumber(
        optionalMapAndFilterFusionCase_);
  }

  private int optionalMapFusionCase_ = 0;
  private java.lang.Object optionalMapFusion_;
  public enum OptionalMapFusionCase
      implements com.google.protobuf.Internal.EnumLite {
    MAP_FUSION(11),
    OPTIONALMAPFUSION_NOT_SET(0);
    private final int value;
    private OptionalMapFusionCase(int value) {
      this.value = value;
    }
    /**
     * @deprecated Use {@link #forNumber(int)} instead.
     */
    @java.lang.Deprecated
    public static OptionalMapFusionCase valueOf(int value) {
      return forNumber(value);
    }

    public static OptionalMapFusionCase forNumber(int value) {
      switch (value) {
        case 11: return MAP_FUSION;
        case 0: return OPTIONALMAPFUSION_NOT_SET;
        default: return null;
      }
    }
    public int getNumber() {
      return this.value;
    }
  };

  public OptionalMapFusionCase
  getOptionalMapFusionCase() {
    return OptionalMapFusionCase.forNumber(
        optionalMapFusionCase_);
  }

  private int optionalMapParallelizationCase_ = 0;
  private java.lang.Object optionalMapParallelization_;
  public enum OptionalMapParallelizationCase
      implements com.google.protobuf.Internal.EnumLite {
    MAP_PARALLELIZATION(12),
    OPTIONALMAPPARALLELIZATION_NOT_SET(0);
    private final int value;
    private OptionalMapParallelizationCase(int value) {
      this.value = value;
    }
    /**
     * @deprecated Use {@link #forNumber(int)} instead.
     */
    @java.lang.Deprecated
    public static OptionalMapParallelizationCase valueOf(int value) {
      return forNumber(value);
    }

    public static OptionalMapParallelizationCase forNumber(int value) {
      switch (value) {
        case 12: return MAP_PARALLELIZATION;
        case 0: return OPTIONALMAPPARALLELIZATION_NOT_SET;
        default: return null;
      }
    }
    public int getNumber() {
      return this.value;
    }
  };

  public OptionalMapParallelizationCase
  getOptionalMapParallelizationCase() {
    return OptionalMapParallelizationCase.forNumber(
        optionalMapParallelizationCase_);
  }

  private int optionalNoopEliminationCase_ = 0;
  private java.lang.Object optionalNoopElimination_;
  public enum OptionalNoopEliminationCase
      implements com.google.protobuf.Internal.EnumLite {
    NOOP_ELIMINATION(14),
    OPTIONALNOOPELIMINATION_NOT_SET(0);
    private final int value;
    private OptionalNoopEliminationCase(int value) {
      this.value = value;
    }
    /**
     * @deprecated Use {@link #forNumber(int)} instead.
     */
    @java.lang.Deprecated
    public static OptionalNoopEliminationCase valueOf(int value) {
      return forNumber(value);
    }

    public static OptionalNoopEliminationCase forNumber(int value) {
      switch (value) {
        case 14: return NOOP_ELIMINATION;
        case 0: return OPTIONALNOOPELIMINATION_NOT_SET;
        default: return null;
      }
    }
    public int getNumber() {
      return this.value;
    }
  };

  public OptionalNoopEliminationCase
  getOptionalNoopEliminationCase() {
    return OptionalNoopEliminationCase.forNumber(
        optionalNoopEliminationCase_);
  }

  private int optionalParallelBatchCase_ = 0;
  private java.lang.Object optionalParallelBatch_;
  public enum OptionalParallelBatchCase
      implements com.google.protobuf.Internal.EnumLite {
    PARALLEL_BATCH(15),
    OPTIONALPARALLELBATCH_NOT_SET(0);
    private final int value;
    private OptionalParallelBatchCase(int value) {
      this.value = value;
    }
    /**
     * @deprecated Use {@link #forNumber(int)} instead.
     */
    @java.lang.Deprecated
    public static OptionalParallelBatchCase valueOf(int value) {
      return forNumber(value);
    }

    public static OptionalParallelBatchCase forNumber(int value) {
      switch (value) {
        case 15: return PARALLEL_BATCH;
        case 0: return OPTIONALPARALLELBATCH_NOT_SET;
        default: return null;
      }
    }
    public int getNumber() {
      return this.value;
    }
  };

  public OptionalParallelBatchCase
  getOptionalParallelBatchCase() {
    return OptionalParallelBatchCase.forNumber(
        optionalParallelBatchCase_);
  }

  private int optionalShuffleAndRepeatFusionCase_ = 0;
  private java.lang.Object optionalShuffleAndRepeatFusion_;
  public enum OptionalShuffleAndRepeatFusionCase
      implements com.google.protobuf.Internal.EnumLite {
    SHUFFLE_AND_REPEAT_FUSION(17),
    OPTIONALSHUFFLEANDREPEATFUSION_NOT_SET(0);
    private final int value;
    private OptionalShuffleAndRepeatFusionCase(int value) {
      this.value = value;
    }
    /**
     * @deprecated Use {@link #forNumber(int)} instead.
     */
    @java.lang.Deprecated
    public static OptionalShuffleAndRepeatFusionCase valueOf(int value) {
      return forNumber(value);
    }

    public static OptionalShuffleAndRepeatFusionCase forNumber(int value) {
      switch (value) {
        case 17: return SHUFFLE_AND_REPEAT_FUSION;
        case 0: return OPTIONALSHUFFLEANDREPEATFUSION_NOT_SET;
        default: return null;
      }
    }
    public int getNumber() {
      return this.value;
    }
  };

  public OptionalShuffleAndRepeatFusionCase
  getOptionalShuffleAndRepeatFusionCase() {
    return OptionalShuffleAndRepeatFusionCase.forNumber(
        optionalShuffleAndRepeatFusionCase_);
  }

  public static final int APPLY_DEFAULT_OPTIMIZATIONS_FIELD_NUMBER = 1;
  /**
   * <code>bool apply_default_optimizations = 1;</code>
   */
  public boolean getApplyDefaultOptimizations() {
    if (optionalApplyDefaultOptimizationsCase_ == 1) {
      return (java.lang.Boolean) optionalApplyDefaultOptimizations_;
    }
    return false;
  }

  public static final int FILTER_FUSION_FIELD_NUMBER = 6;
  /**
   * <code>bool filter_fusion = 6;</code>
   */
  public boolean getFilterFusion() {
    if (optionalFilterFusionCase_ == 6) {
      return (java.lang.Boolean) optionalFilterFusion_;
    }
    return false;
  }

  public static final int MAP_AND_BATCH_FUSION_FIELD_NUMBER = 9;
  /**
   * <code>bool map_and_batch_fusion = 9;</code>
   */
  public boolean getMapAndBatchFusion() {
    if (optionalMapAndBatchFusionCase_ == 9) {
      return (java.lang.Boolean) optionalMapAndBatchFusion_;
    }
    return false;
  }

  public static final int MAP_AND_FILTER_FUSION_FIELD_NUMBER = 10;
  /**
   * <code>bool map_and_filter_fusion = 10;</code>
   */
  public boolean getMapAndFilterFusion() {
    if (optionalMapAndFilterFusionCase_ == 10) {
      return (java.lang.Boolean) optionalMapAndFilterFusion_;
    }
    return false;
  }

  public static final int MAP_FUSION_FIELD_NUMBER = 11;
  /**
   * <code>bool map_fusion = 11;</code>
   */
  public boolean getMapFusion() {
    if (optionalMapFusionCase_ == 11) {
      return (java.lang.Boolean) optionalMapFusion_;
    }
    return false;
  }

  public static final int MAP_PARALLELIZATION_FIELD_NUMBER = 12;
  /**
   * <code>bool map_parallelization = 12;</code>
   */
  public boolean getMapParallelization() {
    if (optionalMapParallelizationCase_ == 12) {
      return (java.lang.Boolean) optionalMapParallelization_;
    }
    return false;
  }

  public static final int NOOP_ELIMINATION_FIELD_NUMBER = 14;
  /**
   * <code>bool noop_elimination = 14;</code>
   */
  public boolean getNoopElimination() {
    if (optionalNoopEliminationCase_ == 14) {
      return (java.lang.Boolean) optionalNoopElimination_;
    }
    return false;
  }

  public static final int PARALLEL_BATCH_FIELD_NUMBER = 15;
  /**
   * <code>bool parallel_batch = 15;</code>
   */
  public boolean getParallelBatch() {
    if (optionalParallelBatchCase_ == 15) {
      return (java.lang.Boolean) optionalParallelBatch_;
    }
    return false;
  }

  public static final int SHUFFLE_AND_REPEAT_FUSION_FIELD_NUMBER = 17;
  /**
   * <code>bool shuffle_and_repeat_fusion = 17;</code>
   */
  public boolean getShuffleAndRepeatFusion() {
    if (optionalShuffleAndRepeatFusionCase_ == 17) {
      return (java.lang.Boolean) optionalShuffleAndRepeatFusion_;
    }
    return false;
  }

  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 (optionalApplyDefaultOptimizationsCase_ == 1) {
      output.writeBool(
          1, (boolean)((java.lang.Boolean) optionalApplyDefaultOptimizations_));
    }
    if (optionalFilterFusionCase_ == 6) {
      output.writeBool(
          6, (boolean)((java.lang.Boolean) optionalFilterFusion_));
    }
    if (optionalMapAndBatchFusionCase_ == 9) {
      output.writeBool(
          9, (boolean)((java.lang.Boolean) optionalMapAndBatchFusion_));
    }
    if (optionalMapAndFilterFusionCase_ == 10) {
      output.writeBool(
          10, (boolean)((java.lang.Boolean) optionalMapAndFilterFusion_));
    }
    if (optionalMapFusionCase_ == 11) {
      output.writeBool(
          11, (boolean)((java.lang.Boolean) optionalMapFusion_));
    }
    if (optionalMapParallelizationCase_ == 12) {
      output.writeBool(
          12, (boolean)((java.lang.Boolean) optionalMapParallelization_));
    }
    if (optionalNoopEliminationCase_ == 14) {
      output.writeBool(
          14, (boolean)((java.lang.Boolean) optionalNoopElimination_));
    }
    if (optionalParallelBatchCase_ == 15) {
      output.writeBool(
          15, (boolean)((java.lang.Boolean) optionalParallelBatch_));
    }
    if (optionalShuffleAndRepeatFusionCase_ == 17) {
      output.writeBool(
          17, (boolean)((java.lang.Boolean) optionalShuffleAndRepeatFusion_));
    }
    unknownFields.writeTo(output);
  }

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

    size = 0;
    if (optionalApplyDefaultOptimizationsCase_ == 1) {
      size += com.google.protobuf.CodedOutputStream
        .computeBoolSize(
            1, (boolean)((java.lang.Boolean) optionalApplyDefaultOptimizations_));
    }
    if (optionalFilterFusionCase_ == 6) {
      size += com.google.protobuf.CodedOutputStream
        .computeBoolSize(
            6, (boolean)((java.lang.Boolean) optionalFilterFusion_));
    }
    if (optionalMapAndBatchFusionCase_ == 9) {
      size += com.google.protobuf.CodedOutputStream
        .computeBoolSize(
            9, (boolean)((java.lang.Boolean) optionalMapAndBatchFusion_));
    }
    if (optionalMapAndFilterFusionCase_ == 10) {
      size += com.google.protobuf.CodedOutputStream
        .computeBoolSize(
            10, (boolean)((java.lang.Boolean) optionalMapAndFilterFusion_));
    }
    if (optionalMapFusionCase_ == 11) {
      size += com.google.protobuf.CodedOutputStream
        .computeBoolSize(
            11, (boolean)((java.lang.Boolean) optionalMapFusion_));
    }
    if (optionalMapParallelizationCase_ == 12) {
      size += com.google.protobuf.CodedOutputStream
        .computeBoolSize(
            12, (boolean)((java.lang.Boolean) optionalMapParallelization_));
    }
    if (optionalNoopEliminationCase_ == 14) {
      size += com.google.protobuf.CodedOutputStream
        .computeBoolSize(
            14, (boolean)((java.lang.Boolean) optionalNoopElimination_));
    }
    if (optionalParallelBatchCase_ == 15) {
      size += com.google.protobuf.CodedOutputStream
        .computeBoolSize(
            15, (boolean)((java.lang.Boolean) optionalParallelBatch_));
    }
    if (optionalShuffleAndRepeatFusionCase_ == 17) {
      size += com.google.protobuf.CodedOutputStream
        .computeBoolSize(
            17, (boolean)((java.lang.Boolean) optionalShuffleAndRepeatFusion_));
    }
    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 org.tensorflow.proto.data.OptimizationOptions)) {
      return super.equals(obj);
    }
    org.tensorflow.proto.data.OptimizationOptions other = (org.tensorflow.proto.data.OptimizationOptions) obj;

    if (!getOptionalApplyDefaultOptimizationsCase().equals(other.getOptionalApplyDefaultOptimizationsCase())) return false;
    switch (optionalApplyDefaultOptimizationsCase_) {
      case 1:
        if (getApplyDefaultOptimizations()
            != other.getApplyDefaultOptimizations()) return false;
        break;
      case 0:
      default:
    }
    if (!getOptionalFilterFusionCase().equals(other.getOptionalFilterFusionCase())) return false;
    switch (optionalFilterFusionCase_) {
      case 6:
        if (getFilterFusion()
            != other.getFilterFusion()) return false;
        break;
      case 0:
      default:
    }
    if (!getOptionalMapAndBatchFusionCase().equals(other.getOptionalMapAndBatchFusionCase())) return false;
    switch (optionalMapAndBatchFusionCase_) {
      case 9:
        if (getMapAndBatchFusion()
            != other.getMapAndBatchFusion()) return false;
        break;
      case 0:
      default:
    }
    if (!getOptionalMapAndFilterFusionCase().equals(other.getOptionalMapAndFilterFusionCase())) return false;
    switch (optionalMapAndFilterFusionCase_) {
      case 10:
        if (getMapAndFilterFusion()
            != other.getMapAndFilterFusion()) return false;
        break;
      case 0:
      default:
    }
    if (!getOptionalMapFusionCase().equals(other.getOptionalMapFusionCase())) return false;
    switch (optionalMapFusionCase_) {
      case 11:
        if (getMapFusion()
            != other.getMapFusion()) return false;
        break;
      case 0:
      default:
    }
    if (!getOptionalMapParallelizationCase().equals(other.getOptionalMapParallelizationCase())) return false;
    switch (optionalMapParallelizationCase_) {
      case 12:
        if (getMapParallelization()
            != other.getMapParallelization()) return false;
        break;
      case 0:
      default:
    }
    if (!getOptionalNoopEliminationCase().equals(other.getOptionalNoopEliminationCase())) return false;
    switch (optionalNoopEliminationCase_) {
      case 14:
        if (getNoopElimination()
            != other.getNoopElimination()) return false;
        break;
      case 0:
      default:
    }
    if (!getOptionalParallelBatchCase().equals(other.getOptionalParallelBatchCase())) return false;
    switch (optionalParallelBatchCase_) {
      case 15:
        if (getParallelBatch()
            != other.getParallelBatch()) return false;
        break;
      case 0:
      default:
    }
    if (!getOptionalShuffleAndRepeatFusionCase().equals(other.getOptionalShuffleAndRepeatFusionCase())) return false;
    switch (optionalShuffleAndRepeatFusionCase_) {
      case 17:
        if (getShuffleAndRepeatFusion()
            != other.getShuffleAndRepeatFusion()) return false;
        break;
      case 0:
      default:
    }
    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();
    switch (optionalApplyDefaultOptimizationsCase_) {
      case 1:
        hash = (37 * hash) + APPLY_DEFAULT_OPTIMIZATIONS_FIELD_NUMBER;
        hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
            getApplyDefaultOptimizations());
        break;
      case 0:
      default:
    }
    switch (optionalFilterFusionCase_) {
      case 6:
        hash = (37 * hash) + FILTER_FUSION_FIELD_NUMBER;
        hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
            getFilterFusion());
        break;
      case 0:
      default:
    }
    switch (optionalMapAndBatchFusionCase_) {
      case 9:
        hash = (37 * hash) + MAP_AND_BATCH_FUSION_FIELD_NUMBER;
        hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
            getMapAndBatchFusion());
        break;
      case 0:
      default:
    }
    switch (optionalMapAndFilterFusionCase_) {
      case 10:
        hash = (37 * hash) + MAP_AND_FILTER_FUSION_FIELD_NUMBER;
        hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
            getMapAndFilterFusion());
        break;
      case 0:
      default:
    }
    switch (optionalMapFusionCase_) {
      case 11:
        hash = (37 * hash) + MAP_FUSION_FIELD_NUMBER;
        hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
            getMapFusion());
        break;
      case 0:
      default:
    }
    switch (optionalMapParallelizationCase_) {
      case 12:
        hash = (37 * hash) + MAP_PARALLELIZATION_FIELD_NUMBER;
        hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
            getMapParallelization());
        break;
      case 0:
      default:
    }
    switch (optionalNoopEliminationCase_) {
      case 14:
        hash = (37 * hash) + NOOP_ELIMINATION_FIELD_NUMBER;
        hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
            getNoopElimination());
        break;
      case 0:
      default:
    }
    switch (optionalParallelBatchCase_) {
      case 15:
        hash = (37 * hash) + PARALLEL_BATCH_FIELD_NUMBER;
        hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
            getParallelBatch());
        break;
      case 0:
      default:
    }
    switch (optionalShuffleAndRepeatFusionCase_) {
      case 17:
        hash = (37 * hash) + SHUFFLE_AND_REPEAT_FUSION_FIELD_NUMBER;
        hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
            getShuffleAndRepeatFusion());
        break;
      case 0:
      default:
    }
    hash = (29 * hash) + unknownFields.hashCode();
    memoizedHashCode = hash;
    return hash;
  }

  public static org.tensorflow.proto.data.OptimizationOptions parseFrom(
      java.nio.ByteBuffer data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }
  public static org.tensorflow.proto.data.OptimizationOptions parseFrom(
      java.nio.ByteBuffer data,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data, extensionRegistry);
  }
  public static org.tensorflow.proto.data.OptimizationOptions parseFrom(
      com.google.protobuf.ByteString data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }
  public static org.tensorflow.proto.data.OptimizationOptions parseFrom(
      com.google.protobuf.ByteString data,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data, extensionRegistry);
  }
  public static org.tensorflow.proto.data.OptimizationOptions parseFrom(byte[] data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }
  public static org.tensorflow.proto.data.OptimizationOptions parseFrom(
      byte[] data,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data, extensionRegistry);
  }
  public static org.tensorflow.proto.data.OptimizationOptions parseFrom(java.io.InputStream input)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3
        .parseWithIOException(PARSER, input);
  }
  public static org.tensorflow.proto.data.OptimizationOptions 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 org.tensorflow.proto.data.OptimizationOptions parseDelimitedFrom(java.io.InputStream input)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3
        .parseDelimitedWithIOException(PARSER, input);
  }
  public static org.tensorflow.proto.data.OptimizationOptions 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 org.tensorflow.proto.data.OptimizationOptions parseFrom(
      com.google.protobuf.CodedInputStream input)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3
        .parseWithIOException(PARSER, input);
  }
  public static org.tensorflow.proto.data.OptimizationOptions 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(org.tensorflow.proto.data.OptimizationOptions 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;
  }
  /**
   * <pre>
   * next: 18
   * </pre>
   *
   * Protobuf type {@code tensorflow.data.OptimizationOptions}
   */
  public static final class Builder extends
      com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
      // @@protoc_insertion_point(builder_implements:tensorflow.data.OptimizationOptions)
      org.tensorflow.proto.data.OptimizationOptionsOrBuilder {
    public static final com.google.protobuf.Descriptors.Descriptor
        getDescriptor() {
      return org.tensorflow.proto.data.DatasetOptionsProtos.internal_static_tensorflow_data_OptimizationOptions_descriptor;
    }

    @java.lang.Override
    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
        internalGetFieldAccessorTable() {
      return org.tensorflow.proto.data.DatasetOptionsProtos.internal_static_tensorflow_data_OptimizationOptions_fieldAccessorTable
          .ensureFieldAccessorsInitialized(
              org.tensorflow.proto.data.OptimizationOptions.class, org.tensorflow.proto.data.OptimizationOptions.Builder.class);
    }

    // Construct using org.tensorflow.proto.data.OptimizationOptions.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();
      optionalApplyDefaultOptimizationsCase_ = 0;
      optionalApplyDefaultOptimizations_ = null;
      optionalFilterFusionCase_ = 0;
      optionalFilterFusion_ = null;
      optionalMapAndBatchFusionCase_ = 0;
      optionalMapAndBatchFusion_ = null;
      optionalMapAndFilterFusionCase_ = 0;
      optionalMapAndFilterFusion_ = null;
      optionalMapFusionCase_ = 0;
      optionalMapFusion_ = null;
      optionalMapParallelizationCase_ = 0;
      optionalMapParallelization_ = null;
      optionalNoopEliminationCase_ = 0;
      optionalNoopElimination_ = null;
      optionalParallelBatchCase_ = 0;
      optionalParallelBatch_ = null;
      optionalShuffleAndRepeatFusionCase_ = 0;
      optionalShuffleAndRepeatFusion_ = null;
      return this;
    }

    @java.lang.Override
    public com.google.protobuf.Descriptors.Descriptor
        getDescriptorForType() {
      return org.tensorflow.proto.data.DatasetOptionsProtos.internal_static_tensorflow_data_OptimizationOptions_descriptor;
    }

    @java.lang.Override
    public org.tensorflow.proto.data.OptimizationOptions getDefaultInstanceForType() {
      return org.tensorflow.proto.data.OptimizationOptions.getDefaultInstance();
    }

    @java.lang.Override
    public org.tensorflow.proto.data.OptimizationOptions build() {
      org.tensorflow.proto.data.OptimizationOptions result = buildPartial();
      if (!result.isInitialized()) {
        throw newUninitializedMessageException(result);
      }
      return result;
    }

    @java.lang.Override
    public org.tensorflow.proto.data.OptimizationOptions buildPartial() {
      org.tensorflow.proto.data.OptimizationOptions result = new org.tensorflow.proto.data.OptimizationOptions(this);
      if (optionalApplyDefaultOptimizationsCase_ == 1) {
        result.optionalApplyDefaultOptimizations_ = optionalApplyDefaultOptimizations_;
      }
      if (optionalFilterFusionCase_ == 6) {
        result.optionalFilterFusion_ = optionalFilterFusion_;
      }
      if (optionalMapAndBatchFusionCase_ == 9) {
        result.optionalMapAndBatchFusion_ = optionalMapAndBatchFusion_;
      }
      if (optionalMapAndFilterFusionCase_ == 10) {
        result.optionalMapAndFilterFusion_ = optionalMapAndFilterFusion_;
      }
      if (optionalMapFusionCase_ == 11) {
        result.optionalMapFusion_ = optionalMapFusion_;
      }
      if (optionalMapParallelizationCase_ == 12) {
        result.optionalMapParallelization_ = optionalMapParallelization_;
      }
      if (optionalNoopEliminationCase_ == 14) {
        result.optionalNoopElimination_ = optionalNoopElimination_;
      }
      if (optionalParallelBatchCase_ == 15) {
        result.optionalParallelBatch_ = optionalParallelBatch_;
      }
      if (optionalShuffleAndRepeatFusionCase_ == 17) {
        result.optionalShuffleAndRepeatFusion_ = optionalShuffleAndRepeatFusion_;
      }
      result.optionalApplyDefaultOptimizationsCase_ = optionalApplyDefaultOptimizationsCase_;
      result.optionalFilterFusionCase_ = optionalFilterFusionCase_;
      result.optionalMapAndBatchFusionCase_ = optionalMapAndBatchFusionCase_;
      result.optionalMapAndFilterFusionCase_ = optionalMapAndFilterFusionCase_;
      result.optionalMapFusionCase_ = optionalMapFusionCase_;
      result.optionalMapParallelizationCase_ = optionalMapParallelizationCase_;
      result.optionalNoopEliminationCase_ = optionalNoopEliminationCase_;
      result.optionalParallelBatchCase_ = optionalParallelBatchCase_;
      result.optionalShuffleAndRepeatFusionCase_ = optionalShuffleAndRepeatFusionCase_;
      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 org.tensorflow.proto.data.OptimizationOptions) {
        return mergeFrom((org.tensorflow.proto.data.OptimizationOptions)other);
      } else {
        super.mergeFrom(other);
        return this;
      }
    }

    public Builder mergeFrom(org.tensorflow.proto.data.OptimizationOptions other) {
      if (other == org.tensorflow.proto.data.OptimizationOptions.getDefaultInstance()) return this;
      switch (other.getOptionalApplyDefaultOptimizationsCase()) {
        case APPLY_DEFAULT_OPTIMIZATIONS: {
          setApplyDefaultOptimizations(other.getApplyDefaultOptimizations());
          break;
        }
        case OPTIONALAPPLYDEFAULTOPTIMIZATIONS_NOT_SET: {
          break;
        }
      }
      switch (other.getOptionalFilterFusionCase()) {
        case FILTER_FUSION: {
          setFilterFusion(other.getFilterFusion());
          break;
        }
        case OPTIONALFILTERFUSION_NOT_SET: {
          break;
        }
      }
      switch (other.getOptionalMapAndBatchFusionCase()) {
        case MAP_AND_BATCH_FUSION: {
          setMapAndBatchFusion(other.getMapAndBatchFusion());
          break;
        }
        case OPTIONALMAPANDBATCHFUSION_NOT_SET: {
          break;
        }
      }
      switch (other.getOptionalMapAndFilterFusionCase()) {
        case MAP_AND_FILTER_FUSION: {
          setMapAndFilterFusion(other.getMapAndFilterFusion());
          break;
        }
        case OPTIONALMAPANDFILTERFUSION_NOT_SET: {
          break;
        }
      }
      switch (other.getOptionalMapFusionCase()) {
        case MAP_FUSION: {
          setMapFusion(other.getMapFusion());
          break;
        }
        case OPTIONALMAPFUSION_NOT_SET: {
          break;
        }
      }
      switch (other.getOptionalMapParallelizationCase()) {
        case MAP_PARALLELIZATION: {
          setMapParallelization(other.getMapParallelization());
          break;
        }
        case OPTIONALMAPPARALLELIZATION_NOT_SET: {
          break;
        }
      }
      switch (other.getOptionalNoopEliminationCase()) {
        case NOOP_ELIMINATION: {
          setNoopElimination(other.getNoopElimination());
          break;
        }
        case OPTIONALNOOPELIMINATION_NOT_SET: {
          break;
        }
      }
      switch (other.getOptionalParallelBatchCase()) {
        case PARALLEL_BATCH: {
          setParallelBatch(other.getParallelBatch());
          break;
        }
        case OPTIONALPARALLELBATCH_NOT_SET: {
          break;
        }
      }
      switch (other.getOptionalShuffleAndRepeatFusionCase()) {
        case SHUFFLE_AND_REPEAT_FUSION: {
          setShuffleAndRepeatFusion(other.getShuffleAndRepeatFusion());
          break;
        }
        case OPTIONALSHUFFLEANDREPEATFUSION_NOT_SET: {
          break;
        }
      }
      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 {
      org.tensorflow.proto.data.OptimizationOptions parsedMessage = null;
      try {
        parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
      } catch (com.google.protobuf.InvalidProtocolBufferException e) {
        parsedMessage = (org.tensorflow.proto.data.OptimizationOptions) e.getUnfinishedMessage();
        throw e.unwrapIOException();
      } finally {
        if (parsedMessage != null) {
          mergeFrom(parsedMessage);
        }
      }
      return this;
    }
    private int optionalApplyDefaultOptimizationsCase_ = 0;
    private java.lang.Object optionalApplyDefaultOptimizations_;
    public OptionalApplyDefaultOptimizationsCase
        getOptionalApplyDefaultOptimizationsCase() {
      return OptionalApplyDefaultOptimizationsCase.forNumber(
          optionalApplyDefaultOptimizationsCase_);
    }

    public Builder clearOptionalApplyDefaultOptimizations() {
      optionalApplyDefaultOptimizationsCase_ = 0;
      optionalApplyDefaultOptimizations_ = null;
      onChanged();
      return this;
    }

    private int optionalFilterFusionCase_ = 0;
    private java.lang.Object optionalFilterFusion_;
    public OptionalFilterFusionCase
        getOptionalFilterFusionCase() {
      return OptionalFilterFusionCase.forNumber(
          optionalFilterFusionCase_);
    }

    public Builder clearOptionalFilterFusion() {
      optionalFilterFusionCase_ = 0;
      optionalFilterFusion_ = null;
      onChanged();
      return this;
    }

    private int optionalMapAndBatchFusionCase_ = 0;
    private java.lang.Object optionalMapAndBatchFusion_;
    public OptionalMapAndBatchFusionCase
        getOptionalMapAndBatchFusionCase() {
      return OptionalMapAndBatchFusionCase.forNumber(
          optionalMapAndBatchFusionCase_);
    }

    public Builder clearOptionalMapAndBatchFusion() {
      optionalMapAndBatchFusionCase_ = 0;
      optionalMapAndBatchFusion_ = null;
      onChanged();
      return this;
    }

    private int optionalMapAndFilterFusionCase_ = 0;
    private java.lang.Object optionalMapAndFilterFusion_;
    public OptionalMapAndFilterFusionCase
        getOptionalMapAndFilterFusionCase() {
      return OptionalMapAndFilterFusionCase.forNumber(
          optionalMapAndFilterFusionCase_);
    }

    public Builder clearOptionalMapAndFilterFusion() {
      optionalMapAndFilterFusionCase_ = 0;
      optionalMapAndFilterFusion_ = null;
      onChanged();
      return this;
    }

    private int optionalMapFusionCase_ = 0;
    private java.lang.Object optionalMapFusion_;
    public OptionalMapFusionCase
        getOptionalMapFusionCase() {
      return OptionalMapFusionCase.forNumber(
          optionalMapFusionCase_);
    }

    public Builder clearOptionalMapFusion() {
      optionalMapFusionCase_ = 0;
      optionalMapFusion_ = null;
      onChanged();
      return this;
    }

    private int optionalMapParallelizationCase_ = 0;
    private java.lang.Object optionalMapParallelization_;
    public OptionalMapParallelizationCase
        getOptionalMapParallelizationCase() {
      return OptionalMapParallelizationCase.forNumber(
          optionalMapParallelizationCase_);
    }

    public Builder clearOptionalMapParallelization() {
      optionalMapParallelizationCase_ = 0;
      optionalMapParallelization_ = null;
      onChanged();
      return this;
    }

    private int optionalNoopEliminationCase_ = 0;
    private java.lang.Object optionalNoopElimination_;
    public OptionalNoopEliminationCase
        getOptionalNoopEliminationCase() {
      return OptionalNoopEliminationCase.forNumber(
          optionalNoopEliminationCase_);
    }

    public Builder clearOptionalNoopElimination() {
      optionalNoopEliminationCase_ = 0;
      optionalNoopElimination_ = null;
      onChanged();
      return this;
    }

    private int optionalParallelBatchCase_ = 0;
    private java.lang.Object optionalParallelBatch_;
    public OptionalParallelBatchCase
        getOptionalParallelBatchCase() {
      return OptionalParallelBatchCase.forNumber(
          optionalParallelBatchCase_);
    }

    public Builder clearOptionalParallelBatch() {
      optionalParallelBatchCase_ = 0;
      optionalParallelBatch_ = null;
      onChanged();
      return this;
    }

    private int optionalShuffleAndRepeatFusionCase_ = 0;
    private java.lang.Object optionalShuffleAndRepeatFusion_;
    public OptionalShuffleAndRepeatFusionCase
        getOptionalShuffleAndRepeatFusionCase() {
      return OptionalShuffleAndRepeatFusionCase.forNumber(
          optionalShuffleAndRepeatFusionCase_);
    }

    public Builder clearOptionalShuffleAndRepeatFusion() {
      optionalShuffleAndRepeatFusionCase_ = 0;
      optionalShuffleAndRepeatFusion_ = null;
      onChanged();
      return this;
    }


    /**
     * <code>bool apply_default_optimizations = 1;</code>
     */
    public boolean getApplyDefaultOptimizations() {
      if (optionalApplyDefaultOptimizationsCase_ == 1) {
        return (java.lang.Boolean) optionalApplyDefaultOptimizations_;
      }
      return false;
    }
    /**
     * <code>bool apply_default_optimizations = 1;</code>
     */
    public Builder setApplyDefaultOptimizations(boolean value) {
      optionalApplyDefaultOptimizationsCase_ = 1;
      optionalApplyDefaultOptimizations_ = value;
      onChanged();
      return this;
    }
    /**
     * <code>bool apply_default_optimizations = 1;</code>
     */
    public Builder clearApplyDefaultOptimizations() {
      if (optionalApplyDefaultOptimizationsCase_ == 1) {
        optionalApplyDefaultOptimizationsCase_ = 0;
        optionalApplyDefaultOptimizations_ = null;
        onChanged();
      }
      return this;
    }

    /**
     * <code>bool filter_fusion = 6;</code>
     */
    public boolean getFilterFusion() {
      if (optionalFilterFusionCase_ == 6) {
        return (java.lang.Boolean) optionalFilterFusion_;
      }
      return false;
    }
    /**
     * <code>bool filter_fusion = 6;</code>
     */
    public Builder setFilterFusion(boolean value) {
      optionalFilterFusionCase_ = 6;
      optionalFilterFusion_ = value;
      onChanged();
      return this;
    }
    /**
     * <code>bool filter_fusion = 6;</code>
     */
    public Builder clearFilterFusion() {
      if (optionalFilterFusionCase_ == 6) {
        optionalFilterFusionCase_ = 0;
        optionalFilterFusion_ = null;
        onChanged();
      }
      return this;
    }

    /**
     * <code>bool map_and_batch_fusion = 9;</code>
     */
    public boolean getMapAndBatchFusion() {
      if (optionalMapAndBatchFusionCase_ == 9) {
        return (java.lang.Boolean) optionalMapAndBatchFusion_;
      }
      return false;
    }
    /**
     * <code>bool map_and_batch_fusion = 9;</code>
     */
    public Builder setMapAndBatchFusion(boolean value) {
      optionalMapAndBatchFusionCase_ = 9;
      optionalMapAndBatchFusion_ = value;
      onChanged();
      return this;
    }
    /**
     * <code>bool map_and_batch_fusion = 9;</code>
     */
    public Builder clearMapAndBatchFusion() {
      if (optionalMapAndBatchFusionCase_ == 9) {
        optionalMapAndBatchFusionCase_ = 0;
        optionalMapAndBatchFusion_ = null;
        onChanged();
      }
      return this;
    }

    /**
     * <code>bool map_and_filter_fusion = 10;</code>
     */
    public boolean getMapAndFilterFusion() {
      if (optionalMapAndFilterFusionCase_ == 10) {
        return (java.lang.Boolean) optionalMapAndFilterFusion_;
      }
      return false;
    }
    /**
     * <code>bool map_and_filter_fusion = 10;</code>
     */
    public Builder setMapAndFilterFusion(boolean value) {
      optionalMapAndFilterFusionCase_ = 10;
      optionalMapAndFilterFusion_ = value;
      onChanged();
      return this;
    }
    /**
     * <code>bool map_and_filter_fusion = 10;</code>
     */
    public Builder clearMapAndFilterFusion() {
      if (optionalMapAndFilterFusionCase_ == 10) {
        optionalMapAndFilterFusionCase_ = 0;
        optionalMapAndFilterFusion_ = null;
        onChanged();
      }
      return this;
    }

    /**
     * <code>bool map_fusion = 11;</code>
     */
    public boolean getMapFusion() {
      if (optionalMapFusionCase_ == 11) {
        return (java.lang.Boolean) optionalMapFusion_;
      }
      return false;
    }
    /**
     * <code>bool map_fusion = 11;</code>
     */
    public Builder setMapFusion(boolean value) {
      optionalMapFusionCase_ = 11;
      optionalMapFusion_ = value;
      onChanged();
      return this;
    }
    /**
     * <code>bool map_fusion = 11;</code>
     */
    public Builder clearMapFusion() {
      if (optionalMapFusionCase_ == 11) {
        optionalMapFusionCase_ = 0;
        optionalMapFusion_ = null;
        onChanged();
      }
      return this;
    }

    /**
     * <code>bool map_parallelization = 12;</code>
     */
    public boolean getMapParallelization() {
      if (optionalMapParallelizationCase_ == 12) {
        return (java.lang.Boolean) optionalMapParallelization_;
      }
      return false;
    }
    /**
     * <code>bool map_parallelization = 12;</code>
     */
    public Builder setMapParallelization(boolean value) {
      optionalMapParallelizationCase_ = 12;
      optionalMapParallelization_ = value;
      onChanged();
      return this;
    }
    /**
     * <code>bool map_parallelization = 12;</code>
     */
    public Builder clearMapParallelization() {
      if (optionalMapParallelizationCase_ == 12) {
        optionalMapParallelizationCase_ = 0;
        optionalMapParallelization_ = null;
        onChanged();
      }
      return this;
    }

    /**
     * <code>bool noop_elimination = 14;</code>
     */
    public boolean getNoopElimination() {
      if (optionalNoopEliminationCase_ == 14) {
        return (java.lang.Boolean) optionalNoopElimination_;
      }
      return false;
    }
    /**
     * <code>bool noop_elimination = 14;</code>
     */
    public Builder setNoopElimination(boolean value) {
      optionalNoopEliminationCase_ = 14;
      optionalNoopElimination_ = value;
      onChanged();
      return this;
    }
    /**
     * <code>bool noop_elimination = 14;</code>
     */
    public Builder clearNoopElimination() {
      if (optionalNoopEliminationCase_ == 14) {
        optionalNoopEliminationCase_ = 0;
        optionalNoopElimination_ = null;
        onChanged();
      }
      return this;
    }

    /**
     * <code>bool parallel_batch = 15;</code>
     */
    public boolean getParallelBatch() {
      if (optionalParallelBatchCase_ == 15) {
        return (java.lang.Boolean) optionalParallelBatch_;
      }
      return false;
    }
    /**
     * <code>bool parallel_batch = 15;</code>
     */
    public Builder setParallelBatch(boolean value) {
      optionalParallelBatchCase_ = 15;
      optionalParallelBatch_ = value;
      onChanged();
      return this;
    }
    /**
     * <code>bool parallel_batch = 15;</code>
     */
    public Builder clearParallelBatch() {
      if (optionalParallelBatchCase_ == 15) {
        optionalParallelBatchCase_ = 0;
        optionalParallelBatch_ = null;
        onChanged();
      }
      return this;
    }

    /**
     * <code>bool shuffle_and_repeat_fusion = 17;</code>
     */
    public boolean getShuffleAndRepeatFusion() {
      if (optionalShuffleAndRepeatFusionCase_ == 17) {
        return (java.lang.Boolean) optionalShuffleAndRepeatFusion_;
      }
      return false;
    }
    /**
     * <code>bool shuffle_and_repeat_fusion = 17;</code>
     */
    public Builder setShuffleAndRepeatFusion(boolean value) {
      optionalShuffleAndRepeatFusionCase_ = 17;
      optionalShuffleAndRepeatFusion_ = value;
      onChanged();
      return this;
    }
    /**
     * <code>bool shuffle_and_repeat_fusion = 17;</code>
     */
    public Builder clearShuffleAndRepeatFusion() {
      if (optionalShuffleAndRepeatFusionCase_ == 17) {
        optionalShuffleAndRepeatFusionCase_ = 0;
        optionalShuffleAndRepeatFusion_ = null;
        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:tensorflow.data.OptimizationOptions)
  }

  // @@protoc_insertion_point(class_scope:tensorflow.data.OptimizationOptions)
  private static final org.tensorflow.proto.data.OptimizationOptions DEFAULT_INSTANCE;
  static {
    DEFAULT_INSTANCE = new org.tensorflow.proto.data.OptimizationOptions();
  }

  public static org.tensorflow.proto.data.OptimizationOptions getDefaultInstance() {
    return DEFAULT_INSTANCE;
  }

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

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

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

  @java.lang.Override
  public org.tensorflow.proto.data.OptimizationOptions getDefaultInstanceForType() {
    return DEFAULT_INSTANCE;
  }

}

