SetDataValuesSettingsBuilder

public class SetDataValuesSettingsBuilder : TransformationSettingsBuilder

A builder for creating TransformationSettings that configure a SetDataValues transformer.

This builder lets you define operations that copy values between paths in the dispatch payload or set constant values at specific destinations.

Example:

let settings = SetDataValuesSettingsBuilder(id: "my-transform")
    .setFrom(.key("source"), to: .key("dest"))
    .setConstant("hello", to: .key("greeting"))
    .setScope(.afterCollectors)
    .build()
  • Creates a new builder for a SetDataValues transformation.

    Declaration

    Swift

    public init(id: String)

    Parameters

    id

    A unique identifier for this transformation.

  • Adds an operation that copies a value from one location to another in the dispatch payload.

    Declaration

    Swift

    public func setFrom(_ input: ReferenceContainer, to destination: ReferenceContainer) -> Self

    Parameters

    input

    A reference to the source location in the payload.

    destination

    A reference to the destination location in the payload.

    Return Value

    This builder instance for chaining.

  • Adds an operation that sets a constant value at a location in the dispatch payload.

    Declaration

    Swift

    public func setConstant(_ constant: DataInput, to destination: ReferenceContainer) -> Self

    Parameters

    constant

    The constant value to set.

    destination

    A reference to the destination location in the payload.

    Return Value

    This builder instance for chaining.

  • Builds a DataObject with the configured operations, scope, and conditions. Writes whatever properties have been set to the configuration DataObject.

    Declaration

    Swift

    override public func build() -> DataObject

    Return Value

    A DataObject containing only the explicitly configured transformation settings.