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

package org.tensorflow.proto.util;

/**
 * <pre>
 * Protocol buffer representing an event that happened during
 * the execution of a Brain model.
 * </pre>
 *
 * Protobuf type {@code tensorflow.Event}
 */
public  final class Event extends
    com.google.protobuf.GeneratedMessageV3 implements
    // @@protoc_insertion_point(message_implements:tensorflow.Event)
    EventOrBuilder {
private static final long serialVersionUID = 0L;
  // Use Event.newBuilder() to construct.
  private Event(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
    super(builder);
  }
  private Event() {
  }

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

  @java.lang.Override
  public final com.google.protobuf.UnknownFieldSet
  getUnknownFields() {
    return this.unknownFields;
  }
  private Event(
      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 9: {

            wallTime_ = input.readDouble();
            break;
          }
          case 16: {

            step_ = input.readInt64();
            break;
          }
          case 26: {
            java.lang.String s = input.readStringRequireUtf8();
            whatCase_ = 3;
            what_ = s;
            break;
          }
          case 34: {
            whatCase_ = 4;
            what_ = input.readBytes();
            break;
          }
          case 42: {
            org.tensorflow.proto.framework.Summary.Builder subBuilder = null;
            if (whatCase_ == 5) {
              subBuilder = ((org.tensorflow.proto.framework.Summary) what_).toBuilder();
            }
            what_ =
                input.readMessage(org.tensorflow.proto.framework.Summary.parser(), extensionRegistry);
            if (subBuilder != null) {
              subBuilder.mergeFrom((org.tensorflow.proto.framework.Summary) what_);
              what_ = subBuilder.buildPartial();
            }
            whatCase_ = 5;
            break;
          }
          case 50: {
            org.tensorflow.proto.util.LogMessage.Builder subBuilder = null;
            if (whatCase_ == 6) {
              subBuilder = ((org.tensorflow.proto.util.LogMessage) what_).toBuilder();
            }
            what_ =
                input.readMessage(org.tensorflow.proto.util.LogMessage.parser(), extensionRegistry);
            if (subBuilder != null) {
              subBuilder.mergeFrom((org.tensorflow.proto.util.LogMessage) what_);
              what_ = subBuilder.buildPartial();
            }
            whatCase_ = 6;
            break;
          }
          case 58: {
            org.tensorflow.proto.util.SessionLog.Builder subBuilder = null;
            if (whatCase_ == 7) {
              subBuilder = ((org.tensorflow.proto.util.SessionLog) what_).toBuilder();
            }
            what_ =
                input.readMessage(org.tensorflow.proto.util.SessionLog.parser(), extensionRegistry);
            if (subBuilder != null) {
              subBuilder.mergeFrom((org.tensorflow.proto.util.SessionLog) what_);
              what_ = subBuilder.buildPartial();
            }
            whatCase_ = 7;
            break;
          }
          case 66: {
            org.tensorflow.proto.util.TaggedRunMetadata.Builder subBuilder = null;
            if (whatCase_ == 8) {
              subBuilder = ((org.tensorflow.proto.util.TaggedRunMetadata) what_).toBuilder();
            }
            what_ =
                input.readMessage(org.tensorflow.proto.util.TaggedRunMetadata.parser(), extensionRegistry);
            if (subBuilder != null) {
              subBuilder.mergeFrom((org.tensorflow.proto.util.TaggedRunMetadata) what_);
              what_ = subBuilder.buildPartial();
            }
            whatCase_ = 8;
            break;
          }
          case 74: {
            whatCase_ = 9;
            what_ = input.readBytes();
            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.util.EventProtos.internal_static_tensorflow_Event_descriptor;
  }

  @java.lang.Override
  protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
      internalGetFieldAccessorTable() {
    return org.tensorflow.proto.util.EventProtos.internal_static_tensorflow_Event_fieldAccessorTable
        .ensureFieldAccessorsInitialized(
            org.tensorflow.proto.util.Event.class, org.tensorflow.proto.util.Event.Builder.class);
  }

  private int whatCase_ = 0;
  private java.lang.Object what_;
  public enum WhatCase
      implements com.google.protobuf.Internal.EnumLite {
    FILE_VERSION(3),
    GRAPH_DEF(4),
    SUMMARY(5),
    @java.lang.Deprecated LOG_MESSAGE(6),
    SESSION_LOG(7),
    TAGGED_RUN_METADATA(8),
    META_GRAPH_DEF(9),
    WHAT_NOT_SET(0);
    private final int value;
    private WhatCase(int value) {
      this.value = value;
    }
    /**
     * @deprecated Use {@link #forNumber(int)} instead.
     */
    @java.lang.Deprecated
    public static WhatCase valueOf(int value) {
      return forNumber(value);
    }

    public static WhatCase forNumber(int value) {
      switch (value) {
        case 3: return FILE_VERSION;
        case 4: return GRAPH_DEF;
        case 5: return SUMMARY;
        case 6: return LOG_MESSAGE;
        case 7: return SESSION_LOG;
        case 8: return TAGGED_RUN_METADATA;
        case 9: return META_GRAPH_DEF;
        case 0: return WHAT_NOT_SET;
        default: return null;
      }
    }
    public int getNumber() {
      return this.value;
    }
  };

  public WhatCase
  getWhatCase() {
    return WhatCase.forNumber(
        whatCase_);
  }

  public static final int WALL_TIME_FIELD_NUMBER = 1;
  private double wallTime_;
  /**
   * <pre>
   * Timestamp of the event.
   * </pre>
   *
   * <code>double wall_time = 1;</code>
   */
  public double getWallTime() {
    return wallTime_;
  }

  public static final int STEP_FIELD_NUMBER = 2;
  private long step_;
  /**
   * <pre>
   * Global step of the event.
   * </pre>
   *
   * <code>int64 step = 2;</code>
   */
  public long getStep() {
    return step_;
  }

  public static final int FILE_VERSION_FIELD_NUMBER = 3;
  /**
   * <pre>
   * An event file was started, with the specified version.
   * This is use to identify the contents of the record IO files
   * easily.  Current version is "brain.Event:2".  All versions
   * start with "brain.Event:".
   * </pre>
   *
   * <code>string file_version = 3;</code>
   */
  public java.lang.String getFileVersion() {
    java.lang.Object ref = "";
    if (whatCase_ == 3) {
      ref = what_;
    }
    if (ref instanceof java.lang.String) {
      return (java.lang.String) ref;
    } else {
      com.google.protobuf.ByteString bs = 
          (com.google.protobuf.ByteString) ref;
      java.lang.String s = bs.toStringUtf8();
      if (whatCase_ == 3) {
        what_ = s;
      }
      return s;
    }
  }
  /**
   * <pre>
   * An event file was started, with the specified version.
   * This is use to identify the contents of the record IO files
   * easily.  Current version is "brain.Event:2".  All versions
   * start with "brain.Event:".
   * </pre>
   *
   * <code>string file_version = 3;</code>
   */
  public com.google.protobuf.ByteString
      getFileVersionBytes() {
    java.lang.Object ref = "";
    if (whatCase_ == 3) {
      ref = what_;
    }
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b = 
          com.google.protobuf.ByteString.copyFromUtf8(
              (java.lang.String) ref);
      if (whatCase_ == 3) {
        what_ = b;
      }
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int GRAPH_DEF_FIELD_NUMBER = 4;
  /**
   * <pre>
   * An encoded version of a GraphDef.
   * </pre>
   *
   * <code>bytes graph_def = 4;</code>
   */
  public com.google.protobuf.ByteString getGraphDef() {
    if (whatCase_ == 4) {
      return (com.google.protobuf.ByteString) what_;
    }
    return com.google.protobuf.ByteString.EMPTY;
  }

  public static final int SUMMARY_FIELD_NUMBER = 5;
  /**
   * <pre>
   * A summary was generated.
   * </pre>
   *
   * <code>.tensorflow.Summary summary = 5;</code>
   */
  public boolean hasSummary() {
    return whatCase_ == 5;
  }
  /**
   * <pre>
   * A summary was generated.
   * </pre>
   *
   * <code>.tensorflow.Summary summary = 5;</code>
   */
  public org.tensorflow.proto.framework.Summary getSummary() {
    if (whatCase_ == 5) {
       return (org.tensorflow.proto.framework.Summary) what_;
    }
    return org.tensorflow.proto.framework.Summary.getDefaultInstance();
  }
  /**
   * <pre>
   * A summary was generated.
   * </pre>
   *
   * <code>.tensorflow.Summary summary = 5;</code>
   */
  public org.tensorflow.proto.framework.SummaryOrBuilder getSummaryOrBuilder() {
    if (whatCase_ == 5) {
       return (org.tensorflow.proto.framework.Summary) what_;
    }
    return org.tensorflow.proto.framework.Summary.getDefaultInstance();
  }

  public static final int LOG_MESSAGE_FIELD_NUMBER = 6;
  /**
   * <pre>
   * The user output a log message. This was theoretically used by the defunct
   * tensorboard_logging module, which has since been removed; this field is
   * now deprecated and should not be used.
   * </pre>
   *
   * <code>.tensorflow.LogMessage log_message = 6 [deprecated = true];</code>
   */
  @java.lang.Deprecated public boolean hasLogMessage() {
    return whatCase_ == 6;
  }
  /**
   * <pre>
   * The user output a log message. This was theoretically used by the defunct
   * tensorboard_logging module, which has since been removed; this field is
   * now deprecated and should not be used.
   * </pre>
   *
   * <code>.tensorflow.LogMessage log_message = 6 [deprecated = true];</code>
   */
  @java.lang.Deprecated public org.tensorflow.proto.util.LogMessage getLogMessage() {
    if (whatCase_ == 6) {
       return (org.tensorflow.proto.util.LogMessage) what_;
    }
    return org.tensorflow.proto.util.LogMessage.getDefaultInstance();
  }
  /**
   * <pre>
   * The user output a log message. This was theoretically used by the defunct
   * tensorboard_logging module, which has since been removed; this field is
   * now deprecated and should not be used.
   * </pre>
   *
   * <code>.tensorflow.LogMessage log_message = 6 [deprecated = true];</code>
   */
  @java.lang.Deprecated public org.tensorflow.proto.util.LogMessageOrBuilder getLogMessageOrBuilder() {
    if (whatCase_ == 6) {
       return (org.tensorflow.proto.util.LogMessage) what_;
    }
    return org.tensorflow.proto.util.LogMessage.getDefaultInstance();
  }

  public static final int SESSION_LOG_FIELD_NUMBER = 7;
  /**
   * <pre>
   * The state of the session which can be used for restarting after crashes.
   * </pre>
   *
   * <code>.tensorflow.SessionLog session_log = 7;</code>
   */
  public boolean hasSessionLog() {
    return whatCase_ == 7;
  }
  /**
   * <pre>
   * The state of the session which can be used for restarting after crashes.
   * </pre>
   *
   * <code>.tensorflow.SessionLog session_log = 7;</code>
   */
  public org.tensorflow.proto.util.SessionLog getSessionLog() {
    if (whatCase_ == 7) {
       return (org.tensorflow.proto.util.SessionLog) what_;
    }
    return org.tensorflow.proto.util.SessionLog.getDefaultInstance();
  }
  /**
   * <pre>
   * The state of the session which can be used for restarting after crashes.
   * </pre>
   *
   * <code>.tensorflow.SessionLog session_log = 7;</code>
   */
  public org.tensorflow.proto.util.SessionLogOrBuilder getSessionLogOrBuilder() {
    if (whatCase_ == 7) {
       return (org.tensorflow.proto.util.SessionLog) what_;
    }
    return org.tensorflow.proto.util.SessionLog.getDefaultInstance();
  }

  public static final int TAGGED_RUN_METADATA_FIELD_NUMBER = 8;
  /**
   * <pre>
   * The metadata returned by running a session.run() call.
   * </pre>
   *
   * <code>.tensorflow.TaggedRunMetadata tagged_run_metadata = 8;</code>
   */
  public boolean hasTaggedRunMetadata() {
    return whatCase_ == 8;
  }
  /**
   * <pre>
   * The metadata returned by running a session.run() call.
   * </pre>
   *
   * <code>.tensorflow.TaggedRunMetadata tagged_run_metadata = 8;</code>
   */
  public org.tensorflow.proto.util.TaggedRunMetadata getTaggedRunMetadata() {
    if (whatCase_ == 8) {
       return (org.tensorflow.proto.util.TaggedRunMetadata) what_;
    }
    return org.tensorflow.proto.util.TaggedRunMetadata.getDefaultInstance();
  }
  /**
   * <pre>
   * The metadata returned by running a session.run() call.
   * </pre>
   *
   * <code>.tensorflow.TaggedRunMetadata tagged_run_metadata = 8;</code>
   */
  public org.tensorflow.proto.util.TaggedRunMetadataOrBuilder getTaggedRunMetadataOrBuilder() {
    if (whatCase_ == 8) {
       return (org.tensorflow.proto.util.TaggedRunMetadata) what_;
    }
    return org.tensorflow.proto.util.TaggedRunMetadata.getDefaultInstance();
  }

  public static final int META_GRAPH_DEF_FIELD_NUMBER = 9;
  /**
   * <pre>
   * An encoded version of a MetaGraphDef.
   * </pre>
   *
   * <code>bytes meta_graph_def = 9;</code>
   */
  public com.google.protobuf.ByteString getMetaGraphDef() {
    if (whatCase_ == 9) {
      return (com.google.protobuf.ByteString) what_;
    }
    return com.google.protobuf.ByteString.EMPTY;
  }

  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 (wallTime_ != 0D) {
      output.writeDouble(1, wallTime_);
    }
    if (step_ != 0L) {
      output.writeInt64(2, step_);
    }
    if (whatCase_ == 3) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 3, what_);
    }
    if (whatCase_ == 4) {
      output.writeBytes(
          4, (com.google.protobuf.ByteString) what_);
    }
    if (whatCase_ == 5) {
      output.writeMessage(5, (org.tensorflow.proto.framework.Summary) what_);
    }
    if (whatCase_ == 6) {
      output.writeMessage(6, (org.tensorflow.proto.util.LogMessage) what_);
    }
    if (whatCase_ == 7) {
      output.writeMessage(7, (org.tensorflow.proto.util.SessionLog) what_);
    }
    if (whatCase_ == 8) {
      output.writeMessage(8, (org.tensorflow.proto.util.TaggedRunMetadata) what_);
    }
    if (whatCase_ == 9) {
      output.writeBytes(
          9, (com.google.protobuf.ByteString) what_);
    }
    unknownFields.writeTo(output);
  }

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

    size = 0;
    if (wallTime_ != 0D) {
      size += com.google.protobuf.CodedOutputStream
        .computeDoubleSize(1, wallTime_);
    }
    if (step_ != 0L) {
      size += com.google.protobuf.CodedOutputStream
        .computeInt64Size(2, step_);
    }
    if (whatCase_ == 3) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, what_);
    }
    if (whatCase_ == 4) {
      size += com.google.protobuf.CodedOutputStream
        .computeBytesSize(
            4, (com.google.protobuf.ByteString) what_);
    }
    if (whatCase_ == 5) {
      size += com.google.protobuf.CodedOutputStream
        .computeMessageSize(5, (org.tensorflow.proto.framework.Summary) what_);
    }
    if (whatCase_ == 6) {
      size += com.google.protobuf.CodedOutputStream
        .computeMessageSize(6, (org.tensorflow.proto.util.LogMessage) what_);
    }
    if (whatCase_ == 7) {
      size += com.google.protobuf.CodedOutputStream
        .computeMessageSize(7, (org.tensorflow.proto.util.SessionLog) what_);
    }
    if (whatCase_ == 8) {
      size += com.google.protobuf.CodedOutputStream
        .computeMessageSize(8, (org.tensorflow.proto.util.TaggedRunMetadata) what_);
    }
    if (whatCase_ == 9) {
      size += com.google.protobuf.CodedOutputStream
        .computeBytesSize(
            9, (com.google.protobuf.ByteString) what_);
    }
    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.util.Event)) {
      return super.equals(obj);
    }
    org.tensorflow.proto.util.Event other = (org.tensorflow.proto.util.Event) obj;

    if (java.lang.Double.doubleToLongBits(getWallTime())
        != java.lang.Double.doubleToLongBits(
            other.getWallTime())) return false;
    if (getStep()
        != other.getStep()) return false;
    if (!getWhatCase().equals(other.getWhatCase())) return false;
    switch (whatCase_) {
      case 3:
        if (!getFileVersion()
            .equals(other.getFileVersion())) return false;
        break;
      case 4:
        if (!getGraphDef()
            .equals(other.getGraphDef())) return false;
        break;
      case 5:
        if (!getSummary()
            .equals(other.getSummary())) return false;
        break;
      case 6:
        if (!getLogMessage()
            .equals(other.getLogMessage())) return false;
        break;
      case 7:
        if (!getSessionLog()
            .equals(other.getSessionLog())) return false;
        break;
      case 8:
        if (!getTaggedRunMetadata()
            .equals(other.getTaggedRunMetadata())) return false;
        break;
      case 9:
        if (!getMetaGraphDef()
            .equals(other.getMetaGraphDef())) 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();
    hash = (37 * hash) + WALL_TIME_FIELD_NUMBER;
    hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
        java.lang.Double.doubleToLongBits(getWallTime()));
    hash = (37 * hash) + STEP_FIELD_NUMBER;
    hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
        getStep());
    switch (whatCase_) {
      case 3:
        hash = (37 * hash) + FILE_VERSION_FIELD_NUMBER;
        hash = (53 * hash) + getFileVersion().hashCode();
        break;
      case 4:
        hash = (37 * hash) + GRAPH_DEF_FIELD_NUMBER;
        hash = (53 * hash) + getGraphDef().hashCode();
        break;
      case 5:
        hash = (37 * hash) + SUMMARY_FIELD_NUMBER;
        hash = (53 * hash) + getSummary().hashCode();
        break;
      case 6:
        hash = (37 * hash) + LOG_MESSAGE_FIELD_NUMBER;
        hash = (53 * hash) + getLogMessage().hashCode();
        break;
      case 7:
        hash = (37 * hash) + SESSION_LOG_FIELD_NUMBER;
        hash = (53 * hash) + getSessionLog().hashCode();
        break;
      case 8:
        hash = (37 * hash) + TAGGED_RUN_METADATA_FIELD_NUMBER;
        hash = (53 * hash) + getTaggedRunMetadata().hashCode();
        break;
      case 9:
        hash = (37 * hash) + META_GRAPH_DEF_FIELD_NUMBER;
        hash = (53 * hash) + getMetaGraphDef().hashCode();
        break;
      case 0:
      default:
    }
    hash = (29 * hash) + unknownFields.hashCode();
    memoizedHashCode = hash;
    return hash;
  }

  public static org.tensorflow.proto.util.Event parseFrom(
      java.nio.ByteBuffer data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }
  public static org.tensorflow.proto.util.Event 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.util.Event parseFrom(
      com.google.protobuf.ByteString data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }
  public static org.tensorflow.proto.util.Event 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.util.Event parseFrom(byte[] data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }
  public static org.tensorflow.proto.util.Event parseFrom(
      byte[] data,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data, extensionRegistry);
  }
  public static org.tensorflow.proto.util.Event parseFrom(java.io.InputStream input)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3
        .parseWithIOException(PARSER, input);
  }
  public static org.tensorflow.proto.util.Event 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.util.Event parseDelimitedFrom(java.io.InputStream input)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3
        .parseDelimitedWithIOException(PARSER, input);
  }
  public static org.tensorflow.proto.util.Event 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.util.Event parseFrom(
      com.google.protobuf.CodedInputStream input)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3
        .parseWithIOException(PARSER, input);
  }
  public static org.tensorflow.proto.util.Event 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.util.Event 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>
   * Protocol buffer representing an event that happened during
   * the execution of a Brain model.
   * </pre>
   *
   * Protobuf type {@code tensorflow.Event}
   */
  public static final class Builder extends
      com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
      // @@protoc_insertion_point(builder_implements:tensorflow.Event)
      org.tensorflow.proto.util.EventOrBuilder {
    public static final com.google.protobuf.Descriptors.Descriptor
        getDescriptor() {
      return org.tensorflow.proto.util.EventProtos.internal_static_tensorflow_Event_descriptor;
    }

    @java.lang.Override
    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
        internalGetFieldAccessorTable() {
      return org.tensorflow.proto.util.EventProtos.internal_static_tensorflow_Event_fieldAccessorTable
          .ensureFieldAccessorsInitialized(
              org.tensorflow.proto.util.Event.class, org.tensorflow.proto.util.Event.Builder.class);
    }

    // Construct using org.tensorflow.proto.util.Event.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();
      wallTime_ = 0D;

      step_ = 0L;

      whatCase_ = 0;
      what_ = null;
      return this;
    }

    @java.lang.Override
    public com.google.protobuf.Descriptors.Descriptor
        getDescriptorForType() {
      return org.tensorflow.proto.util.EventProtos.internal_static_tensorflow_Event_descriptor;
    }

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

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

    @java.lang.Override
    public org.tensorflow.proto.util.Event buildPartial() {
      org.tensorflow.proto.util.Event result = new org.tensorflow.proto.util.Event(this);
      result.wallTime_ = wallTime_;
      result.step_ = step_;
      if (whatCase_ == 3) {
        result.what_ = what_;
      }
      if (whatCase_ == 4) {
        result.what_ = what_;
      }
      if (whatCase_ == 5) {
        if (summaryBuilder_ == null) {
          result.what_ = what_;
        } else {
          result.what_ = summaryBuilder_.build();
        }
      }
      if (whatCase_ == 6) {
        if (logMessageBuilder_ == null) {
          result.what_ = what_;
        } else {
          result.what_ = logMessageBuilder_.build();
        }
      }
      if (whatCase_ == 7) {
        if (sessionLogBuilder_ == null) {
          result.what_ = what_;
        } else {
          result.what_ = sessionLogBuilder_.build();
        }
      }
      if (whatCase_ == 8) {
        if (taggedRunMetadataBuilder_ == null) {
          result.what_ = what_;
        } else {
          result.what_ = taggedRunMetadataBuilder_.build();
        }
      }
      if (whatCase_ == 9) {
        result.what_ = what_;
      }
      result.whatCase_ = whatCase_;
      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.util.Event) {
        return mergeFrom((org.tensorflow.proto.util.Event)other);
      } else {
        super.mergeFrom(other);
        return this;
      }
    }

    public Builder mergeFrom(org.tensorflow.proto.util.Event other) {
      if (other == org.tensorflow.proto.util.Event.getDefaultInstance()) return this;
      if (other.getWallTime() != 0D) {
        setWallTime(other.getWallTime());
      }
      if (other.getStep() != 0L) {
        setStep(other.getStep());
      }
      switch (other.getWhatCase()) {
        case FILE_VERSION: {
          whatCase_ = 3;
          what_ = other.what_;
          onChanged();
          break;
        }
        case GRAPH_DEF: {
          setGraphDef(other.getGraphDef());
          break;
        }
        case SUMMARY: {
          mergeSummary(other.getSummary());
          break;
        }
        case LOG_MESSAGE: {
          mergeLogMessage(other.getLogMessage());
          break;
        }
        case SESSION_LOG: {
          mergeSessionLog(other.getSessionLog());
          break;
        }
        case TAGGED_RUN_METADATA: {
          mergeTaggedRunMetadata(other.getTaggedRunMetadata());
          break;
        }
        case META_GRAPH_DEF: {
          setMetaGraphDef(other.getMetaGraphDef());
          break;
        }
        case WHAT_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.util.Event parsedMessage = null;
      try {
        parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
      } catch (com.google.protobuf.InvalidProtocolBufferException e) {
        parsedMessage = (org.tensorflow.proto.util.Event) e.getUnfinishedMessage();
        throw e.unwrapIOException();
      } finally {
        if (parsedMessage != null) {
          mergeFrom(parsedMessage);
        }
      }
      return this;
    }
    private int whatCase_ = 0;
    private java.lang.Object what_;
    public WhatCase
        getWhatCase() {
      return WhatCase.forNumber(
          whatCase_);
    }

    public Builder clearWhat() {
      whatCase_ = 0;
      what_ = null;
      onChanged();
      return this;
    }


    private double wallTime_ ;
    /**
     * <pre>
     * Timestamp of the event.
     * </pre>
     *
     * <code>double wall_time = 1;</code>
     */
    public double getWallTime() {
      return wallTime_;
    }
    /**
     * <pre>
     * Timestamp of the event.
     * </pre>
     *
     * <code>double wall_time = 1;</code>
     */
    public Builder setWallTime(double value) {
      
      wallTime_ = value;
      onChanged();
      return this;
    }
    /**
     * <pre>
     * Timestamp of the event.
     * </pre>
     *
     * <code>double wall_time = 1;</code>
     */
    public Builder clearWallTime() {
      
      wallTime_ = 0D;
      onChanged();
      return this;
    }

    private long step_ ;
    /**
     * <pre>
     * Global step of the event.
     * </pre>
     *
     * <code>int64 step = 2;</code>
     */
    public long getStep() {
      return step_;
    }
    /**
     * <pre>
     * Global step of the event.
     * </pre>
     *
     * <code>int64 step = 2;</code>
     */
    public Builder setStep(long value) {
      
      step_ = value;
      onChanged();
      return this;
    }
    /**
     * <pre>
     * Global step of the event.
     * </pre>
     *
     * <code>int64 step = 2;</code>
     */
    public Builder clearStep() {
      
      step_ = 0L;
      onChanged();
      return this;
    }

    /**
     * <pre>
     * An event file was started, with the specified version.
     * This is use to identify the contents of the record IO files
     * easily.  Current version is "brain.Event:2".  All versions
     * start with "brain.Event:".
     * </pre>
     *
     * <code>string file_version = 3;</code>
     */
    public java.lang.String getFileVersion() {
      java.lang.Object ref = "";
      if (whatCase_ == 3) {
        ref = what_;
      }
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs =
            (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        if (whatCase_ == 3) {
          what_ = s;
        }
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     * <pre>
     * An event file was started, with the specified version.
     * This is use to identify the contents of the record IO files
     * easily.  Current version is "brain.Event:2".  All versions
     * start with "brain.Event:".
     * </pre>
     *
     * <code>string file_version = 3;</code>
     */
    public com.google.protobuf.ByteString
        getFileVersionBytes() {
      java.lang.Object ref = "";
      if (whatCase_ == 3) {
        ref = what_;
      }
      if (ref instanceof String) {
        com.google.protobuf.ByteString b = 
            com.google.protobuf.ByteString.copyFromUtf8(
                (java.lang.String) ref);
        if (whatCase_ == 3) {
          what_ = b;
        }
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     * <pre>
     * An event file was started, with the specified version.
     * This is use to identify the contents of the record IO files
     * easily.  Current version is "brain.Event:2".  All versions
     * start with "brain.Event:".
     * </pre>
     *
     * <code>string file_version = 3;</code>
     */
    public Builder setFileVersion(
        java.lang.String value) {
      if (value == null) {
    throw new NullPointerException();
  }
  whatCase_ = 3;
      what_ = value;
      onChanged();
      return this;
    }
    /**
     * <pre>
     * An event file was started, with the specified version.
     * This is use to identify the contents of the record IO files
     * easily.  Current version is "brain.Event:2".  All versions
     * start with "brain.Event:".
     * </pre>
     *
     * <code>string file_version = 3;</code>
     */
    public Builder clearFileVersion() {
      if (whatCase_ == 3) {
        whatCase_ = 0;
        what_ = null;
        onChanged();
      }
      return this;
    }
    /**
     * <pre>
     * An event file was started, with the specified version.
     * This is use to identify the contents of the record IO files
     * easily.  Current version is "brain.Event:2".  All versions
     * start with "brain.Event:".
     * </pre>
     *
     * <code>string file_version = 3;</code>
     */
    public Builder setFileVersionBytes(
        com.google.protobuf.ByteString value) {
      if (value == null) {
    throw new NullPointerException();
  }
  checkByteStringIsUtf8(value);
      whatCase_ = 3;
      what_ = value;
      onChanged();
      return this;
    }

    /**
     * <pre>
     * An encoded version of a GraphDef.
     * </pre>
     *
     * <code>bytes graph_def = 4;</code>
     */
    public com.google.protobuf.ByteString getGraphDef() {
      if (whatCase_ == 4) {
        return (com.google.protobuf.ByteString) what_;
      }
      return com.google.protobuf.ByteString.EMPTY;
    }
    /**
     * <pre>
     * An encoded version of a GraphDef.
     * </pre>
     *
     * <code>bytes graph_def = 4;</code>
     */
    public Builder setGraphDef(com.google.protobuf.ByteString value) {
      if (value == null) {
    throw new NullPointerException();
  }
  whatCase_ = 4;
      what_ = value;
      onChanged();
      return this;
    }
    /**
     * <pre>
     * An encoded version of a GraphDef.
     * </pre>
     *
     * <code>bytes graph_def = 4;</code>
     */
    public Builder clearGraphDef() {
      if (whatCase_ == 4) {
        whatCase_ = 0;
        what_ = null;
        onChanged();
      }
      return this;
    }

    private com.google.protobuf.SingleFieldBuilderV3<
        org.tensorflow.proto.framework.Summary, org.tensorflow.proto.framework.Summary.Builder, org.tensorflow.proto.framework.SummaryOrBuilder> summaryBuilder_;
    /**
     * <pre>
     * A summary was generated.
     * </pre>
     *
     * <code>.tensorflow.Summary summary = 5;</code>
     */
    public boolean hasSummary() {
      return whatCase_ == 5;
    }
    /**
     * <pre>
     * A summary was generated.
     * </pre>
     *
     * <code>.tensorflow.Summary summary = 5;</code>
     */
    public org.tensorflow.proto.framework.Summary getSummary() {
      if (summaryBuilder_ == null) {
        if (whatCase_ == 5) {
          return (org.tensorflow.proto.framework.Summary) what_;
        }
        return org.tensorflow.proto.framework.Summary.getDefaultInstance();
      } else {
        if (whatCase_ == 5) {
          return summaryBuilder_.getMessage();
        }
        return org.tensorflow.proto.framework.Summary.getDefaultInstance();
      }
    }
    /**
     * <pre>
     * A summary was generated.
     * </pre>
     *
     * <code>.tensorflow.Summary summary = 5;</code>
     */
    public Builder setSummary(org.tensorflow.proto.framework.Summary value) {
      if (summaryBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        what_ = value;
        onChanged();
      } else {
        summaryBuilder_.setMessage(value);
      }
      whatCase_ = 5;
      return this;
    }
    /**
     * <pre>
     * A summary was generated.
     * </pre>
     *
     * <code>.tensorflow.Summary summary = 5;</code>
     */
    public Builder setSummary(
        org.tensorflow.proto.framework.Summary.Builder builderForValue) {
      if (summaryBuilder_ == null) {
        what_ = builderForValue.build();
        onChanged();
      } else {
        summaryBuilder_.setMessage(builderForValue.build());
      }
      whatCase_ = 5;
      return this;
    }
    /**
     * <pre>
     * A summary was generated.
     * </pre>
     *
     * <code>.tensorflow.Summary summary = 5;</code>
     */
    public Builder mergeSummary(org.tensorflow.proto.framework.Summary value) {
      if (summaryBuilder_ == null) {
        if (whatCase_ == 5 &&
            what_ != org.tensorflow.proto.framework.Summary.getDefaultInstance()) {
          what_ = org.tensorflow.proto.framework.Summary.newBuilder((org.tensorflow.proto.framework.Summary) what_)
              .mergeFrom(value).buildPartial();
        } else {
          what_ = value;
        }
        onChanged();
      } else {
        if (whatCase_ == 5) {
          summaryBuilder_.mergeFrom(value);
        }
        summaryBuilder_.setMessage(value);
      }
      whatCase_ = 5;
      return this;
    }
    /**
     * <pre>
     * A summary was generated.
     * </pre>
     *
     * <code>.tensorflow.Summary summary = 5;</code>
     */
    public Builder clearSummary() {
      if (summaryBuilder_ == null) {
        if (whatCase_ == 5) {
          whatCase_ = 0;
          what_ = null;
          onChanged();
        }
      } else {
        if (whatCase_ == 5) {
          whatCase_ = 0;
          what_ = null;
        }
        summaryBuilder_.clear();
      }
      return this;
    }
    /**
     * <pre>
     * A summary was generated.
     * </pre>
     *
     * <code>.tensorflow.Summary summary = 5;</code>
     */
    public org.tensorflow.proto.framework.Summary.Builder getSummaryBuilder() {
      return getSummaryFieldBuilder().getBuilder();
    }
    /**
     * <pre>
     * A summary was generated.
     * </pre>
     *
     * <code>.tensorflow.Summary summary = 5;</code>
     */
    public org.tensorflow.proto.framework.SummaryOrBuilder getSummaryOrBuilder() {
      if ((whatCase_ == 5) && (summaryBuilder_ != null)) {
        return summaryBuilder_.getMessageOrBuilder();
      } else {
        if (whatCase_ == 5) {
          return (org.tensorflow.proto.framework.Summary) what_;
        }
        return org.tensorflow.proto.framework.Summary.getDefaultInstance();
      }
    }
    /**
     * <pre>
     * A summary was generated.
     * </pre>
     *
     * <code>.tensorflow.Summary summary = 5;</code>
     */
    private com.google.protobuf.SingleFieldBuilderV3<
        org.tensorflow.proto.framework.Summary, org.tensorflow.proto.framework.Summary.Builder, org.tensorflow.proto.framework.SummaryOrBuilder> 
        getSummaryFieldBuilder() {
      if (summaryBuilder_ == null) {
        if (!(whatCase_ == 5)) {
          what_ = org.tensorflow.proto.framework.Summary.getDefaultInstance();
        }
        summaryBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
            org.tensorflow.proto.framework.Summary, org.tensorflow.proto.framework.Summary.Builder, org.tensorflow.proto.framework.SummaryOrBuilder>(
                (org.tensorflow.proto.framework.Summary) what_,
                getParentForChildren(),
                isClean());
        what_ = null;
      }
      whatCase_ = 5;
      onChanged();;
      return summaryBuilder_;
    }

    private com.google.protobuf.SingleFieldBuilderV3<
        org.tensorflow.proto.util.LogMessage, org.tensorflow.proto.util.LogMessage.Builder, org.tensorflow.proto.util.LogMessageOrBuilder> logMessageBuilder_;
    /**
     * <pre>
     * The user output a log message. This was theoretically used by the defunct
     * tensorboard_logging module, which has since been removed; this field is
     * now deprecated and should not be used.
     * </pre>
     *
     * <code>.tensorflow.LogMessage log_message = 6 [deprecated = true];</code>
     */
    @java.lang.Deprecated public boolean hasLogMessage() {
      return whatCase_ == 6;
    }
    /**
     * <pre>
     * The user output a log message. This was theoretically used by the defunct
     * tensorboard_logging module, which has since been removed; this field is
     * now deprecated and should not be used.
     * </pre>
     *
     * <code>.tensorflow.LogMessage log_message = 6 [deprecated = true];</code>
     */
    @java.lang.Deprecated public org.tensorflow.proto.util.LogMessage getLogMessage() {
      if (logMessageBuilder_ == null) {
        if (whatCase_ == 6) {
          return (org.tensorflow.proto.util.LogMessage) what_;
        }
        return org.tensorflow.proto.util.LogMessage.getDefaultInstance();
      } else {
        if (whatCase_ == 6) {
          return logMessageBuilder_.getMessage();
        }
        return org.tensorflow.proto.util.LogMessage.getDefaultInstance();
      }
    }
    /**
     * <pre>
     * The user output a log message. This was theoretically used by the defunct
     * tensorboard_logging module, which has since been removed; this field is
     * now deprecated and should not be used.
     * </pre>
     *
     * <code>.tensorflow.LogMessage log_message = 6 [deprecated = true];</code>
     */
    @java.lang.Deprecated public Builder setLogMessage(org.tensorflow.proto.util.LogMessage value) {
      if (logMessageBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        what_ = value;
        onChanged();
      } else {
        logMessageBuilder_.setMessage(value);
      }
      whatCase_ = 6;
      return this;
    }
    /**
     * <pre>
     * The user output a log message. This was theoretically used by the defunct
     * tensorboard_logging module, which has since been removed; this field is
     * now deprecated and should not be used.
     * </pre>
     *
     * <code>.tensorflow.LogMessage log_message = 6 [deprecated = true];</code>
     */
    @java.lang.Deprecated public Builder setLogMessage(
        org.tensorflow.proto.util.LogMessage.Builder builderForValue) {
      if (logMessageBuilder_ == null) {
        what_ = builderForValue.build();
        onChanged();
      } else {
        logMessageBuilder_.setMessage(builderForValue.build());
      }
      whatCase_ = 6;
      return this;
    }
    /**
     * <pre>
     * The user output a log message. This was theoretically used by the defunct
     * tensorboard_logging module, which has since been removed; this field is
     * now deprecated and should not be used.
     * </pre>
     *
     * <code>.tensorflow.LogMessage log_message = 6 [deprecated = true];</code>
     */
    @java.lang.Deprecated public Builder mergeLogMessage(org.tensorflow.proto.util.LogMessage value) {
      if (logMessageBuilder_ == null) {
        if (whatCase_ == 6 &&
            what_ != org.tensorflow.proto.util.LogMessage.getDefaultInstance()) {
          what_ = org.tensorflow.proto.util.LogMessage.newBuilder((org.tensorflow.proto.util.LogMessage) what_)
              .mergeFrom(value).buildPartial();
        } else {
          what_ = value;
        }
        onChanged();
      } else {
        if (whatCase_ == 6) {
          logMessageBuilder_.mergeFrom(value);
        }
        logMessageBuilder_.setMessage(value);
      }
      whatCase_ = 6;
      return this;
    }
    /**
     * <pre>
     * The user output a log message. This was theoretically used by the defunct
     * tensorboard_logging module, which has since been removed; this field is
     * now deprecated and should not be used.
     * </pre>
     *
     * <code>.tensorflow.LogMessage log_message = 6 [deprecated = true];</code>
     */
    @java.lang.Deprecated public Builder clearLogMessage() {
      if (logMessageBuilder_ == null) {
        if (whatCase_ == 6) {
          whatCase_ = 0;
          what_ = null;
          onChanged();
        }
      } else {
        if (whatCase_ == 6) {
          whatCase_ = 0;
          what_ = null;
        }
        logMessageBuilder_.clear();
      }
      return this;
    }
    /**
     * <pre>
     * The user output a log message. This was theoretically used by the defunct
     * tensorboard_logging module, which has since been removed; this field is
     * now deprecated and should not be used.
     * </pre>
     *
     * <code>.tensorflow.LogMessage log_message = 6 [deprecated = true];</code>
     */
    @java.lang.Deprecated public org.tensorflow.proto.util.LogMessage.Builder getLogMessageBuilder() {
      return getLogMessageFieldBuilder().getBuilder();
    }
    /**
     * <pre>
     * The user output a log message. This was theoretically used by the defunct
     * tensorboard_logging module, which has since been removed; this field is
     * now deprecated and should not be used.
     * </pre>
     *
     * <code>.tensorflow.LogMessage log_message = 6 [deprecated = true];</code>
     */
    @java.lang.Deprecated public org.tensorflow.proto.util.LogMessageOrBuilder getLogMessageOrBuilder() {
      if ((whatCase_ == 6) && (logMessageBuilder_ != null)) {
        return logMessageBuilder_.getMessageOrBuilder();
      } else {
        if (whatCase_ == 6) {
          return (org.tensorflow.proto.util.LogMessage) what_;
        }
        return org.tensorflow.proto.util.LogMessage.getDefaultInstance();
      }
    }
    /**
     * <pre>
     * The user output a log message. This was theoretically used by the defunct
     * tensorboard_logging module, which has since been removed; this field is
     * now deprecated and should not be used.
     * </pre>
     *
     * <code>.tensorflow.LogMessage log_message = 6 [deprecated = true];</code>
     */
    private com.google.protobuf.SingleFieldBuilderV3<
        org.tensorflow.proto.util.LogMessage, org.tensorflow.proto.util.LogMessage.Builder, org.tensorflow.proto.util.LogMessageOrBuilder> 
        getLogMessageFieldBuilder() {
      if (logMessageBuilder_ == null) {
        if (!(whatCase_ == 6)) {
          what_ = org.tensorflow.proto.util.LogMessage.getDefaultInstance();
        }
        logMessageBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
            org.tensorflow.proto.util.LogMessage, org.tensorflow.proto.util.LogMessage.Builder, org.tensorflow.proto.util.LogMessageOrBuilder>(
                (org.tensorflow.proto.util.LogMessage) what_,
                getParentForChildren(),
                isClean());
        what_ = null;
      }
      whatCase_ = 6;
      onChanged();;
      return logMessageBuilder_;
    }

    private com.google.protobuf.SingleFieldBuilderV3<
        org.tensorflow.proto.util.SessionLog, org.tensorflow.proto.util.SessionLog.Builder, org.tensorflow.proto.util.SessionLogOrBuilder> sessionLogBuilder_;
    /**
     * <pre>
     * The state of the session which can be used for restarting after crashes.
     * </pre>
     *
     * <code>.tensorflow.SessionLog session_log = 7;</code>
     */
    public boolean hasSessionLog() {
      return whatCase_ == 7;
    }
    /**
     * <pre>
     * The state of the session which can be used for restarting after crashes.
     * </pre>
     *
     * <code>.tensorflow.SessionLog session_log = 7;</code>
     */
    public org.tensorflow.proto.util.SessionLog getSessionLog() {
      if (sessionLogBuilder_ == null) {
        if (whatCase_ == 7) {
          return (org.tensorflow.proto.util.SessionLog) what_;
        }
        return org.tensorflow.proto.util.SessionLog.getDefaultInstance();
      } else {
        if (whatCase_ == 7) {
          return sessionLogBuilder_.getMessage();
        }
        return org.tensorflow.proto.util.SessionLog.getDefaultInstance();
      }
    }
    /**
     * <pre>
     * The state of the session which can be used for restarting after crashes.
     * </pre>
     *
     * <code>.tensorflow.SessionLog session_log = 7;</code>
     */
    public Builder setSessionLog(org.tensorflow.proto.util.SessionLog value) {
      if (sessionLogBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        what_ = value;
        onChanged();
      } else {
        sessionLogBuilder_.setMessage(value);
      }
      whatCase_ = 7;
      return this;
    }
    /**
     * <pre>
     * The state of the session which can be used for restarting after crashes.
     * </pre>
     *
     * <code>.tensorflow.SessionLog session_log = 7;</code>
     */
    public Builder setSessionLog(
        org.tensorflow.proto.util.SessionLog.Builder builderForValue) {
      if (sessionLogBuilder_ == null) {
        what_ = builderForValue.build();
        onChanged();
      } else {
        sessionLogBuilder_.setMessage(builderForValue.build());
      }
      whatCase_ = 7;
      return this;
    }
    /**
     * <pre>
     * The state of the session which can be used for restarting after crashes.
     * </pre>
     *
     * <code>.tensorflow.SessionLog session_log = 7;</code>
     */
    public Builder mergeSessionLog(org.tensorflow.proto.util.SessionLog value) {
      if (sessionLogBuilder_ == null) {
        if (whatCase_ == 7 &&
            what_ != org.tensorflow.proto.util.SessionLog.getDefaultInstance()) {
          what_ = org.tensorflow.proto.util.SessionLog.newBuilder((org.tensorflow.proto.util.SessionLog) what_)
              .mergeFrom(value).buildPartial();
        } else {
          what_ = value;
        }
        onChanged();
      } else {
        if (whatCase_ == 7) {
          sessionLogBuilder_.mergeFrom(value);
        }
        sessionLogBuilder_.setMessage(value);
      }
      whatCase_ = 7;
      return this;
    }
    /**
     * <pre>
     * The state of the session which can be used for restarting after crashes.
     * </pre>
     *
     * <code>.tensorflow.SessionLog session_log = 7;</code>
     */
    public Builder clearSessionLog() {
      if (sessionLogBuilder_ == null) {
        if (whatCase_ == 7) {
          whatCase_ = 0;
          what_ = null;
          onChanged();
        }
      } else {
        if (whatCase_ == 7) {
          whatCase_ = 0;
          what_ = null;
        }
        sessionLogBuilder_.clear();
      }
      return this;
    }
    /**
     * <pre>
     * The state of the session which can be used for restarting after crashes.
     * </pre>
     *
     * <code>.tensorflow.SessionLog session_log = 7;</code>
     */
    public org.tensorflow.proto.util.SessionLog.Builder getSessionLogBuilder() {
      return getSessionLogFieldBuilder().getBuilder();
    }
    /**
     * <pre>
     * The state of the session which can be used for restarting after crashes.
     * </pre>
     *
     * <code>.tensorflow.SessionLog session_log = 7;</code>
     */
    public org.tensorflow.proto.util.SessionLogOrBuilder getSessionLogOrBuilder() {
      if ((whatCase_ == 7) && (sessionLogBuilder_ != null)) {
        return sessionLogBuilder_.getMessageOrBuilder();
      } else {
        if (whatCase_ == 7) {
          return (org.tensorflow.proto.util.SessionLog) what_;
        }
        return org.tensorflow.proto.util.SessionLog.getDefaultInstance();
      }
    }
    /**
     * <pre>
     * The state of the session which can be used for restarting after crashes.
     * </pre>
     *
     * <code>.tensorflow.SessionLog session_log = 7;</code>
     */
    private com.google.protobuf.SingleFieldBuilderV3<
        org.tensorflow.proto.util.SessionLog, org.tensorflow.proto.util.SessionLog.Builder, org.tensorflow.proto.util.SessionLogOrBuilder> 
        getSessionLogFieldBuilder() {
      if (sessionLogBuilder_ == null) {
        if (!(whatCase_ == 7)) {
          what_ = org.tensorflow.proto.util.SessionLog.getDefaultInstance();
        }
        sessionLogBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
            org.tensorflow.proto.util.SessionLog, org.tensorflow.proto.util.SessionLog.Builder, org.tensorflow.proto.util.SessionLogOrBuilder>(
                (org.tensorflow.proto.util.SessionLog) what_,
                getParentForChildren(),
                isClean());
        what_ = null;
      }
      whatCase_ = 7;
      onChanged();;
      return sessionLogBuilder_;
    }

    private com.google.protobuf.SingleFieldBuilderV3<
        org.tensorflow.proto.util.TaggedRunMetadata, org.tensorflow.proto.util.TaggedRunMetadata.Builder, org.tensorflow.proto.util.TaggedRunMetadataOrBuilder> taggedRunMetadataBuilder_;
    /**
     * <pre>
     * The metadata returned by running a session.run() call.
     * </pre>
     *
     * <code>.tensorflow.TaggedRunMetadata tagged_run_metadata = 8;</code>
     */
    public boolean hasTaggedRunMetadata() {
      return whatCase_ == 8;
    }
    /**
     * <pre>
     * The metadata returned by running a session.run() call.
     * </pre>
     *
     * <code>.tensorflow.TaggedRunMetadata tagged_run_metadata = 8;</code>
     */
    public org.tensorflow.proto.util.TaggedRunMetadata getTaggedRunMetadata() {
      if (taggedRunMetadataBuilder_ == null) {
        if (whatCase_ == 8) {
          return (org.tensorflow.proto.util.TaggedRunMetadata) what_;
        }
        return org.tensorflow.proto.util.TaggedRunMetadata.getDefaultInstance();
      } else {
        if (whatCase_ == 8) {
          return taggedRunMetadataBuilder_.getMessage();
        }
        return org.tensorflow.proto.util.TaggedRunMetadata.getDefaultInstance();
      }
    }
    /**
     * <pre>
     * The metadata returned by running a session.run() call.
     * </pre>
     *
     * <code>.tensorflow.TaggedRunMetadata tagged_run_metadata = 8;</code>
     */
    public Builder setTaggedRunMetadata(org.tensorflow.proto.util.TaggedRunMetadata value) {
      if (taggedRunMetadataBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        what_ = value;
        onChanged();
      } else {
        taggedRunMetadataBuilder_.setMessage(value);
      }
      whatCase_ = 8;
      return this;
    }
    /**
     * <pre>
     * The metadata returned by running a session.run() call.
     * </pre>
     *
     * <code>.tensorflow.TaggedRunMetadata tagged_run_metadata = 8;</code>
     */
    public Builder setTaggedRunMetadata(
        org.tensorflow.proto.util.TaggedRunMetadata.Builder builderForValue) {
      if (taggedRunMetadataBuilder_ == null) {
        what_ = builderForValue.build();
        onChanged();
      } else {
        taggedRunMetadataBuilder_.setMessage(builderForValue.build());
      }
      whatCase_ = 8;
      return this;
    }
    /**
     * <pre>
     * The metadata returned by running a session.run() call.
     * </pre>
     *
     * <code>.tensorflow.TaggedRunMetadata tagged_run_metadata = 8;</code>
     */
    public Builder mergeTaggedRunMetadata(org.tensorflow.proto.util.TaggedRunMetadata value) {
      if (taggedRunMetadataBuilder_ == null) {
        if (whatCase_ == 8 &&
            what_ != org.tensorflow.proto.util.TaggedRunMetadata.getDefaultInstance()) {
          what_ = org.tensorflow.proto.util.TaggedRunMetadata.newBuilder((org.tensorflow.proto.util.TaggedRunMetadata) what_)
              .mergeFrom(value).buildPartial();
        } else {
          what_ = value;
        }
        onChanged();
      } else {
        if (whatCase_ == 8) {
          taggedRunMetadataBuilder_.mergeFrom(value);
        }
        taggedRunMetadataBuilder_.setMessage(value);
      }
      whatCase_ = 8;
      return this;
    }
    /**
     * <pre>
     * The metadata returned by running a session.run() call.
     * </pre>
     *
     * <code>.tensorflow.TaggedRunMetadata tagged_run_metadata = 8;</code>
     */
    public Builder clearTaggedRunMetadata() {
      if (taggedRunMetadataBuilder_ == null) {
        if (whatCase_ == 8) {
          whatCase_ = 0;
          what_ = null;
          onChanged();
        }
      } else {
        if (whatCase_ == 8) {
          whatCase_ = 0;
          what_ = null;
        }
        taggedRunMetadataBuilder_.clear();
      }
      return this;
    }
    /**
     * <pre>
     * The metadata returned by running a session.run() call.
     * </pre>
     *
     * <code>.tensorflow.TaggedRunMetadata tagged_run_metadata = 8;</code>
     */
    public org.tensorflow.proto.util.TaggedRunMetadata.Builder getTaggedRunMetadataBuilder() {
      return getTaggedRunMetadataFieldBuilder().getBuilder();
    }
    /**
     * <pre>
     * The metadata returned by running a session.run() call.
     * </pre>
     *
     * <code>.tensorflow.TaggedRunMetadata tagged_run_metadata = 8;</code>
     */
    public org.tensorflow.proto.util.TaggedRunMetadataOrBuilder getTaggedRunMetadataOrBuilder() {
      if ((whatCase_ == 8) && (taggedRunMetadataBuilder_ != null)) {
        return taggedRunMetadataBuilder_.getMessageOrBuilder();
      } else {
        if (whatCase_ == 8) {
          return (org.tensorflow.proto.util.TaggedRunMetadata) what_;
        }
        return org.tensorflow.proto.util.TaggedRunMetadata.getDefaultInstance();
      }
    }
    /**
     * <pre>
     * The metadata returned by running a session.run() call.
     * </pre>
     *
     * <code>.tensorflow.TaggedRunMetadata tagged_run_metadata = 8;</code>
     */
    private com.google.protobuf.SingleFieldBuilderV3<
        org.tensorflow.proto.util.TaggedRunMetadata, org.tensorflow.proto.util.TaggedRunMetadata.Builder, org.tensorflow.proto.util.TaggedRunMetadataOrBuilder> 
        getTaggedRunMetadataFieldBuilder() {
      if (taggedRunMetadataBuilder_ == null) {
        if (!(whatCase_ == 8)) {
          what_ = org.tensorflow.proto.util.TaggedRunMetadata.getDefaultInstance();
        }
        taggedRunMetadataBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
            org.tensorflow.proto.util.TaggedRunMetadata, org.tensorflow.proto.util.TaggedRunMetadata.Builder, org.tensorflow.proto.util.TaggedRunMetadataOrBuilder>(
                (org.tensorflow.proto.util.TaggedRunMetadata) what_,
                getParentForChildren(),
                isClean());
        what_ = null;
      }
      whatCase_ = 8;
      onChanged();;
      return taggedRunMetadataBuilder_;
    }

    /**
     * <pre>
     * An encoded version of a MetaGraphDef.
     * </pre>
     *
     * <code>bytes meta_graph_def = 9;</code>
     */
    public com.google.protobuf.ByteString getMetaGraphDef() {
      if (whatCase_ == 9) {
        return (com.google.protobuf.ByteString) what_;
      }
      return com.google.protobuf.ByteString.EMPTY;
    }
    /**
     * <pre>
     * An encoded version of a MetaGraphDef.
     * </pre>
     *
     * <code>bytes meta_graph_def = 9;</code>
     */
    public Builder setMetaGraphDef(com.google.protobuf.ByteString value) {
      if (value == null) {
    throw new NullPointerException();
  }
  whatCase_ = 9;
      what_ = value;
      onChanged();
      return this;
    }
    /**
     * <pre>
     * An encoded version of a MetaGraphDef.
     * </pre>
     *
     * <code>bytes meta_graph_def = 9;</code>
     */
    public Builder clearMetaGraphDef() {
      if (whatCase_ == 9) {
        whatCase_ = 0;
        what_ = 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.Event)
  }

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

  public static org.tensorflow.proto.util.Event getDefaultInstance() {
    return DEFAULT_INSTANCE;
  }

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

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

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

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

}

