Update

struct Update
extension Update : ActionBehavior, Copyable, Copyable, CustomStringConvertible, Equatable, Escapable, Escapable, Sendable

Trait attribute update used in an automation action.

  • The trait to update.

    Declaration

    Swift

    let trait: any Trait.Type
  • The string-based identifier for the Trait.

    If the trait is UnknownTrait it will refer to the original Trait ID provided.

    Declaration

    Swift

    let traitID: String
  • The Key-value pairs representing the attributes to update, where the key is the attribute field ID, and the value is the new attribute value.

    Declaration

    Swift

    let updatedAttributes: [Parameter]
  • Returns true if the action behaviors are equal, false otherwise.

    Declaration

    Swift

    func isEqualTo(_ other: any ActionBehavior) -> Bool
  • Returns a Boolean value indicating whether two values are equal.

    Equality is the inverse of inequality. For any values a and b, a == b implies that a != b is false.

    Declaration

    Swift

    static func == (lhs: Update, rhs: Update) -> Bool

    Parameters

    lhs

    A value to compare.

    rhs

    Another value to compare.

  • A textual representation of this instance.

    Calling this property directly is discouraged. Instead, convert an instance of any type to a string by using the String(describing:) initializer. This initializer works with any type, and uses the custom description property for types that conform to CustomStringConvertible:

    struct Point: CustomStringConvertible {
        let x: Int, y: Int
    
        var description: String {
            return "(\(x), \(y))"
        }
    }
    
    let p = Point(x: 21, y: 30)
    let s = String(describing: p)
    print(s)
    // Prints "(21, 30)"
    

    The conversion of p to a string in the assignment to s uses the Point type’s description property.

    Declaration

    Swift

    var description: String { get }