/** * 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 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#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)); }
/** * 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)); }
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; if (builder.isDeletedIsSet()) { initShim.steps(createUnmodifiableList(true, builder.steps)); initShim.flows(createUnmodifiableList(true, builder.flows)); initShim.connections(createUnmodifiableList(true, builder.connections)); initShim.configuredProperties(createUnmodifiableMap(false, false, builder.configuredProperties)); initShim.resources(createUnmodifiableList(true, builder.resources));
/** * 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)); }
private Object readResolve() throws ObjectStreamException { return validate(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, List<Step> steps, List<Flow> flows, List<Connection> connections, Optional<String> description, Map<String, ConfigurationProperty> properties, Map<String, String> configuredProperties, int version, long createdAt, long updatedAt, SortedSet<String> tags, String name, List<ResourceIdentifier> resources) { return of(id, isDeleted, (Iterable<? extends Step>) steps, (Iterable<? extends Flow>) flows, (Iterable<? extends Connection>) connections, description, properties, configuredProperties, version, createdAt, updatedAt, (Iterable<String>) tags, name, (Iterable<? extends ResourceIdentifier>) resources); }
/** * This instance is equal to all instances of {@code ImmutableIntegration} that have equal attribute values. * @return {@code true} if {@code this} is equal to {@code another} instance */ @Override public boolean equals(@Nullable Object another) { if (this == another) return true; return another instanceof ImmutableIntegration && equalTo((ImmutableIntegration) another); }
/** * 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)); }
this.id = id.orElse(null); this.isDeleted = isDeleted; this.steps = createUnmodifiableList(false, createSafeList(steps, true, false)); this.flows = createUnmodifiableList(false, createSafeList(flows, true, false)); 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; this.updatedAt = updatedAt; this.tags = createUnmodifiableSortedSet(false, createSafeList(tags, false, true)); this.name = name; this.resources = createUnmodifiableList(false, createSafeList(resources, true, false)); initShim.isDeleted(this.isDeleted); initShim.steps(this.steps);
/** * 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 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 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 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)); }
/** * 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 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 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 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 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)); }