/** * Copy the current immutable object by setting a value for the {@link DynamicActionMetadata#inputShape() inputShape} attribute. * A shallow reference equality check is used to prevent copying of the same value by returning {@code this}. * @param value A new value for inputShape (can be {@code null}) * @return A modified copy of the {@code this} object */ public final ImmutableDynamicActionMetadata withInputShape(DataShape value) { if (this.inputShape == value) return this; return validate(new ImmutableDynamicActionMetadata(this, this.properties, value, this.outputShape)); }
/** * Copy the current immutable object by setting a value for the {@link DynamicActionMetadata#outputShape() outputShape} attribute. * A shallow reference equality check is used to prevent copying of the same value by returning {@code this}. * @param value A new value for outputShape (can be {@code null}) * @return A modified copy of the {@code this} object */ public final ImmutableDynamicActionMetadata withOutputShape(DataShape value) { if (this.outputShape == value) return this; return validate(new ImmutableDynamicActionMetadata(this, this.properties, this.inputShape, value)); }
/** * Construct a new immutable {@code DynamicActionMetadata} instance. * @param properties The value for the {@code properties} attribute * @param inputShape The value for the {@code inputShape} attribute * @param outputShape The value for the {@code outputShape} attribute * @return An immutable DynamicActionMetadata instance */ public static DynamicActionMetadata of(Map<String, ? extends List<DynamicActionMetadata.ActionPropertySuggestion>> properties, DataShape inputShape, DataShape outputShape) { return validate(new ImmutableDynamicActionMetadata(properties, inputShape, outputShape)); }
/** * Copy the current immutable object by replacing the {@link DynamicActionMetadata#properties() properties} map with the specified map. * Nulls are not permitted as keys or values. * A shallow reference equality check is used to prevent copying of the same value by returning {@code this}. * @param entries The entries to be added to the properties map * @return A modified copy of {@code this} object */ public final ImmutableDynamicActionMetadata withProperties(Map<String, ? extends List<DynamicActionMetadata.ActionPropertySuggestion>> entries) { if (this.properties == entries) return this; Map<String, List<DynamicActionMetadata.ActionPropertySuggestion>> newValue = createUnmodifiableMap(true, false, entries); return validate(new ImmutableDynamicActionMetadata(this, newValue, this.inputShape, this.outputShape)); }