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

org.finos.tracdap.config._ConfigFile Maven / Gradle / Ivy

Go to download

TRAC D.A.P. config library, contains data structures used for config files (and other config sources)

The newest version!
// Generated by the protocol buffer compiler.  DO NOT EDIT!
// NO CHECKED-IN PROTOBUF GENCODE
// source: tracdap/config/common.proto
// Protobuf Java Version: 4.28.2

package org.finos.tracdap.config;

/**
 * Protobuf type {@code tracdap.config._ConfigFile}
 */
public final class _ConfigFile extends
    com.google.protobuf.GeneratedMessage implements
    // @@protoc_insertion_point(message_implements:tracdap.config._ConfigFile)
    _ConfigFileOrBuilder {
private static final long serialVersionUID = 0L;
  static {
    com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
      com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
      /* major= */ 4,
      /* minor= */ 28,
      /* patch= */ 2,
      /* suffix= */ "",
      _ConfigFile.class.getName());
  }
  // Use _ConfigFile.newBuilder() to construct.
  private _ConfigFile(com.google.protobuf.GeneratedMessage.Builder builder) {
    super(builder);
  }
  private _ConfigFile() {
  }

  public static final com.google.protobuf.Descriptors.Descriptor
      getDescriptor() {
    return org.finos.tracdap.config.Common.internal_static_tracdap_config__ConfigFile_descriptor;
  }

  @SuppressWarnings({"rawtypes"})
  @java.lang.Override
  protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection(
      int number) {
    switch (number) {
      case 1:
        return internalGetConfig();
      default:
        throw new RuntimeException(
            "Invalid map field number: " + number);
    }
  }
  @java.lang.Override
  protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
      internalGetFieldAccessorTable() {
    return org.finos.tracdap.config.Common.internal_static_tracdap_config__ConfigFile_fieldAccessorTable
        .ensureFieldAccessorsInitialized(
            org.finos.tracdap.config._ConfigFile.class, org.finos.tracdap.config._ConfigFile.Builder.class);
  }

  public static final int CONFIG_FIELD_NUMBER = 1;
  private static final class ConfigDefaultEntryHolder {
    static final com.google.protobuf.MapEntry<
        java.lang.String, java.lang.String> defaultEntry =
            com.google.protobuf.MapEntry
            .newDefaultInstance(
                org.finos.tracdap.config.Common.internal_static_tracdap_config__ConfigFile_ConfigEntry_descriptor, 
                com.google.protobuf.WireFormat.FieldType.STRING,
                "",
                com.google.protobuf.WireFormat.FieldType.STRING,
                "");
  }
  @SuppressWarnings("serial")
  private com.google.protobuf.MapField<
      java.lang.String, java.lang.String> config_;
  private com.google.protobuf.MapField
  internalGetConfig() {
    if (config_ == null) {
      return com.google.protobuf.MapField.emptyMapField(
          ConfigDefaultEntryHolder.defaultEntry);
    }
    return config_;
  }
  public int getConfigCount() {
    return internalGetConfig().getMap().size();
  }
  /**
   * map<string, string> config = 1;
   */
  @java.lang.Override
  public boolean containsConfig(
      java.lang.String key) {
    if (key == null) { throw new NullPointerException("map key"); }
    return internalGetConfig().getMap().containsKey(key);
  }
  /**
   * Use {@link #getConfigMap()} instead.
   */
  @java.lang.Override
  @java.lang.Deprecated
  public java.util.Map getConfig() {
    return getConfigMap();
  }
  /**
   * map<string, string> config = 1;
   */
  @java.lang.Override
  public java.util.Map getConfigMap() {
    return internalGetConfig().getMap();
  }
  /**
   * map<string, string> config = 1;
   */
  @java.lang.Override
  public /* nullable */
