/** * Builds a new {@link Connector Connector}. * @return An immutable instance of Connector * @throws java.lang.IllegalStateException if any required attributes are missing */ public Connector build() { return ImmutableConnector.validate(new ImmutableConnector(this)); }
/** * Copy the current immutable object by setting a <i>present</i> value for the optional {@link Connector#getId() id} attribute. * @param value The value for id * @return A modified copy of {@code this} object */ public final ImmutableConnector withId(String value) { @Nullable String newValue = Objects.requireNonNull(value, "id"); if (Objects.equals(this.id, newValue)) return this; return validate(new ImmutableConnector( this, this.connectorGroup, this.connectorGroupId, this.description, this.icon, this.kind, this.componentScheme, this.connectorFactory, this.connectorCustomizers, this.actionsSummary, this.uses, newValue, this.version, this.actions, this.tags, this.name, this.properties, this.configuredProperties, this.dependencies, this.metadata)); }
@Nullable ConnectorGroup value = optional.orElse(null); if (this.connectorGroup == value) return this; return validate(new ImmutableConnector( this, value,
@Nullable String value = optional.orElse(null); if (Objects.equals(this.connectorFactory, value)) return this; return validate(new ImmutableConnector( this, this.connectorGroup,
/** * Copy the current immutable object by setting a <i>present</i> value for the optional {@link Connector#getConnectorGroupId() connectorGroupId} attribute. * @param value The value for connectorGroupId * @return A modified copy of {@code this} object */ public final ImmutableConnector withConnectorGroupId(String value) { @Nullable String newValue = Objects.requireNonNull(value, "connectorGroupId"); if (Objects.equals(this.connectorGroupId, newValue)) return this; return validate(new ImmutableConnector( this, this.connectorGroup, newValue, this.description, this.icon, this.kind, this.componentScheme, this.connectorFactory, this.connectorCustomizers, this.actionsSummary, this.uses, this.id, this.version, this.actions, this.tags, this.name, this.properties, this.configuredProperties, this.dependencies, this.metadata)); }
/** * Copy the current immutable object by setting a <i>present</i> value for the optional {@link Connector#getActionsSummary() actionsSummary} attribute. * @param value The value for actionsSummary * @return A modified copy of {@code this} object */ public final ImmutableConnector withActionsSummary(ActionsSummary value) { @Nullable ActionsSummary newValue = Objects.requireNonNull(value, "actionsSummary"); if (this.actionsSummary == newValue) return this; return validate(new ImmutableConnector( this, this.connectorGroup, this.connectorGroupId, this.description, this.icon, this.kind, this.componentScheme, this.connectorFactory, this.connectorCustomizers, newValue, this.uses, this.id, this.version, this.actions, this.tags, this.name, this.properties, this.configuredProperties, this.dependencies, this.metadata)); }
/** * Copy the current immutable object by setting a <i>present</i> value for the optional {@link Connector#getUses() uses} attribute. * @param value The value for uses * @return A modified copy of {@code this} object */ public final ImmutableConnector withUses(int value) { @Nullable Integer newValue = value; if (Objects.equals(this.uses, newValue)) return this; return validate(new ImmutableConnector( this, this.connectorGroup, this.connectorGroupId, this.description, this.icon, this.kind, this.componentScheme, this.connectorFactory, this.connectorCustomizers, this.actionsSummary, newValue, this.id, this.version, this.actions, this.tags, this.name, this.properties, this.configuredProperties, this.dependencies, this.metadata)); }
@Nullable String value = optional.orElse(null); if (Objects.equals(this.connectorGroupId, value)) return this; return validate(new ImmutableConnector( this, this.connectorGroup,
if (this.kind == value) return this; Kind newValue = Objects.requireNonNull(value, "kind"); return validate(new ImmutableConnector( this, this.connectorGroup,
@Nullable String value = optional.orElse(null); if (Objects.equals(this.componentScheme, value)) return this; return validate(new ImmutableConnector( this, this.connectorGroup,
/** * Construct a new immutable {@code Connector} instance. * @param connectorGroup The value for the {@code connectorGroup} attribute * @param connectorGroupId The value for the {@code connectorGroupId} attribute * @param description The value for the {@code description} attribute * @param icon The value for the {@code icon} attribute * @param kind The value for the {@code kind} attribute * @param componentScheme The value for the {@code componentScheme} attribute * @param connectorFactory The value for the {@code connectorFactory} attribute * @param connectorCustomizers The value for the {@code connectorCustomizers} attribute * @param actionsSummary The value for the {@code actionsSummary} attribute * @param uses The value for the {@code uses} attribute * @param id The value for the {@code id} attribute * @param version The value for the {@code version} attribute * @param actions The value for the {@code actions} attribute * @param tags The value for the {@code tags} attribute * @param name The value for the {@code name} attribute * @param properties The value for the {@code properties} attribute * @param configuredProperties The value for the {@code configuredProperties} attribute * @param dependencies The value for the {@code dependencies} attribute * @param metadata The value for the {@code metadata} attribute * @return An immutable Connector instance */ public static Connector of(Optional<ConnectorGroup> connectorGroup, Optional<String> connectorGroupId, String description, String icon, Kind kind, Optional<String> componentScheme, Optional<String> connectorFactory, Iterable<String> connectorCustomizers, Optional<ActionsSummary> actionsSummary, OptionalInt uses, Optional<String> id, int version, Iterable<? extends ConnectorAction> actions, Iterable<String> tags, String name, Map<String, ? extends ConfigurationProperty> properties, Map<String, ? extends String> configuredProperties, Iterable<? extends Dependency> dependencies, Map<String, ? extends String> metadata) { return validate(new ImmutableConnector(connectorGroup, connectorGroupId, description, icon, kind, componentScheme, connectorFactory, connectorCustomizers, actionsSummary, uses, id, version, actions, tags, name, properties, configuredProperties, dependencies, metadata)); }
@Nullable Integer value = optional.isPresent() ? optional.getAsInt() : null; if (Objects.equals(this.uses, value)) return this; return validate(new ImmutableConnector( this, this.connectorGroup,
/** * Copy the current immutable object by setting a value for the {@link Connector#getIcon() icon} attribute. * An equals check used to prevent copying of the same value by returning {@code this}. * @param value A new value for icon (can be {@code null}) * @return A modified copy of the {@code this} object */ public final ImmutableConnector withIcon(String value) { if (Objects.equals(this.icon, value)) return this; return validate(new ImmutableConnector( this, this.connectorGroup, this.connectorGroupId, this.description, value, this.kind, this.componentScheme, this.connectorFactory, this.connectorCustomizers, this.actionsSummary, this.uses, this.id, this.version, this.actions, this.tags, this.name, this.properties, this.configuredProperties, this.dependencies, this.metadata)); }
/** * Copy the current immutable object by setting a value for the {@link Connector#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 ImmutableConnector withName(String value) { if (Objects.equals(this.name, value)) return this; return validate(new ImmutableConnector( this, this.connectorGroup, this.connectorGroupId, this.description, this.icon, this.kind, this.componentScheme, this.connectorFactory, this.connectorCustomizers, this.actionsSummary, this.uses, this.id, this.version, this.actions, this.tags, value, this.properties, this.configuredProperties, this.dependencies, this.metadata)); }
if (this.metadata == entries) return this; Map<String, String> newValue = createUnmodifiableMap(true, false, entries); return validate(new ImmutableConnector( this, this.connectorGroup,
/** * Copy the current immutable object with elements that replace the content of {@link Connector#getTags() tags}. * @param elements The elements to set * @return A modified copy of {@code this} object */ public final ImmutableConnector withTags(String... elements) { SortedSet<String> newValue = createUnmodifiableSortedSet(false, createSafeList(Arrays.asList(elements), false, true)); return validate(new ImmutableConnector( this, this.connectorGroup, this.connectorGroupId, this.description, this.icon, this.kind, this.componentScheme, this.connectorFactory, this.connectorCustomizers, this.actionsSummary, this.uses, this.id, this.version, this.actions, newValue, this.name, this.properties, this.configuredProperties, this.dependencies, this.metadata)); }
/** * Copy the current immutable object with elements that replace the content of {@link Connector#getDependencies() dependencies}. * @param elements The elements to set * @return A modified copy of {@code this} object */ public final ImmutableConnector withDependencies(Dependency... elements) { List<Dependency> newValue = createUnmodifiableList(false, createSafeList(Arrays.asList(elements), true, false)); return validate(new ImmutableConnector( this, this.connectorGroup, this.connectorGroupId, this.description, this.icon, this.kind, this.componentScheme, this.connectorFactory, this.connectorCustomizers, this.actionsSummary, this.uses, this.id, this.version, this.actions, this.tags, this.name, this.properties, this.configuredProperties, newValue, this.metadata)); }
/** * Copy the current immutable object with elements that replace the content of {@link Connector#getConnectorCustomizers() connectorCustomizers}. * @param elements The elements to set * @return A modified copy of {@code this} object */ public final ImmutableConnector withConnectorCustomizers(String... elements) { List<String> newValue = createUnmodifiableList(false, createSafeList(Arrays.asList(elements), true, false)); return validate(new ImmutableConnector( this, this.connectorGroup, this.connectorGroupId, this.description, this.icon, this.kind, this.componentScheme, this.connectorFactory, newValue, this.actionsSummary, this.uses, this.id, this.version, this.actions, this.tags, this.name, this.properties, this.configuredProperties, this.dependencies, this.metadata)); }
/** * Copy the current immutable object with elements that replace the content of {@link Connector#getActions() actions}. * @param elements The elements to set * @return A modified copy of {@code this} object */ public final ImmutableConnector withActions(ConnectorAction... elements) { List<ConnectorAction> newValue = createUnmodifiableList(false, createSafeList(Arrays.asList(elements), true, false)); return validate(new ImmutableConnector( this, this.connectorGroup, this.connectorGroupId, this.description, this.icon, this.kind, this.componentScheme, this.connectorFactory, this.connectorCustomizers, this.actionsSummary, this.uses, this.id, this.version, newValue, this.tags, this.name, this.properties, this.configuredProperties, this.dependencies, this.metadata)); }
if (this.tags == elements) return this; SortedSet<String> newValue = createUnmodifiableSortedSet(false, createSafeList(elements, false, true)); return validate(new ImmutableConnector( this, this.connectorGroup,