/** * Builds a new {@link DynamicActionMetadata.ActionPropertySuggestion ActionPropertySuggestion}. * @return An immutable instance of ActionPropertySuggestion * @throws java.lang.IllegalStateException if any required attributes are missing */ public DynamicActionMetadata.ActionPropertySuggestion build() { return ImmutableActionPropertySuggestion.validate(new ImmutableActionPropertySuggestion(displayValue, value)); } }
/** * Copy the current immutable object by setting a value for the {@link DynamicActionMetadata.ActionPropertySuggestion#displayValue() displayValue} attribute. * An equals check used to prevent copying of the same value by returning {@code this}. * @param value A new value for displayValue (can be {@code null}) * @return A modified copy of the {@code this} object */ public final ImmutableActionPropertySuggestion withDisplayValue(String value) { if (Objects.equals(this.displayValue, value)) return this; return validate(new ImmutableActionPropertySuggestion(value, this.value)); }
/** * Copy the current immutable object by setting a value for the {@link DynamicActionMetadata.ActionPropertySuggestion#value() value} attribute. * An equals check used to prevent copying of the same value by returning {@code this}. * @param value A new value for value (can be {@code null}) * @return A modified copy of the {@code this} object */ public final ImmutableActionPropertySuggestion withValue(String value) { if (Objects.equals(this.value, value)) return this; return validate(new ImmutableActionPropertySuggestion(this.displayValue, value)); }
/** * Construct a new immutable {@code ActionPropertySuggestion} instance. * @param displayValue The value for the {@code displayValue} attribute * @param value The value for the {@code value} attribute * @return An immutable ActionPropertySuggestion instance */ public static DynamicActionMetadata.ActionPropertySuggestion of(String displayValue, String value) { return validate(new ImmutableActionPropertySuggestion(displayValue, value)); }