Class WriteOptions

java.lang.Object
io.github.jopenlibs.vault.api.WriteOptions

public class WriteOptions extends Object
Additional options that may be set as part of K/V V2 write operation. Construct instances of this class using a builder pattern, calling setter methods for each value and then terminating with a call to build().
  • Field Details

  • Constructor Details

    • WriteOptions

      public WriteOptions()
  • Method Details

    • checkAndSet

      public WriteOptions checkAndSet(Long version)
      Enable check and set (CAS) option
      Parameters:
      version - current version of the secret
      Returns:
      updated options ready for additional builder-pattern calls or else finalization with the build() method
    • setOption

      public WriteOptions setOption(String name, Object value)
      Set an option to a value
      Parameters:
      name - option name
      value - option value
      Returns:
      updated options ready for additional builder-pattern calls or else finalization with the build() method
    • build

      public WriteOptions build()
      Finalize the options (terminating method in the builder pattern)
      Returns:
      this object, with all available config options parsed and loaded
    • getOptionsMap

      public Map<String,Object> getOptionsMap()
      Returns:
      options as a Map
    • isEmpty

      public boolean isEmpty()
      Returns:
      true if no options are set, false otherwise