-
Notifications
You must be signed in to change notification settings - Fork 54
/
Copy pathPrivacyConcernMetadataProvider.swift
68 lines (54 loc) · 2.6 KB
/
PrivacyConcernMetadataProvider.swift
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
//
// Copyright (c) Microsoft Corporation. All rights reserved.
// SPDX-License-Identifier: Apache-2.0
//
import ObjCModule
/// Wrapper over ODWPrivacyConcernMetadataProvider class.
public final class PrivacyConcernMetadataProvider {
/// ObjC variable which is wrapped by Swift.
var odwPrivacyConcernMetadataProvider: ODWPrivacyConcernMetadataProvider
/// Constructor initialized with ObjC wrapped object.
init(odwPrivacyConcernMetadataProvider: ODWPrivacyConcernMetadataProvider) {
self.odwPrivacyConcernMetadataProvider = odwPrivacyConcernMetadataProvider
}
/// Default constructor.
public init() {
odwPrivacyConcernMetadataProvider = ODWPrivacyConcernMetadataProvider()
}
/// Get the database name for the provided record.
public func getDatabaseName(for record: Any) -> String {
return odwPrivacyConcernMetadataProvider.getDatabaseNameForRecord(record)
}
/// Get the server name for the provided record.
public func getServerName(for record: Any) -> String {
return odwPrivacyConcernMetadataProvider.getServerNameForRecord(record)
}
/// Get the event locator name for the provided record.
public func getEventLocatorName(for record: Any) -> String {
return odwPrivacyConcernMetadataProvider.getEventLocatorNameForRecord(record)
}
/// Get the event locator value for the provided record.
public func getEventLocatorValue(for record: Any) -> String {
return odwPrivacyConcernMetadataProvider.getEventLocatorValueForRecord(record)
}
/// Get the override for the privacy guard event time for the provided record.
public func getPrivacyGuardEventTimeOverride(for record: Any) -> Int64 {
return odwPrivacyConcernMetadataProvider.getPrivacyGuardEventTimeOverrideForRecord(record)
}
/// Check if the record should be ignored.
public func getShouldIgnoreOverride(for record: Any) -> Bool {
return odwPrivacyConcernMetadataProvider.getShouldIgnoreOverrideForRecord(record)
}
/// Get the associated tenant for the provided record.
public func getAssociatedTenant(for record: Any) -> String {
return odwPrivacyConcernMetadataProvider.getAssociatedTenantForRecord(record)
}
/// Get the environment for the provided record.
public func getEnvironment(for record: Any) -> String {
return odwPrivacyConcernMetadataProvider.getEnvironmentForRecord(record)
}
/// Get the metadata for the provided record.
public func getMetadata(for record: Any) -> String {
return odwPrivacyConcernMetadataProvider.getMetadataForRecord(record)
}
}