SAPcpmsUsagePolicy

public struct SAPcpmsUsagePolicy

Describes the SAPcpms Usage policy structure

  • Parameter from the server’s Usage policy

    Declaration

    Swift

    public let uploadDataAfterDays: Int
  • Initialize the structure

    Declaration

    Swift

    public init(uploadDataAfterDays: Int = 0)

    Parameters

    uploadDataAfterDays

    parameter from the server’s Usage policy

  • 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: { … usagePolicy: { dataCollectionEnabled: true, uploadDataAfterDays: 1 } … } } } 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: String] 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: … usagePolicy: { dataCollectionEnabled: true, uploadDataAfterDays: 1 } … If the dataCollectionEnabled property is false, the init returns nil.

    Throws

    ConfigurationError if the received config is invalid

    Declaration

    Swift

    public init?(sapcpmsUsagePolicy: Any) throws

    Parameters

    sapcpmsUsagePolicy

    Any type object which can be converted to [String: Any]

  • Declaration

    Swift

    public var description: String { get }
  • Declaration

    Swift

    public var debugDescription: String { get }