/** * Builds a new {@link Integration Integration}. * @return An immutable instance of Integration * @throws java.lang.IllegalStateException if any required attributes are missing */ public Integration build() { return ImmutableIntegration.validate(new ImmutableIntegration(this)); }
/** * Construct a new immutable {@code Integration} instance. * @param id The value for the {@code id} attribute * @param isDeleted The value for the {@code isDeleted} attribute * @param steps The value for the {@code steps} attribute * @param flows The value for the {@code flows} attribute * @param connections The value for the {@code connections} attribute * @param description The value for the {@code description} attribute * @param properties The value for the {@code properties} attribute * @param configuredProperties The value for the {@code configuredProperties} attribute * @param version The value for the {@code version} attribute * @param createdAt The value for the {@code createdAt} attribute * @param updatedAt The value for the {@code updatedAt} attribute * @param tags The value for the {@code tags} attribute * @param name The value for the {@code name} attribute * @param resources The value for the {@code resources} attribute * @return An immutable Integration instance */ public static Integration of(Optional<String> id, boolean isDeleted, Iterable<? extends Step> steps, Iterable<? extends Flow> flows, Iterable<? extends Connection> connections, Optional<String> description, Map<String, ? extends ConfigurationProperty> properties, Map<String, ? extends String> configuredProperties, int version, long createdAt, long updatedAt, Iterable<String> tags, String name, Iterable<? extends ResourceIdentifier> resources) { return validate(new ImmutableIntegration(id, isDeleted, steps, flows, connections, description, properties, configuredProperties, version, createdAt, updatedAt, tags, name, resources)); }
/** * Copy the current immutable object by setting a value for the {@link Integration#isDeleted() isDeleted} attribute. * A value equality check is used to prevent copying of the same value by returning {@code this}. * @param value A new value for isDeleted * @return A modified copy of the {@code this} object */ public final ImmutableIntegration withIsDeleted(boolean value) { if (this.isDeleted == value) return this; return validate(new ImmutableIntegration( this, this.id, value, this.steps, this.flows, this.connections, this.description, this.properties, this.configuredProperties, this.version, this.createdAt, this.updatedAt, this.tags, this.name, this.resources)); }
/** * Copy the current immutable object by setting a value for the {@link Integration#getVersion() version} attribute. * A value equality check is used to prevent copying of the same value by returning {@code this}. * @param value A new value for version * @return A modified copy of the {@code this} object */ public final ImmutableIntegration withVersion(int value) { if (this.version == value) return this; return validate(new ImmutableIntegration( this, this.id, this.isDeleted, this.steps, this.flows, this.connections, this.description, this.properties, this.configuredProperties, value, this.createdAt, this.updatedAt, this.tags, this.name, this.resources)); }
/** * Copy the current immutable object by setting a value for the {@link Integration#getUpdatedAt() updatedAt} attribute. * A value equality check is used to prevent copying of the same value by returning {@code this}. * @param value A new value for updatedAt * @return A modified copy of the {@code this} object */ public final ImmutableIntegration withUpdatedAt(long value) { if (this.updatedAt == value) return this; return validate(new ImmutableIntegration( this, this.id, this.isDeleted, this.steps, this.flows, this.connections, this.description, this.properties, this.configuredProperties, this.version, this.createdAt, value, this.tags, this.name, this.resources)); }
/** * Copy the current immutable object by setting a value for the {@link Integration#getName() name} attribute. * An equals check used to prevent copying of the same value by returning {@code this}. * @param value A new value for name (can be {@code null}) * @return A modified copy of the {@code this} object */ public final ImmutableIntegration withName(String value) { if (Objects.equals(this.name, value)) return this; return validate(new ImmutableIntegration( this, this.id, this.isDeleted, this.steps, this.flows, this.connections, this.description, this.properties, this.configuredProperties, this.version, this.createdAt, this.updatedAt, this.tags, value, this.resources)); }
/** * Copy the current immutable object by setting a <i>present</i> value for the optional {@link Integration#getId() id} attribute. * @param value The value for id * @return A modified copy of {@code this} object */ public final ImmutableIntegration withId(String value) { @Nullable String newValue = Objects.requireNonNull(value, "id"); if (Objects.equals(this.id, newValue)) return this; return validate(new ImmutableIntegration( this, newValue, this.isDeleted, this.steps, this.flows, this.connections, this.description, this.properties, this.configuredProperties, this.version, this.createdAt, this.updatedAt, this.tags, this.name, this.resources)); }
/** * Copy the current immutable object by setting a <i>present</i> value for the optional {@link Integration#getDescription() description} attribute. * @param value The value for description * @return A modified copy of {@code this} object */ public final ImmutableIntegration withDescription(String value) { @Nullable String newValue = Objects.requireNonNull(value, "description"); if (Objects.equals(this.description, newValue)) return this; return validate(new ImmutableIntegration( this, this.id, this.isDeleted, this.steps, this.flows, this.connections, newValue, this.properties, this.configuredProperties, this.version, this.createdAt, this.updatedAt, this.tags, this.name, this.resources)); }
/** * Copy the current immutable object by setting a value for the {@link Integration#getCreatedAt() createdAt} attribute. * A value equality check is used to prevent copying of the same value by returning {@code this}. * @param value A new value for createdAt * @return A modified copy of the {@code this} object */ public final ImmutableIntegration withCreatedAt(long value) { if (this.createdAt == value) return this; return validate(new ImmutableIntegration( this, this.id, this.isDeleted, this.steps, this.flows, this.connections, this.description, this.properties, this.configuredProperties, this.version, value, this.updatedAt, this.tags, this.name, this.resources)); }
/** * Copy the current immutable object by setting an optional value for the {@link Integration#getDescription() description} 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 description * @return A modified copy of {@code this} object */ public final ImmutableIntegration withDescription(Optional<String> optional) { @Nullable String value = optional.orElse(null); if (Objects.equals(this.description, value)) return this; return validate(new ImmutableIntegration( this, this.id, this.isDeleted, this.steps, this.flows, this.connections, value, this.properties, this.configuredProperties, this.version, this.createdAt, this.updatedAt, this.tags, this.name, this.resources)); }
/** * Copy the current immutable object with elements that replace the content of {@link Integration#getSteps() steps}. * @param elements The elements to set * @return A modified copy of {@code this} object */ @Deprecated public final ImmutableIntegration withSteps(Step... elements) { List<Step> newValue = createUnmodifiableList(false, createSafeList(Arrays.asList(elements), true, false)); return validate(new ImmutableIntegration( this, this.id, this.isDeleted, newValue, this.flows, this.connections, this.description, this.properties, this.configuredProperties, this.version, this.createdAt, this.updatedAt, this.tags, this.name, this.resources)); }
/** * 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 with elements that replace the content of {@link Integration#getResources() resources}. * @param elements The elements to set * @return A modified copy of {@code this} object */ public final ImmutableIntegration withResources(ResourceIdentifier... elements) { List<ResourceIdentifier> newValue = createUnmodifiableList(false, createSafeList(Arrays.asList(elements), true, false)); return validate(new ImmutableIntegration( this, this.id, this.isDeleted, this.steps, this.flows, this.connections, this.description, this.properties, this.configuredProperties, this.version, this.createdAt, this.updatedAt, this.tags, this.name, newValue)); }
/** * Copy the current immutable object with elements that replace the content of {@link Integration#getFlows() flows}. * @param elements The elements to set * @return A modified copy of {@code this} object */ public final ImmutableIntegration withFlows(Flow... elements) { List<Flow> newValue = createUnmodifiableList(false, createSafeList(Arrays.asList(elements), true, false)); return validate(new ImmutableIntegration( this, this.id, this.isDeleted, this.steps, newValue, this.connections, this.description, this.properties, this.configuredProperties, this.version, this.createdAt, this.updatedAt, this.tags, this.name, this.resources)); }
/** * Copy the current immutable object with elements that replace the content of {@link Integration#getConnections() connections}. * @param elements The elements to set * @return A modified copy of {@code this} object */ public final ImmutableIntegration withConnections(Connection... elements) { List<Connection> newValue = createUnmodifiableList(false, createSafeList(Arrays.asList(elements), true, false)); return validate(new ImmutableIntegration( this, this.id, this.isDeleted, this.steps, this.flows, newValue, this.description, this.properties, this.configuredProperties, this.version, this.createdAt, this.updatedAt, this.tags, this.name, this.resources)); }
/** * Copy the current immutable object with elements that replace the content of {@link Integration#getTags() tags}. * @param elements The elements to set * @return A modified copy of {@code this} object */ public final ImmutableIntegration withTags(String... elements) { SortedSet<String> newValue = createUnmodifiableSortedSet(false, createSafeList(Arrays.asList(elements), false, true)); return validate(new ImmutableIntegration( this, this.id, this.isDeleted, this.steps, this.flows, this.connections, this.description, this.properties, this.configuredProperties, this.version, this.createdAt, this.updatedAt, newValue, this.name, this.resources)); }
/** * Copy the current immutable object with elements that replace the content of {@link Integration#getConnections() connections}. * A shallow reference equality check is used to prevent copying of the same value by returning {@code this}. * @param elements An iterable of connections elements to set * @return A modified copy of {@code this} object */ public final ImmutableIntegration withConnections(Iterable<? extends Connection> elements) { if (this.connections == elements) return this; List<Connection> newValue = createUnmodifiableList(false, createSafeList(elements, true, false)); return validate(new ImmutableIntegration( this, this.id, this.isDeleted, this.steps, this.flows, newValue, this.description, this.properties, this.configuredProperties, this.version, this.createdAt, this.updatedAt, this.tags, this.name, this.resources)); }
/** * Copy the current immutable object with elements that replace the content of {@link Integration#getResources() resources}. * A shallow reference equality check is used to prevent copying of the same value by returning {@code this}. * @param elements An iterable of resources elements to set * @return A modified copy of {@code this} object */ public final ImmutableIntegration withResources(Iterable<? extends ResourceIdentifier> elements) { if (this.resources == elements) return this; List<ResourceIdentifier> newValue = createUnmodifiableList(false, createSafeList(elements, true, false)); return validate(new ImmutableIntegration( this, this.id, this.isDeleted, this.steps, this.flows, this.connections, this.description, this.properties, this.configuredProperties, this.version, this.createdAt, this.updatedAt, this.tags, this.name, newValue)); }
/** * Copy the current immutable object with elements that replace the content of {@link Integration#getFlows() flows}. * A shallow reference equality check is used to prevent copying of the same value by returning {@code this}. * @param elements An iterable of flows elements to set * @return A modified copy of {@code this} object */ public final ImmutableIntegration withFlows(Iterable<? extends Flow> elements) { if (this.flows == elements) return this; List<Flow> newValue = createUnmodifiableList(false, createSafeList(elements, true, false)); return validate(new ImmutableIntegration( this, this.id, this.isDeleted, this.steps, newValue, this.connections, this.description, this.properties, this.configuredProperties, this.version, this.createdAt, this.updatedAt, this.tags, this.name, this.resources)); }
/** * Copy the current immutable object with elements that replace the content of {@link Integration#getTags() tags}. * A shallow reference equality check is used to prevent copying of the same value by returning {@code this}. * @param elements An iterable of tags elements to set * @return A modified copy of {@code this} object */ public final ImmutableIntegration withTags(Iterable<String> elements) { if (this.tags == elements) return this; SortedSet<String> newValue = createUnmodifiableSortedSet(false, createSafeList(elements, false, true)); return validate(new ImmutableIntegration( this, this.id, this.isDeleted, this.steps, this.flows, this.connections, this.description, this.properties, this.configuredProperties, this.version, this.createdAt, this.updatedAt, newValue, this.name, this.resources)); }