/** * Builds a new {@link ImmutableEventOptions ImmutableEventOptions}. * @return An immutable instance of EventOptions * @throws java.lang.IllegalStateException if any required attributes are missing */ public ImmutableEventOptions build() { return new ImmutableEventOptions(datacenter, nodeFilter, serviceFilter, tagFilter); } }
/** * Copy the current immutable object by setting a <i>present</i> value for the optional {@link EventOptions#getDatacenter() datacenter} attribute. * @param value The value for datacenter * @return A modified copy of {@code this} object */ public final ImmutableEventOptions withDatacenter(String value) { @Nullable String newValue = Preconditions.checkNotNull(value, "datacenter"); if (Objects.equals(this.datacenter, newValue)) return this; return new ImmutableEventOptions(newValue, this.nodeFilter, this.serviceFilter, this.tagFilter); }
/** * Copy the current immutable object by setting a <i>present</i> value for the optional {@link EventOptions#getNodeFilter() nodeFilter} attribute. * @param value The value for nodeFilter * @return A modified copy of {@code this} object */ public final ImmutableEventOptions withNodeFilter(String value) { @Nullable String newValue = Preconditions.checkNotNull(value, "nodeFilter"); if (Objects.equals(this.nodeFilter, newValue)) return this; return new ImmutableEventOptions(this.datacenter, newValue, this.serviceFilter, this.tagFilter); }
/** * Copy the current immutable object by setting an optional value for the {@link EventOptions#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 ImmutableEventOptions withDatacenter(Optional<String> optional) { @Nullable String value = optional.orElse(null); if (Objects.equals(this.datacenter, value)) return this; return new ImmutableEventOptions(value, this.nodeFilter, this.serviceFilter, this.tagFilter); }
/** * Copy the current immutable object by setting an optional value for the {@link EventOptions#getServiceFilter() serviceFilter} 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 serviceFilter * @return A modified copy of {@code this} object */ public final ImmutableEventOptions withServiceFilter(Optional<String> optional) { @Nullable String value = optional.orElse(null); if (Objects.equals(this.serviceFilter, value)) return this; return new ImmutableEventOptions(this.datacenter, this.nodeFilter, value, this.tagFilter); }
/** * Copy the current immutable object by setting an optional value for the {@link EventOptions#getNodeFilter() nodeFilter} 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 nodeFilter * @return A modified copy of {@code this} object */ public final ImmutableEventOptions withNodeFilter(Optional<String> optional) { @Nullable String value = optional.orElse(null); if (Objects.equals(this.nodeFilter, value)) return this; return new ImmutableEventOptions(this.datacenter, value, this.serviceFilter, this.tagFilter); }
/** * Copy the current immutable object by setting a <i>present</i> value for the optional {@link EventOptions#getServiceFilter() serviceFilter} attribute. * @param value The value for serviceFilter * @return A modified copy of {@code this} object */ public final ImmutableEventOptions withServiceFilter(String value) { @Nullable String newValue = Preconditions.checkNotNull(value, "serviceFilter"); if (Objects.equals(this.serviceFilter, newValue)) return this; return new ImmutableEventOptions(this.datacenter, this.nodeFilter, newValue, this.tagFilter); }
/** * Copy the current immutable object by setting a <i>present</i> value for the optional {@link EventOptions#getTagFilter() tagFilter} attribute. * @param value The value for tagFilter * @return A modified copy of {@code this} object */ public final ImmutableEventOptions withTagFilter(String value) { @Nullable String newValue = Preconditions.checkNotNull(value, "tagFilter"); if (Objects.equals(this.tagFilter, newValue)) return this; return new ImmutableEventOptions(this.datacenter, this.nodeFilter, this.serviceFilter, newValue); }
/** * Copy the current immutable object by setting an optional value for the {@link EventOptions#getTagFilter() tagFilter} 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 tagFilter * @return A modified copy of {@code this} object */ public final ImmutableEventOptions withTagFilter(Optional<String> optional) { @Nullable String value = optional.orElse(null); if (Objects.equals(this.tagFilter, value)) return this; return new ImmutableEventOptions(this.datacenter, this.nodeFilter, this.serviceFilter, value); }