Class ImmutableRegCheck.Builder
java.lang.Object
org.kiwiproject.consul.model.agent.ImmutableRegCheck.Builder
- Enclosing class:
- ImmutableRegCheck
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 Summary
Modifier and TypeMethodDescriptionInitializes the optional valueargsto args.Initializes the optional valueargsto args.build()Builds a newImmutableRegCheck.deregisterCriticalServiceAfter(String deregisterCriticalServiceAfter) Initializes the optional valuederegisterCriticalServiceAfterto deregisterCriticalServiceAfter.deregisterCriticalServiceAfter(Optional<String> deregisterCriticalServiceAfter) Initializes the optional valuederegisterCriticalServiceAfterto deregisterCriticalServiceAfter.failuresBeforeCritical(int failuresBeforeCritical) Initializes the optional valuefailuresBeforeCriticalto failuresBeforeCritical.failuresBeforeCritical(Optional<Integer> failuresBeforeCritical) Initializes the optional valuefailuresBeforeCriticalto failuresBeforeCritical.from(Registration.RegCheck instance) Fill a builder with attribute values from the providedRegCheckinstance.Initializes the optional valuegrpcto grpc.Initializes the optional valuegrpcto grpc.grpcUseTls(boolean grpcUseTls) Initializes the optional valuegrpcUseTlsto grpcUseTls.grpcUseTls(Optional<Boolean> grpcUseTls) Initializes the optional valuegrpcUseTlsto grpcUseTls.Initializes the optional valuehttpto http.Initializes the optional valuehttpto http.Initializes the optional valueidto id.Initializes the optional valueidto id.Initializes the optional valueintervalto interval.Initializes the optional valueintervalto interval.Initializes the optional valuenameto name.Initializes the optional valuenameto name.Initializes the optional valuenotesto notes.Initializes the optional valuenotesto notes.Initializes the optional valuestatusto status.Initializes the optional valuestatusto status.successBeforePassing(int successBeforePassing) Initializes the optional valuesuccessBeforePassingto successBeforePassing.successBeforePassing(Optional<Integer> successBeforePassing) Initializes the optional valuesuccessBeforePassingto successBeforePassing.Initializes the optional valuetcpto tcp.Initializes the optional valuetcpto tcp.Initializes the optional valuetimeoutto timeout.Initializes the optional valuetimeoutto timeout.tlsSkipVerify(boolean tlsSkipVerify) Initializes the optional valuetlsSkipVerifyto tlsSkipVerify.tlsSkipVerify(Optional<Boolean> tlsSkipVerify) Initializes the optional valuetlsSkipVerifyto tlsSkipVerify.Initializes the optional valuettlto ttl.Initializes the optional valuettlto ttl.
-
Method Details
-
from
Fill a builder with attribute values from the providedRegCheckinstance. 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:
thisbuilder for use in a chained invocation
-
id
Initializes the optional valueidto id.- Parameters:
id- The value for id- Returns:
thisbuilder for chained invocation
-
id
Initializes the optional valueidto id.- Parameters:
id- The value for id- Returns:
thisbuilder for use in a chained invocation
-
name
Initializes the optional valuenameto name.- Parameters:
name- The value for name- Returns:
thisbuilder for chained invocation
-
name
Initializes the optional valuenameto name.- Parameters:
name- The value for name- Returns:
thisbuilder for use in a chained invocation
-
args
Initializes the optional valueargsto args.- Parameters:
args- The value for args- Returns:
thisbuilder for chained invocation
-
args
@CanIgnoreReturnValue public final ImmutableRegCheck.Builder args(Optional<? extends List<String>> args) Initializes the optional valueargsto args.- Parameters:
args- The value for args- Returns:
thisbuilder for use in a chained invocation
-
interval
Initializes the optional valueintervalto interval.- Parameters:
interval- The value for interval- Returns:
thisbuilder for chained invocation
-
interval
Initializes the optional valueintervalto interval.- Parameters:
interval- The value for interval- Returns:
thisbuilder for use in a chained invocation
-
ttl
Initializes the optional valuettlto ttl.- Parameters:
ttl- The value for ttl- Returns:
thisbuilder for chained invocation
-
ttl
Initializes the optional valuettlto ttl.- Parameters:
ttl- The value for ttl- Returns:
thisbuilder for use in a chained invocation
-
http
Initializes the optional valuehttpto http.- Parameters:
http- The value for http- Returns:
thisbuilder for chained invocation
-
http
Initializes the optional valuehttpto http.- Parameters:
http- The value for http- Returns:
thisbuilder for use in a chained invocation
-
tcp
Initializes the optional valuetcpto tcp.- Parameters:
tcp- The value for tcp- Returns:
thisbuilder for chained invocation
-
tcp
Initializes the optional valuetcpto tcp.- Parameters:
tcp- The value for tcp- Returns:
thisbuilder for use in a chained invocation
-
grpc
Initializes the optional valuegrpcto grpc.- Parameters:
grpc- The value for grpc- Returns:
thisbuilder for chained invocation
-
grpc
Initializes the optional valuegrpcto grpc.- Parameters:
grpc- The value for grpc- Returns:
thisbuilder for use in a chained invocation
-
grpcUseTls
Initializes the optional valuegrpcUseTlsto grpcUseTls.- Parameters:
grpcUseTls- The value for grpcUseTls- Returns:
thisbuilder for chained invocation
-
grpcUseTls
@CanIgnoreReturnValue public final ImmutableRegCheck.Builder grpcUseTls(Optional<Boolean> grpcUseTls) Initializes the optional valuegrpcUseTlsto grpcUseTls.- Parameters:
grpcUseTls- The value for grpcUseTls- Returns:
thisbuilder for use in a chained invocation
-
timeout
Initializes the optional valuetimeoutto timeout.- Parameters:
timeout- The value for timeout- Returns:
thisbuilder for chained invocation
-
timeout
Initializes the optional valuetimeoutto timeout.- Parameters:
timeout- The value for timeout- Returns:
thisbuilder for use in a chained invocation
-
notes
Initializes the optional valuenotesto notes.- Parameters:
notes- The value for notes- Returns:
thisbuilder for chained invocation
-
notes
Initializes the optional valuenotesto notes.- Parameters:
notes- The value for notes- Returns:
thisbuilder for use in a chained invocation
-
deregisterCriticalServiceAfter
@CanIgnoreReturnValue public final ImmutableRegCheck.Builder deregisterCriticalServiceAfter(String deregisterCriticalServiceAfter) Initializes the optional valuederegisterCriticalServiceAfterto deregisterCriticalServiceAfter.- Parameters:
deregisterCriticalServiceAfter- The value for deregisterCriticalServiceAfter- Returns:
thisbuilder for chained invocation
-
deregisterCriticalServiceAfter
@CanIgnoreReturnValue public final ImmutableRegCheck.Builder deregisterCriticalServiceAfter(Optional<String> deregisterCriticalServiceAfter) Initializes the optional valuederegisterCriticalServiceAfterto deregisterCriticalServiceAfter.- Parameters:
deregisterCriticalServiceAfter- The value for deregisterCriticalServiceAfter- Returns:
thisbuilder for use in a chained invocation
-
tlsSkipVerify
Initializes the optional valuetlsSkipVerifyto tlsSkipVerify.- Parameters:
tlsSkipVerify- The value for tlsSkipVerify- Returns:
thisbuilder for chained invocation
-
tlsSkipVerify
@CanIgnoreReturnValue public final ImmutableRegCheck.Builder tlsSkipVerify(Optional<Boolean> tlsSkipVerify) Initializes the optional valuetlsSkipVerifyto tlsSkipVerify.- Parameters:
tlsSkipVerify- The value for tlsSkipVerify- Returns:
thisbuilder for use in a chained invocation
-
status
Initializes the optional valuestatusto status.- Parameters:
status- The value for status- Returns:
thisbuilder for chained invocation
-
status
Initializes the optional valuestatusto status.- Parameters:
status- The value for status- Returns:
thisbuilder for use in a chained invocation
-
successBeforePassing
@CanIgnoreReturnValue public final ImmutableRegCheck.Builder successBeforePassing(int successBeforePassing) Initializes the optional valuesuccessBeforePassingto successBeforePassing.- Parameters:
successBeforePassing- The value for successBeforePassing- Returns:
thisbuilder for chained invocation
-
successBeforePassing
@CanIgnoreReturnValue public final ImmutableRegCheck.Builder successBeforePassing(Optional<Integer> successBeforePassing) Initializes the optional valuesuccessBeforePassingto successBeforePassing.- Parameters:
successBeforePassing- The value for successBeforePassing- Returns:
thisbuilder for use in a chained invocation
-
failuresBeforeCritical
@CanIgnoreReturnValue public final ImmutableRegCheck.Builder failuresBeforeCritical(int failuresBeforeCritical) Initializes the optional valuefailuresBeforeCriticalto failuresBeforeCritical.- Parameters:
failuresBeforeCritical- The value for failuresBeforeCritical- Returns:
thisbuilder for chained invocation
-
failuresBeforeCritical
@CanIgnoreReturnValue public final ImmutableRegCheck.Builder failuresBeforeCritical(Optional<Integer> failuresBeforeCritical) Initializes the optional valuefailuresBeforeCriticalto failuresBeforeCritical.- Parameters:
failuresBeforeCritical- The value for failuresBeforeCritical- Returns:
thisbuilder for use in a chained invocation
-
build
Builds a newImmutableRegCheck.- Returns:
- An immutable instance of RegCheck
- Throws:
IllegalStateException- if any required attributes are missing
-