         }
     }
 
+    /// - returns: get or set the user records IDs
     public var userRecordIDs: [T.RecordID]? {
         get { return operation.userRecordIDs }
         set {

import Foundation
import CloudKit

public protocol CKOperationType: class {
    typealias Container
    typealias ServerChangeToken
    typealias Notification
    typealias RecordZone
    typealias Record
    typealias Subscription
    typealias RecordSavePolicy
    typealias DiscoveredUserInfo
    typealias Query
    typealias QueryCursor

    typealias RecordZoneID: Hashable
    typealias NotificationID: Hashable
    typealias RecordID: Hashable

    var container: Container? { get set }
}

public protocol CKDatabaseOperationType: CKOperationType {
    typealias Database
    var database: Database? { get set }
}

public protocol CKPreviousServerChangeToken: CKOperationType {
    var previousServerChangeToken: ServerChangeToken? { get set }
}

public protocol CKResultsLimit: CKOperationType {
    var resultsLimit: Int { get set }
}

public protocol CKMoreComing: CKOperationType {
    var moreComing: Bool { get }
}

public protocol CKDesiredKeys: CKOperationType {
    var desiredKeys: [String]? { get set }
}

public protocol CKBatchedOperationType: CKResultsLimit, CKMoreComing { }

public typealias CKFetchOperationType = protocol<CKPreviousServerChangeToken, CKBatchedOperationType>

public protocol CKDiscoverAllContactsOperationType: CKOperationType {
    var discoverAllContactsCompletionBlock: (([DiscoveredUserInfo]?, NSError?) -> Void)? { get set }
}

public protocol CKDiscoverUserInfosOperationType: CKOperationType {
    var emailAddresses: [String]? { get set }
    var userRecordIDs: [RecordID]? { get set }
    var discoverUserInfosCompletionBlock: (([String: DiscoveredUserInfo]?, [RecordID: DiscoveredUserInfo]?, NSError?) -> Void)? { get set }
}

public protocol CKFetchNotificationChangesOperationType: CKFetchOperationType {
    var notificationChangedBlock: ((Notification) -> Void)? { get set }
    var fetchNotificationChangesCompletionBlock: ((ServerChangeToken?, NSError?) -> Void)? { get set }
}

public protocol CKMarkNotificationsReadOperationType: CKOperationType {
    var notificationIDs: [NotificationID] { get set }
    var markNotificationsReadCompletionBlock: (([NotificationID]?, NSError?) -> Void)? { get set }
}

public protocol CKModifyBadgeOperationType: CKOperationType {
    var badgeValue: Int { get set }
    var modifyBadgeCompletionBlock: ((NSError?) -> Void)? { get set }
}

public protocol CKFetchRecordChangesOperationType: CKDatabaseOperationType, CKFetchOperationType, CKDesiredKeys {

    var recordZoneID: RecordZoneID { get set }
    var recordChangedBlock: ((Record) -> Void)? { get set }
    var recordWithIDWasDeletedBlock: ((RecordID) -> Void)? { get set }
    var fetchRecordChangesCompletionBlock: ((ServerChangeToken?, NSData?, NSError?) -> Void)? { get set }
}

public protocol CKFetchRecordZonesOperationType: CKDatabaseOperationType {
    var recordZoneIDs: [RecordZoneID]? { get set }
    var fetchRecordZonesCompletionBlock: (([RecordZoneID: RecordZone]?, NSError?) -> Void)? { get set }
}

public protocol CKFetchRecordsOperationType: CKDatabaseOperationType, CKDesiredKeys {
    var recordIDs: [RecordID]? { get set }
    var perRecordProgressBlock: ((RecordID, Double) -> Void)? { get set }
    var perRecordCompletionBlock: ((Record?, RecordID?, NSError?) -> Void)? { get set }
    var fetchRecordsCompletionBlock: (([RecordID: Record]?, NSError?) -> Void)? { get set }
}

public protocol CKFetchSubscriptionsOperationType: CKDatabaseOperationType {
    var subscriptionIDs: [String]? { get set }
    var fetchSubscriptionCompletionBlock: (([String: Subscription]?, NSError?) -> Void)? { get set }
}

public protocol CKModifyRecordZonesOperationType: CKDatabaseOperationType {
    var recordZonesToSave: [RecordZone]? { get set }
    var recordZoneIDsToDelete: [RecordZoneID]? { get set }
    var modifyRecordZonesCompletionBlock: (([RecordZone]?, [RecordZoneID]?, NSError?) -> Void)? { get set }
}

public protocol CKModifyRecordsOperationType: CKDatabaseOperationType {
    var recordsToSave: [Record]? { get set }
    var recordIDsToDelete: [RecordID]? { get set }
    var savePolicy: RecordSavePolicy { get set }
    var clientChangeTokenData: NSData? { get set }
    var atomic: Bool { get set }

    var perRecordProgressBlock: ((Record, Double) -> Void)? { get set }
    var perRecordCompletionBlock: ((Record?, NSError?) -> Void)? { get set }
    var modifyRecordsCompletionBlock: (([Record]?, [RecordID]?, NSError?) -> Void)? { get set }
}

public protocol CKModifySubscriptionsOperationType: CKDatabaseOperationType {
    var subscriptionsToSave: [Subscription]? { get set }
    var subscriptionIDsToDelete: [String]? { get set }
    var modifySubscriptionsCompletionBlock: (([Subscription]?, [String]?, NSError?) -> Void)? { get set }
}

public protocol CKQueryOperationType: CKDatabaseOperationType, CKResultsLimit, CKDesiredKeys {

    var query: Query? { get set }
    var cursor: QueryCursor? { get set }
    var zoneID: RecordZoneID? { get set }
    var recordFetchedBlock: ((Record) -> Void)? { get set }
    var queryCompletionBlock: ((QueryCursor?, NSError?) -> Void)? { get set }
}

extension CKOperation: CKOperationType {
    public typealias Container = CKContainer
    public typealias ServerChangeToken = CKServerChangeToken
    public typealias DiscoveredUserInfo = CKDiscoveredUserInfo
    public typealias RecordZone = CKRecordZone
    public typealias RecordZoneID = CKRecordZoneID
    public typealias Notification = CKNotification
    public typealias NotificationID = CKNotificationID
    public typealias Record = CKRecord
    public typealias RecordID = CKRecordID
    public typealias Subscription = CKSubscription
    public typealias RecordSavePolicy = CKRecordSavePolicy
    public typealias Query = CKQuery
    public typealias QueryCursor = CKQueryCursor
}

extension CKDatabaseOperation: CKDatabaseOperationType {
    public typealias Database = CKDatabase
}

extension CKDiscoverAllContactsOperation:       CKDiscoverAllContactsOperationType { }
extension CKDiscoverUserInfosOperation:         CKDiscoverUserInfosOperationType { }
extension CKFetchNotificationChangesOperation:  CKFetchNotificationChangesOperationType   { }
extension CKMarkNotificationsReadOperation:     CKMarkNotificationsReadOperationType { }
extension CKModifyBadgeOperation:               CKModifyBadgeOperationType { }
extension CKFetchRecordChangesOperation:        CKFetchRecordChangesOperationType { }
extension CKFetchRecordZonesOperation:          CKFetchRecordZonesOperationType { }
extension CKFetchRecordsOperation:              CKFetchRecordsOperationType { }
extension CKFetchSubscriptionsOperation:        CKFetchSubscriptionsOperationType { }
extension CKModifyRecordZonesOperation:         CKModifyRecordZonesOperationType { }
extension CKModifyRecordsOperation:             CKModifyRecordsOperationType { }
extension CKModifySubscriptionsOperation:       CKModifySubscriptionsOperationType { }
extension CKQueryOperation:                     CKQueryOperationType { }


// MARK: OPRCKOperation

        }
    }

    /// - returns: a block for the record completion
    public var perRecordCompletionBlock: FetchRecordsPerRecordCompletionBlock? {
        get { return operation.perRecordCompletionBlock }
        set {
