/** * Builds a new {@link ConnectorDescriptor ConnectorDescriptor}. * @return An immutable instance of ConnectorDescriptor * @throws java.lang.IllegalStateException if any required attributes are missing */ public ConnectorDescriptor build() { return ImmutableConnectorDescriptor.validate(new ImmutableConnectorDescriptor(this)); }
/** * Construct a new immutable {@code ConnectorDescriptor} instance. * @param connectorId The value for the {@code connectorId} attribute * @param camelConnectorGAV The value for the {@code camelConnectorGAV} attribute * @param camelConnectorPrefix The value for the {@code camelConnectorPrefix} 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 inputDataShape The value for the {@code inputDataShape} attribute * @param outputDataShape The value for the {@code outputDataShape} attribute * @param propertyDefinitionSteps The value for the {@code propertyDefinitionSteps} attribute * @param configuredProperties The value for the {@code configuredProperties} attribute * @param split The value for the {@code split} attribute * @return An immutable ConnectorDescriptor instance */ public static ConnectorDescriptor of(String connectorId, String camelConnectorGAV, String camelConnectorPrefix, Optional<String> componentScheme, Optional<String> connectorFactory, Iterable<String> connectorCustomizers, Optional<DataShape> inputDataShape, Optional<DataShape> outputDataShape, Iterable<? extends ActionDescriptor.ActionDescriptorStep> propertyDefinitionSteps, Map<String, ? extends String> configuredProperties, Optional<Split> split) { return validate(new ImmutableConnectorDescriptor(connectorId, camelConnectorGAV, camelConnectorPrefix, componentScheme, connectorFactory, connectorCustomizers, inputDataShape, outputDataShape, propertyDefinitionSteps, configuredProperties, split)); }
/** * Copy the current immutable object by setting an optional value for the {@link ConnectorDescriptor#getOutputDataShape() outputDataShape} 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 outputDataShape * @return A modified copy of {@code this} object */ public final ImmutableConnectorDescriptor withOutputDataShape(Optional<? extends DataShape> optional) { @Nullable DataShape value = optional.orElse(null); if (this.outputDataShape == value) return this; return validate(new ImmutableConnectorDescriptor( this, this.connectorId, this.camelConnectorGAV, this.camelConnectorPrefix, this.componentScheme, this.connectorFactory, this.connectorCustomizers, this.inputDataShape, value, this.propertyDefinitionSteps, this.configuredProperties, this.split)); }
/** * Copy the current immutable object by setting an optional value for the {@link ConnectorDescriptor#getSplit() split} 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 split * @return A modified copy of {@code this} object */ public final ImmutableConnectorDescriptor withSplit(Optional<? extends Split> optional) { @Nullable Split value = optional.orElse(null); if (this.split == value) return this; return validate(new ImmutableConnectorDescriptor( this, this.connectorId, this.camelConnectorGAV, this.camelConnectorPrefix, this.componentScheme, this.connectorFactory, this.connectorCustomizers, this.inputDataShape, this.outputDataShape, this.propertyDefinitionSteps, this.configuredProperties, value)); }
/** * Copy the current immutable object by setting a <i>present</i> value for the optional {@link ConnectorDescriptor#getOutputDataShape() outputDataShape} attribute. * @param value The value for outputDataShape * @return A modified copy of {@code this} object */ public final ImmutableConnectorDescriptor withOutputDataShape(DataShape value) { @Nullable DataShape newValue = Objects.requireNonNull(value, "outputDataShape"); if (this.outputDataShape == newValue) return this; return validate(new ImmutableConnectorDescriptor( this, this.connectorId, this.camelConnectorGAV, this.camelConnectorPrefix, this.componentScheme, this.connectorFactory, this.connectorCustomizers, this.inputDataShape, newValue, this.propertyDefinitionSteps, this.configuredProperties, this.split)); }
/** * Copy the current immutable object by setting a value for the {@link ConnectorDescriptor#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 ImmutableConnectorDescriptor withCamelConnectorGAV(String value) { if (Objects.equals(this.camelConnectorGAV, value)) return this; return validate(new ImmutableConnectorDescriptor( this, this.connectorId, value, this.camelConnectorPrefix, this.componentScheme, this.connectorFactory, this.connectorCustomizers, this.inputDataShape, this.outputDataShape, this.propertyDefinitionSteps, this.configuredProperties, this.split)); }
/** * Copy the current immutable object by setting a <i>present</i> value for the optional {@link ConnectorDescriptor#getComponentScheme() componentScheme} attribute. * @param value The value for componentScheme * @return A modified copy of {@code this} object */ public final ImmutableConnectorDescriptor withComponentScheme(String value) { @Nullable String newValue = Objects.requireNonNull(value, "componentScheme"); if (Objects.equals(this.componentScheme, newValue)) return this; return validate(new ImmutableConnectorDescriptor( this, this.connectorId, this.camelConnectorGAV, this.camelConnectorPrefix, newValue, this.connectorFactory, this.connectorCustomizers, this.inputDataShape, this.outputDataShape, this.propertyDefinitionSteps, this.configuredProperties, this.split)); }
/** * Copy the current immutable object by setting a <i>present</i> value for the optional {@link ConnectorDescriptor#getInputDataShape() inputDataShape} attribute. * @param value The value for inputDataShape * @return A modified copy of {@code this} object */ public final ImmutableConnectorDescriptor withInputDataShape(DataShape value) { @Nullable DataShape newValue = Objects.requireNonNull(value, "inputDataShape"); if (this.inputDataShape == newValue) return this; return validate(new ImmutableConnectorDescriptor( this, this.connectorId, this.camelConnectorGAV, this.camelConnectorPrefix, this.componentScheme, this.connectorFactory, this.connectorCustomizers, newValue, this.outputDataShape, this.propertyDefinitionSteps, this.configuredProperties, this.split)); }
/** * Copy the current immutable object by setting a <i>present</i> value for the optional {@link ConnectorDescriptor#getConnectorFactory() connectorFactory} attribute. * @param value The value for connectorFactory * @return A modified copy of {@code this} object */ public final ImmutableConnectorDescriptor withConnectorFactory(String value) { @Nullable String newValue = Objects.requireNonNull(value, "connectorFactory"); if (Objects.equals(this.connectorFactory, newValue)) return this; return validate(new ImmutableConnectorDescriptor( this, this.connectorId, this.camelConnectorGAV, this.camelConnectorPrefix, this.componentScheme, newValue, this.connectorCustomizers, this.inputDataShape, this.outputDataShape, this.propertyDefinitionSteps, this.configuredProperties, this.split)); }
/** * Copy the current immutable object by setting an optional value for the {@link ConnectorDescriptor#getConnectorFactory() connectorFactory} 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 connectorFactory * @return A modified copy of {@code this} object */ public final ImmutableConnectorDescriptor withConnectorFactory(Optional<String> optional) { @Nullable String value = optional.orElse(null); if (Objects.equals(this.connectorFactory, value)) return this; return validate(new ImmutableConnectorDescriptor( this, this.connectorId, this.camelConnectorGAV, this.camelConnectorPrefix, this.componentScheme, value, this.connectorCustomizers, this.inputDataShape, this.outputDataShape, this.propertyDefinitionSteps, this.configuredProperties, this.split)); }
/** * Copy the current immutable object by setting a value for the {@link ConnectorDescriptor#getConnectorId() connectorId} attribute. * An equals check used to prevent copying of the same value by returning {@code this}. * @param value A new value for connectorId (can be {@code null}) * @return A modified copy of the {@code this} object */ public final ImmutableConnectorDescriptor withConnectorId(String value) { if (Objects.equals(this.connectorId, value)) return this; return validate(new ImmutableConnectorDescriptor( this, value, this.camelConnectorGAV, this.camelConnectorPrefix, this.componentScheme, this.connectorFactory, this.connectorCustomizers, this.inputDataShape, this.outputDataShape, this.propertyDefinitionSteps, this.configuredProperties, this.split)); }
/** * Copy the current immutable object by setting a value for the {@link ConnectorDescriptor#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 ImmutableConnectorDescriptor withCamelConnectorPrefix(String value) { if (Objects.equals(this.camelConnectorPrefix, value)) return this; return validate(new ImmutableConnectorDescriptor( this, this.connectorId, this.camelConnectorGAV, value, this.componentScheme, this.connectorFactory, this.connectorCustomizers, this.inputDataShape, this.outputDataShape, this.propertyDefinitionSteps, this.configuredProperties, this.split)); }
/** * Copy the current immutable object by setting a <i>present</i> value for the optional {@link ConnectorDescriptor#getSplit() split} attribute. * @param value The value for split * @return A modified copy of {@code this} object */ public final ImmutableConnectorDescriptor withSplit(Split value) { @Nullable Split newValue = Objects.requireNonNull(value, "split"); if (this.split == newValue) return this; return validate(new ImmutableConnectorDescriptor( this, this.connectorId, this.camelConnectorGAV, this.camelConnectorPrefix, this.componentScheme, this.connectorFactory, this.connectorCustomizers, this.inputDataShape, this.outputDataShape, this.propertyDefinitionSteps, this.configuredProperties, newValue)); }
/** * Copy the current immutable object by setting an optional value for the {@link ConnectorDescriptor#getComponentScheme() componentScheme} 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 componentScheme * @return A modified copy of {@code this} object */ public final ImmutableConnectorDescriptor withComponentScheme(Optional<String> optional) { @Nullable String value = optional.orElse(null); if (Objects.equals(this.componentScheme, value)) return this; return validate(new ImmutableConnectorDescriptor( this, this.connectorId, this.camelConnectorGAV, this.camelConnectorPrefix, value, this.connectorFactory, this.connectorCustomizers, this.inputDataShape, this.outputDataShape, this.propertyDefinitionSteps, this.configuredProperties, this.split)); }
/** * Copy the current immutable object by setting an optional value for the {@link ConnectorDescriptor#getInputDataShape() inputDataShape} 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 inputDataShape * @return A modified copy of {@code this} object */ public final ImmutableConnectorDescriptor withInputDataShape(Optional<? extends DataShape> optional) { @Nullable DataShape value = optional.orElse(null); if (this.inputDataShape == value) return this; return validate(new ImmutableConnectorDescriptor( this, this.connectorId, this.camelConnectorGAV, this.camelConnectorPrefix, this.componentScheme, this.connectorFactory, this.connectorCustomizers, value, this.outputDataShape, this.propertyDefinitionSteps, this.configuredProperties, this.split)); }
/** * Copy the current immutable object by replacing the {@link ConnectorDescriptor#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 ImmutableConnectorDescriptor withConfiguredProperties(Map<String, ? extends String> entries) { if (this.configuredProperties == entries) return this; Map<String, String> newValue = createUnmodifiableMap(true, false, entries); return validate(new ImmutableConnectorDescriptor( this, this.connectorId, this.camelConnectorGAV, this.camelConnectorPrefix, this.componentScheme, this.connectorFactory, this.connectorCustomizers, this.inputDataShape, this.outputDataShape, this.propertyDefinitionSteps, newValue, this.split)); }
/** * Copy the current immutable object with elements that replace the content of {@link ConnectorDescriptor#getConnectorCustomizers() connectorCustomizers}. * @param elements The elements to set * @return A modified copy of {@code this} object */ public final ImmutableConnectorDescriptor withConnectorCustomizers(String... elements) { List<String> newValue = createUnmodifiableList(false, createSafeList(Arrays.asList(elements), true, false)); return validate(new ImmutableConnectorDescriptor( this, this.connectorId, this.camelConnectorGAV, this.camelConnectorPrefix, this.componentScheme, this.connectorFactory, newValue, this.inputDataShape, this.outputDataShape, this.propertyDefinitionSteps, this.configuredProperties, this.split)); }
/** * Copy the current immutable object with elements that replace the content of {@link ConnectorDescriptor#getPropertyDefinitionSteps() propertyDefinitionSteps}. * @param elements The elements to set * @return A modified copy of {@code this} object */ public final ImmutableConnectorDescriptor withPropertyDefinitionSteps(ActionDescriptor.ActionDescriptorStep... elements) { List<ActionDescriptor.ActionDescriptorStep> newValue = createUnmodifiableList(false, createSafeList(Arrays.asList(elements), true, false)); return validate(new ImmutableConnectorDescriptor( this, this.connectorId, this.camelConnectorGAV, this.camelConnectorPrefix, this.componentScheme, this.connectorFactory, this.connectorCustomizers, this.inputDataShape, this.outputDataShape, newValue, this.configuredProperties, this.split)); }
/** * Copy the current immutable object with elements that replace the content of {@link ConnectorDescriptor#getConnectorCustomizers() connectorCustomizers}. * A shallow reference equality check is used to prevent copying of the same value by returning {@code this}. * @param elements An iterable of connectorCustomizers elements to set * @return A modified copy of {@code this} object */ public final ImmutableConnectorDescriptor withConnectorCustomizers(Iterable<String> elements) { if (this.connectorCustomizers == elements) return this; List<String> newValue = createUnmodifiableList(false, createSafeList(elements, true, false)); return validate(new ImmutableConnectorDescriptor( this, this.connectorId, this.camelConnectorGAV, this.camelConnectorPrefix, this.componentScheme, this.connectorFactory, newValue, this.inputDataShape, this.outputDataShape, this.propertyDefinitionSteps, this.configuredProperties, this.split)); }
/** * Copy the current immutable object with elements that replace the content of {@link ConnectorDescriptor#getPropertyDefinitionSteps() propertyDefinitionSteps}. * A shallow reference equality check is used to prevent copying of the same value by returning {@code this}. * @param elements An iterable of propertyDefinitionSteps elements to set * @return A modified copy of {@code this} object */ public final ImmutableConnectorDescriptor withPropertyDefinitionSteps(Iterable<? extends ActionDescriptor.ActionDescriptorStep> elements) { if (this.propertyDefinitionSteps == elements) return this; List<ActionDescriptor.ActionDescriptorStep> newValue = createUnmodifiableList(false, createSafeList(elements, true, false)); return validate(new ImmutableConnectorDescriptor( this, this.connectorId, this.camelConnectorGAV, this.camelConnectorPrefix, this.componentScheme, this.connectorFactory, this.connectorCustomizers, this.inputDataShape, this.outputDataShape, newValue, this.configuredProperties, this.split)); }