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

package org.tensorflow.proto.distruntime;

/**
 * <pre>
 * Defines the configuration of a single TensorFlow server.
 * </pre>
 *
 * Protobuf type {@code tensorflow.ServerDef}
 */
public  final class ServerDef extends
    com.google.protobuf.GeneratedMessageV3 implements
    // @@protoc_insertion_point(message_implements:tensorflow.ServerDef)
    ServerDefOrBuilder {
private static final long serialVersionUID = 0L;
  // Use ServerDef.newBuilder() to construct.
  private ServerDef(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
    super(builder);
  }
  private ServerDef() {
    jobName_ = "";
    protocol_ = "";
  }

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

  @java.lang.Override
  public final com.google.protobuf.UnknownFieldSet
  getUnknownFields() {
    return this.unknownFields;
  }
  private ServerDef(
      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 10: {
            org.tensorflow.proto.distruntime.ClusterDef.Builder subBuilder = null;
            if (cluster_ != null) {
              subBuilder = cluster_.toBuilder();
            }
            cluster_ = input.readMessage(org.tensorflow.proto.distruntime.ClusterDef.parser(), extensionRegistry);
            if (subBuilder != null) {
              subBuilder.mergeFrom(cluster_);
              cluster_ = subBuilder.buildPartial();
            }

            break;
          }
          case 18: {
            java.lang.String s = input.readStringRequireUtf8();

            jobName_ = s;
            break;
          }
          case 24: {

            taskIndex_ = input.readInt32();
            break;
          }
          case 34: {
            org.tensorflow.proto.framework.ConfigProto.Builder subBuilder = null;
            if (defaultSessionConfig_ != null) {
              subBuilder = defaultSessionConfig_.toBuilder();
            }
            defaultSessionConfig_ = input.readMessage(org.tensorflow.proto.framework.ConfigProto.parser(), extensionRegistry);
            if (subBuilder != null) {
              subBuilder.mergeFrom(defaultSessionConfig_);
              defaultSessionConfig_ = subBuilder.buildPartial();
            }

            break;
          }
          case 42: {
            java.lang.String s = input.readStringRequireUtf8();

            protocol_ = s;
            break;
          }
          case 48: {

            port_ = input.readInt32();
            break;
          }
          case 58: {
            org.tensorflow.proto.distruntime.ClusterDeviceFilters.Builder subBuilder = null;
            if (clusterDeviceFilters_ != null) {
              subBuilder = clusterDeviceFilters_.toBuilder();
            }
            clusterDeviceFilters_ = input.readMessage(org.tensorflow.proto.distruntime.ClusterDeviceFilters.parser(), extensionRegistry);
            if (subBuilder != null) {
              subBuilder.mergeFrom(clusterDeviceFilters_);
              clusterDeviceFilters_ = subBuilder.buildPartial();
            }

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

  @java.lang.Override
  protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
      internalGetFieldAccessorTable() {
    return org.tensorflow.proto.distruntime.ServerProtos.internal_static_tensorflow_ServerDef_fieldAccessorTable
        .ensureFieldAccessorsInitialized(
            org.tensorflow.proto.distruntime.ServerDef.class, org.tensorflow.proto.distruntime.ServerDef.Builder.class);
  }

  public static final int CLUSTER_FIELD_NUMBER = 1;
  private org.tensorflow.proto.distruntime.ClusterDef cluster_;
  /**
   * <pre>
   * The cluster of which this server is a member.
   * </pre>
   *
   * <code>.tensorflow.ClusterDef cluster = 1;</code>
   */
  public boolean hasCluster() {
    return cluster_ != null;
  }
  /**
   * <pre>
   * The cluster of which this server is a member.
   * </pre>
   *
   * <code>.tensorflow.ClusterDef cluster = 1;</code>
   */
  public org.tensorflow.proto.distruntime.ClusterDef getCluster() {
    return cluster_ == null ? org.tensorflow.proto.distruntime.ClusterDef.getDefaultInstance() : cluster_;
  }
  /**
   * <pre>
   * The cluster of which this server is a member.
   * </pre>
   *
   * <code>.tensorflow.ClusterDef cluster = 1;</code>
   */
  public org.tensorflow.proto.distruntime.ClusterDefOrBuilder getClusterOrBuilder() {
    return getCluster();
  }

  public static final int JOB_NAME_FIELD_NUMBER = 2;
  private volatile java.lang.Object jobName_;
  /**
   * <pre>
   * The name of the job of which this server is a member.
   * NOTE(mrry): The `cluster` field must contain a `JobDef` with a `name` field
   * that matches this name.
   * </pre>
   *
   * <code>string job_name = 2;</code>
   */
  public java.lang.String getJobName() {
    java.lang.Object ref = jobName_;
    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();
      jobName_ = s;
      return s;
    }
  }
  /**
   * <pre>
   * The name of the job of which this server is a member.
   * NOTE(mrry): The `cluster` field must contain a `JobDef` with a `name` field
   * that matches this name.
   * </pre>
   *
   * <code>string job_name = 2;</code>
   */
  public com.google.protobuf.ByteString
      getJobNameBytes() {
    java.lang.Object ref = jobName_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b = 
          com.google.protobuf.ByteString.copyFromUtf8(
              (java.lang.String) ref);
      jobName_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int TASK_INDEX_FIELD_NUMBER = 3;
  private int taskIndex_;
  /**
   * <pre>
   * The task index of this server in its job.
   * NOTE: The `cluster` field must contain a `JobDef` with a matching `name`
   * and a mapping in its `tasks` field for this index.
   * </pre>
   *
   * <code>int32 task_index = 3;</code>
   */
  public int getTaskIndex() {
    return taskIndex_;
  }

  public static final int DEFAULT_SESSION_CONFIG_FIELD_NUMBER = 4;
  private org.tensorflow.proto.framework.ConfigProto defaultSessionConfig_;
  /**
   * <pre>
   * The default configuration for sessions that run on this server.
   * </pre>
   *
   * <code>.tensorflow.ConfigProto default_session_config = 4;</code>
   */
  public boolean hasDefaultSessionConfig() {
    return defaultSessionConfig_ != null;
  }
  /**
   * <pre>
   * The default configuration for sessions that run on this server.
   * </pre>
   *
   * <code>.tensorflow.ConfigProto default_session_config = 4;</code>
   */
  public org.tensorflow.proto.framework.ConfigProto getDefaultSessionConfig() {
    return defaultSessionConfig_ == null ? org.tensorflow.proto.framework.ConfigProto.getDefaultInstance() : defaultSessionConfig_;
  }
  /**
   * <pre>
   * The default configuration for sessions that run on this server.
   * </pre>
   *
   * <code>.tensorflow.ConfigProto default_session_config = 4;</code>
   */
  public org.tensorflow.proto.framework.ConfigProtoOrBuilder getDefaultSessionConfigOrBuilder() {
    return getDefaultSessionConfig();
  }

  public static final int PROTOCOL_FIELD_NUMBER = 5;
  private volatile java.lang.Object protocol_;
  /**
   * <pre>
   * The protocol to be used by this server.
   * Acceptable values include: "grpc", "grpc+verbs".
   * </pre>
   *
   * <code>string protocol = 5;</code>
   */
  public java.lang.String getProtocol() {
    java.lang.Object ref = protocol_;
    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();
      protocol_ = s;
      return s;
    }
  }
  /**
   * <pre>
   * The protocol to be used by this server.
   * Acceptable values include: "grpc", "grpc+verbs".
   * </pre>
   *
   * <code>string protocol = 5;</code>
   */
  public com.google.protobuf.ByteString
      getProtocolBytes() {
    java.lang.Object ref = protocol_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b = 
          com.google.protobuf.ByteString.copyFromUtf8(
              (java.lang.String) ref);
      protocol_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int PORT_FIELD_NUMBER = 6;
  private int port_;
  /**
   * <pre>
   * The server port. If not set, then we identify the port from the job_name.
   * </pre>
   *
   * <code>int32 port = 6;</code>
   */
  public int getPort() {
    return port_;
  }

  public static final int CLUSTER_DEVICE_FILTERS_FIELD_NUMBER = 7;
  private org.tensorflow.proto.distruntime.ClusterDeviceFilters clusterDeviceFilters_;
  /**
   * <pre>
   * Device filters for remote tasks in the cluster.
   * NOTE: This is an experimental feature and only effective in TensorFlow 2.x.
   * </pre>
   *
   * <code>.tensorflow.ClusterDeviceFilters cluster_device_filters = 7;</code>
   */
  public boolean hasClusterDeviceFilters() {
    return clusterDeviceFilters_ != null;
  }
  /**
   * <pre>
   * Device filters for remote tasks in the cluster.
   * NOTE: This is an experimental feature and only effective in TensorFlow 2.x.
   * </pre>
   *
   * <code>.tensorflow.ClusterDeviceFilters cluster_device_filters = 7;</code>
   */
  public org.tensorflow.proto.distruntime.ClusterDeviceFilters getClusterDeviceFilters() {
    return clusterDeviceFilters_ == null ? org.tensorflow.proto.distruntime.ClusterDeviceFilters.getDefaultInstance() : clusterDeviceFilters_;
  }
  /**
   * <pre>
   * Device filters for remote tasks in the cluster.
   * NOTE: This is an experimental feature and only effective in TensorFlow 2.x.
   * </pre>
   *
   * <code>.tensorflow.ClusterDeviceFilters cluster_device_filters = 7;</code>
   */
  public org.tensorflow.proto.distruntime.ClusterDeviceFiltersOrBuilder getClusterDeviceFiltersOrBuilder() {
    return getClusterDeviceFilters();
  }

  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 (cluster_ != null) {
      output.writeMessage(1, getCluster());
    }
    if (!getJobNameBytes().isEmpty()) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 2, jobName_);
    }
    if (taskIndex_ != 0) {
      output.writeInt32(3, taskIndex_);
    }
    if (defaultSessionConfig_ != null) {
      output.writeMessage(4, getDefaultSessionConfig());
    }
    if (!getProtocolBytes().isEmpty()) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 5, protocol_);
    }
    if (port_ != 0) {
      output.writeInt32(6, port_);
    }
    if (clusterDeviceFilters_ != null) {
      output.writeMessage(7, getClusterDeviceFilters());
    }
    unknownFields.writeTo(output);
  }

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

    size = 0;
    if (cluster_ != null) {
      size += com.google.protobuf.CodedOutputStream
        .computeMessageSize(1, getCluster());
    }
    if (!getJobNameBytes().isEmpty()) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, jobName_);
    }
    if (taskIndex_ != 0) {
      size += com.google.protobuf.CodedOutputStream
        .computeInt32Size(3, taskIndex_);
    }
    if (defaultSessionConfig_ != null) {
      size += com.google.protobuf.CodedOutputStream
        .computeMessageSize(4, getDefaultSessionConfig());
    }
    if (!getProtocolBytes().isEmpty()) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, protocol_);
    }
    if (port_ != 0) {
      size += com.google.protobuf.CodedOutputStream
        .computeInt32Size(6, port_);
    }
    if (clusterDeviceFilters_ != null) {
      size += com.google.protobuf.CodedOutputStream
        .computeMessageSize(7, getClusterDeviceFilters());
    }
    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.distruntime.ServerDef)) {
      return super.equals(obj);
    }
    org.tensorflow.proto.distruntime.ServerDef other = (org.tensorflow.proto.distruntime.ServerDef) obj;

    if (hasCluster() != other.hasCluster()) return false;
    if (hasCluster()) {
      if (!getCluster()
          .equals(other.getCluster())) return false;
    }
    if (!getJobName()
        .equals(other.getJobName())) return false;
    if (getTaskIndex()
        != other.getTaskIndex()) return false;
    if (hasDefaultSessionConfig() != other.hasDefaultSessionConfig()) return false;
    if (hasDefaultSessionConfig()) {
      if (!getDefaultSessionConfig()
          .equals(other.getDefaultSessionConfig())) return false;
    }
    if (!getProtocol()
        .equals(other.getProtocol())) return false;
    if (getPort()
        != other.getPort()) return false;
    if (hasClusterDeviceFilters() != other.hasClusterDeviceFilters()) return false;
    if (hasClusterDeviceFilters()) {
      if (!getClusterDeviceFilters()
          .equals(other.getClusterDeviceFilters())) return false;
    }
    if (!unknownFields.equals(other.unknownFields)) return false;
    return true;
  }

  @java.lang.Override
  public int hashCode() {
    if (memoizedHashCode != 0) {
      return memoizedHashCode;
    }
    int hash = 41;
    hash = (19 * hash) + getDescriptor().hashCode();
    if (hasCluster()) {
      hash = (37 * hash) + CLUSTER_FIELD_NUMBER;
      hash = (53 * hash) + getCluster().hashCode();
    }
    hash = (37 * hash) + JOB_NAME_FIELD_NUMBER;
    hash = (53 * hash) + getJobName().hashCode();
    hash = (37 * hash) + TASK_INDEX_FIELD_NUMBER;
    hash = (53 * hash) + getTaskIndex();
    if (hasDefaultSessionConfig()) {
      hash = (37 * hash) + DEFAULT_SESSION_CONFIG_FIELD_NUMBER;
      hash = (53 * hash) + getDefaultSessionConfig().hashCode();
    }
    hash = (37 * hash) + PROTOCOL_FIELD_NUMBER;
    hash = (53 * hash) + getProtocol().hashCode();
    hash = (37 * hash) + PORT_FIELD_NUMBER;
    hash = (53 * hash) + getPort();
    if (hasClusterDeviceFilters()) {
      hash = (37 * hash) + CLUSTER_DEVICE_FILTERS_FIELD_NUMBER;
      hash = (53 * hash) + getClusterDeviceFilters().hashCode();
    }
    hash = (29 * hash) + unknownFields.hashCode();
    memoizedHashCode = hash;
    return hash;
  }

  public static org.tensorflow.proto.distruntime.ServerDef parseFrom(
      java.nio.ByteBuffer data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }
  public static org.tensorflow.proto.distruntime.ServerDef 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.distruntime.ServerDef parseFrom(
      com.google.protobuf.ByteString data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }
  public static org.tensorflow.proto.distruntime.ServerDef 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.distruntime.ServerDef parseFrom(byte[] data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }
  public static org.tensorflow.proto.distruntime.ServerDef parseFrom(
      byte[] data,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data, extensionRegistry);
  }
  public static org.tensorflow.proto.distruntime.ServerDef parseFrom(java.io.InputStream input)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3
        .parseWithIOException(PARSER, input);
  }
  public static org.tensorflow.proto.distruntime.ServerDef 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.distruntime.ServerDef parseDelimitedFrom(java.io.InputStream input)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3
        .parseDelimitedWithIOException(PARSER, input);
  }
  public static org.tensorflow.proto.distruntime.ServerDef 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.distruntime.ServerDef parseFrom(
      com.google.protobuf.CodedInputStream input)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3
        .parseWithIOException(PARSER, input);
  }
  public static org.tensorflow.proto.distruntime.ServerDef 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.distruntime.ServerDef 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>
   * Defines the configuration of a single TensorFlow server.
   * </pre>
   *
   * Protobuf type {@code tensorflow.ServerDef}
   */
  public static final class Builder extends
      com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
      // @@protoc_insertion_point(builder_implements:tensorflow.ServerDef)
      org.tensorflow.proto.distruntime.ServerDefOrBuilder {
    public static final com.google.protobuf.Descriptors.Descriptor
        getDescriptor() {
      return org.tensorflow.proto.distruntime.ServerProtos.internal_static_tensorflow_ServerDef_descriptor;
    }

    @java.lang.Override
    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
        internalGetFieldAccessorTable() {
      return org.tensorflow.proto.distruntime.ServerProtos.internal_static_tensorflow_ServerDef_fieldAccessorTable
          .ensureFieldAccessorsInitialized(
              org.tensorflow.proto.distruntime.ServerDef.class, org.tensorflow.proto.distruntime.ServerDef.Builder.class);
    }

    // Construct using org.tensorflow.proto.distruntime.ServerDef.newBuilder()
    private Builder() {
      maybeForceBuilderInitialization();
    }

    private Builder(
        com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
      super(parent);
      maybeForceBuilderInitialization();
    }
    private void maybeForceBuilderInitialization() {
      if (com.google.protobuf.GeneratedMessageV3
              .alwaysUseFieldBuilders) {
      }
    }
    @java.lang.Override
    public Builder clear() {
      super.clear();
      if (clusterBuilder_ == null) {
        cluster_ = null;
      } else {
        cluster_ = null;
        clusterBuilder_ = null;
      }
      jobName_ = "";

      taskIndex_ = 0;

      if (defaultSessionConfigBuilder_ == null) {
        defaultSessionConfig_ = null;
      } else {
        defaultSessionConfig_ = null;
        defaultSessionConfigBuilder_ = null;
      }
      protocol_ = "";

      port_ = 0;

      if (clusterDeviceFiltersBuilder_ == null) {
        clusterDeviceFilters_ = null;
      } else {
        clusterDeviceFilters_ = null;
        clusterDeviceFiltersBuilder_ = null;
      }
      return this;
    }

    @java.lang.Override
    public com.google.protobuf.Descriptors.Descriptor
        getDescriptorForType() {
      return org.tensorflow.proto.distruntime.ServerProtos.internal_static_tensorflow_ServerDef_descriptor;
    }

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

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

    @java.lang.Override
    public org.tensorflow.proto.distruntime.ServerDef buildPartial() {
      org.tensorflow.proto.distruntime.ServerDef result = new org.tensorflow.proto.distruntime.ServerDef(this);
      if (clusterBuilder_ == null) {
        result.cluster_ = cluster_;
      } else {
        result.cluster_ = clusterBuilder_.build();
      }
      result.jobName_ = jobName_;
      result.taskIndex_ = taskIndex_;
      if (defaultSessionConfigBuilder_ == null) {
        result.defaultSessionConfig_ = defaultSessionConfig_;
      } else {
        result.defaultSessionConfig_ = defaultSessionConfigBuilder_.build();
      }
      result.protocol_ = protocol_;
      result.port_ = port_;
      if (clusterDeviceFiltersBuilder_ == null) {
        result.clusterDeviceFilters_ = clusterDeviceFilters_;
      } else {
        result.clusterDeviceFilters_ = clusterDeviceFiltersBuilder_.build();
      }
      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.distruntime.ServerDef) {
        return mergeFrom((org.tensorflow.proto.distruntime.ServerDef)other);
      } else {
        super.mergeFrom(other);
        return this;
      }
    }

    public Builder mergeFrom(org.tensorflow.proto.distruntime.ServerDef other) {
      if (other == org.tensorflow.proto.distruntime.ServerDef.getDefaultInstance()) return this;
      if (other.hasCluster()) {
        mergeCluster(other.getCluster());
      }
      if (!other.getJobName().isEmpty()) {
        jobName_ = other.jobName_;
        onChanged();
      }
      if (other.getTaskIndex() != 0) {
        setTaskIndex(other.getTaskIndex());
      }
      if (other.hasDefaultSessionConfig()) {
        mergeDefaultSessionConfig(other.getDefaultSessionConfig());
      }
      if (!other.getProtocol().isEmpty()) {
        protocol_ = other.protocol_;
        onChanged();
      }
      if (other.getPort() != 0) {
        setPort(other.getPort());
      }
      if (other.hasClusterDeviceFilters()) {
        mergeClusterDeviceFilters(other.getClusterDeviceFilters());
      }
      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.distruntime.ServerDef parsedMessage = null;
      try {
        parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
      } catch (com.google.protobuf.InvalidProtocolBufferException e) {
        parsedMessage = (org.tensorflow.proto.distruntime.ServerDef) e.getUnfinishedMessage();
        throw e.unwrapIOException();
      } finally {
        if (parsedMessage != null) {
          mergeFrom(parsedMessage);
        }
      }
      return this;
    }

    private org.tensorflow.proto.distruntime.ClusterDef cluster_;
    private com.google.protobuf.SingleFieldBuilderV3<
        org.tensorflow.proto.distruntime.ClusterDef, org.tensorflow.proto.distruntime.ClusterDef.Builder, org.tensorflow.proto.distruntime.ClusterDefOrBuilder> clusterBuilder_;
    /**
     * <pre>
     * The cluster of which this server is a member.
     * </pre>
     *
     * <code>.tensorflow.ClusterDef cluster = 1;</code>
     */
    public boolean hasCluster() {
      return clusterBuilder_ != null || cluster_ != null;
    }
    /**
     * <pre>
     * The cluster of which this server is a member.
     * </pre>
     *
     * <code>.tensorflow.ClusterDef cluster = 1;</code>
     */
    public org.tensorflow.proto.distruntime.ClusterDef getCluster() {
      if (clusterBuilder_ == null) {
        return cluster_ == null ? org.tensorflow.proto.distruntime.ClusterDef.getDefaultInstance() : cluster_;
      } else {
        return clusterBuilder_.getMessage();
      }
    }
    /**
     * <pre>
     * The cluster of which this server is a member.
     * </pre>
     *
     * <code>.tensorflow.ClusterDef cluster = 1;</code>
     */
    public Builder setCluster(org.tensorflow.proto.distruntime.ClusterDef value) {
      if (clusterBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        cluster_ = value;
        onChanged();
      } else {
        clusterBuilder_.setMessage(value);
      }

      return this;
    }
    /**
     * <pre>
     * The cluster of which this server is a member.
     * </pre>
     *
     * <code>.tensorflow.ClusterDef cluster = 1;</code>
     */
    public Builder setCluster(
        org.tensorflow.proto.distruntime.ClusterDef.Builder builderForValue) {
      if (clusterBuilder_ == null) {
        cluster_ = builderForValue.build();
        onChanged();
      } else {
        clusterBuilder_.setMessage(builderForValue.build());
      }

      return this;
    }
    /**
     * <pre>
     * The cluster of which this server is a member.
     * </pre>
     *
     * <code>.tensorflow.ClusterDef cluster = 1;</code>
     */
    public Builder mergeCluster(org.tensorflow.proto.distruntime.ClusterDef value) {
      if (clusterBuilder_ == null) {
        if (cluster_ != null) {
          cluster_ =
            org.tensorflow.proto.distruntime.ClusterDef.newBuilder(cluster_).mergeFrom(value).buildPartial();
        } else {
          cluster_ = value;
        }
        onChanged();
      } else {
        clusterBuilder_.mergeFrom(value);
      }

      return this;
    }
    /**
     * <pre>
     * The cluster of which this server is a member.
     * </pre>
     *
     * <code>.tensorflow.ClusterDef cluster = 1;</code>
     */
    public Builder clearCluster() {
      if (clusterBuilder_ == null) {
        cluster_ = null;
        onChanged();
      } else {
        cluster_ = null;
        clusterBuilder_ = null;
      }

      return this;
    }
    /**
     * <pre>
     * The cluster of which this server is a member.
     * </pre>
     *
     * <code>.tensorflow.ClusterDef cluster = 1;</code>
     */
    public org.tensorflow.proto.distruntime.ClusterDef.Builder getClusterBuilder() {
      
      onChanged();
      return getClusterFieldBuilder().getBuilder();
    }
    /**
     * <pre>
     * The cluster of which this server is a member.
     * </pre>
     *
     * <code>.tensorflow.ClusterDef cluster = 1;</code>
     */
    public org.tensorflow.proto.distruntime.ClusterDefOrBuilder getClusterOrBuilder() {
      if (clusterBuilder_ != null) {
        return clusterBuilder_.getMessageOrBuilder();
      } else {
        return cluster_ == null ?
            org.tensorflow.proto.distruntime.ClusterDef.getDefaultInstance() : cluster_;
      }
    }
    /**
     * <pre>
     * The cluster of which this server is a member.
     * </pre>
     *
     * <code>.tensorflow.ClusterDef cluster = 1;</code>
     */
    private com.google.protobuf.SingleFieldBuilderV3<
        org.tensorflow.proto.distruntime.ClusterDef, org.tensorflow.proto.distruntime.ClusterDef.Builder, org.tensorflow.proto.distruntime.ClusterDefOrBuilder> 
        getClusterFieldBuilder() {
      if (clusterBuilder_ == null) {
        clusterBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
            org.tensorflow.proto.distruntime.ClusterDef, org.tensorflow.proto.distruntime.ClusterDef.Builder, org.tensorflow.proto.distruntime.ClusterDefOrBuilder>(
                getCluster(),
                getParentForChildren(),
                isClean());
        cluster_ = null;
      }
      return clusterBuilder_;
    }

    private java.lang.Object jobName_ = "";
    /**
     * <pre>
     * The name of the job of which this server is a member.
     * NOTE(mrry): The `cluster` field must contain a `JobDef` with a `name` field
     * that matches this name.
     * </pre>
     *
     * <code>string job_name = 2;</code>
     */
    public java.lang.String getJobName() {
      java.lang.Object ref = jobName_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs =
            (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        jobName_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     * <pre>
     * The name of the job of which this server is a member.
     * NOTE(mrry): The `cluster` field must contain a `JobDef` with a `name` field
     * that matches this name.
     * </pre>
     *
     * <code>string job_name = 2;</code>
     */
    public com.google.protobuf.ByteString
        getJobNameBytes() {
      java.lang.Object ref = jobName_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b = 
            com.google.protobuf.ByteString.copyFromUtf8(
                (java.lang.String) ref);
        jobName_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     * <pre>
     * The name of the job of which this server is a member.
     * NOTE(mrry): The `cluster` field must contain a `JobDef` with a `name` field
     * that matches this name.
     * </pre>
     *
     * <code>string job_name = 2;</code>
     */
    public Builder setJobName(
        java.lang.String value) {
      if (value == null) {
    throw new NullPointerException();
  }
  
      jobName_ = value;
      onChanged();
      return this;
    }
    /**
     * <pre>
     * The name of the job of which this server is a member.
     * NOTE(mrry): The `cluster` field must contain a `JobDef` with a `name` field
     * that matches this name.
     * </pre>
     *
     * <code>string job_name = 2;</code>
     */
    public Builder clearJobName() {
      
      jobName_ = getDefaultInstance().getJobName();
      onChanged();
      return this;
    }
    /**
     * <pre>
     * The name of the job of which this server is a member.
     * NOTE(mrry): The `cluster` field must contain a `JobDef` with a `name` field
     * that matches this name.
     * </pre>
     *
     * <code>string job_name = 2;</code>
     */
    public Builder setJobNameBytes(
        com.google.protobuf.ByteString value) {
      if (value == null) {
    throw new NullPointerException();
  }
  checkByteStringIsUtf8(value);
      
      jobName_ = value;
      onChanged();
      return this;
    }

    private int taskIndex_ ;
    /**
     * <pre>
     * The task index of this server in its job.
     * NOTE: The `cluster` field must contain a `JobDef` with a matching `name`
     * and a mapping in its `tasks` field for this index.
     * </pre>
     *
     * <code>int32 task_index = 3;</code>
     */
    public int getTaskIndex() {
      return taskIndex_;
    }
    /**
     * <pre>
     * The task index of this server in its job.
     * NOTE: The `cluster` field must contain a `JobDef` with a matching `name`
     * and a mapping in its `tasks` field for this index.
     * </pre>
     *
     * <code>int32 task_index = 3;</code>
     */
    public Builder setTaskIndex(int value) {
      
      taskIndex_ = value;
      onChanged();
      return this;
    }
    /**
     * <pre>
     * The task index of this server in its job.
     * NOTE: The `cluster` field must contain a `JobDef` with a matching `name`
     * and a mapping in its `tasks` field for this index.
     * </pre>
     *
     * <code>int32 task_index = 3;</code>
     */
    public Builder clearTaskIndex() {
      
      taskIndex_ = 0;
      onChanged();
      return this;
    }

    private org.tensorflow.proto.framework.ConfigProto defaultSessionConfig_;
    private com.google.protobuf.SingleFieldBuilderV3<
        org.tensorflow.proto.framework.ConfigProto, org.tensorflow.proto.framework.ConfigProto.Builder, org.tensorflow.proto.framework.ConfigProtoOrBuilder> defaultSessionConfigBuilder_;
    /**
     * <pre>
     * The default configuration for sessions that run on this server.
     * </pre>
     *
     * <code>.tensorflow.ConfigProto default_session_config = 4;</code>
     */
    public boolean hasDefaultSessionConfig() {
      return defaultSessionConfigBuilder_ != null || defaultSessionConfig_ != null;
    }
    /**
     * <pre>
     * The default configuration for sessions that run on this server.
     * </pre>
     *
     * <code>.tensorflow.ConfigProto default_session_config = 4;</code>
     */
    public org.tensorflow.proto.framework.ConfigProto getDefaultSessionConfig() {
      if (defaultSessionConfigBuilder_ == null) {
        return defaultSessionConfig_ == null ? org.tensorflow.proto.framework.ConfigProto.getDefaultInstance() : defaultSessionConfig_;
      } else {
        return defaultSessionConfigBuilder_.getMessage();
      }
    }
    /**
     * <pre>
     * The default configuration for sessions that run on this server.
     * </pre>
     *
     * <code>.tensorflow.ConfigProto default_session_config = 4;</code>
     */
    public Builder setDefaultSessionConfig(org.tensorflow.proto.framework.ConfigProto value) {
      if (defaultSessionConfigBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        defaultSessionConfig_ = value;
        onChanged();
      } else {
        defaultSessionConfigBuilder_.setMessage(value);
      }

      return this;
    }
    /**
     * <pre>
     * The default configuration for sessions that run on this server.
     * </pre>
     *
     * <code>.tensorflow.ConfigProto default_session_config = 4;</code>
     */
    public Builder setDefaultSessionConfig(
        org.tensorflow.proto.framework.ConfigProto.Builder builderForValue) {
      if (defaultSessionConfigBuilder_ == null) {
        defaultSessionConfig_ = builderForValue.build();
        onChanged();
      } else {
        defaultSessionConfigBuilder_.setMessage(builderForValue.build());
      }

      return this;
    }
    /**
     * <pre>
     * The default configuration for sessions that run on this server.
     * </pre>
     *
     * <code>.tensorflow.ConfigProto default_session_config = 4;</code>
     */
    public Builder mergeDefaultSessionConfig(org.tensorflow.proto.framework.ConfigProto value) {
      if (defaultSessionConfigBuilder_ == null) {
        if (defaultSessionConfig_ != null) {
          defaultSessionConfig_ =
            org.tensorflow.proto.framework.ConfigProto.newBuilder(defaultSessionConfig_).mergeFrom(value).buildPartial();
        } else {
          defaultSessionConfig_ = value;
        }
        onChanged();
      } else {
        defaultSessionConfigBuilder_.mergeFrom(value);
      }

      return this;
    }
    /**
     * <pre>
     * The default configuration for sessions that run on this server.
     * </pre>
     *
     * <code>.tensorflow.ConfigProto default_session_config = 4;</code>
     */
    public Builder clearDefaultSessionConfig() {
      if (defaultSessionConfigBuilder_ == null) {
        defaultSessionConfig_ = null;
        onChanged();
      } else {
        defaultSessionConfig_ = null;
        defaultSessionConfigBuilder_ = null;
      }

      return this;
    }
    /**
     * <pre>
     * The default configuration for sessions that run on this server.
     * </pre>
     *
     * <code>.tensorflow.ConfigProto default_session_config = 4;</code>
     */
    public org.tensorflow.proto.framework.ConfigProto.Builder getDefaultSessionConfigBuilder() {
      
      onChanged();
      return getDefaultSessionConfigFieldBuilder().getBuilder();
    }
    /**
     * <pre>
     * The default configuration for sessions that run on this server.
     * </pre>
     *
     * <code>.tensorflow.ConfigProto default_session_config = 4;</code>
     */
    public org.tensorflow.proto.framework.ConfigProtoOrBuilder getDefaultSessionConfigOrBuilder() {
      if (defaultSessionConfigBuilder_ != null) {
        return defaultSessionConfigBuilder_.getMessageOrBuilder();
      } else {
        return defaultSessionConfig_ == null ?
            org.tensorflow.proto.framework.ConfigProto.getDefaultInstance() : defaultSessionConfig_;
      }
    }
    /**
     * <pre>
     * The default configuration for sessions that run on this server.
     * </pre>
     *
     * <code>.tensorflow.ConfigProto default_session_config = 4;</code>
     */
    private com.google.protobuf.SingleFieldBuilderV3<
        org.tensorflow.proto.framework.ConfigProto, org.tensorflow.proto.framework.ConfigProto.Builder, org.tensorflow.proto.framework.ConfigProtoOrBuilder> 
        getDefaultSessionConfigFieldBuilder() {
      if (defaultSessionConfigBuilder_ == null) {
        defaultSessionConfigBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
            org.tensorflow.proto.framework.ConfigProto, org.tensorflow.proto.framework.ConfigProto.Builder, org.tensorflow.proto.framework.ConfigProtoOrBuilder>(
                getDefaultSessionConfig(),
                getParentForChildren(),
                isClean());
        defaultSessionConfig_ = null;
      }
      return defaultSessionConfigBuilder_;
    }

    private java.lang.Object protocol_ = "";
    /**
     * <pre>
     * The protocol to be used by this server.
     * Acceptable values include: "grpc", "grpc+verbs".
     * </pre>
     *
     * <code>string protocol = 5;</code>
     */
    public java.lang.String getProtocol() {
      java.lang.Object ref = protocol_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs =
            (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        protocol_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     * <pre>
     * The protocol to be used by this server.
     * Acceptable values include: "grpc", "grpc+verbs".
     * </pre>
     *
     * <code>string protocol = 5;</code>
     */
    public com.google.protobuf.ByteString
        getProtocolBytes() {
      java.lang.Object ref = protocol_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b = 
            com.google.protobuf.ByteString.copyFromUtf8(
                (java.lang.String) ref);
        protocol_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     * <pre>
     * The protocol to be used by this server.
     * Acceptable values include: "grpc", "grpc+verbs".
     * </pre>
     *
     * <code>string protocol = 5;</code>
     */
    public Builder setProtocol(
        java.lang.String value) {
      if (value == null) {
    throw new NullPointerException();
  }
  
      protocol_ = value;
      onChanged();
      return this;
    }
    /**
     * <pre>
     * The protocol to be used by this server.
     * Acceptable values include: "grpc", "grpc+verbs".
     * </pre>
     *
     * <code>string protocol = 5;</code>
     */
    public Builder clearProtocol() {
      
      protocol_ = getDefaultInstance().getProtocol();
      onChanged();
      return this;
    }
    /**
     * <pre>
     * The protocol to be used by this server.
     * Acceptable values include: "grpc", "grpc+verbs".
     * </pre>
     *
     * <code>string protocol = 5;</code>
     */
    public Builder setProtocolBytes(
        com.google.protobuf.ByteString value) {
      if (value == null) {
    throw new NullPointerException();
  }
  checkByteStringIsUtf8(value);
      
      protocol_ = value;
      onChanged();
      return this;
    }

    private int port_ ;
    /**
     * <pre>
     * The server port. If not set, then we identify the port from the job_name.
     * </pre>
     *
     * <code>int32 port = 6;</code>
     */
    public int getPort() {
      return port_;
    }
    /**
     * <pre>
     * The server port. If not set, then we identify the port from the job_name.
     * </pre>
     *
     * <code>int32 port = 6;</code>
     */
    public Builder setPort(int value) {
      
      port_ = value;
      onChanged();
      return this;
    }
    /**
     * <pre>
     * The server port. If not set, then we identify the port from the job_name.
     * </pre>
     *
     * <code>int32 port = 6;</code>
     */
    public Builder clearPort() {
      
      port_ = 0;
      onChanged();
      return this;
    }

    private org.tensorflow.proto.distruntime.ClusterDeviceFilters clusterDeviceFilters_;
    private com.google.protobuf.SingleFieldBuilderV3<
        org.tensorflow.proto.distruntime.ClusterDeviceFilters, org.tensorflow.proto.distruntime.ClusterDeviceFilters.Builder, org.tensorflow.proto.distruntime.ClusterDeviceFiltersOrBuilder> clusterDeviceFiltersBuilder_;
    /**
     * <pre>
     * Device filters for remote tasks in the cluster.
     * NOTE: This is an experimental feature and only effective in TensorFlow 2.x.
     * </pre>
     *
     * <code>.tensorflow.ClusterDeviceFilters cluster_device_filters = 7;</code>
     */
    public boolean hasClusterDeviceFilters() {
      return clusterDeviceFiltersBuilder_ != null || clusterDeviceFilters_ != null;
    }
    /**
     * <pre>
     * Device filters for remote tasks in the cluster.
     * NOTE: This is an experimental feature and only effective in TensorFlow 2.x.
     * </pre>
     *
     * <code>.tensorflow.ClusterDeviceFilters cluster_device_filters = 7;</code>
     */
    public org.tensorflow.proto.distruntime.ClusterDeviceFilters getClusterDeviceFilters() {
      if (clusterDeviceFiltersBuilder_ == null) {
        return clusterDeviceFilters_ == null ? org.tensorflow.proto.distruntime.ClusterDeviceFilters.getDefaultInstance() : clusterDeviceFilters_;
      } else {
        return clusterDeviceFiltersBuilder_.getMessage();
      }
    }
    /**
     * <pre>
     * Device filters for remote tasks in the cluster.
     * NOTE: This is an experimental feature and only effective in TensorFlow 2.x.
     * </pre>
     *
     * <code>.tensorflow.ClusterDeviceFilters cluster_device_filters = 7;</code>
     */
    public Builder setClusterDeviceFilters(org.tensorflow.proto.distruntime.ClusterDeviceFilters value) {
      if (clusterDeviceFiltersBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        clusterDeviceFilters_ = value;
        onChanged();
      } else {
        clusterDeviceFiltersBuilder_.setMessage(value);
      }

      return this;
    }
    /**
     * <pre>
     * Device filters for remote tasks in the cluster.
     * NOTE: This is an experimental feature and only effective in TensorFlow 2.x.
     * </pre>
     *
     * <code>.tensorflow.ClusterDeviceFilters cluster_device_filters = 7;</code>
     */
    public Builder setClusterDeviceFilters(
        org.tensorflow.proto.distruntime.ClusterDeviceFilters.Builder builderForValue) {
      if (clusterDeviceFiltersBuilder_ == null) {
        clusterDeviceFilters_ = builderForValue.build();
        onChanged();
      } else {
        clusterDeviceFiltersBuilder_.setMessage(builderForValue.build());
      }

      return this;
    }
    /**
     * <pre>
     * Device filters for remote tasks in the cluster.
     * NOTE: This is an experimental feature and only effective in TensorFlow 2.x.
     * </pre>
     *
     * <code>.tensorflow.ClusterDeviceFilters cluster_device_filters = 7;</code>
     */
    public Builder mergeClusterDeviceFilters(org.tensorflow.proto.distruntime.ClusterDeviceFilters value) {
      if (clusterDeviceFiltersBuilder_ == null) {
        if (clusterDeviceFilters_ != null) {
          clusterDeviceFilters_ =
            org.tensorflow.proto.distruntime.ClusterDeviceFilters.newBuilder(clusterDeviceFilters_).mergeFrom(value).buildPartial();
        } else {
          clusterDeviceFilters_ = value;
        }
        onChanged();
      } else {
        clusterDeviceFiltersBuilder_.mergeFrom(value);
      }

      return this;
    }
    /**
     * <pre>
     * Device filters for remote tasks in the cluster.
     * NOTE: This is an experimental feature and only effective in TensorFlow 2.x.
     * </pre>
     *
     * <code>.tensorflow.ClusterDeviceFilters cluster_device_filters = 7;</code>
     */
    public Builder clearClusterDeviceFilters() {
      if (clusterDeviceFiltersBuilder_ == null) {
        clusterDeviceFilters_ = null;
        onChanged();
      } else {
        clusterDeviceFilters_ = null;
        clusterDeviceFiltersBuilder_ = null;
      }

      return this;
    }
    /**
     * <pre>
     * Device filters for remote tasks in the cluster.
     * NOTE: This is an experimental feature and only effective in TensorFlow 2.x.
     * </pre>
     *
     * <code>.tensorflow.ClusterDeviceFilters cluster_device_filters = 7;</code>
     */
    public org.tensorflow.proto.distruntime.ClusterDeviceFilters.Builder getClusterDeviceFiltersBuilder() {
      
      onChanged();
      return getClusterDeviceFiltersFieldBuilder().getBuilder();
    }
    /**
     * <pre>
     * Device filters for remote tasks in the cluster.
     * NOTE: This is an experimental feature and only effective in TensorFlow 2.x.
     * </pre>
     *
     * <code>.tensorflow.ClusterDeviceFilters cluster_device_filters = 7;</code>
     */
    public org.tensorflow.proto.distruntime.ClusterDeviceFiltersOrBuilder getClusterDeviceFiltersOrBuilder() {
      if (clusterDeviceFiltersBuilder_ != null) {
        return clusterDeviceFiltersBuilder_.getMessageOrBuilder();
      } else {
        return clusterDeviceFilters_ == null ?
            org.tensorflow.proto.distruntime.ClusterDeviceFilters.getDefaultInstance() : clusterDeviceFilters_;
      }
    }
    /**
     * <pre>
     * Device filters for remote tasks in the cluster.
     * NOTE: This is an experimental feature and only effective in TensorFlow 2.x.
     * </pre>
     *
     * <code>.tensorflow.ClusterDeviceFilters cluster_device_filters = 7;</code>
     */
    private com.google.protobuf.SingleFieldBuilderV3<
        org.tensorflow.proto.distruntime.ClusterDeviceFilters, org.tensorflow.proto.distruntime.ClusterDeviceFilters.Builder, org.tensorflow.proto.distruntime.ClusterDeviceFiltersOrBuilder> 
        getClusterDeviceFiltersFieldBuilder() {
      if (clusterDeviceFiltersBuilder_ == null) {
        clusterDeviceFiltersBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
            org.tensorflow.proto.distruntime.ClusterDeviceFilters, org.tensorflow.proto.distruntime.ClusterDeviceFilters.Builder, org.tensorflow.proto.distruntime.ClusterDeviceFiltersOrBuilder>(
                getClusterDeviceFilters(),
                getParentForChildren(),
                isClean());
        clusterDeviceFilters_ = null;
      }
      return clusterDeviceFiltersBuilder_;
    }
    @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.ServerDef)
  }

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

  public static org.tensorflow.proto.distruntime.ServerDef getDefaultInstance() {
    return DEFAULT_INSTANCE;
  }

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

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

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

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

}

