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

com.yahoo.cloud.config.filedistribution.FiledistributorrpcConfig Maven / Gradle / Ivy

There is a newer version: 8.458.13
Show newest version
// ------------   D O   N O T   E D I T !   ------------
// This file is generated from a config definition file.

package com.yahoo.cloud.config.filedistribution;

import java.util.*;
import java.io.File;
import java.nio.file.Path;
import com.yahoo.config.*;

/**
 * This class represents the root node of filedistributorrpc
 *
 * Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
 */
public final class FiledistributorrpcConfig extends ConfigInstance {

  public final static String CONFIG_DEF_MD5 = "7a139e62d1f3c0354d724e7f49b648fc";
  public final static String CONFIG_DEF_NAME = "filedistributorrpc";
  public final static String CONFIG_DEF_NAMESPACE = "cloud.config.filedistribution";
  public final static String[] CONFIG_DEF_SCHEMA = {
    "namespace=cloud.config.filedistribution",
    "connectionspec string"
  };

  public static String getDefMd5()       { return CONFIG_DEF_MD5; }
  public static String getDefName()      { return CONFIG_DEF_NAME; }
  public static String getDefNamespace() { return CONFIG_DEF_NAMESPACE; }

  public interface Producer extends ConfigInstance.Producer {
    void getConfig(Builder builder);
  }

  public static final class Builder implements ConfigInstance.Builder {
    private Set __uninitialized = new HashSet(List.of(
      "connectionspec"
      ));

    private String connectionspec = null;

    public Builder() { }

    public Builder(FiledistributorrpcConfig config) {
      connectionspec(config.connectionspec());
    }

    private Builder override(Builder __superior) {
      if (__superior.connectionspec != null)
        connectionspec(__superior.connectionspec);
      return this;
    }

    public Builder connectionspec(String __value) {
    if (__value == null) throw new IllegalArgumentException("Null value is not allowed.");
      connectionspec = __value;
      __uninitialized.remove("connectionspec");
      return this;
    }


    private boolean _applyOnRestart = false;

    @java.lang.Override
    public final boolean dispatchGetConfig(ConfigInstance.Producer producer) {
      if (producer instanceof Producer) {
        ((Producer)producer).getConfig(this);
        return true;
      }
      return false;
    }

    @java.lang.Override
    public final String getDefMd5() { return CONFIG_DEF_MD5; }

    @java.lang.Override
    public final String getDefName() { return CONFIG_DEF_NAME; }

    @java.lang.Override
    public final String getDefNamespace() { return CONFIG_DEF_NAMESPACE; }

    @java.lang.Override
    public final boolean getApplyOnRestart() { return _applyOnRestart; }

    @java.lang.Override
    public final void setApplyOnRestart(boolean applyOnRestart) { _applyOnRestart = applyOnRestart; }

    public FiledistributorrpcConfig build() {
      return new FiledistributorrpcConfig(this);
    }

  }

  private final StringNode connectionspec;

  public FiledistributorrpcConfig(Builder builder) {
    this(builder, true);
  }

  private FiledistributorrpcConfig(Builder builder, boolean throwIfUninitialized) {
    if (throwIfUninitialized && ! builder.__uninitialized.isEmpty())
      throw new IllegalArgumentException("The following builder parameters for " +
          "filedistributorrpc must be initialized: " + builder.__uninitialized);

    connectionspec = (builder.connectionspec == null) ?
        new StringNode() : new StringNode(builder.connectionspec);
  }

  /**
   * @return filedistributorrpc.connectionspec
   */
  public String connectionspec() {
    return connectionspec.value();
  }

  private ChangesRequiringRestart getChangesRequiringRestart(FiledistributorrpcConfig newConfig) {
    ChangesRequiringRestart changes = new ChangesRequiringRestart("filedistributorrpc");
    return changes;
  }

  private static boolean containsFieldsFlaggedWithRestart() {
    return false;
  }


}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy