Skip to content

Commit

Permalink
adding setters and getters for properties in eventprops for swift wra…
Browse files Browse the repository at this point in the history
…ppers (#1239)
  • Loading branch information
absaroj authored Jan 31, 2024
1 parent 5d539d1 commit bad56a0
Showing 1 changed file with 44 additions and 0 deletions.
44 changes: 44 additions & 0 deletions wrappers/swift/Sources/OneDSSwift/EventProperties.swift
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,50 @@ public final class EventProperties {
odwEventProperties = ODWEventProperties(name: name, properties: properties, piiTags: piiTags)
}

/// Event name.
public var name:String {
get {
odwEventProperties.name
}
set {
odwEventProperties.name = newValue
}
}

/// Event priority.
public var priority:EventPriority {
get {
odwEventProperties.priority
}
set {
odwEventProperties.priority = newValue
}
}

/// Event properties. Key is property name, value is property value.
public var properties:[String: Any] {
get {
odwEventProperties.properties
}
}

/// Event PII (personal identifiable information ) tags. Key is property name, value is ODWPiiKind value.
public var piiTags: [String: NSNumber] {
get {
odwEventProperties.piiTags
}
}

/// Base Type of an event. This field is populated in Records.Type
public var eventType:String {
get {
odwEventProperties.eventType
}
set {
odwEventProperties.eventType = newValue
}
}

/**
Sets the base type of the event, populated in Records.Type.

Expand Down

0 comments on commit bad56a0

Please sign in to comment.