/** * Copy the current immutable object by replacing the {@link Integration#getProperties() 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 ImmutableIntegration withProperties(Map<String, ? extends ConfigurationProperty> entries) { if (this.properties == entries) return this; Map<String, ConfigurationProperty> newValue = createUnmodifiableMap(true, false, entries); return validate(new ImmutableIntegration( this, this.id, this.isDeleted, this.steps, this.flows, this.connections, this.description, newValue, this.configuredProperties, this.version, this.createdAt, this.updatedAt, this.tags, this.name, this.resources)); }
/** * Copy the current immutable object by replacing the {@link Integration#getConfiguredProperties() configuredProperties} 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 configuredProperties map * @return A modified copy of {@code this} object */ public final ImmutableIntegration withConfiguredProperties(Map<String, ? extends String> entries) { if (this.configuredProperties == entries) return this; Map<String, String> newValue = createUnmodifiableMap(true, false, entries); return validate(new ImmutableIntegration( this, this.id, this.isDeleted, this.steps, this.flows, this.connections, this.description, this.properties, newValue, this.version, this.createdAt, this.updatedAt, this.tags, this.name, this.resources)); }
this.connections = createUnmodifiableList(false, createSafeList(connections, true, false)); this.description = description.orElse(null); this.properties = createUnmodifiableMap(true, false, properties); this.configuredProperties = createUnmodifiableMap(true, false, configuredProperties); this.version = version; this.createdAt = createdAt;
private ImmutableIntegration(ImmutableIntegration.Builder builder) { this.id = builder.id; this.description = builder.description; this.properties = createUnmodifiableMap(false, false, builder.properties); this.tags = createUnmodifiableSortedSet(false, createSafeList(builder.tags, false, false)); this.name = builder.name; initShim.configuredProperties(createUnmodifiableMap(false, false, builder.configuredProperties));