Class ImmutableRegCheck

java.lang.Object
org.kiwiproject.consul.model.agent.Registration.RegCheck
org.kiwiproject.consul.model.agent.ImmutableRegCheck

@ParametersAreNonnullByDefault @Generated("org.immutables.processor.ProxyProcessor") @Immutable @CheckReturnValue public final class ImmutableRegCheck extends Registration.RegCheck
Immutable implementation of Registration.RegCheck.

Use the builder to create immutable instances: ImmutableRegCheck.builder().

  • Method Details

    • getId

      public Optional<String> getId()
      Specified by:
      getId in class Registration.RegCheck
      Returns:
      The value of the id attribute
    • getName

      public Optional<String> getName()
      Specified by:
      getName in class Registration.RegCheck
      Returns:
      The value of the name attribute
    • getArgs

      public Optional<List<String>> getArgs()
      Specified by:
      getArgs in class Registration.RegCheck
      Returns:
      The value of the args attribute
    • getInterval

      public Optional<String> getInterval()
      Specified by:
      getInterval in class Registration.RegCheck
      Returns:
      The value of the interval attribute
    • getTtl

      public Optional<String> getTtl()
      Specified by:
      getTtl in class Registration.RegCheck
      Returns:
      The value of the ttl attribute
    • getHttp

      public Optional<String> getHttp()
      Specified by:
      getHttp in class Registration.RegCheck
      Returns:
      The value of the http attribute
    • getTcp

      public Optional<String> getTcp()
      Specified by:
      getTcp in class Registration.RegCheck
      Returns:
      The value of the tcp attribute
    • getGrpc

      public Optional<String> getGrpc()
      Specified by:
      getGrpc in class Registration.RegCheck
      Returns:
      The value of the grpc attribute
    • getGrpcUseTls

      public Optional<Boolean> getGrpcUseTls()
      Specified by:
      getGrpcUseTls in class Registration.RegCheck
      Returns:
      The value of the grpcUseTls attribute
    • getTimeout

      public Optional<String> getTimeout()
      Specified by:
      getTimeout in class Registration.RegCheck
      Returns:
      The value of the timeout attribute
    • getNotes

      public Optional<String> getNotes()
      Specified by:
      getNotes in class Registration.RegCheck
      Returns:
      The value of the notes attribute
    • getDeregisterCriticalServiceAfter

      public Optional<String> getDeregisterCriticalServiceAfter()
      Specified by:
      getDeregisterCriticalServiceAfter in class Registration.RegCheck
      Returns:
      The value of the deregisterCriticalServiceAfter attribute
    • getTlsSkipVerify

      public Optional<Boolean> getTlsSkipVerify()
      Specified by:
      getTlsSkipVerify in class Registration.RegCheck
      Returns:
      The value of the tlsSkipVerify attribute
    • getStatus

      public Optional<String> getStatus()
      Specified by:
      getStatus in class Registration.RegCheck
      Returns:
      The value of the status attribute
    • getSuccessBeforePassing

      public Optional<Integer> getSuccessBeforePassing()
      Specified by:
      getSuccessBeforePassing in class Registration.RegCheck
      Returns:
      The value of the successBeforePassing attribute
    • getFailuresBeforeCritical

      public Optional<Integer> getFailuresBeforeCritical()
      Specified by:
      getFailuresBeforeCritical in class Registration.RegCheck
      Returns:
      The value of the failuresBeforeCritical attribute
    • withId

      public final ImmutableRegCheck withId(String value)
      Copy the current immutable object by setting a present value for the optional id attribute.
      Parameters:
      value - The value for id
      Returns:
      A modified copy of this object
    • withId

      public final ImmutableRegCheck withId(Optional<String> optional)
      Copy the current immutable object by setting an optional value for the id attribute. An equality check is used on inner nullable value to prevent copying of the same value by returning this.
      Parameters:
      optional - A value for id
      Returns:
      A modified copy of this object
    • withName

      public final ImmutableRegCheck withName(String value)
      Copy the current immutable object by setting a present value for the optional name attribute.
      Parameters:
      value - The value for name
      Returns:
      A modified copy of this object
    • withName

      public final ImmutableRegCheck withName(Optional<String> optional)
      Copy the current immutable object by setting an optional value for the name attribute. An equality check is used on inner nullable value to prevent copying of the same value by returning this.
      Parameters:
      optional - A value for name
      Returns:
      A modified copy of this object
    • withArgs

      public final ImmutableRegCheck withArgs(List<String> value)
      Copy the current immutable object by setting a present value for the optional args attribute.
      Parameters:
      value - The value for args
      Returns:
      A modified copy of this object
    • withArgs

      public final ImmutableRegCheck withArgs(Optional<? extends List<String>> optional)
      Copy the current immutable object by setting an optional value for the args attribute. A shallow reference equality check is used on unboxed optional value to prevent copying of the same value by returning this.
      Parameters:
      optional - A value for args
      Returns:
      A modified copy of this object
    • withInterval

      public final ImmutableRegCheck withInterval(String value)
      Copy the current immutable object by setting a present value for the optional interval attribute.
      Parameters:
      value - The value for interval
      Returns:
      A modified copy of this object
    • withInterval

      public final ImmutableRegCheck withInterval(Optional<String> optional)
      Copy the current immutable object by setting an optional value for the interval attribute. An equality check is used on inner nullable value to prevent copying of the same value by returning this.
      Parameters:
      optional - A value for interval
      Returns:
      A modified copy of this object
    • withTtl

      public final ImmutableRegCheck withTtl(String value)
      Copy the current immutable object by setting a present value for the optional ttl attribute.
      Parameters:
      value - The value for ttl
      Returns:
      A modified copy of this object
    • withTtl

      public final ImmutableRegCheck withTtl(Optional<String> optional)
      Copy the current immutable object by setting an optional value for the ttl attribute. An equality check is used on inner nullable value to prevent copying of the same value by returning this.
      Parameters:
      optional - A value for ttl
      Returns:
      A modified copy of this object
    • withHttp

      public final ImmutableRegCheck withHttp(String value)
      Copy the current immutable object by setting a present value for the optional http attribute.
      Parameters:
      value - The value for http
      Returns:
      A modified copy of this object
    • withHttp

      public final ImmutableRegCheck withHttp(Optional<String> optional)
      Copy the current immutable object by setting an optional value for the http attribute. An equality check is used on inner nullable value to prevent copying of the same value by returning this.
      Parameters:
      optional - A value for http
      Returns:
      A modified copy of this object
    • withTcp

      public final ImmutableRegCheck withTcp(String value)
      Copy the current immutable object by setting a present value for the optional tcp attribute.
      Parameters:
      value - The value for tcp
      Returns:
      A modified copy of this object
    • withTcp

      public final ImmutableRegCheck withTcp(Optional<String> optional)
      Copy the current immutable object by setting an optional value for the tcp attribute. An equality check is used on inner nullable value to prevent copying of the same value by returning this.
      Parameters:
      optional - A value for tcp
      Returns:
      A modified copy of this object
    • withGrpc

      public final ImmutableRegCheck withGrpc(String value)
      Copy the current immutable object by setting a present value for the optional grpc attribute.
      Parameters:
      value - The value for grpc
      Returns:
      A modified copy of this object
    • withGrpc

      public final ImmutableRegCheck withGrpc(Optional<String> optional)
      Copy the current immutable object by setting an optional value for the grpc attribute. An equality check is used on inner nullable value to prevent copying of the same value by returning this.
      Parameters:
      optional - A value for grpc
      Returns:
      A modified copy of this object
    • withGrpcUseTls

      public final ImmutableRegCheck withGrpcUseTls(boolean value)
      Copy the current immutable object by setting a present value for the optional grpcUseTls attribute.
      Parameters:
      value - The value for grpcUseTls
      Returns:
      A modified copy of this object
    • withGrpcUseTls

      public final ImmutableRegCheck withGrpcUseTls(Optional<Boolean> optional)
      Copy the current immutable object by setting an optional value for the grpcUseTls attribute. An equality check is used on inner nullable value to prevent copying of the same value by returning this.
      Parameters:
      optional - A value for grpcUseTls
      Returns:
      A modified copy of this object
    • withTimeout

      public final ImmutableRegCheck withTimeout(String value)
      Copy the current immutable object by setting a present value for the optional timeout attribute.
      Parameters:
      value - The value for timeout
      Returns:
      A modified copy of this object
    • withTimeout

      public final ImmutableRegCheck withTimeout(Optional<String> optional)
      Copy the current immutable object by setting an optional value for the timeout attribute. An equality check is used on inner nullable value to prevent copying of the same value by returning this.
      Parameters:
      optional - A value for timeout
      Returns:
      A modified copy of this object
    • withNotes

      public final ImmutableRegCheck withNotes(String value)
      Copy the current immutable object by setting a present value for the optional notes attribute.
      Parameters:
      value - The value for notes
      Returns:
      A modified copy of this object
    • withNotes

      public final ImmutableRegCheck withNotes(Optional<String> optional)
      Copy the current immutable object by setting an optional value for the notes attribute. An equality check is used on inner nullable value to prevent copying of the same value by returning this.
      Parameters:
      optional - A value for notes
      Returns:
      A modified copy of this object
    • withDeregisterCriticalServiceAfter

      public final ImmutableRegCheck withDeregisterCriticalServiceAfter(String value)
      Copy the current immutable object by setting a present value for the optional deregisterCriticalServiceAfter attribute.
      Parameters:
      value - The value for deregisterCriticalServiceAfter
      Returns:
      A modified copy of this object
    • withDeregisterCriticalServiceAfter

      public final ImmutableRegCheck withDeregisterCriticalServiceAfter(Optional<String> optional)
      Copy the current immutable object by setting an optional value for the deregisterCriticalServiceAfter attribute. An equality check is used on inner nullable value to prevent copying of the same value by returning this.
      Parameters:
      optional - A value for deregisterCriticalServiceAfter
      Returns:
      A modified copy of this object
    • withTlsSkipVerify

      public final ImmutableRegCheck withTlsSkipVerify(boolean value)
      Copy the current immutable object by setting a present value for the optional tlsSkipVerify attribute.
      Parameters:
      value - The value for tlsSkipVerify
      Returns:
      A modified copy of this object
    • withTlsSkipVerify

      public final ImmutableRegCheck withTlsSkipVerify(Optional<Boolean> optional)
      Copy the current immutable object by setting an optional value for the tlsSkipVerify attribute. An equality check is used on inner nullable value to prevent copying of the same value by returning this.
      Parameters:
      optional - A value for tlsSkipVerify
      Returns:
      A modified copy of this object
    • withStatus

      public final ImmutableRegCheck withStatus(String value)
      Copy the current immutable object by setting a present value for the optional status attribute.
      Parameters:
      value - The value for status
      Returns:
      A modified copy of this object
    • withStatus

      public final ImmutableRegCheck withStatus(Optional<String> optional)
      Copy the current immutable object by setting an optional value for the status attribute. An equality check is used on inner nullable value to prevent copying of the same value by returning this.
      Parameters:
      optional - A value for status
      Returns:
      A modified copy of this object
    • withSuccessBeforePassing

      public final ImmutableRegCheck withSuccessBeforePassing(int value)
      Copy the current immutable object by setting a present value for the optional successBeforePassing attribute.
      Parameters:
      value - The value for successBeforePassing
      Returns:
      A modified copy of this object
    • withSuccessBeforePassing

      public final ImmutableRegCheck withSuccessBeforePassing(Optional<Integer> optional)
      Copy the current immutable object by setting an optional value for the successBeforePassing attribute. An equality check is used on inner nullable value to prevent copying of the same value by returning this.
      Parameters:
      optional - A value for successBeforePassing
      Returns:
      A modified copy of this object
    • withFailuresBeforeCritical

      public final ImmutableRegCheck withFailuresBeforeCritical(int value)
      Copy the current immutable object by setting a present value for the optional failuresBeforeCritical attribute.
      Parameters:
      value - The value for failuresBeforeCritical
      Returns:
      A modified copy of this object
    • withFailuresBeforeCritical

      public final ImmutableRegCheck withFailuresBeforeCritical(Optional<Integer> optional)
      Copy the current immutable object by setting an optional value for the failuresBeforeCritical attribute. An equality check is used on inner nullable value to prevent copying of the same value by returning this.
      Parameters:
      optional - A value for failuresBeforeCritical
      Returns:
      A modified copy of this object
    • equals

      public boolean equals(@Nullable Object another)
      This instance is equal to all instances of ImmutableRegCheck that have equal attribute values.
      Overrides:
      equals in class Object
      Returns:
      true if this is equal to another instance
    • hashCode

      public int hashCode()
      Computes a hash code from attributes: id, name, args, interval, ttl, http, tcp, grpc, grpcUseTls, timeout, notes, deregisterCriticalServiceAfter, tlsSkipVerify, status, successBeforePassing, failuresBeforeCritical.
      Overrides:
      hashCode in class Object
      Returns:
      hashCode value
    • toString

      public String toString()
      Prints the immutable value RegCheck with attribute values.
      Overrides:
      toString in class Object
      Returns:
      A string representation of the value
    • copyOf

      public static ImmutableRegCheck copyOf(Registration.RegCheck instance)
      Creates an immutable copy of a Registration.RegCheck value. Uses accessors to get values to initialize the new immutable instance. If an instance is already immutable, it is returned as is.
      Parameters:
      instance - The instance to copy
      Returns:
      A copied immutable RegCheck instance
    • builder

      public static ImmutableRegCheck.Builder builder()
      Creates a builder for ImmutableRegCheck.
       ImmutableRegCheck.builder()
          .id(String) // optional id
          .name(String) // optional name
          .args(List&lt;String&gt;) // optional args
          .interval(String) // optional interval
          .ttl(String) // optional ttl
          .http(String) // optional http
          .tcp(String) // optional tcp
          .grpc(String) // optional grpc
          .grpcUseTls(Boolean) // optional grpcUseTls
          .timeout(String) // optional timeout
          .notes(String) // optional notes
          .deregisterCriticalServiceAfter(String) // optional deregisterCriticalServiceAfter
          .tlsSkipVerify(Boolean) // optional tlsSkipVerify
          .status(String) // optional status
          .successBeforePassing(Integer) // optional successBeforePassing
          .failuresBeforeCritical(Integer) // optional failuresBeforeCritical
          .build();
       
      Returns:
      A new ImmutableRegCheck builder