 
 // MARK: - BatchedCloudKitOperation
 
-class CloudKitGenerator<T where T: NSOperation, T: CKOperationType>: GeneratorType {
+class CloudKitOperationGenerator<T where T: NSOperation, T: CKOperationType>: GeneratorType {
 
     let connectivity: Reachability.Connectivity
     let reachability: SystemReachabilityType


extension OPRCKOperation where T: CKModifyBadgeOperationType {

    internal typealias ModifyBadgeCompletionBlock = () -> Void

    internal var badgeValue: Int {
        get { return operation.badgeValue }
        set { operation.badgeValue = newValue }
    }

    internal func setModifyBadgeCompletionBlock(block: ModifyBadgeCompletionBlock) {
        operation.modifyBadgeCompletionBlock = { [unowned target] error in
            if let error = error, target = target as? GroupOperation {
                target.aggregateError(error)


extension OPRCKOperation where T: CKDiscoverUserInfosOperationType {

    typealias DiscoverUserInfosCompletionBlock = ([String: T.DiscoveredUserInfo]?, [T.RecordID: T.DiscoveredUserInfo]?) -> Void

    var emailAddresses: [String]? {
        get { return operation.emailAddresses }
        set { operation.emailAddresses = newValue }
    }

    var userRecordIDs: [T.RecordID]? {
        get { return operation.userRecordIDs }
        set { operation.userRecordIDs = newValue }
    }

    func setDiscoverUserInfosCompletionBlock(block: DiscoverUserInfosCompletionBlock) {
        operation.discoverUserInfosCompletionBlock = { [unowned target] userInfoByEmail, userInfoByRecordID, error in
            if let error = error, target = target as? GroupOperation {
                target.aggregateError(error)
