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

io.flipt.client.models.ClientOptions Maven / Gradle / Ivy

There is a newer version: 0.2.0
Show newest version
package io.flipt.client.models;

import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.time.Duration;
import java.util.Optional;

@JsonInclude(JsonInclude.Include.NON_EMPTY)
public class ClientOptions {
  private final Optional url;
  private final Optional updateInterval;
  private final Optional authentication;
  private final Optional reference;
  private final Optional fetchMode;

  public ClientOptions(
      Optional url,
      Optional updateInterval,
      Optional authentication,
      Optional reference,
      Optional fetchMode) {
    this.url = url;
    this.authentication = authentication;
    this.reference = reference;

    Optional setUpdateInterval = Optional.empty();
    if (updateInterval.isPresent()) {
      setUpdateInterval = Optional.of(updateInterval.get().getSeconds());
    }

    this.updateInterval = setUpdateInterval;
    this.fetchMode = fetchMode;
  }

  @JsonProperty("url")
  public Optional getUrl() {
    return url;
  }

  @JsonProperty("update_interval")
  public Optional getUpdateInterval() {
    return updateInterval;
  }

  @JsonProperty("authentication")
  public Optional getAuthentication() {
    return authentication;
  }

  @JsonProperty("reference")
  public Optional getReference() {
    return reference;
  }

  @JsonProperty("fetch_mode")
  public Optional getFetchMode() {
    return fetchMode;
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy