AWSCognitoRecordMetadata

Objective-C

@interface AWSCognitoRecordMetadata : NSObject

/**
 Record ID or name.
 */
@property (nonatomic, readonly) NSString *recordId;

/**
 The last date the record was modified.
 */
@property (nonatomic, readonly) NSDate *lastModified;

/**
 The ID of the client that last modified the record. Set in AWSCognitoConfig under the clientID property.
 */
@property (nonatomic, strong) NSString *lastModifiedBy;

/**
 Boolean indicating whether or not the record has updates/deletes that need to be synced with the server.
 */
@property (nonatomic, readonly, getter = isDirty) BOOL dirty;

/**
 Integer value indicating how many times the record has been written since the last sync.
 The value is 0 if the record has not been modified. The value is incremented by 1 each time the record is updated.
 The value is set to -1 when the record is marked as deleted from the local database.
 */
@property (nonatomic, assign) int64_t dirtyCount;

/**
 Integer value of the server sync count of the record.
 */
@property (nonatomic, assign) int64_t syncCount;

- (instancetype)initWithId:(NSString *)recordId;

/**
 Checks if the metadata matches.
 
 @param object The object to be compared to the receiver.
 May be nil, in which case this method returns NO.
 @return YES if the receiver and object have equal metadata, otherwise NO.
 */
- (BOOL)isEqualMetadata:(id)object;

@end

Swift

class AWSCognitoRecordMetadata : NSObject

Undocumented

  • Record ID or name.

    Declaration

    Objective-C

    @property (nonatomic, readonly) NSString *recordId;

    Swift

    var recordId: String! { get }
  • The last date the record was modified.

    Declaration

    Objective-C

    @property (nonatomic, readonly) NSDate *lastModified;

    Swift

    var lastModified: Date! { get }
  • The ID of the client that last modified the record. Set in AWSCognitoConfig under the clientID property.

    Declaration

    Objective-C

    @property (nonatomic, strong) NSString *lastModifiedBy;

    Swift

    var lastModifiedBy: String! { get set }
  • Boolean indicating whether or not the record has updates/deletes that need to be synced with the server.

    Declaration

    Objective-C

    @property (nonatomic, readonly, getter=isDirty) BOOL dirty;

    Swift

    var isDirty: Bool { get }
  • Integer value indicating how many times the record has been written since the last sync. The value is 0 if the record has not been modified. The value is incremented by 1 each time the record is updated. The value is set to -1 when the record is marked as deleted from the local database.

    Declaration

    Objective-C

    @property (nonatomic) int64_t dirtyCount;

    Swift

    var dirtyCount: Int64 { get set }
  • Integer value of the server sync count of the record.

    Declaration

    Objective-C

    @property (nonatomic) int64_t syncCount;

    Swift

    var syncCount: Int64 { get set }
  • Undocumented

    Declaration

    Objective-C

    - (instancetype)initWithId:(NSString *)recordId;

    Swift

    init!(id recordId: String!)
  • Checks if the metadata matches.

    Declaration

    Objective-C

    - (BOOL)isEqualMetadata:(id)object;

    Swift

    func isEqualMetadata(_ object: Any!) -> Bool

    Parameters

    object

    The object to be compared to the receiver. May be nil, in which case this method returns NO.

    Return Value

    YES if the receiver and object have equal metadata, otherwise NO.