TransformationSettingsBuilder

open class TransformationSettingsBuilder

Base class for building transformation settings as a DataObject.

Concrete subclasses (e.g. SetDataValuesSettingsBuilder, PersistDataValueSettingsBuilder, LowercaseSettingsBuilder) override build() to populate transformer-specific configuration and then delegate to super.build().

Only values that are explicitly set via the builder’s methods will appear in the resulting DataObject, so programmatic settings won’t override remote/local settings for values the caller didn’t intend to change.

Pass the finished builder directly to TealiumConfig.setTransformation(_:) — there is no need to call build() yourself.

  • Creates a new builder for a transformation with the given unique id and transformerId.

    Declaration

    Swift

    public init(id: String, transformerId: String)

    Parameters

    id

    A unique identifier for this transformation instance.

    transformerId

    The identifier of the transformer that will process this configuration.

  • Sets the scope in which this transformation should run.

    Declaration

    Swift

    public func setScope(_ scope: TransformationScope) -> Self

    Parameters

    scope

    The scope to apply.

    Return Value

    The builder instance for method chaining.

  • Sets the execution order for this transformation.

    Lower values run first. Transformations without an explicit order run last.

    Declaration

    Swift

    public func setOrder(_ order: Int) -> Self

    Parameters

    order

    The order value.

    Return Value

    The builder instance for method chaining.

  • Sets the conditions under which this transformation is applied.

    Declaration

    Swift

    public func setConditions(_ conditions: Rule<Condition>) -> Self

    Parameters

    conditions

    A Rule<Condition> that must be satisfied for the transformation to run.

    Return Value

    The builder instance for method chaining.

  • Undocumented

    Declaration

    Swift

    @discardableResult
    public func _setConfiguration(_ configuration: DataObject) -> Self
  • Builds and returns a DataObject representing the transformation settings.

    Only explicitly set values are included, so unset properties won’t override other settings sources during merging.

    Declaration

    Swift

    open func build() -> DataObject

    Return Value

    A DataObject containing only the explicitly configured transformation settings.