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

package org.tensorflow.proto.framework;

/**
 * <pre>
 * SignatureDef defines the signature of a computation supported by a TensorFlow
 * graph.
 * For example, a model with two loss computations, sharing a single input,
 * might have the following signature_def map, in a MetaGraphDef message.
 * Note that across the two SignatureDefs "loss_A" and "loss_B", the input key,
 * output key, and method_name are identical, and will be used by system(s) that
 * implement or rely upon this particular loss method. The output tensor names
 * differ, demonstrating how different outputs can exist for the same method.
 * signature_def {
 *   key: "loss_A"
 *   value {
 *     inputs {
 *       key: "input"
 *       value {
 *         name: "input:0"
 *         dtype: DT_STRING
 *         tensor_shape: ...
 *       }
 *     }
 *     outputs {
 *       key: "loss_output"
 *       value {
 *         name: "loss_output_A:0"
 *         dtype: DT_FLOAT
 *         tensor_shape: ...
 *       }
 *     }
 *     method_name: "some/package/compute_loss"
 *   }
 *   ...
 * }
 * signature_def {
 *   key: "loss_B"
 *   value {
 *     inputs {
 *       key: "input"
 *       value {
 *         name: "input:0"
 *         dtype: DT_STRING
 *         tensor_shape: ...
 *       }
 *     }
 *     outputs {
 *       key: "loss_output"
 *       value {
 *         name: "loss_output_B:0"
 *         dtype: DT_FLOAT
 *         tensor_shape: ...
 *       }
 *     }
 *     method_name: "some/package/compute_loss"
 *   }
 *   ...
 * }
 * </pre>
 *
 * Protobuf type {@code tensorflow.SignatureDef}
 */
