/** * Builds a new {@link ImmutableDeleteOptions ImmutableDeleteOptions}. * @return An immutable instance of DeleteOptions * @throws java.lang.IllegalStateException if any required attributes are missing */ public ImmutableDeleteOptions build() { return new ImmutableDeleteOptions(cas, recurse, datacenter); } }
/** * Copy the current immutable object by setting a <i>present</i> value for the optional {@link DeleteOptions#getRecurse() recurse} attribute. * @param value The value for recurse * @return A modified copy of {@code this} object */ public final ImmutableDeleteOptions withRecurse(boolean value) { @Nullable Boolean newValue = value; if (Objects.equals(this.recurse, newValue)) return this; return new ImmutableDeleteOptions(this.cas, newValue, this.datacenter); }
/** * Copy the current immutable object by setting a <i>present</i> value for the optional {@link DeleteOptions#getCas() cas} attribute. * @param value The value for cas * @return A modified copy of {@code this} object */ public final ImmutableDeleteOptions withCas(long value) { @Nullable Long newValue = value; if (Objects.equals(this.cas, newValue)) return this; return new ImmutableDeleteOptions(newValue, this.recurse, this.datacenter); }
/** * Copy the current immutable object by setting an optional value for the {@link DeleteOptions#getCas() cas} 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 cas * @return A modified copy of {@code this} object */ public final ImmutableDeleteOptions withCas(Optional<Long> optional) { @Nullable Long value = optional.orElse(null); if (Objects.equals(this.cas, value)) return this; return new ImmutableDeleteOptions(value, this.recurse, this.datacenter); }
/** * Copy the current immutable object by setting an optional value for the {@link DeleteOptions#getDatacenter() datacenter} 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 datacenter * @return A modified copy of {@code this} object */ public final ImmutableDeleteOptions withDatacenter(Optional<String> optional) { @Nullable String value = optional.orElse(null); if (Objects.equals(this.datacenter, value)) return this; return new ImmutableDeleteOptions(this.cas, this.recurse, value); }
/** * Copy the current immutable object by setting a <i>present</i> value for the optional {@link DeleteOptions#getDatacenter() datacenter} attribute. * @param value The value for datacenter * @return A modified copy of {@code this} object */ public final ImmutableDeleteOptions withDatacenter(String value) { @Nullable String newValue = Preconditions.checkNotNull(value, "datacenter"); if (Objects.equals(this.datacenter, newValue)) return this; return new ImmutableDeleteOptions(this.cas, this.recurse, newValue); }
/** * Copy the current immutable object by setting an optional value for the {@link DeleteOptions#getRecurse() recurse} 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 recurse * @return A modified copy of {@code this} object */ public final ImmutableDeleteOptions withRecurse(Optional<Boolean> optional) { @Nullable Boolean value = optional.orElse(null); if (Objects.equals(this.recurse, value)) return this; return new ImmutableDeleteOptions(this.cas, value, this.datacenter); }