Options

public struct Options

Allow override custom values whenever the default value is not desired.

  • Custom Client instance

    Declaration

    Swift

    public var client: Client?
  • Custom URLSession instance

    Declaration

    Swift

    public var urlSession: URLSession?
  • Custom authServiceId value used for MIC

    Declaration

    Swift

    public var authServiceId: String?
  • ttl

    Custom TTL value used for cases where time-to-live value is present

    Declaration

    Swift

    public var ttl: TTL?
  • Enables / disables delta set

    Declaration

    Swift

    public var deltaSet: Bool?
  • Custom read policy for read operations

    Declaration

    Swift

    public var readPolicy: ReadPolicy?
  • Custom write policy for write operations

    Declaration

    Swift

    public var writePolicy: WritePolicy?
  • Custom timeout interval for network requests

    Declaration

    Swift

    public var timeout: TimeInterval?
  • App version for this client instance.

    Declaration

    Swift

    public var clientAppVersion: String?
  • Custom request properties for this client instance.

    Declaration

    Swift

    public var customRequestProperties: [String : Any]?
  • Maximum size per result set coming from the backend. Default to 10k records.

    Declaration

    Swift

    public private(set) var maxSizePerResultSet: Int? { get }
  • Constructor that takes the values that need to be specified and assign default values for all the other properties

    Declaration

    Swift

    public init(
        _ options: Options? = nil,
        client: Client? = nil,
        urlSession: URLSession? = nil,
        authServiceId: String? = nil,
        ttl: TTL? = nil,
        deltaSet: Bool? = nil,
        readPolicy: ReadPolicy? = nil,
        writePolicy: WritePolicy? = nil,
        timeout: TimeInterval? = nil,
        clientAppVersion: String? = nil,
        customRequestProperties: [String : Any]? = nil,
        maxSizePerResultSet: Int? = nil
    ) throws
  • Constructor that takes the values that need to be specified and assign default values for all the other properties

    Declaration

    Swift

    public init(_ block: (inout Options) -> Void)