Class ImmutableRegCheck.Builder

java.lang.Object
org.kiwiproject.consul.model.agent.ImmutableRegCheck.Builder
Enclosing class:
ImmutableRegCheck

public static final class ImmutableRegCheck.Builder extends Object
Builds instances of type ImmutableRegCheck. Initialize attributes and then invoke the build() method to create an immutable instance.

Builder is not thread-safe and generally should not be stored in a field or collection, but instead used immediately to create instances.

  • Method Details

    • from

      @CanIgnoreReturnValue public final ImmutableRegCheck.Builder from(Registration.RegCheck instance)
      Fill a builder with attribute values from the provided RegCheck instance. Regular attribute values will be replaced with those from the given instance. Absent optional values will not replace present values.
      Parameters:
      instance - The instance from which to copy values
      Returns:
      this builder for use in a chained invocation
    • id

      @CanIgnoreReturnValue public final ImmutableRegCheck.Builder id(String id)
      Initializes the optional value id to id.
      Parameters:
      id - The value for id
      Returns:
      this builder for chained invocation
    • id

      @CanIgnoreReturnValue public final ImmutableRegCheck.Builder id(Optional<String> id)
      Initializes the optional value id to id.
      Parameters:
      id - The value for id
      Returns:
      this builder for use in a chained invocation
    • name

      @CanIgnoreReturnValue public final ImmutableRegCheck.Builder name(String name)
      Initializes the optional value name to name.
      Parameters:
      name - The value for name
      Returns:
      this builder for chained invocation
    • name

      @CanIgnoreReturnValue public final ImmutableRegCheck.Builder name(Optional<String> name)
      Initializes the optional value name to name.
      Parameters:
      name - The value for name
      Returns:
      this builder for use in a chained invocation
    • args

      @CanIgnoreReturnValue public final ImmutableRegCheck.Builder args(List<String> args)
      Initializes the optional value args to args.
      Parameters:
      args - The value for args
      Returns:
      this builder for chained invocation
    • args

      @CanIgnoreReturnValue public final ImmutableRegCheck.Builder args(Optional<? extends List<String>> args)
      Initializes the optional value args to args.
      Parameters:
      args - The value for args
      Returns:
      this builder for use in a chained invocation
    • interval

      @CanIgnoreReturnValue public final ImmutableRegCheck.Builder interval(String interval)
      Initializes the optional value interval to interval.
      Parameters:
      interval - The value for interval
      Returns:
      this builder for chained invocation
    • interval

      @CanIgnoreReturnValue public final ImmutableRegCheck.Builder interval(Optional<String> interval)
      Initializes the optional value interval to interval.
      Parameters:
      interval - The value for interval
      Returns:
      this builder for use in a chained invocation
    • ttl

      @CanIgnoreReturnValue public final ImmutableRegCheck.Builder ttl(String ttl)
      Initializes the optional value ttl to ttl.
      Parameters:
      ttl - The value for ttl
      Returns:
      this builder for chained invocation
    • ttl

      @CanIgnoreReturnValue public final ImmutableRegCheck.Builder ttl(Optional<String> ttl)
      Initializes the optional value ttl to ttl.
      Parameters:
      ttl - The value for ttl
      Returns:
      this builder for use in a chained invocation
    • http

      @CanIgnoreReturnValue public final ImmutableRegCheck.Builder http(String http)
      Initializes the optional value http to http.
      Parameters:
      http - The value for http
      Returns:
      this builder for chained invocation
    • http

      @CanIgnoreReturnValue public final ImmutableRegCheck.Builder http(Optional<String> http)
      Initializes the optional value http to http.
      Parameters:
      http - The value for http
      Returns:
      this builder for use in a chained invocation
    • tcp

      @CanIgnoreReturnValue public final ImmutableRegCheck.Builder tcp(String tcp)
      Initializes the optional value tcp to tcp.
      Parameters:
      tcp - The value for tcp
      Returns:
      this builder for chained invocation
    • tcp

      @CanIgnoreReturnValue public final ImmutableRegCheck.Builder tcp(Optional<String> tcp)
      Initializes the optional value tcp to tcp.
      Parameters:
      tcp - The value for tcp
      Returns:
      this builder for use in a chained invocation
    • grpc

      @CanIgnoreReturnValue public final ImmutableRegCheck.Builder grpc(String grpc)
      Initializes the optional value grpc to grpc.
      Parameters:
      grpc - The value for grpc
      Returns:
      this builder for chained invocation
    • grpc

      @CanIgnoreReturnValue public final ImmutableRegCheck.Builder grpc(Optional<String> grpc)
      Initializes the optional value grpc to grpc.
      Parameters:
      grpc - The value for grpc
      Returns:
      this builder for use in a chained invocation
    • grpcUseTls

      @CanIgnoreReturnValue public final ImmutableRegCheck.Builder grpcUseTls(boolean grpcUseTls)
      Initializes the optional value grpcUseTls to grpcUseTls.
      Parameters:
      grpcUseTls - The value for grpcUseTls
      Returns:
      this builder for chained invocation
    • grpcUseTls

      @CanIgnoreReturnValue public final ImmutableRegCheck.Builder grpcUseTls(Optional<Boolean> grpcUseTls)
      Initializes the optional value grpcUseTls to grpcUseTls.
      Parameters:
      grpcUseTls - The value for grpcUseTls
      Returns:
      this builder for use in a chained invocation
    • timeout

      @CanIgnoreReturnValue public final ImmutableRegCheck.Builder timeout(String timeout)
      Initializes the optional value timeout to timeout.
      Parameters:
      timeout - The value for timeout
      Returns:
      this builder for chained invocation
    • timeout

      @CanIgnoreReturnValue public final ImmutableRegCheck.Builder timeout(Optional<String> timeout)
      Initializes the optional value timeout to timeout.
      Parameters:
      timeout - The value for timeout
      Returns:
      this builder for use in a chained invocation
    • notes

      @CanIgnoreReturnValue public final ImmutableRegCheck.Builder notes(String notes)
      Initializes the optional value notes to notes.
      Parameters:
      notes - The value for notes
      Returns:
      this builder for chained invocation
    • notes

      @CanIgnoreReturnValue public final ImmutableRegCheck.Builder notes(Optional<String> notes)
      Initializes the optional value notes to notes.
      Parameters:
      notes - The value for notes
      Returns:
      this builder for use in a chained invocation
    • deregisterCriticalServiceAfter

      @CanIgnoreReturnValue public final ImmutableRegCheck.Builder deregisterCriticalServiceAfter(String deregisterCriticalServiceAfter)
      Initializes the optional value deregisterCriticalServiceAfter to deregisterCriticalServiceAfter.
      Parameters:
      deregisterCriticalServiceAfter - The value for deregisterCriticalServiceAfter
      Returns:
      this builder for chained invocation
    • deregisterCriticalServiceAfter

      @CanIgnoreReturnValue public final ImmutableRegCheck.Builder deregisterCriticalServiceAfter(Optional<String> deregisterCriticalServiceAfter)
      Initializes the optional value deregisterCriticalServiceAfter to deregisterCriticalServiceAfter.
      Parameters:
      deregisterCriticalServiceAfter - The value for deregisterCriticalServiceAfter
      Returns:
      this builder for use in a chained invocation
    • tlsSkipVerify

      @CanIgnoreReturnValue public final ImmutableRegCheck.Builder tlsSkipVerify(boolean tlsSkipVerify)
      Initializes the optional value tlsSkipVerify to tlsSkipVerify.
      Parameters:
      tlsSkipVerify - The value for tlsSkipVerify
      Returns:
      this builder for chained invocation
    • tlsSkipVerify

      @CanIgnoreReturnValue public final ImmutableRegCheck.Builder tlsSkipVerify(Optional<Boolean> tlsSkipVerify)
      Initializes the optional value tlsSkipVerify to tlsSkipVerify.
      Parameters:
      tlsSkipVerify - The value for tlsSkipVerify
      Returns:
      this builder for use in a chained invocation
    • status

      @CanIgnoreReturnValue public final ImmutableRegCheck.Builder status(String status)
      Initializes the optional value status to status.
      Parameters:
      status - The value for status
      Returns:
      this builder for chained invocation
    • status

      @CanIgnoreReturnValue public final ImmutableRegCheck.Builder status(Optional<String> status)
      Initializes the optional value status to status.
      Parameters:
      status - The value for status
      Returns:
      this builder for use in a chained invocation
    • successBeforePassing

      @CanIgnoreReturnValue public final ImmutableRegCheck.Builder successBeforePassing(int successBeforePassing)
      Initializes the optional value successBeforePassing to successBeforePassing.
      Parameters:
      successBeforePassing - The value for successBeforePassing
      Returns:
      this builder for chained invocation
    • successBeforePassing

      @CanIgnoreReturnValue public final ImmutableRegCheck.Builder successBeforePassing(Optional<Integer> successBeforePassing)
      Initializes the optional value successBeforePassing to successBeforePassing.
      Parameters:
      successBeforePassing - The value for successBeforePassing
      Returns:
      this builder for use in a chained invocation
    • failuresBeforeCritical

      @CanIgnoreReturnValue public final ImmutableRegCheck.Builder failuresBeforeCritical(int failuresBeforeCritical)
      Initializes the optional value failuresBeforeCritical to failuresBeforeCritical.
      Parameters:
      failuresBeforeCritical - The value for failuresBeforeCritical
      Returns:
      this builder for chained invocation
    • failuresBeforeCritical

      @CanIgnoreReturnValue public final ImmutableRegCheck.Builder failuresBeforeCritical(Optional<Integer> failuresBeforeCritical)
      Initializes the optional value failuresBeforeCritical to failuresBeforeCritical.
      Parameters:
      failuresBeforeCritical - The value for failuresBeforeCritical
      Returns:
      this builder for use in a chained invocation
    • build

      public ImmutableRegCheck build()
      Builds a new ImmutableRegCheck.
      Returns:
      An immutable instance of RegCheck
      Throws:
      IllegalStateException - if any required attributes are missing