SAPcpmsNetworkSynchronizationPolicy
public struct SAPcpmsNetworkSynchronizationPolicy
extension SAPcpmsNetworkSynchronizationPolicy: CustomStringConvertible, CustomDebugStringConvertible
Describes the SAPcpms Network Synchronization policy structure
-
Parameter from the mobile services’ Network Synchronization policy which enables the different network options for the analytics
Declaration
Swift
public let analytics: SAPcpmsNetworkSynchronizationPolicyOptions
-
Parameter from the mobile services’ Network Synchronization policy which enables the different network options for the clientResource
Declaration
Swift
public let clientResource: SAPcpmsNetworkSynchronizationPolicyOptions
-
Parameter from the mobile services’ Network Synchronization policy which enables the different network options for the logs
Declaration
Swift
public let logs: SAPcpmsNetworkSynchronizationPolicyOptions
-
Parameter from the mobile services’ Network Synchronization policy which enables the different network options for the offlineOData
Declaration
Swift
public let offlineOData: SAPcpmsNetworkSynchronizationPolicyOptions
-
Initialize the structure
Declaration
Swift
public init(analytics: SAPcpmsNetworkSynchronizationPolicyOptions = .default, clientResource: SAPcpmsNetworkSynchronizationPolicyOptions = .default, logs: SAPcpmsNetworkSynchronizationPolicyOptions = .default, offlineOData: SAPcpmsNetworkSynchronizationPolicyOptions = .default)
Parameters
analytics
parameter from the mobile services’ Network Synchronization policy which enables the different network options for the analytics
clientResource
parameter from the mobile services’ Network Synchronization policy which enables the different network options for the clientResource
logs
parameter from the mobile services’ Network Synchronization policy which enables the different network options for the logs
offlineOData
parameter from the mobile services’ Network Synchronization policy which enables the different network options for the offlineOData
-
Initialize the structure from [String: Any] dictionary. For example when the policy received from mobile services and should parse the json. Example structure, which is part of the Settings structure downloaded from mobile services: { “mobileservices”: { “settingsExchange”: { … “networkPolicy”: { “networkPolicyEnabled”: “true”, “analytics”: { “mobileNetwork”: “false”, “roaming”: “false”, “wifi”: “true” }, “clientResource”: { “mobileNetwork”: “false”, “roaming”: “false”, “wifi”: “true” }, “logs”: { “mobileNetwork”: “true”, “roaming”: “false”, “wifi”: “true” }, “offlineOData”: { “mobileNetwork”: “true”, “roaming”: “false”, “wifi”: “true” } } … } } } If the enabled property is false, the init returns nil.
Throws
ConfigurationError if the received config is invalid.Declaration
Swift
public init?(sapcpmsSettings: Any) throws
Parameters
sapcpmsSettings
‘Any’ type object which can be converted to [String: Any]
-
Initialize the structure from [String: Any] dictionary. For example when the policy received from mobile services and should parse the json. Example structure, which is part of the Settings structure downloaded from mobile services: … “networkPolicy”: { “networkPolicyEnabled”: “true”, “analytics”: { “mobileNetwork”: “false”, “roaming”: “false”, “wifi”: “true” }, “clientResource”: { “mobileNetwork”: “false”, “roaming”: “false”, “wifi”: “true” }, “logs”: { “mobileNetwork”: “true”, “roaming”: “false”, “wifi”: “true” }, “offlineOData”: { “mobileNetwork”: “true”, “roaming”: “false”, “wifi”: “true” } } … If the
networkPolicyEnabled
property is false or sapcpmsNetworkPolicy is an empty dictionary, the init returns nil.Throws
ConfigurationError if the received config is invalid.Declaration
Swift
public init?(sapcpmsNetworkPolicy: Any) throws
Parameters
sapcpmsNetworkPolicy
‘Any’ type object which can be converted to [String: Any]
-
Declaration
Swift
public var description: String { get }
-
Declaration
Swift
public var debugDescription: String { get }