/** * Builds a new {@link ImmutableRegCheck ImmutableRegCheck}. * @return An immutable instance of RegCheck * @throws java.lang.IllegalStateException if any required attributes are missing */ public ImmutableRegCheck build() { return ImmutableRegCheck.validate(new ImmutableRegCheck( args, interval, ttl, http, tcp, grpc, grpcUseTls, timeout, notes, deregisterCriticalServiceAfter, tlsSkipVerify, status)); } }
/** * Copy the current immutable object by setting a <i>present</i> value for the optional {@link Registration.RegCheck#getStatus() status} attribute. * @param value The value for status * @return A modified copy of {@code this} object */ public final ImmutableRegCheck withStatus(String value) { @Nullable String newValue = Preconditions.checkNotNull(value, "status"); if (Objects.equals(this.status, newValue)) return this; return validate(new ImmutableRegCheck( this.args, this.interval, this.ttl, this.http, this.tcp, this.grpc, this.grpcUseTls, this.timeout, this.notes, this.deregisterCriticalServiceAfter, this.tlsSkipVerify, newValue)); }
/** * Copy the current immutable object by setting an optional value for the {@link Registration.RegCheck#getInterval() interval} attribute. * An equality check is used on inner nullable value to prevent copying of the same value by returning {@code this}. * @param optional A value for interval * @return A modified copy of {@code this} object */ public final ImmutableRegCheck withInterval(Optional<String> optional) { @Nullable String value = optional.orElse(null); if (Objects.equals(this.interval, value)) return this; return validate(new ImmutableRegCheck( this.args, value, this.ttl, this.http, this.tcp, this.grpc, this.grpcUseTls, this.timeout, this.notes, this.deregisterCriticalServiceAfter, this.tlsSkipVerify, this.status)); }
/** * Copy the current immutable object by setting an optional value for the {@link Registration.RegCheck#getGrpc() grpc} attribute. * An equality check is used on inner nullable value to prevent copying of the same value by returning {@code this}. * @param optional A value for grpc * @return A modified copy of {@code this} object */ public final ImmutableRegCheck withGrpc(Optional<String> optional) { @Nullable String value = optional.orElse(null); if (Objects.equals(this.grpc, value)) return this; return validate(new ImmutableRegCheck( this.args, this.interval, this.ttl, this.http, this.tcp, value, this.grpcUseTls, this.timeout, this.notes, this.deregisterCriticalServiceAfter, this.tlsSkipVerify, this.status)); }
/** * Copy the current immutable object by setting a <i>present</i> value for the optional {@link Registration.RegCheck#getArgs() args} attribute. * @param value The value for args * @return A modified copy of {@code this} object */ public final ImmutableRegCheck withArgs(List<String> value) { @Nullable List<String> newValue = Preconditions.checkNotNull(value, "args"); if (this.args == newValue) return this; return validate(new ImmutableRegCheck( newValue, this.interval, this.ttl, this.http, this.tcp, this.grpc, this.grpcUseTls, this.timeout, this.notes, this.deregisterCriticalServiceAfter, this.tlsSkipVerify, this.status)); }
/** * Copy the current immutable object by setting a <i>present</i> value for the optional {@link Registration.RegCheck#getInterval() interval} attribute. * @param value The value for interval * @return A modified copy of {@code this} object */ public final ImmutableRegCheck withInterval(String value) { @Nullable String newValue = Preconditions.checkNotNull(value, "interval"); if (Objects.equals(this.interval, newValue)) return this; return validate(new ImmutableRegCheck( this.args, newValue, this.ttl, this.http, this.tcp, this.grpc, this.grpcUseTls, this.timeout, this.notes, this.deregisterCriticalServiceAfter, this.tlsSkipVerify, this.status)); }
/** * Copy the current immutable object by setting a <i>present</i> value for the optional {@link Registration.RegCheck#getGrpcUseTls() grpcUseTls} attribute. * @param value The value for grpcUseTls * @return A modified copy of {@code this} object */ public final ImmutableRegCheck withGrpcUseTls(boolean value) { @Nullable Boolean newValue = value; if (Objects.equals(this.grpcUseTls, newValue)) return this; return validate(new ImmutableRegCheck( this.args, this.interval, this.ttl, this.http, this.tcp, this.grpc, newValue, this.timeout, this.notes, this.deregisterCriticalServiceAfter, this.tlsSkipVerify, this.status)); }
/** * Copy the current immutable object by setting a <i>present</i> value for the optional {@link Registration.RegCheck#getTimeout() timeout} attribute. * @param value The value for timeout * @return A modified copy of {@code this} object */ public final ImmutableRegCheck withTimeout(String value) { @Nullable String newValue = Preconditions.checkNotNull(value, "timeout"); if (Objects.equals(this.timeout, newValue)) return this; return validate(new ImmutableRegCheck( this.args, this.interval, this.ttl, this.http, this.tcp, this.grpc, this.grpcUseTls, newValue, this.notes, this.deregisterCriticalServiceAfter, this.tlsSkipVerify, this.status)); }
/** * Copy the current immutable object by setting an optional value for the {@link Registration.RegCheck#getArgs() args} attribute. * A shallow reference equality check is used on unboxed optional value to prevent copying of the same value by returning {@code this}. * @param optional A value for args * @return A modified copy of {@code this} object */ public final ImmutableRegCheck withArgs(Optional<List<String>> optional) { @Nullable List<String> value = optional.orElse(null); if (this.args == value) return this; return validate(new ImmutableRegCheck( value, this.interval, this.ttl, this.http, this.tcp, this.grpc, this.grpcUseTls, this.timeout, this.notes, this.deregisterCriticalServiceAfter, this.tlsSkipVerify, this.status)); }
/** * Copy the current immutable object by setting an optional value for the {@link Registration.RegCheck#getStatus() status} attribute. * An equality check is used on inner nullable value to prevent copying of the same value by returning {@code this}. * @param optional A value for status * @return A modified copy of {@code this} object */ public final ImmutableRegCheck withStatus(Optional<String> optional) { @Nullable String value = optional.orElse(null); if (Objects.equals(this.status, value)) return this; return validate(new ImmutableRegCheck( this.args, this.interval, this.ttl, this.http, this.tcp, this.grpc, this.grpcUseTls, this.timeout, this.notes, this.deregisterCriticalServiceAfter, this.tlsSkipVerify, value)); }
/** * Copy the current immutable object by setting an optional value for the {@link Registration.RegCheck#getTlsSkipVerify() tlsSkipVerify} attribute. * An equality check is used on inner nullable value to prevent copying of the same value by returning {@code this}. * @param optional A value for tlsSkipVerify * @return A modified copy of {@code this} object */ public final ImmutableRegCheck withTlsSkipVerify(Optional<Boolean> optional) { @Nullable Boolean value = optional.orElse(null); if (Objects.equals(this.tlsSkipVerify, value)) return this; return validate(new ImmutableRegCheck( this.args, this.interval, this.ttl, this.http, this.tcp, this.grpc, this.grpcUseTls, this.timeout, this.notes, this.deregisterCriticalServiceAfter, value, this.status)); }
/** * Copy the current immutable object by setting a <i>present</i> value for the optional {@link Registration.RegCheck#getTtl() ttl} attribute. * @param value The value for ttl * @return A modified copy of {@code this} object */ public final ImmutableRegCheck withTtl(String value) { @Nullable String newValue = Preconditions.checkNotNull(value, "ttl"); if (Objects.equals(this.ttl, newValue)) return this; return validate(new ImmutableRegCheck( this.args, this.interval, newValue, this.http, this.tcp, this.grpc, this.grpcUseTls, this.timeout, this.notes, this.deregisterCriticalServiceAfter, this.tlsSkipVerify, this.status)); }
/** * Copy the current immutable object by setting a <i>present</i> value for the optional {@link Registration.RegCheck#getHttp() http} attribute. * @param value The value for http * @return A modified copy of {@code this} object */ public final ImmutableRegCheck withHttp(String value) { @Nullable String newValue = Preconditions.checkNotNull(value, "http"); if (Objects.equals(this.http, newValue)) return this; return validate(new ImmutableRegCheck( this.args, this.interval, this.ttl, newValue, this.tcp, this.grpc, this.grpcUseTls, this.timeout, this.notes, this.deregisterCriticalServiceAfter, this.tlsSkipVerify, this.status)); }
/** * Copy the current immutable object by setting a <i>present</i> value for the optional {@link Registration.RegCheck#getTcp() tcp} attribute. * @param value The value for tcp * @return A modified copy of {@code this} object */ public final ImmutableRegCheck withTcp(String value) { @Nullable String newValue = Preconditions.checkNotNull(value, "tcp"); if (Objects.equals(this.tcp, newValue)) return this; return validate(new ImmutableRegCheck( this.args, this.interval, this.ttl, this.http, newValue, this.grpc, this.grpcUseTls, this.timeout, this.notes, this.deregisterCriticalServiceAfter, this.tlsSkipVerify, this.status)); }
/** * Copy the current immutable object by setting a <i>present</i> value for the optional {@link Registration.RegCheck#getGrpc() grpc} attribute. * @param value The value for grpc * @return A modified copy of {@code this} object */ public final ImmutableRegCheck withGrpc(String value) { @Nullable String newValue = Preconditions.checkNotNull(value, "grpc"); if (Objects.equals(this.grpc, newValue)) return this; return validate(new ImmutableRegCheck( this.args, this.interval, this.ttl, this.http, this.tcp, newValue, this.grpcUseTls, this.timeout, this.notes, this.deregisterCriticalServiceAfter, this.tlsSkipVerify, this.status)); }
/** * Copy the current immutable object by setting a <i>present</i> value for the optional {@link Registration.RegCheck#getNotes() notes} attribute. * @param value The value for notes * @return A modified copy of {@code this} object */ public final ImmutableRegCheck withNotes(String value) { @Nullable String newValue = Preconditions.checkNotNull(value, "notes"); if (Objects.equals(this.notes, newValue)) return this; return validate(new ImmutableRegCheck( this.args, this.interval, this.ttl, this.http, this.tcp, this.grpc, this.grpcUseTls, this.timeout, newValue, this.deregisterCriticalServiceAfter, this.tlsSkipVerify, this.status)); }
/** * Copy the current immutable object by setting a <i>present</i> value for the optional {@link Registration.RegCheck#getDeregisterCriticalServiceAfter() deregisterCriticalServiceAfter} attribute. * @param value The value for deregisterCriticalServiceAfter * @return A modified copy of {@code this} object */ public final ImmutableRegCheck withDeregisterCriticalServiceAfter(String value) { @Nullable String newValue = Preconditions.checkNotNull(value, "deregisterCriticalServiceAfter"); if (Objects.equals(this.deregisterCriticalServiceAfter, newValue)) return this; return validate(new ImmutableRegCheck( this.args, this.interval, this.ttl, this.http, this.tcp, this.grpc, this.grpcUseTls, this.timeout, this.notes, newValue, this.tlsSkipVerify, this.status)); }
/** * Copy the current immutable object by setting a <i>present</i> value for the optional {@link Registration.RegCheck#getTlsSkipVerify() tlsSkipVerify} attribute. * @param value The value for tlsSkipVerify * @return A modified copy of {@code this} object */ public final ImmutableRegCheck withTlsSkipVerify(boolean value) { @Nullable Boolean newValue = value; if (Objects.equals(this.tlsSkipVerify, newValue)) return this; return validate(new ImmutableRegCheck( this.args, this.interval, this.ttl, this.http, this.tcp, this.grpc, this.grpcUseTls, this.timeout, this.notes, this.deregisterCriticalServiceAfter, newValue, this.status)); }
/** * Copy the current immutable object by setting an optional value for the {@link Registration.RegCheck#getNotes() notes} attribute. * An equality check is used on inner nullable value to prevent copying of the same value by returning {@code this}. * @param optional A value for notes * @return A modified copy of {@code this} object */ public final ImmutableRegCheck withNotes(Optional<String> optional) { @Nullable String value = optional.orElse(null); if (Objects.equals(this.notes, value)) return this; return validate(new ImmutableRegCheck( this.args, this.interval, this.ttl, this.http, this.tcp, this.grpc, this.grpcUseTls, this.timeout, value, this.deregisterCriticalServiceAfter, this.tlsSkipVerify, this.status)); }
/** * Copy the current immutable object by setting an optional value for the {@link Registration.RegCheck#getDeregisterCriticalServiceAfter() deregisterCriticalServiceAfter} attribute. * An equality check is used on inner nullable value to prevent copying of the same value by returning {@code this}. * @param optional A value for deregisterCriticalServiceAfter * @return A modified copy of {@code this} object */ public final ImmutableRegCheck withDeregisterCriticalServiceAfter(Optional<String> optional) { @Nullable String value = optional.orElse(null); if (Objects.equals(this.deregisterCriticalServiceAfter, value)) return this; return validate(new ImmutableRegCheck( this.args, this.interval, this.ttl, this.http, this.tcp, this.grpc, this.grpcUseTls, this.timeout, this.notes, value, this.tlsSkipVerify, this.status)); }