/** * Builds a new {@link ConnectorTemplate ConnectorTemplate}. * @return An immutable instance of ConnectorTemplate * @throws java.lang.IllegalStateException if any required attributes are missing */ public ConnectorTemplate build() { return ImmutableConnectorTemplate.validate(new ImmutableConnectorTemplate(this)); }
/** * Copy the current immutable object by setting a value for the {@link ConnectorTemplate#getCamelConnectorGAV() camelConnectorGAV} attribute. * An equals check used to prevent copying of the same value by returning {@code this}. * @param value A new value for camelConnectorGAV (can be {@code null}) * @return A modified copy of the {@code this} object */ public final ImmutableConnectorTemplate withCamelConnectorGAV(String value) { if (Objects.equals(this.camelConnectorGAV, value)) return this; return validate(new ImmutableConnectorTemplate( this, value, this.camelConnectorPrefix, this.connectorGroup, this.connectorProperties, this.description, this.icon, this.kind, this.id, this.name, this.properties, this.configuredProperties)); }
/** * Construct a new immutable {@code ConnectorTemplate} instance. * @param camelConnectorGAV The value for the {@code camelConnectorGAV} attribute * @param camelConnectorPrefix The value for the {@code camelConnectorPrefix} attribute * @param connectorGroup The value for the {@code connectorGroup} attribute * @param connectorProperties The value for the {@code connectorProperties} 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 id The value for the {@code id} 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 * @return An immutable ConnectorTemplate instance */ public static ConnectorTemplate of(String camelConnectorGAV, String camelConnectorPrefix, Optional<ConnectorGroup> connectorGroup, Map<String, ? extends ConfigurationProperty> connectorProperties, String description, String icon, Kind kind, Optional<String> id, String name, Map<String, ? extends ConfigurationProperty> properties, Map<String, ? extends String> configuredProperties) { return validate(new ImmutableConnectorTemplate(camelConnectorGAV, camelConnectorPrefix, connectorGroup, connectorProperties, description, icon, kind, id, name, properties, configuredProperties)); }
/** * Copy the current immutable object by setting a value for the {@link ConnectorTemplate#getCamelConnectorPrefix() camelConnectorPrefix} attribute. * An equals check used to prevent copying of the same value by returning {@code this}. * @param value A new value for camelConnectorPrefix (can be {@code null}) * @return A modified copy of the {@code this} object */ public final ImmutableConnectorTemplate withCamelConnectorPrefix(String value) { if (Objects.equals(this.camelConnectorPrefix, value)) return this; return validate(new ImmutableConnectorTemplate( this, this.camelConnectorGAV, value, this.connectorGroup, this.connectorProperties, this.description, this.icon, this.kind, this.id, this.name, this.properties, this.configuredProperties)); }
/** * Copy the current immutable object by setting a <i>present</i> value for the optional {@link ConnectorTemplate#getConnectorGroup() connectorGroup} attribute. * @param value The value for connectorGroup * @return A modified copy of {@code this} object */ public final ImmutableConnectorTemplate withConnectorGroup(ConnectorGroup value) { @Nullable ConnectorGroup newValue = Objects.requireNonNull(value, "connectorGroup"); if (this.connectorGroup == newValue) return this; return validate(new ImmutableConnectorTemplate( this, this.camelConnectorGAV, this.camelConnectorPrefix, newValue, this.connectorProperties, this.description, this.icon, this.kind, this.id, this.name, this.properties, this.configuredProperties)); }
/** * Copy the current immutable object by setting a value for the {@link ConnectorTemplate#getDescription() description} attribute. * An equals check used to prevent copying of the same value by returning {@code this}. * @param value A new value for description (can be {@code null}) * @return A modified copy of the {@code this} object */ public final ImmutableConnectorTemplate withDescription(String value) { if (Objects.equals(this.description, value)) return this; return validate(new ImmutableConnectorTemplate( this, this.camelConnectorGAV, this.camelConnectorPrefix, this.connectorGroup, this.connectorProperties, value, this.icon, this.kind, this.id, this.name, this.properties, this.configuredProperties)); }
/** * Copy the current immutable object by setting a <i>present</i> value for the optional {@link ConnectorTemplate#getId() id} attribute. * @param value The value for id * @return A modified copy of {@code this} object */ public final ImmutableConnectorTemplate withId(String value) { @Nullable String newValue = Objects.requireNonNull(value, "id"); if (Objects.equals(this.id, newValue)) return this; return validate(new ImmutableConnectorTemplate( this, this.camelConnectorGAV, this.camelConnectorPrefix, this.connectorGroup, this.connectorProperties, this.description, this.icon, this.kind, newValue, this.name, this.properties, this.configuredProperties)); }
/** * Copy the current immutable object by setting a value for the {@link ConnectorTemplate#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 ImmutableConnectorTemplate withName(String value) { if (Objects.equals(this.name, value)) return this; return validate(new ImmutableConnectorTemplate( this, this.camelConnectorGAV, this.camelConnectorPrefix, this.connectorGroup, this.connectorProperties, this.description, this.icon, this.kind, this.id, value, this.properties, this.configuredProperties)); }
/** * Copy the current immutable object by setting a value for the {@link ConnectorTemplate#getKind() kind} attribute. * A value equality check is used to prevent copying of the same value by returning {@code this}. * @param value A new value for kind * @return A modified copy of the {@code this} object */ public final ImmutableConnectorTemplate withKind(Kind value) { if (this.kind == value) return this; Kind newValue = Objects.requireNonNull(value, "kind"); return validate(new ImmutableConnectorTemplate( this, this.camelConnectorGAV, this.camelConnectorPrefix, this.connectorGroup, this.connectorProperties, this.description, this.icon, newValue, this.id, this.name, this.properties, this.configuredProperties)); }
/** * Copy the current immutable object by setting an optional value for the {@link ConnectorTemplate#getId() id} 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 id * @return A modified copy of {@code this} object */ public final ImmutableConnectorTemplate withId(Optional<String> optional) { @Nullable String value = optional.orElse(null); if (Objects.equals(this.id, value)) return this; return validate(new ImmutableConnectorTemplate( this, this.camelConnectorGAV, this.camelConnectorPrefix, this.connectorGroup, this.connectorProperties, this.description, this.icon, this.kind, value, this.name, this.properties, this.configuredProperties)); }
/** * Copy the current immutable object by setting a value for the {@link ConnectorTemplate#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 ImmutableConnectorTemplate withIcon(String value) { if (Objects.equals(this.icon, value)) return this; return validate(new ImmutableConnectorTemplate( this, this.camelConnectorGAV, this.camelConnectorPrefix, this.connectorGroup, this.connectorProperties, this.description, value, this.kind, this.id, this.name, this.properties, this.configuredProperties)); }
/** * Copy the current immutable object by setting an optional value for the {@link ConnectorTemplate#getConnectorGroup() connectorGroup} attribute. * A shallow reference equality check is used on unboxed optional value to prevent copying of the same value by returning {@code this}. * @param optional A value for connectorGroup * @return A modified copy of {@code this} object */ public final ImmutableConnectorTemplate withConnectorGroup(Optional<? extends ConnectorGroup> optional) { @Nullable ConnectorGroup value = optional.orElse(null); if (this.connectorGroup == value) return this; return validate(new ImmutableConnectorTemplate( this, this.camelConnectorGAV, this.camelConnectorPrefix, value, this.connectorProperties, this.description, this.icon, this.kind, this.id, this.name, this.properties, this.configuredProperties)); }
/** * Copy the current immutable object by replacing the {@link ConnectorTemplate#getConnectorProperties() connectorProperties} 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 connectorProperties map * @return A modified copy of {@code this} object */ public final ImmutableConnectorTemplate withConnectorProperties(Map<String, ? extends ConfigurationProperty> entries) { if (this.connectorProperties == entries) return this; Map<String, ConfigurationProperty> newValue = createUnmodifiableMap(true, false, entries); return validate(new ImmutableConnectorTemplate( this, this.camelConnectorGAV, this.camelConnectorPrefix, this.connectorGroup, newValue, this.description, this.icon, this.kind, this.id, this.name, this.properties, this.configuredProperties)); }
/** * Copy the current immutable object by replacing the {@link ConnectorTemplate#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 ImmutableConnectorTemplate withProperties(Map<String, ? extends ConfigurationProperty> entries) { if (this.properties == entries) return this; Map<String, ConfigurationProperty> newValue = createUnmodifiableMap(true, false, entries); return validate(new ImmutableConnectorTemplate( this, this.camelConnectorGAV, this.camelConnectorPrefix, this.connectorGroup, this.connectorProperties, this.description, this.icon, this.kind, this.id, this.name, newValue, this.configuredProperties)); }
/** * Copy the current immutable object by replacing the {@link ConnectorTemplate#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 ImmutableConnectorTemplate withConfiguredProperties(Map<String, ? extends String> entries) { if (this.configuredProperties == entries) return this; Map<String, String> newValue = createUnmodifiableMap(true, false, entries); return validate(new ImmutableConnectorTemplate( this, this.camelConnectorGAV, this.camelConnectorPrefix, this.connectorGroup, this.connectorProperties, this.description, this.icon, this.kind, this.id, this.name, this.properties, newValue)); }