Skip to content

Commit bad56a0

Browse files
authored
adding setters and getters for properties in eventprops for swift wrappers (#1239)
1 parent 5d539d1 commit bad56a0

File tree

1 file changed

+44
-0
lines changed

1 file changed

+44
-0
lines changed

wrappers/swift/Sources/OneDSSwift/EventProperties.swift

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,50 @@ public final class EventProperties {
4545
odwEventProperties = ODWEventProperties(name: name, properties: properties, piiTags: piiTags)
4646
}
4747

48+
/// Event name.
49+
public var name:String {
50+
get {
51+
odwEventProperties.name
52+
}
53+
set {
54+
odwEventProperties.name = newValue
55+
}
56+
}
57+
58+
/// Event priority.
59+
public var priority:EventPriority {
60+
get {
61+
odwEventProperties.priority
62+
}
63+
set {
64+
odwEventProperties.priority = newValue
65+
}
66+
}
67+
68+
/// Event properties. Key is property name, value is property value.
69+
public var properties:[String: Any] {
70+
get {
71+
odwEventProperties.properties
72+
}
73+
}
74+
75+
/// Event PII (personal identifiable information ) tags. Key is property name, value is ODWPiiKind value.
76+
public var piiTags: [String: NSNumber] {
77+
get {
78+
odwEventProperties.piiTags
79+
}
80+
}
81+
82+
/// Base Type of an event. This field is populated in Records.Type
83+
public var eventType:String {
84+
get {
85+
odwEventProperties.eventType
86+
}
87+
set {
88+
odwEventProperties.eventType = newValue
89+
}
90+
}
91+
4892
/**
4993
Sets the base type of the event, populated in Records.Type.
5094

0 commit comments

Comments
 (0)