java.lang.String getConfigOrDefault(
      java.lang.String key,
      /* nullable */
java.lang.String defaultValue) {
    if (key == null) { throw new NullPointerException("map key"); }
    java.util.Map map =
        internalGetConfig().getMap();
    return map.containsKey(key) ? map.get(key) : defaultValue;
  }
  /**
   * map<string, string> config = 1;
   */
  @java.lang.Override
  public java.lang.String getConfigOrThrow(
      java.lang.String key) {
    if (key == null) { throw new NullPointerException("map key"); }
    java.util.Map map =
        internalGetConfig().getMap();
    if (!map.containsKey(key)) {
      throw new java.lang.IllegalArgumentException();
    }
    return map.get(key);
  }

  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.GeneratedMessage
      .serializeStringMapTo(
        output,
        internalGetConfig(),
        ConfigDefaultEntryHolder.defaultEntry,
        1);
    getUnknownFields().writeTo(output);
  }

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

    size = 0;
    for (java.util.Map.Entry entry
         : internalGetConfig().getMap().entrySet()) {
      com.google.protobuf.MapEntry
      config__ = ConfigDefaultEntryHolder.defaultEntry.newBuilderForType()
          .setKey(entry.getKey())
          .setValue(entry.getValue())
          .build();
      size += com.google.protobuf.CodedOutputStream
          .computeMessageSize(1, config__);
    }
    size += getUnknownFields().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.finos.tracdap.config._ConfigFile)) {
      return super.equals(obj);
    }
    org.finos.tracdap.config._ConfigFile other = (org.finos.tracdap.config._ConfigFile) obj;

    if (!internalGetConfig().equals(
        other.internalGetConfig())) return false;
    if (!getUnknownFields().equals(other.getUnknownFields())) return false;
    return true;
  }

  @java.lang.Override
  public int hashCode() {
    if (memoizedHashCode != 0) {
      return memoizedHashCode;
    }
    int hash = 41;
    hash = (19 * hash) + getDescriptor().hashCode();
    if (!internalGetConfig().getMap().isEmpty()) {
      hash = (37 * hash) + CONFIG_FIELD_NUMBER;
      hash = (53 * hash) + internalGetConfig().hashCode();
    }
    hash = (29 * hash) + getUnknownFields().hashCode();
    memoizedHashCode = hash;
    return hash;
  }

  public static org.finos.tracdap.config._ConfigFile parseFrom(
      java.nio.ByteBuffer data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }
  public static org.finos.tracdap.config._ConfigFile parseFrom(
      java.nio.ByteBuffer data,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data, extensionRegistry);
  }
  public static org.finos.tracdap.config._ConfigFile parseFrom(
      com.google.protobuf.ByteString data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }
  public static org.finos.tracdap.config._ConfigFile parseFrom(
      com.google.protobuf.ByteString data,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data, extensionRegistry);
  }
  public static org.finos.tracdap.config._ConfigFile parseFrom(byte[] data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }
  public static org.finos.tracdap.config._ConfigFile parseFrom(
      byte[] data,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data, extensionRegistry);
  }
  public static org.finos.tracdap.config._ConfigFile parseFrom(java.io.InputStream input)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessage
        .parseWithIOException(PARSER, input);
  }
  public static org.finos.tracdap.config._ConfigFile parseFrom(
      java.io.InputStream input,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessage
        .parseWithIOException(PARSER, input, extensionRegistry);
  }

  public static org.finos.tracdap.config._ConfigFile parseDelimitedFrom(java.io.InputStream input)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessage
        .parseDelimitedWithIOException(PARSER, input);
  }

  public static org.finos.tracdap.config._ConfigFile parseDelimitedFrom(
      java.io.InputStream input,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessage
        .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
  }
  public static org.finos.tracdap.config._ConfigFile parseFrom(
      com.google.protobuf.CodedInputStream input)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessage
        .parseWithIOException(PARSER, input);
  }
  public static org.finos.tracdap.config._ConfigFile parseFrom(
      com.google.protobuf.CodedInputStream input,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessage
        .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.finos.tracdap.config._ConfigFile 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.GeneratedMessage.BuilderParent parent) {
    Builder builder = new Builder(parent);
    return builder;
  }
  /**
   * Protobuf type {@code tracdap.config._ConfigFile}
   */
  public static final class Builder extends
      com.google.protobuf.GeneratedMessage.Builder implements
      // @@protoc_insertion_point(builder_implements:tracdap.config._ConfigFile)
      org.finos.tracdap.config._ConfigFileOrBuilder {
    public static final com.google.protobuf.Descriptors.Descriptor
        getDescriptor() {
      return org.finos.tracdap.config.Common.internal_static_tracdap_config__ConfigFile_descriptor;
    }

    @SuppressWarnings({"rawtypes"})
    protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection(
        int number) {
      switch (number) {
        case 1:
          return internalGetConfig();
        default:
          throw new RuntimeException(
              "Invalid map field number: " + number);
      }
    }
    @SuppressWarnings({"rawtypes"})
    protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection(
        int number) {
      switch (number) {
        case 1:
          return internalGetMutableConfig();
        default:
          throw new RuntimeException(
              "Invalid map field number: " + number);
      }
    }
    @java.lang.Override
    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
        internalGetFieldAccessorTable() {
      return org.finos.tracdap.config.Common.internal_static_tracdap_config__ConfigFile_fieldAccessorTable
          .ensureFieldAccessorsInitialized(
              org.finos.tracdap.config._ConfigFile.class, org.finos.tracdap.config._ConfigFile.Builder.class);
    }

    // Construct using org.finos.tracdap.config._ConfigFile.newBuilder()
    private Builder() {

    }

    private Builder(
        com.google.protobuf.GeneratedMessage.BuilderParent parent) {
      super(parent);

    }
    @java.lang.Override
    public Builder clear() {
      super.clear();
      bitField0_ = 0;
      internalGetMutableConfig().clear();
      return this;
    }

    @java.lang.Override
    public com.google.protobuf.Descriptors.Descriptor
        getDescriptorForType() {
      return org.finos.tracdap.config.Common.internal_static_tracdap_config__ConfigFile_descriptor;
    }

    @java.lang.Override
    public org.finos.tracdap.config._ConfigFile getDefaultInstanceForType() {
      return org.finos.tracdap.config._ConfigFile.getDefaultInstance();
    }

    @java.lang.Override
    public org.finos.tracdap.config._ConfigFile build() {
      org.finos.tracdap.config._ConfigFile result = buildPartial();
      if (!result.isInitialized()) {
        throw newUninitializedMessageException(result);
      }
      return result;
    }

    @java.lang.Override
    public org.finos.tracdap.config._ConfigFile buildPartial() {
      org.finos.tracdap.config._ConfigFile result = new org.finos.tracdap.config._ConfigFile(this);
      if (bitField0_ != 0) { buildPartial0(result); }
      onBuilt();
      return result;
    }

    private void buildPartial0(org.finos.tracdap.config._ConfigFile result) {
      int from_bitField0_ = bitField0_;
      if (((from_bitField0_ & 0x00000001) != 0)) {
        result.config_ = internalGetConfig();
        result.config_.makeImmutable();
      }
    }

    @java.lang.Override
    public Builder mergeFrom(com.google.protobuf.Message other) {
      if (other instanceof org.finos.tracdap.config._ConfigFile) {
        return mergeFrom((org.finos.tracdap.config._ConfigFile)other);
      } else {
        super.mergeFrom(other);
        return this;
      }
    }

    public Builder mergeFrom(org.finos.tracdap.config._ConfigFile other) {
      if (other == org.finos.tracdap.config._ConfigFile.getDefaultInstance()) return this;
      internalGetMutableConfig().mergeFrom(
          other.internalGetConfig());
      bitField0_ |= 0x00000001;
      this.mergeUnknownFields(other.getUnknownFields());
      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 {
      if (extensionRegistry == null) {
        throw new java.lang.NullPointerException();
      }
      try {
        boolean done = false;
        while (!done) {
          int tag = input.readTag();
          switch (tag) {
            case 0:
              done = true;
              break;
            case 10: {
              com.google.protobuf.MapEntry
              config__ = input.readMessage(
                  ConfigDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry);
              internalGetMutableConfig().getMutableMap().put(
                  config__.getKey(), config__.getValue());
              bitField0_ |= 0x00000001;
              break;
            } // case 10
            default: {
              if (!super.parseUnknownField(input, extensionRegistry, tag)) {
                done = true; // was an endgroup tag
              }
              break;
            } // default:
          } // switch (tag)
        } // while (!done)
      } catch (com.google.protobuf.InvalidProtocolBufferException e) {
        throw e.unwrapIOException();
      } finally {
        onChanged();
      } // finally
      return this;
    }
    private int bitField0_;

    private com.google.protobuf.MapField<
        java.lang.String, java.lang.String> config_;
    private com.google.protobuf.MapField
        internalGetConfig() {
      if (config_ == null) {
        return com.google.protobuf.MapField.emptyMapField(
            ConfigDefaultEntryHolder.defaultEntry);
      }
      return config_;
    }
    private com.google.protobuf.MapField
        internalGetMutableConfig() {
      if (config_ == null) {
        config_ = com.google.protobuf.MapField.newMapField(
            ConfigDefaultEntryHolder.defaultEntry);
      }
      if (!config_.isMutable()) {
        config_ = config_.copy();
      }
      bitField0_ |= 0x00000001;
      onChanged();
      return config_;
    }
    public int getConfigCount() {
      return internalGetConfig().getMap().size();
    }
    /**
     * map<string, string> config = 1;
     */
    @java.lang.Override
    public boolean containsConfig(
        java.lang.String key) {
      if (key == null) { throw new NullPointerException("map key"); }
      return internalGetConfig().getMap().containsKey(key);
    }
    /**
     * Use {@link #getConfigMap()} instead.
     */
    @java.lang.Override
    @java.lang.Deprecated
    public java.util.Map getConfig() {
      return getConfigMap();
    }
    /**
     * map<string, string> config = 1;
     */
    @java.lang.Override
    public java.util.Map getConfigMap() {
      return internalGetConfig().getMap();
    }
    /**
     * map<string, string> config = 1;
     */
    @java.lang.Override
    public /* nullable */
java.lang.String getConfigOrDefault(
        java.lang.String key,
        /* nullable */
java.lang.String defaultValue) {
      if (key == null) { throw new NullPointerException("map key"); }
      java.util.Map map =
          internalGetConfig().getMap();
      return map.containsKey(key) ? map.get(key) : defaultValue;
    }
    /**
     * map<string, string> config = 1;
     */
    @java.lang.Override
    public java.lang.String getConfigOrThrow(
        java.lang.String key) {
      if (key == null) { throw new NullPointerException("map key"); }
      java.util.Map map =
          internalGetConfig().getMap();
      if (!map.containsKey(key)) {
        throw new java.lang.IllegalArgumentException();
      }
      return map.get(key);
    }
    public Builder clearConfig() {
      bitField0_ = (bitField0_ & ~0x00000001);
      internalGetMutableConfig().getMutableMap()
          .clear();
      return this;
    }
    /**
     * map<string, string> config = 1;
     */
    public Builder removeConfig(
        java.lang.String key) {
      if (key == null) { throw new NullPointerException("map key"); }
      internalGetMutableConfig().getMutableMap()
          .remove(key);
      return this;
    }
    /**
     * Use alternate mutation accessors instead.
     */
    @java.lang.Deprecated
    public java.util.Map
        getMutableConfig() {
      bitField0_ |= 0x00000001;
      return internalGetMutableConfig().getMutableMap();
    }
    /**
     * map<string, string> config = 1;
     */
    public Builder putConfig(
        java.lang.String key,
        java.lang.String value) {
      if (key == null) { throw new NullPointerException("map key"); }
      if (value == null) { throw new NullPointerException("map value"); }
      internalGetMutableConfig().getMutableMap()
          .put(key, value);
      bitField0_ |= 0x00000001;
      return this;
    }
    /**
     * map<string, string> config = 1;
     */
    public Builder putAllConfig(
        java.util.Map values) {
      internalGetMutableConfig().getMutableMap()
          .putAll(values);
      bitField0_ |= 0x00000001;
      return this;
    }

    // @@protoc_insertion_point(builder_scope:tracdap.config._ConfigFile)
  }

  // @@protoc_insertion_point(class_scope:tracdap.config._ConfigFile)
  private static final org.finos.tracdap.config._ConfigFile DEFAULT_INSTANCE;
  static {
    DEFAULT_INSTANCE = new org.finos.tracdap.config._ConfigFile();
  }

  public static org.finos.tracdap.config._ConfigFile getDefaultInstance() {
    return DEFAULT_INSTANCE;
  }

  private static final com.google.protobuf.Parser<_ConfigFile>
      PARSER = new com.google.protobuf.AbstractParser<_ConfigFile>() {
    @java.lang.Override
    public _ConfigFile parsePartialFrom(
        com.google.protobuf.CodedInputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      Builder builder = newBuilder();
      try {
        builder.mergeFrom(input, extensionRegistry);
      } catch (com.google.protobuf.InvalidProtocolBufferException e) {
        throw e.setUnfinishedMessage(builder.buildPartial());
      } catch (com.google.protobuf.UninitializedMessageException e) {
        throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
      } catch (java.io.IOException e) {
        throw new com.google.protobuf.InvalidProtocolBufferException(e)
            .setUnfinishedMessage(builder.buildPartial());
      }
      return builder.buildPartial();
    }
  };

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

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

  @java.lang.Override
  public org.finos.tracdap.config._ConfigFile getDefaultInstanceForType() {
    return DEFAULT_INSTANCE;
  }

}





© 2015 - 2024 Weber Informatics LLC | Privacy Policy