public  final class SignatureDef extends
    com.google.protobuf.GeneratedMessageV3 implements
    // @@protoc_insertion_point(message_implements:tensorflow.SignatureDef)
    SignatureDefOrBuilder {
private static final long serialVersionUID = 0L;
  // Use SignatureDef.newBuilder() to construct.
  private SignatureDef(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
    super(builder);
  }
  private SignatureDef() {
    methodName_ = "";
  }

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

  @java.lang.Override
  public final com.google.protobuf.UnknownFieldSet
  getUnknownFields() {
    return this.unknownFields;
  }
  private SignatureDef(
      com.google.protobuf.CodedInputStream input,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    this();
    if (extensionRegistry == null) {
      throw new java.lang.NullPointerException();
    }
    int mutable_bitField0_ = 0;
    com.google.protobuf.UnknownFieldSet.Builder unknownFields =
        com.google.protobuf.UnknownFieldSet.newBuilder();
    try {
      boolean done = false;
      while (!done) {
        int tag = input.readTag();
        switch (tag) {
          case 0:
            done = true;
            break;
          case 10: {
            if (!((mutable_bitField0_ & 0x00000001) != 0)) {
              inputs_ = com.google.protobuf.MapField.newMapField(
                  InputsDefaultEntryHolder.defaultEntry);
              mutable_bitField0_ |= 0x00000001;
            }
            com.google.protobuf.MapEntry<java.lang.String, org.tensorflow.proto.framework.TensorInfo>
            inputs__ = input.readMessage(
                InputsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry);
            inputs_.getMutableMap().put(
                inputs__.getKey(), inputs__.getValue());
            break;
          }
          case 18: {
            if (!((mutable_bitField0_ & 0x00000002) != 0)) {
              outputs_ = com.google.protobuf.MapField.newMapField(
                  OutputsDefaultEntryHolder.defaultEntry);
              mutable_bitField0_ |= 0x00000002;
            }
            com.google.protobuf.MapEntry<java.lang.String, org.tensorflow.proto.framework.TensorInfo>
            outputs__ = input.readMessage(
                OutputsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry);
            outputs_.getMutableMap().put(
                outputs__.getKey(), outputs__.getValue());
            break;
          }
          case 26: {
            java.lang.String s = input.readStringRequireUtf8();

            methodName_ = s;
            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.framework.MetaGraphProtos.internal_static_tensorflow_SignatureDef_descriptor;
  }

  @SuppressWarnings({"rawtypes"})
  @java.lang.Override
  protected com.google.protobuf.MapField internalGetMapField(
      int number) {
    switch (number) {
      case 1:
        return internalGetInputs();
      case 2:
        return internalGetOutputs();
      default:
        throw new RuntimeException(
            "Invalid map field number: " + number);
    }
  }
  @java.lang.Override
  protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
      internalGetFieldAccessorTable() {
    return org.tensorflow.proto.framework.MetaGraphProtos.internal_static_tensorflow_SignatureDef_fieldAccessorTable
        .ensureFieldAccessorsInitialized(
            org.tensorflow.proto.framework.SignatureDef.class, org.tensorflow.proto.framework.SignatureDef.Builder.class);
  }

  public static final int INPUTS_FIELD_NUMBER = 1;
  private static final class InputsDefaultEntryHolder {
    static final com.google.protobuf.MapEntry<
        java.lang.String, org.tensorflow.proto.framework.TensorInfo> defaultEntry =
            com.google.protobuf.MapEntry
            .<java.lang.String, org.tensorflow.proto.framework.TensorInfo>newDefaultInstance(
                org.tensorflow.proto.framework.MetaGraphProtos.internal_static_tensorflow_SignatureDef_InputsEntry_descriptor, 
                com.google.protobuf.WireFormat.FieldType.STRING,
                "",
                com.google.protobuf.WireFormat.FieldType.MESSAGE,
                org.tensorflow.proto.framework.TensorInfo.getDefaultInstance());
  }
  private com.google.protobuf.MapField<
      java.lang.String, org.tensorflow.proto.framework.TensorInfo> inputs_;
  private com.google.protobuf.MapField<java.lang.String, org.tensorflow.proto.framework.TensorInfo>
  internalGetInputs() {
    if (inputs_ == null) {
      return com.google.protobuf.MapField.emptyMapField(
          InputsDefaultEntryHolder.defaultEntry);
    }
    return inputs_;
  }

  public int getInputsCount() {
    return internalGetInputs().getMap().size();
  }
  /**
   * <pre>
   * Named input parameters.
   * </pre>
   *
   * <code>map&lt;string, .tensorflow.TensorInfo&gt; inputs = 1;</code>
   */

  public boolean containsInputs(
      java.lang.String key) {
    if (key == null) { throw new java.lang.NullPointerException(); }
    return internalGetInputs().getMap().containsKey(key);
  }
  /**
   * Use {@link #getInputsMap()} instead.
   */
  @java.lang.Deprecated
  public java.util.Map<java.lang.String, org.tensorflow.proto.framework.TensorInfo> getInputs() {
    return getInputsMap();
  }
  /**
   * <pre>
   * Named input parameters.
   * </pre>
   *
   * <code>map&lt;string, .tensorflow.TensorInfo&gt; inputs = 1;</code>
   */

  public java.util.Map<java.lang.String, org.tensorflow.proto.framework.TensorInfo> getInputsMap() {
    return internalGetInputs().getMap();
  }
  /**
   * <pre>
   * Named input parameters.
   * </pre>
   *
   * <code>map&lt;string, .tensorflow.TensorInfo&gt; inputs = 1;</code>
   */

  public org.tensorflow.proto.framework.TensorInfo getInputsOrDefault(
      java.lang.String key,
      org.tensorflow.proto.framework.TensorInfo defaultValue) {
    if (key == null) { throw new java.lang.NullPointerException(); }
    java.util.Map<java.lang.String, org.tensorflow.proto.framework.TensorInfo> map =
        internalGetInputs().getMap();
    return map.containsKey(key) ? map.get(key) : defaultValue;
  }
  /**
   * <pre>
   * Named input parameters.
   * </pre>
   *
   * <code>map&lt;string, .tensorflow.TensorInfo&gt; inputs = 1;</code>
   */

  public org.tensorflow.proto.framework.TensorInfo getInputsOrThrow(
      java.lang.String key) {
    if (key == null) { throw new java.lang.NullPointerException(); }
    java.util.Map<java.lang.String, org.tensorflow.proto.framework.TensorInfo> map =
        internalGetInputs().getMap();
    if (!map.containsKey(key)) {
      throw new java.lang.IllegalArgumentException();
    }
    return map.get(key);
  }

  public static final int OUTPUTS_FIELD_NUMBER = 2;
  private static final class OutputsDefaultEntryHolder {
    static final com.google.protobuf.MapEntry<
        java.lang.String, org.tensorflow.proto.framework.TensorInfo> defaultEntry =
            com.google.protobuf.MapEntry
            .<java.lang.String, org.tensorflow.proto.framework.TensorInfo>newDefaultInstance(
                org.tensorflow.proto.framework.MetaGraphProtos.internal_static_tensorflow_SignatureDef_OutputsEntry_descriptor, 
                com.google.protobuf.WireFormat.FieldType.STRING,
                "",
                com.google.protobuf.WireFormat.FieldType.MESSAGE,
                org.tensorflow.proto.framework.TensorInfo.getDefaultInstance());
  }
  private com.google.protobuf.MapField<
      java.lang.String, org.tensorflow.proto.framework.TensorInfo> outputs_;
  private com.google.protobuf.MapField<java.lang.String, org.tensorflow.proto.framework.TensorInfo>
  internalGetOutputs() {
    if (outputs_ == null) {
      return com.google.protobuf.MapField.emptyMapField(
          OutputsDefaultEntryHolder.defaultEntry);
    }
    return outputs_;
  }

  public int getOutputsCount() {
    return internalGetOutputs().getMap().size();
  }
  /**
   * <pre>
   * Named output parameters.
   * </pre>
   *
   * <code>map&lt;string, .tensorflow.TensorInfo&gt; outputs = 2;</code>
   */

  public boolean containsOutputs(
      java.lang.String key) {
    if (key == null) { throw new java.lang.NullPointerException(); }
    return internalGetOutputs().getMap().containsKey(key);
  }
  /**
   * Use {@link #getOutputsMap()} instead.
   */
  @java.lang.Deprecated
  public java.util.Map<java.lang.String, org.tensorflow.proto.framework.TensorInfo> getOutputs() {
    return getOutputsMap();
  }
  /**
   * <pre>
   * Named output parameters.
   * </pre>
   *
   * <code>map&lt;string, .tensorflow.TensorInfo&gt; outputs = 2;</code>
   */

  public java.util.Map<java.lang.String, org.tensorflow.proto.framework.TensorInfo> getOutputsMap() {
    return internalGetOutputs().getMap();
  }
  /**
   * <pre>
   * Named output parameters.
   * </pre>
   *
   * <code>map&lt;string, .tensorflow.TensorInfo&gt; outputs = 2;</code>
   */

  public org.tensorflow.proto.framework.TensorInfo getOutputsOrDefault(
      java.lang.String key,
      org.tensorflow.proto.framework.TensorInfo defaultValue) {
    if (key == null) { throw new java.lang.NullPointerException(); }
    java.util.Map<java.lang.String, org.tensorflow.proto.framework.TensorInfo> map =
        internalGetOutputs().getMap();
    return map.containsKey(key) ? map.get(key) : defaultValue;
  }
  /**
   * <pre>
   * Named output parameters.
   * </pre>
   *
   * <code>map&lt;string, .tensorflow.TensorInfo&gt; outputs = 2;</code>
   */

  public org.tensorflow.proto.framework.TensorInfo getOutputsOrThrow(
      java.lang.String key) {
    if (key == null) { throw new java.lang.NullPointerException(); }
    java.util.Map<java.lang.String, org.tensorflow.proto.framework.TensorInfo> map =
        internalGetOutputs().getMap();
    if (!map.containsKey(key)) {
      throw new java.lang.IllegalArgumentException();
    }
    return map.get(key);
  }

  public static final int METHOD_NAME_FIELD_NUMBER = 3;
  private volatile java.lang.Object methodName_;
  /**
   * <pre>
   * Extensible method_name information enabling third-party users to mark a
   * SignatureDef as supporting a particular method. This enables producers and
   * consumers of SignatureDefs, e.g. a model definition library and a serving
   * library to have a clear hand-off regarding the semantics of a computation.
   * Note that multiple SignatureDefs in a single MetaGraphDef may have the same
   * method_name. This is commonly used to support multi-headed computation,
   * where a single graph computation may return multiple results.
   * </pre>
   *
   * <code>string method_name = 3;</code>
   */
  public java.lang.String getMethodName() {
    java.lang.Object ref = methodName_;
    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();
      methodName_ = s;
      return s;
    }
  }
  /**
   * <pre>
   * Extensible method_name information enabling third-party users to mark a
   * SignatureDef as supporting a particular method. This enables producers and
   * consumers of SignatureDefs, e.g. a model definition library and a serving
   * library to have a clear hand-off regarding the semantics of a computation.
   * Note that multiple SignatureDefs in a single MetaGraphDef may have the same
   * method_name. This is commonly used to support multi-headed computation,
   * where a single graph computation may return multiple results.
   * </pre>
   *
   * <code>string method_name = 3;</code>
   */
  public com.google.protobuf.ByteString
      getMethodNameBytes() {
    java.lang.Object ref = methodName_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b = 
          com.google.protobuf.ByteString.copyFromUtf8(
              (java.lang.String) ref);
      methodName_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  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 {
    com.google.protobuf.GeneratedMessageV3
      .serializeStringMapTo(
        output,
        internalGetInputs(),
        InputsDefaultEntryHolder.defaultEntry,
        1);
    com.google.protobuf.GeneratedMessageV3
      .serializeStringMapTo(
        output,
        internalGetOutputs(),
        OutputsDefaultEntryHolder.defaultEntry,
        2);
    if (!getMethodNameBytes().isEmpty()) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 3, methodName_);
    }
    unknownFields.writeTo(output);
  }

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

    size = 0;
    for (java.util.Map.Entry<java.lang.String, org.tensorflow.proto.framework.TensorInfo> entry
         : internalGetInputs().getMap().entrySet()) {
      com.google.protobuf.MapEntry<java.lang.String, org.tensorflow.proto.framework.TensorInfo>
      inputs__ = InputsDefaultEntryHolder.defaultEntry.newBuilderForType()
          .setKey(entry.getKey())
          .setValue(entry.getValue())
          .build();
      size += com.google.protobuf.CodedOutputStream
          .computeMessageSize(1, inputs__);
    }
    for (java.util.Map.Entry<java.lang.String, org.tensorflow.proto.framework.TensorInfo> entry
         : internalGetOutputs().getMap().entrySet()) {
      com.google.protobuf.MapEntry<java.lang.String, org.tensorflow.proto.framework.TensorInfo>
      outputs__ = OutputsDefaultEntryHolder.defaultEntry.newBuilderForType()
          .setKey(entry.getKey())
          .setValue(entry.getValue())
          .build();
      size += com.google.protobuf.CodedOutputStream
          .computeMessageSize(2, outputs__);
    }
    if (!getMethodNameBytes().isEmpty()) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, methodName_);
    }
    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.framework.SignatureDef)) {
      return super.equals(obj);
    }
    org.tensorflow.proto.framework.SignatureDef other = (org.tensorflow.proto.framework.SignatureDef) obj;

    if (!internalGetInputs().equals(
        other.internalGetInputs())) return false;
    if (!internalGetOutputs().equals(
        other.internalGetOutputs())) return false;
    if (!getMethodName()
        .equals(other.getMethodName())) 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 (!internalGetInputs().getMap().isEmpty()) {
      hash = (37 * hash) + INPUTS_FIELD_NUMBER;
      hash = (53 * hash) + internalGetInputs().hashCode();
    }
    if (!internalGetOutputs().getMap().isEmpty()) {
      hash = (37 * hash) + OUTPUTS_FIELD_NUMBER;
      hash = (53 * hash) + internalGetOutputs().hashCode();
    }
    hash = (37 * hash) + METHOD_NAME_FIELD_NUMBER;
    hash = (53 * hash) + getMethodName().hashCode();
    hash = (29 * hash) + unknownFields.hashCode();
    memoizedHashCode = hash;
    return hash;
  }

  public static org.tensorflow.proto.framework.SignatureDef parseFrom(
      java.nio.ByteBuffer data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }
  public static org.tensorflow.proto.framework.SignatureDef 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.framework.SignatureDef parseFrom(
      com.google.protobuf.ByteString data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }
  public static org.tensorflow.proto.framework.SignatureDef 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.framework.SignatureDef parseFrom(byte[] data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }
  public static org.tensorflow.proto.framework.SignatureDef parseFrom(
      byte[] data,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data, extensionRegistry);
  }
  public static org.tensorflow.proto.framework.SignatureDef parseFrom(java.io.InputStream input)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3
        .parseWithIOException(PARSER, input);
  }
  public static org.tensorflow.proto.framework.SignatureDef 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.framework.SignatureDef parseDelimitedFrom(java.io.InputStream input)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3
        .parseDelimitedWithIOException(PARSER, input);
  }
  public static org.tensorflow.proto.framework.SignatureDef 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.framework.SignatureDef parseFrom(
      com.google.protobuf.CodedInputStream input)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3
        .parseWithIOException(PARSER, input);
  }
  public static org.tensorflow.proto.framework.SignatureDef 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.framework.SignatureDef 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>
   * SignatureDef defines the signature of a computation supported by a TensorFlow
   * graph.
   * For example, a model with two loss computations, sharing a single input,
   * might have the following signature_def map, in a MetaGraphDef message.
   * Note that across the two SignatureDefs "loss_A" and "loss_B", the input key,
   * output key, and method_name are identical, and will be used by system(s) that
   * implement or rely upon this particular loss method. The output tensor names
   * differ, demonstrating how different outputs can exist for the same method.
   * signature_def {
   *   key: "loss_A"
   *   value {
   *     inputs {
   *       key: "input"
   *       value {
   *         name: "input:0"
   *         dtype: DT_STRING
   *         tensor_shape: ...
   *       }
   *     }
   *     outputs {
   *       key: "loss_output"
   *       value {
   *         name: "loss_output_A:0"
   *         dtype: DT_FLOAT
   *         tensor_shape: ...
   *       }
   *     }
   *     method_name: "some/package/compute_loss"
   *   }
   *   ...
   * }
   * signature_def {
   *   key: "loss_B"
   *   value {
   *     inputs {
   *       key: "input"
   *       value {
   *         name: "input:0"
   *         dtype: DT_STRING
   *         tensor_shape: ...
   *       }
   *     }
   *     outputs {
   *       key: "loss_output"
   *       value {
   *         name: "loss_output_B:0"
   *         dtype: DT_FLOAT
   *         tensor_shape: ...
   *       }
   *     }
   *     method_name: "some/package/compute_loss"
   *   }
   *   ...
   * }
   * </pre>
   *
   * Protobuf type {@code tensorflow.SignatureDef}
   */
  public static final class Builder extends
      com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
      // @@protoc_insertion_point(builder_implements:tensorflow.SignatureDef)
      org.tensorflow.proto.framework.SignatureDefOrBuilder {
    public static final com.google.protobuf.Descriptors.Descriptor
        getDescriptor() {
      return org.tensorflow.proto.framework.MetaGraphProtos.internal_static_tensorflow_SignatureDef_descriptor;
    }

    @SuppressWarnings({"rawtypes"})
    protected com.google.protobuf.MapField internalGetMapField(
        int number) {
      switch (number) {
        case 1:
          return internalGetInputs();
        case 2:
          return internalGetOutputs();
        default:
          throw new RuntimeException(
              "Invalid map field number: " + number);
      }
    }
    @SuppressWarnings({"rawtypes"})
    protected com.google.protobuf.MapField internalGetMutableMapField(
        int number) {
      switch (number) {
        case 1:
          return internalGetMutableInputs();
        case 2:
          return internalGetMutableOutputs();
        default:
          throw new RuntimeException(
              "Invalid map field number: " + number);
      }
    }
    @java.lang.Override
    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
        internalGetFieldAccessorTable() {
      return org.tensorflow.proto.framework.MetaGraphProtos.internal_static_tensorflow_SignatureDef_fieldAccessorTable
          .ensureFieldAccessorsInitialized(
              org.tensorflow.proto.framework.SignatureDef.class, org.tensorflow.proto.framework.SignatureDef.Builder.class);
    }

    // Construct using org.tensorflow.proto.framework.SignatureDef.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();
      internalGetMutableInputs().clear();
      internalGetMutableOutputs().clear();
      methodName_ = "";

      return this;
    }

    @java.lang.Override
    public com.google.protobuf.Descriptors.Descriptor
        getDescriptorForType() {
      return org.tensorflow.proto.framework.MetaGraphProtos.internal_static_tensorflow_SignatureDef_descriptor;
    }

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

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

    @java.lang.Override
    public org.tensorflow.proto.framework.SignatureDef buildPartial() {
      org.tensorflow.proto.framework.SignatureDef result = new org.tensorflow.proto.framework.SignatureDef(this);
      int from_bitField0_ = bitField0_;
      result.inputs_ = internalGetInputs();
      result.inputs_.makeImmutable();
      result.outputs_ = internalGetOutputs();
      result.outputs_.makeImmutable();
      result.methodName_ = methodName_;
      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.framework.SignatureDef) {
        return mergeFrom((org.tensorflow.proto.framework.SignatureDef)other);
      } else {
        super.mergeFrom(other);
        return this;
      }
    }

    public Builder mergeFrom(org.tensorflow.proto.framework.SignatureDef other) {
      if (other == org.tensorflow.proto.framework.SignatureDef.getDefaultInstance()) return this;
      internalGetMutableInputs().mergeFrom(
          other.internalGetInputs());
      internalGetMutableOutputs().mergeFrom(
          other.internalGetOutputs());
      if (!other.getMethodName().isEmpty()) {
        methodName_ = other.methodName_;
        onChanged();
      }
      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.framework.SignatureDef parsedMessage = null;
      try {
        parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
      } catch (com.google.protobuf.InvalidProtocolBufferException e) {
        parsedMessage = (org.tensorflow.proto.framework.SignatureDef) e.getUnfinishedMessage();
        throw e.unwrapIOException();
      } finally {
        if (parsedMessage != null) {
          mergeFrom(parsedMessage);
        }
      }
      return this;
    }
    private int bitField0_;

    private com.google.protobuf.MapField<
        java.lang.String, org.tensorflow.proto.framework.TensorInfo> inputs_;
    private com.google.protobuf.MapField<java.lang.String, org.tensorflow.proto.framework.TensorInfo>
    internalGetInputs() {
      if (inputs_ == null) {
        return com.google.protobuf.MapField.emptyMapField(
            InputsDefaultEntryHolder.defaultEntry);
      }
      return inputs_;
    }
    private com.google.protobuf.MapField<java.lang.String, org.tensorflow.proto.framework.TensorInfo>
    internalGetMutableInputs() {
      onChanged();;
      if (inputs_ == null) {
        inputs_ = com.google.protobuf.MapField.newMapField(
            InputsDefaultEntryHolder.defaultEntry);
      }
      if (!inputs_.isMutable()) {
        inputs_ = inputs_.copy();
      }
      return inputs_;
    }

    public int getInputsCount() {
      return internalGetInputs().getMap().size();
    }
    /**
     * <pre>
     * Named input parameters.
     * </pre>
     *
     * <code>map&lt;string, .tensorflow.TensorInfo&gt; inputs = 1;</code>
     */

    public boolean containsInputs(
        java.lang.String key) {
      if (key == null) { throw new java.lang.NullPointerException(); }
      return internalGetInputs().getMap().containsKey(key);
    }
    /**
     * Use {@link #getInputsMap()} instead.
     */
    @java.lang.Deprecated
    public java.util.Map<java.lang.String, org.tensorflow.proto.framework.TensorInfo> getInputs() {
      return getInputsMap();
    }
    /**
     * <pre>
     * Named input parameters.
     * </pre>
     *
     * <code>map&lt;string, .tensorflow.TensorInfo&gt; inputs = 1;</code>
     */

    public java.util.Map<java.lang.String, org.tensorflow.proto.framework.TensorInfo> getInputsMap() {
      return internalGetInputs().getMap();
    }
    /**
     * <pre>
     * Named input parameters.
     * </pre>
     *
     * <code>map&lt;string, .tensorflow.TensorInfo&gt; inputs = 1;</code>
     */

    public org.tensorflow.proto.framework.TensorInfo getInputsOrDefault(
        java.lang.String key,
        org.tensorflow.proto.framework.TensorInfo defaultValue) {
      if (key == null) { throw new java.lang.NullPointerException(); }
      java.util.Map<java.lang.String, org.tensorflow.proto.framework.TensorInfo> map =
          internalGetInputs().getMap();
      return map.containsKey(key) ? map.get(key) : defaultValue;
    }
    /**
     * <pre>
     * Named input parameters.
     * </pre>
     *
     * <code>map&lt;string, .tensorflow.TensorInfo&gt; inputs = 1;</code>
     */

    public org.tensorflow.proto.framework.TensorInfo getInputsOrThrow(
        java.lang.String key) {
      if (key == null) { throw new java.lang.NullPointerException(); }
      java.util.Map<java.lang.String, org.tensorflow.proto.framework.TensorInfo> map =
          internalGetInputs().getMap();
      if (!map.containsKey(key)) {
        throw new java.lang.IllegalArgumentException();
      }
      return map.get(key);
    }

    public Builder clearInputs() {
      internalGetMutableInputs().getMutableMap()
          .clear();
      return this;
    }
    /**
     * <pre>
     * Named input parameters.
     * </pre>
     *
     * <code>map&lt;string, .tensorflow.TensorInfo&gt; inputs = 1;</code>
     */

    public Builder removeInputs(
        java.lang.String key) {
      if (key == null) { throw new java.lang.NullPointerException(); }
      internalGetMutableInputs().getMutableMap()
          .remove(key);
      return this;
    }
    /**
     * Use alternate mutation accessors instead.
     */
    @java.lang.Deprecated
    public java.util.Map<java.lang.String, org.tensorflow.proto.framework.TensorInfo>
    getMutableInputs() {
      return internalGetMutableInputs().getMutableMap();
    }
    /**
     * <pre>
     * Named input parameters.
     * </pre>
     *
     * <code>map&lt;string, .tensorflow.TensorInfo&gt; inputs = 1;</code>
     */
    public Builder putInputs(
        java.lang.String key,
        org.tensorflow.proto.framework.TensorInfo value) {
      if (key == null) { throw new java.lang.NullPointerException(); }
      if (value == null) { throw new java.lang.NullPointerException(); }
      internalGetMutableInputs().getMutableMap()
          .put(key, value);
      return this;
    }
    /**
     * <pre>
     * Named input parameters.
     * </pre>
     *
     * <code>map&lt;string, .tensorflow.TensorInfo&gt; inputs = 1;</code>
     */

    public Builder putAllInputs(
        java.util.Map<java.lang.String, org.tensorflow.proto.framework.TensorInfo> values) {
      internalGetMutableInputs().getMutableMap()
          .putAll(values);
      return this;
    }

    private com.google.protobuf.MapField<
        java.lang.String, org.tensorflow.proto.framework.TensorInfo> outputs_;
    private com.google.protobuf.MapField<java.lang.String, org.tensorflow.proto.framework.TensorInfo>
    internalGetOutputs() {
      if (outputs_ == null) {
        return com.google.protobuf.MapField.emptyMapField(
            OutputsDefaultEntryHolder.defaultEntry);
      }
      return outputs_;
    }
    private com.google.protobuf.MapField<java.lang.String, org.tensorflow.proto.framework.TensorInfo>
    internalGetMutableOutputs() {
      onChanged();;
      if (outputs_ == null) {
        outputs_ = com.google.protobuf.MapField.newMapField(
            OutputsDefaultEntryHolder.defaultEntry);
      }
      if (!outputs_.isMutable()) {
        outputs_ = outputs_.copy();
      }
      return outputs_;
    }

    public int getOutputsCount() {
      return internalGetOutputs().getMap().size();
    }
    /**
     * <pre>
     * Named output parameters.
     * </pre>
     *
     * <code>map&lt;string, .tensorflow.TensorInfo&gt; outputs = 2;</code>
     */

    public boolean containsOutputs(
        java.lang.String key) {
      if (key == null) { throw new java.lang.NullPointerException(); }
      return internalGetOutputs().getMap().containsKey(key);
    }
    /**
     * Use {@link #getOutputsMap()} instead.
     */
    @java.lang.Deprecated
    public java.util.Map<java.lang.String, org.tensorflow.proto.framework.TensorInfo> getOutputs() {
      return getOutputsMap();
    }
    /**
     * <pre>
     * Named output parameters.
     * </pre>
     *
     * <code>map&lt;string, .tensorflow.TensorInfo&gt; outputs = 2;</code>
     */

    public java.util.Map<java.lang.String, org.tensorflow.proto.framework.TensorInfo> getOutputsMap() {
      return internalGetOutputs().getMap();
    }
    /**
     * <pre>
     * Named output parameters.
     * </pre>
     *
     * <code>map&lt;string, .tensorflow.TensorInfo&gt; outputs = 2;</code>
     */

    public org.tensorflow.proto.framework.TensorInfo getOutputsOrDefault(
        java.lang.String key,
        org.tensorflow.proto.framework.TensorInfo defaultValue) {
      if (key == null) { throw new java.lang.NullPointerException(); }
      java.util.Map<java.lang.String, org.tensorflow.proto.framework.TensorInfo> map =
          internalGetOutputs().getMap();
      return map.containsKey(key) ? map.get(key) : defaultValue;
    }
    /**
     * <pre>
     * Named output parameters.
     * </pre>
     *
     * <code>map&lt;string, .tensorflow.TensorInfo&gt; outputs = 2;</code>
     */

    public org.tensorflow.proto.framework.TensorInfo getOutputsOrThrow(
        java.lang.String key) {
      if (key == null) { throw new java.lang.NullPointerException(); }
      java.util.Map<java.lang.String, org.tensorflow.proto.framework.TensorInfo> map =
          internalGetOutputs().getMap();
      if (!map.containsKey(key)) {
        throw new java.lang.IllegalArgumentException();
      }
      return map.get(key);
    }

    public Builder clearOutputs() {
      internalGetMutableOutputs().getMutableMap()
          .clear();
      return this;
    }
    /**
     * <pre>
     * Named output parameters.
     * </pre>
     *
     * <code>map&lt;string, .tensorflow.TensorInfo&gt; outputs = 2;</code>
     */

    public Builder removeOutputs(
        java.lang.String key) {
      if (key == null) { throw new java.lang.NullPointerException(); }
      internalGetMutableOutputs().getMutableMap()
          .remove(key);
      return this;
    }
    /**
     * Use alternate mutation accessors instead.
     */
    @java.lang.Deprecated
    public java.util.Map<java.lang.String, org.tensorflow.proto.framework.TensorInfo>
    getMutableOutputs() {
      return internalGetMutableOutputs().getMutableMap();
    }
    /**
     * <pre>
     * Named output parameters.
     * </pre>
     *
     * <code>map&lt;string, .tensorflow.TensorInfo&gt; outputs = 2;</code>
     */
    public Builder putOutputs(
        java.lang.String key,
        org.tensorflow.proto.framework.TensorInfo value) {
      if (key == null) { throw new java.lang.NullPointerException(); }
      if (value == null) { throw new java.lang.NullPointerException(); }
      internalGetMutableOutputs().getMutableMap()
          .put(key, value);
      return this;
    }
    /**
     * <pre>
     * Named output parameters.
     * </pre>
     *
     * <code>map&lt;string, .tensorflow.TensorInfo&gt; outputs = 2;</code>
     */

    public Builder putAllOutputs(
        java.util.Map<java.lang.String, org.tensorflow.proto.framework.TensorInfo> values) {
      internalGetMutableOutputs().getMutableMap()
          .putAll(values);
      return this;
    }

    private java.lang.Object methodName_ = "";
    /**
     * <pre>
     * Extensible method_name information enabling third-party users to mark a
     * SignatureDef as supporting a particular method. This enables producers and
     * consumers of SignatureDefs, e.g. a model definition library and a serving
     * library to have a clear hand-off regarding the semantics of a computation.
     * Note that multiple SignatureDefs in a single MetaGraphDef may have the same
     * method_name. This is commonly used to support multi-headed computation,
     * where a single graph computation may return multiple results.
     * </pre>
     *
     * <code>string method_name = 3;</code>
     */
    public java.lang.String getMethodName() {
      java.lang.Object ref = methodName_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs =
            (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        methodName_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     * <pre>
     * Extensible method_name information enabling third-party users to mark a
     * SignatureDef as supporting a particular method. This enables producers and
     * consumers of SignatureDefs, e.g. a model definition library and a serving
     * library to have a clear hand-off regarding the semantics of a computation.
     * Note that multiple SignatureDefs in a single MetaGraphDef may have the same
     * method_name. This is commonly used to support multi-headed computation,
     * where a single graph computation may return multiple results.
     * </pre>
     *
     * <code>string method_name = 3;</code>
     */
    public com.google.protobuf.ByteString
        getMethodNameBytes() {
      java.lang.Object ref = methodName_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b = 
            com.google.protobuf.ByteString.copyFromUtf8(
                (java.lang.String) ref);
        methodName_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     * <pre>
     * Extensible method_name information enabling third-party users to mark a
     * SignatureDef as supporting a particular method. This enables producers and
     * consumers of SignatureDefs, e.g. a model definition library and a serving
     * library to have a clear hand-off regarding the semantics of a computation.
     * Note that multiple SignatureDefs in a single MetaGraphDef may have the same
     * method_name. This is commonly used to support multi-headed computation,
     * where a single graph computation may return multiple results.
     * </pre>
     *
     * <code>string method_name = 3;</code>
     */
    public Builder setMethodName(
        java.lang.String value) {
      if (value == null) {
    throw new NullPointerException();
  }
  
      methodName_ = value;
      onChanged();
      return this;
    }
    /**
     * <pre>
     * Extensible method_name information enabling third-party users to mark a
     * SignatureDef as supporting a particular method. This enables producers and
     * consumers of SignatureDefs, e.g. a model definition library and a serving
     * library to have a clear hand-off regarding the semantics of a computation.
     * Note that multiple SignatureDefs in a single MetaGraphDef may have the same
     * method_name. This is commonly used to support multi-headed computation,
     * where a single graph computation may return multiple results.
     * </pre>
     *
     * <code>string method_name = 3;</code>
     */
    public Builder clearMethodName() {
      
      methodName_ = getDefaultInstance().getMethodName();
      onChanged();
      return this;
    }
    /**
     * <pre>
     * Extensible method_name information enabling third-party users to mark a
     * SignatureDef as supporting a particular method. This enables producers and
     * consumers of SignatureDefs, e.g. a model definition library and a serving
     * library to have a clear hand-off regarding the semantics of a computation.
     * Note that multiple SignatureDefs in a single MetaGraphDef may have the same
     * method_name. This is commonly used to support multi-headed computation,
     * where a single graph computation may return multiple results.
     * </pre>
     *
     * <code>string method_name = 3;</code>
     */
    public Builder setMethodNameBytes(
        com.google.protobuf.ByteString value) {
      if (value == null) {
    throw new NullPointerException();
  }
  checkByteStringIsUtf8(value);
      
      methodName_ = value;
      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.SignatureDef)
  }

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

  public static org.tensorflow.proto.framework.SignatureDef getDefaultInstance() {
    return DEFAULT_INSTANCE;
  }

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

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

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

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

}

