All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.tensorflow.example.FeatureConfiguration Maven / Gradle / Ivy

There is a newer version: 1.15.0
Show newest version
// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: tensorflow/core/example/example_parser_configuration.proto

package org.tensorflow.example;

/**
 * Protobuf type {@code tensorflow.FeatureConfiguration}
 */
public  final class FeatureConfiguration extends
    com.google.protobuf.GeneratedMessageV3 implements
    // @@protoc_insertion_point(message_implements:tensorflow.FeatureConfiguration)
    FeatureConfigurationOrBuilder {
private static final long serialVersionUID = 0L;
  // Use FeatureConfiguration.newBuilder() to construct.
  private FeatureConfiguration(com.google.protobuf.GeneratedMessageV3.Builder builder) {
    super(builder);
  }
  private FeatureConfiguration() {
  }

  @java.lang.Override
  public final com.google.protobuf.UnknownFieldSet
  getUnknownFields() {
    return this.unknownFields;
  }
  private FeatureConfiguration(
      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;
          default: {
            if (!parseUnknownFieldProto3(
                input, unknownFields, extensionRegistry, tag)) {
              done = true;
            }
            break;
          }
          case 10: {
            org.tensorflow.example.FixedLenFeatureProto.Builder subBuilder = null;
            if (configCase_ == 1) {
              subBuilder = ((org.tensorflow.example.FixedLenFeatureProto) config_).toBuilder();
            }
            config_ =
                input.readMessage(org.tensorflow.example.FixedLenFeatureProto.parser(), extensionRegistry);
            if (subBuilder != null) {
              subBuilder.mergeFrom((org.tensorflow.example.FixedLenFeatureProto) config_);
              config_ = subBuilder.buildPartial();
            }
            configCase_ = 1;
            break;
          }
          case 18: {
            org.tensorflow.example.VarLenFeatureProto.Builder subBuilder = null;
            if (configCase_ == 2) {
              subBuilder = ((org.tensorflow.example.VarLenFeatureProto) config_).toBuilder();
            }
            config_ =
                input.readMessage(org.tensorflow.example.VarLenFeatureProto.parser(), extensionRegistry);
            if (subBuilder != null) {
              subBuilder.mergeFrom((org.tensorflow.example.VarLenFeatureProto) config_);
              config_ = subBuilder.buildPartial();
            }
            configCase_ = 2;
            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.example.ExampleParserConfigurationProtos.internal_static_tensorflow_FeatureConfiguration_descriptor;
  }

  protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
      internalGetFieldAccessorTable() {
    return org.tensorflow.example.ExampleParserConfigurationProtos.internal_static_tensorflow_FeatureConfiguration_fieldAccessorTable
        .ensureFieldAccessorsInitialized(
            org.tensorflow.example.FeatureConfiguration.class, org.tensorflow.example.FeatureConfiguration.Builder.class);
  }

  private int configCase_ = 0;
  private java.lang.Object config_;
  public enum ConfigCase
      implements com.google.protobuf.Internal.EnumLite {
    FIXED_LEN_FEATURE(1),
    VAR_LEN_FEATURE(2),
    CONFIG_NOT_SET(0);
    private final int value;
    private ConfigCase(int value) {
      this.value = value;
    }
    /**
     * @deprecated Use {@link #forNumber(int)} instead.
     */
    @java.lang.Deprecated
    public static ConfigCase valueOf(int value) {
      return forNumber(value);
    }

    public static ConfigCase forNumber(int value) {
      switch (value) {
        case 1: return FIXED_LEN_FEATURE;
        case 2: return VAR_LEN_FEATURE;
        case 0: return CONFIG_NOT_SET;
        default: return null;
      }
    }
    public int getNumber() {
      return this.value;
    }
  };

  public ConfigCase
  getConfigCase() {
    return ConfigCase.forNumber(
        configCase_);
  }

  public static final int FIXED_LEN_FEATURE_FIELD_NUMBER = 1;
  /**
   * .tensorflow.FixedLenFeatureProto fixed_len_feature = 1;
   */
  public boolean hasFixedLenFeature() {
    return configCase_ == 1;
  }
  /**
   * .tensorflow.FixedLenFeatureProto fixed_len_feature = 1;
   */
  public org.tensorflow.example.FixedLenFeatureProto getFixedLenFeature() {
    if (configCase_ == 1) {
       return (org.tensorflow.example.FixedLenFeatureProto) config_;
    }
    return org.tensorflow.example.FixedLenFeatureProto.getDefaultInstance();
  }
  /**
   * .tensorflow.FixedLenFeatureProto fixed_len_feature = 1;
   */
  public org.tensorflow.example.FixedLenFeatureProtoOrBuilder getFixedLenFeatureOrBuilder() {
    if (configCase_ == 1) {
       return (org.tensorflow.example.FixedLenFeatureProto) config_;
    }
    return org.tensorflow.example.FixedLenFeatureProto.getDefaultInstance();
  }

  public static final int VAR_LEN_FEATURE_FIELD_NUMBER = 2;
  /**
   * .tensorflow.VarLenFeatureProto var_len_feature = 2;
   */
  public boolean hasVarLenFeature() {
    return configCase_ == 2;
  }
  /**
   * .tensorflow.VarLenFeatureProto var_len_feature = 2;
   */
  public org.tensorflow.example.VarLenFeatureProto getVarLenFeature() {
    if (configCase_ == 2) {
       return (org.tensorflow.example.VarLenFeatureProto) config_;
    }
    return org.tensorflow.example.VarLenFeatureProto.getDefaultInstance();
  }
  /**
   * .tensorflow.VarLenFeatureProto var_len_feature = 2;
   */
  public org.tensorflow.example.VarLenFeatureProtoOrBuilder getVarLenFeatureOrBuilder() {
    if (configCase_ == 2) {
       return (org.tensorflow.example.VarLenFeatureProto) config_;
    }
    return org.tensorflow.example.VarLenFeatureProto.getDefaultInstance();
  }

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

    memoizedIsInitialized = 1;
    return true;
  }

  public void writeTo(com.google.protobuf.CodedOutputStream output)
                      throws java.io.IOException {
    if (configCase_ == 1) {
      output.writeMessage(1, (org.tensorflow.example.FixedLenFeatureProto) config_);
    }
    if (configCase_ == 2) {
      output.writeMessage(2, (org.tensorflow.example.VarLenFeatureProto) config_);
    }
    unknownFields.writeTo(output);
  }

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

    size = 0;
    if (configCase_ == 1) {
      size += com.google.protobuf.CodedOutputStream
        .computeMessageSize(1, (org.tensorflow.example.FixedLenFeatureProto) config_);
    }
    if (configCase_ == 2) {
      size += com.google.protobuf.CodedOutputStream
        .computeMessageSize(2, (org.tensorflow.example.VarLenFeatureProto) config_);
    }
    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.example.FeatureConfiguration)) {
      return super.equals(obj);
    }
    org.tensorflow.example.FeatureConfiguration other = (org.tensorflow.example.FeatureConfiguration) obj;

    boolean result = true;
    result = result && getConfigCase().equals(
        other.getConfigCase());
    if (!result) return false;
    switch (configCase_) {
      case 1:
        result = result && getFixedLenFeature()
            .equals(other.getFixedLenFeature());
        break;
      case 2:
        result = result && getVarLenFeature()
            .equals(other.getVarLenFeature());
        break;
      case 0:
      default:
    }
    result = result && unknownFields.equals(other.unknownFields);
    return result;
  }

  @java.lang.Override
  public int hashCode() {
    if (memoizedHashCode != 0) {
      return memoizedHashCode;
    }
    int hash = 41;
    hash = (19 * hash) + getDescriptor().hashCode();
    switch (configCase_) {
      case 1:
        hash = (37 * hash) + FIXED_LEN_FEATURE_FIELD_NUMBER;
        hash = (53 * hash) + getFixedLenFeature().hashCode();
        break;
      case 2:
        hash = (37 * hash) + VAR_LEN_FEATURE_FIELD_NUMBER;
        hash = (53 * hash) + getVarLenFeature().hashCode();
        break;
      case 0:
      default:
    }
    hash = (29 * hash) + unknownFields.hashCode();
    memoizedHashCode = hash;
    return hash;
  }

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

  public Builder newBuilderForType() { return newBuilder(); }
  public static Builder newBuilder() {
    return DEFAULT_INSTANCE.toBuilder();
  }
  public static Builder newBuilder(org.tensorflow.example.FeatureConfiguration prototype) {
    return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
  }
  public Builder toBuilder() {
    return this == DEFAULT_INSTANCE
        ? new Builder() : new Builder().mergeFrom(this);
  }

  @java.lang.Override
  protected Builder newBuilderForType(
      com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    Builder builder = new Builder(parent);
    return builder;
  }
  /**
   * Protobuf type {@code tensorflow.FeatureConfiguration}
   */
  public static final class Builder extends
      com.google.protobuf.GeneratedMessageV3.Builder implements
      // @@protoc_insertion_point(builder_implements:tensorflow.FeatureConfiguration)
      org.tensorflow.example.FeatureConfigurationOrBuilder {
    public static final com.google.protobuf.Descriptors.Descriptor
        getDescriptor() {
      return org.tensorflow.example.ExampleParserConfigurationProtos.internal_static_tensorflow_FeatureConfiguration_descriptor;
    }

    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
        internalGetFieldAccessorTable() {
      return org.tensorflow.example.ExampleParserConfigurationProtos.internal_static_tensorflow_FeatureConfiguration_fieldAccessorTable
          .ensureFieldAccessorsInitialized(
              org.tensorflow.example.FeatureConfiguration.class, org.tensorflow.example.FeatureConfiguration.Builder.class);
    }

    // Construct using org.tensorflow.example.FeatureConfiguration.newBuilder()
    private Builder() {
      maybeForceBuilderInitialization();
    }

    private Builder(
        com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
      super(parent);
      maybeForceBuilderInitialization();
    }
    private void maybeForceBuilderInitialization() {
      if (com.google.protobuf.GeneratedMessageV3
              .alwaysUseFieldBuilders) {
      }
    }
    public Builder clear() {
      super.clear();
      configCase_ = 0;
      config_ = null;
      return this;
    }

    public com.google.protobuf.Descriptors.Descriptor
        getDescriptorForType() {
      return org.tensorflow.example.ExampleParserConfigurationProtos.internal_static_tensorflow_FeatureConfiguration_descriptor;
    }

    public org.tensorflow.example.FeatureConfiguration getDefaultInstanceForType() {
      return org.tensorflow.example.FeatureConfiguration.getDefaultInstance();
    }

    public org.tensorflow.example.FeatureConfiguration build() {
      org.tensorflow.example.FeatureConfiguration result = buildPartial();
      if (!result.isInitialized()) {
        throw newUninitializedMessageException(result);
      }
      return result;
    }

    public org.tensorflow.example.FeatureConfiguration buildPartial() {
      org.tensorflow.example.FeatureConfiguration result = new org.tensorflow.example.FeatureConfiguration(this);
      if (configCase_ == 1) {
        if (fixedLenFeatureBuilder_ == null) {
          result.config_ = config_;
        } else {
          result.config_ = fixedLenFeatureBuilder_.build();
        }
      }
      if (configCase_ == 2) {
        if (varLenFeatureBuilder_ == null) {
          result.config_ = config_;
        } else {
          result.config_ = varLenFeatureBuilder_.build();
        }
      }
      result.configCase_ = configCase_;
      onBuilt();
      return result;
    }

    public Builder clone() {
      return (Builder) super.clone();
    }
    public Builder setField(
        com.google.protobuf.Descriptors.FieldDescriptor field,
        java.lang.Object value) {
      return (Builder) super.setField(field, value);
    }
    public Builder clearField(
        com.google.protobuf.Descriptors.FieldDescriptor field) {
      return (Builder) super.clearField(field);
    }
    public Builder clearOneof(
        com.google.protobuf.Descriptors.OneofDescriptor oneof) {
      return (Builder) super.clearOneof(oneof);
    }
    public Builder setRepeatedField(
        com.google.protobuf.Descriptors.FieldDescriptor field,
        int index, java.lang.Object value) {
      return (Builder) super.setRepeatedField(field, index, value);
    }
    public Builder addRepeatedField(
        com.google.protobuf.Descriptors.FieldDescriptor field,
        java.lang.Object value) {
      return (Builder) super.addRepeatedField(field, value);
    }
    public Builder mergeFrom(com.google.protobuf.Message other) {
      if (other instanceof org.tensorflow.example.FeatureConfiguration) {
        return mergeFrom((org.tensorflow.example.FeatureConfiguration)other);
      } else {
        super.mergeFrom(other);
        return this;
      }
    }

    public Builder mergeFrom(org.tensorflow.example.FeatureConfiguration other) {
      if (other == org.tensorflow.example.FeatureConfiguration.getDefaultInstance()) return this;
      switch (other.getConfigCase()) {
        case FIXED_LEN_FEATURE: {
          mergeFixedLenFeature(other.getFixedLenFeature());
          break;
        }
        case VAR_LEN_FEATURE: {
          mergeVarLenFeature(other.getVarLenFeature());
          break;
        }
        case CONFIG_NOT_SET: {
          break;
        }
      }
      this.mergeUnknownFields(other.unknownFields);
      onChanged();
      return this;
    }

    public final boolean isInitialized() {
      return true;
    }

    public Builder mergeFrom(
        com.google.protobuf.CodedInputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      org.tensorflow.example.FeatureConfiguration parsedMessage = null;
      try {
        parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
      } catch (com.google.protobuf.InvalidProtocolBufferException e) {
        parsedMessage = (org.tensorflow.example.FeatureConfiguration) e.getUnfinishedMessage();
        throw e.unwrapIOException();
      } finally {
        if (parsedMessage != null) {
          mergeFrom(parsedMessage);
        }
      }
      return this;
    }
    private int configCase_ = 0;
    private java.lang.Object config_;
    public ConfigCase
        getConfigCase() {
      return ConfigCase.forNumber(
          configCase_);
    }

    public Builder clearConfig() {
      configCase_ = 0;
      config_ = null;
      onChanged();
      return this;
    }


    private com.google.protobuf.SingleFieldBuilderV3<
        org.tensorflow.example.FixedLenFeatureProto, org.tensorflow.example.FixedLenFeatureProto.Builder, org.tensorflow.example.FixedLenFeatureProtoOrBuilder> fixedLenFeatureBuilder_;
    /**
     * .tensorflow.FixedLenFeatureProto fixed_len_feature = 1;
     */
    public boolean hasFixedLenFeature() {
      return configCase_ == 1;
    }
    /**
     * .tensorflow.FixedLenFeatureProto fixed_len_feature = 1;
     */
    public org.tensorflow.example.FixedLenFeatureProto getFixedLenFeature() {
      if (fixedLenFeatureBuilder_ == null) {
        if (configCase_ == 1) {
          return (org.tensorflow.example.FixedLenFeatureProto) config_;
        }
        return org.tensorflow.example.FixedLenFeatureProto.getDefaultInstance();
      } else {
        if (configCase_ == 1) {
          return fixedLenFeatureBuilder_.getMessage();
        }
        return org.tensorflow.example.FixedLenFeatureProto.getDefaultInstance();
      }
    }
    /**
     * .tensorflow.FixedLenFeatureProto fixed_len_feature = 1;
     */
    public Builder setFixedLenFeature(org.tensorflow.example.FixedLenFeatureProto value) {
      if (fixedLenFeatureBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        config_ = value;
        onChanged();
      } else {
        fixedLenFeatureBuilder_.setMessage(value);
      }
      configCase_ = 1;
      return this;
    }
    /**
     * .tensorflow.FixedLenFeatureProto fixed_len_feature = 1;
     */
    public Builder setFixedLenFeature(
        org.tensorflow.example.FixedLenFeatureProto.Builder builderForValue) {
      if (fixedLenFeatureBuilder_ == null) {
        config_ = builderForValue.build();
        onChanged();
      } else {
        fixedLenFeatureBuilder_.setMessage(builderForValue.build());
      }
      configCase_ = 1;
      return this;
    }
    /**
     * .tensorflow.FixedLenFeatureProto fixed_len_feature = 1;
     */
    public Builder mergeFixedLenFeature(org.tensorflow.example.FixedLenFeatureProto value) {
      if (fixedLenFeatureBuilder_ == null) {
        if (configCase_ == 1 &&
            config_ != org.tensorflow.example.FixedLenFeatureProto.getDefaultInstance()) {
          config_ = org.tensorflow.example.FixedLenFeatureProto.newBuilder((org.tensorflow.example.FixedLenFeatureProto) config_)
              .mergeFrom(value).buildPartial();
        } else {
          config_ = value;
        }
        onChanged();
      } else {
        if (configCase_ == 1) {
          fixedLenFeatureBuilder_.mergeFrom(value);
        }
        fixedLenFeatureBuilder_.setMessage(value);
      }
      configCase_ = 1;
      return this;
    }
    /**
     * .tensorflow.FixedLenFeatureProto fixed_len_feature = 1;
     */
    public Builder clearFixedLenFeature() {
      if (fixedLenFeatureBuilder_ == null) {
        if (configCase_ == 1) {
          configCase_ = 0;
          config_ = null;
          onChanged();
        }
      } else {
        if (configCase_ == 1) {
          configCase_ = 0;
          config_ = null;
        }
        fixedLenFeatureBuilder_.clear();
      }
      return this;
    }
    /**
     * .tensorflow.FixedLenFeatureProto fixed_len_feature = 1;
     */
    public org.tensorflow.example.FixedLenFeatureProto.Builder getFixedLenFeatureBuilder() {
      return getFixedLenFeatureFieldBuilder().getBuilder();
    }
    /**
     * .tensorflow.FixedLenFeatureProto fixed_len_feature = 1;
     */
    public org.tensorflow.example.FixedLenFeatureProtoOrBuilder getFixedLenFeatureOrBuilder() {
      if ((configCase_ == 1) && (fixedLenFeatureBuilder_ != null)) {
        return fixedLenFeatureBuilder_.getMessageOrBuilder();
      } else {
        if (configCase_ == 1) {
          return (org.tensorflow.example.FixedLenFeatureProto) config_;
        }
        return org.tensorflow.example.FixedLenFeatureProto.getDefaultInstance();
      }
    }
    /**
     * .tensorflow.FixedLenFeatureProto fixed_len_feature = 1;
     */
    private com.google.protobuf.SingleFieldBuilderV3<
        org.tensorflow.example.FixedLenFeatureProto, org.tensorflow.example.FixedLenFeatureProto.Builder, org.tensorflow.example.FixedLenFeatureProtoOrBuilder> 
        getFixedLenFeatureFieldBuilder() {
      if (fixedLenFeatureBuilder_ == null) {
        if (!(configCase_ == 1)) {
          config_ = org.tensorflow.example.FixedLenFeatureProto.getDefaultInstance();
        }
        fixedLenFeatureBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
            org.tensorflow.example.FixedLenFeatureProto, org.tensorflow.example.FixedLenFeatureProto.Builder, org.tensorflow.example.FixedLenFeatureProtoOrBuilder>(
                (org.tensorflow.example.FixedLenFeatureProto) config_,
                getParentForChildren(),
                isClean());
        config_ = null;
      }
      configCase_ = 1;
      onChanged();;
      return fixedLenFeatureBuilder_;
    }

    private com.google.protobuf.SingleFieldBuilderV3<
        org.tensorflow.example.VarLenFeatureProto, org.tensorflow.example.VarLenFeatureProto.Builder, org.tensorflow.example.VarLenFeatureProtoOrBuilder> varLenFeatureBuilder_;
    /**
     * .tensorflow.VarLenFeatureProto var_len_feature = 2;
     */
    public boolean hasVarLenFeature() {
      return configCase_ == 2;
    }
    /**
     * .tensorflow.VarLenFeatureProto var_len_feature = 2;
     */
    public org.tensorflow.example.VarLenFeatureProto getVarLenFeature() {
      if (varLenFeatureBuilder_ == null) {
        if (configCase_ == 2) {
          return (org.tensorflow.example.VarLenFeatureProto) config_;
        }
        return org.tensorflow.example.VarLenFeatureProto.getDefaultInstance();
      } else {
        if (configCase_ == 2) {
          return varLenFeatureBuilder_.getMessage();
        }
        return org.tensorflow.example.VarLenFeatureProto.getDefaultInstance();
      }
    }
    /**
     * .tensorflow.VarLenFeatureProto var_len_feature = 2;
     */
    public Builder setVarLenFeature(org.tensorflow.example.VarLenFeatureProto value) {
      if (varLenFeatureBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        config_ = value;
        onChanged();
      } else {
        varLenFeatureBuilder_.setMessage(value);
      }
      configCase_ = 2;
      return this;
    }
    /**
     * .tensorflow.VarLenFeatureProto var_len_feature = 2;
     */
    public Builder setVarLenFeature(
        org.tensorflow.example.VarLenFeatureProto.Builder builderForValue) {
      if (varLenFeatureBuilder_ == null) {
        config_ = builderForValue.build();
        onChanged();
      } else {
        varLenFeatureBuilder_.setMessage(builderForValue.build());
      }
      configCase_ = 2;
      return this;
    }
    /**
     * .tensorflow.VarLenFeatureProto var_len_feature = 2;
     */
    public Builder mergeVarLenFeature(org.tensorflow.example.VarLenFeatureProto value) {
      if (varLenFeatureBuilder_ == null) {
        if (configCase_ == 2 &&
            config_ != org.tensorflow.example.VarLenFeatureProto.getDefaultInstance()) {
          config_ = org.tensorflow.example.VarLenFeatureProto.newBuilder((org.tensorflow.example.VarLenFeatureProto) config_)
              .mergeFrom(value).buildPartial();
        } else {
          config_ = value;
        }
        onChanged();
      } else {
        if (configCase_ == 2) {
          varLenFeatureBuilder_.mergeFrom(value);
        }
        varLenFeatureBuilder_.setMessage(value);
      }
      configCase_ = 2;
      return this;
    }
    /**
     * .tensorflow.VarLenFeatureProto var_len_feature = 2;
     */
    public Builder clearVarLenFeature() {
      if (varLenFeatureBuilder_ == null) {
        if (configCase_ == 2) {
          configCase_ = 0;
          config_ = null;
          onChanged();
        }
      } else {
        if (configCase_ == 2) {
          configCase_ = 0;
          config_ = null;
        }
        varLenFeatureBuilder_.clear();
      }
      return this;
    }
    /**
     * .tensorflow.VarLenFeatureProto var_len_feature = 2;
     */
    public org.tensorflow.example.VarLenFeatureProto.Builder getVarLenFeatureBuilder() {
      return getVarLenFeatureFieldBuilder().getBuilder();
    }
    /**
     * .tensorflow.VarLenFeatureProto var_len_feature = 2;
     */
    public org.tensorflow.example.VarLenFeatureProtoOrBuilder getVarLenFeatureOrBuilder() {
      if ((configCase_ == 2) && (varLenFeatureBuilder_ != null)) {
        return varLenFeatureBuilder_.getMessageOrBuilder();
      } else {
        if (configCase_ == 2) {
          return (org.tensorflow.example.VarLenFeatureProto) config_;
        }
        return org.tensorflow.example.VarLenFeatureProto.getDefaultInstance();
      }
    }
    /**
     * .tensorflow.VarLenFeatureProto var_len_feature = 2;
     */
    private com.google.protobuf.SingleFieldBuilderV3<
        org.tensorflow.example.VarLenFeatureProto, org.tensorflow.example.VarLenFeatureProto.Builder, org.tensorflow.example.VarLenFeatureProtoOrBuilder> 
        getVarLenFeatureFieldBuilder() {
      if (varLenFeatureBuilder_ == null) {
        if (!(configCase_ == 2)) {
          config_ = org.tensorflow.example.VarLenFeatureProto.getDefaultInstance();
        }
        varLenFeatureBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
            org.tensorflow.example.VarLenFeatureProto, org.tensorflow.example.VarLenFeatureProto.Builder, org.tensorflow.example.VarLenFeatureProtoOrBuilder>(
                (org.tensorflow.example.VarLenFeatureProto) config_,
                getParentForChildren(),
                isClean());
        config_ = null;
      }
      configCase_ = 2;
      onChanged();;
      return varLenFeatureBuilder_;
    }
    public final Builder setUnknownFields(
        final com.google.protobuf.UnknownFieldSet unknownFields) {
      return super.setUnknownFieldsProto3(unknownFields);
    }

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


    // @@protoc_insertion_point(builder_scope:tensorflow.FeatureConfiguration)
  }

  // @@protoc_insertion_point(class_scope:tensorflow.FeatureConfiguration)
  private static final org.tensorflow.example.FeatureConfiguration DEFAULT_INSTANCE;
  static {
    DEFAULT_INSTANCE = new org.tensorflow.example.FeatureConfiguration();
  }

  public static org.tensorflow.example.FeatureConfiguration getDefaultInstance() {
    return DEFAULT_INSTANCE;
  }

  private static final com.google.protobuf.Parser
      PARSER = new com.google.protobuf.AbstractParser() {
    public FeatureConfiguration parsePartialFrom(
        com.google.protobuf.CodedInputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return new FeatureConfiguration(input, extensionRegistry);
    }
  };

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

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

  public org.tensorflow.example.FeatureConfiguration getDefaultInstanceForType() {
    return DEFAULT_INSTANCE;
  }

}





© 2015 - 2024 Weber Informatics LLC | Privacy Policy