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
idA 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) -> SelfParameters
inputA reference to the source location in the payload.
destinationA 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) -> SelfParameters
constantThe constant value to set.
destinationA reference to the destination location in the payload.
Return Value
This builder instance for chaining.
-
Builds a
DataObjectwith the configured operations, scope, and conditions. Writes whatever properties have been set to the configuration DataObject.Declaration
Swift
override public func build() -> DataObjectReturn Value
A
DataObjectcontaining only the explicitly configured transformation settings.
View on GitHub