ZDCAppBill

@interface ZDCAppBill : NSObject

Represents the raw tallies for a specific app, or for the user’s totals (all apps). Instances of this class are created via ZDCUserBill.

  • The number of bytes the user has downloaded from the cloud.

    Declaration

    Objective-C

    @property (readonly, nonatomic) uint64_t bandwidth_byteCount;

    Swift

    var bandwidth_byteCount: UInt64 { get }
  • The number S3 GET requests issued by the user.

    This corresponds to the following actions:

    • Downloads of RCRD files by the PullManager. This occurs automatically during sync, if a node’s metadata has been modified. For example, if a node was moved/renamed, or its permissions were changed.
    • Downloads of DATA files by the app, generally issued thru the DownloadManager or ImageManager. This occurs when your app requests the download of a node’s data, metadata or thumbnail.

    Declaration

    Objective-C

    @property (readonly, nonatomic) uint64_t s3_getCount;

    Swift

    var s3_getCount: UInt64 { get }
  • The number of S3 PUT and/or LIST requests.

    This generally corresponds to the number of nodes that have been uploaded.

    Declaration

    Objective-C

    @property (readonly, nonatomic) uint64_t s3_putCount;

    Swift

    var s3_putCount: UInt64 { get }
  • Details the storage consumption used by the app, for each storage tier.

    The tiers consist of:

    • standard
    • standard_ia
    • glacier

    Declaration

    Objective-C

    @property (readonly, nonatomic)
        NSDictionary<NSString *, ZDCStorageBill *> *_Nonnull s3_storage;

    Swift

    var s3_storage: [String : ZDCStorageBill] { get }
  • Details temporary storage consumption used by the app, while uploading large nodes.

    If you create a node that’s large (e.g. 50 MiB), then the PushManager will upload the node in parts. This helps the system quickly recover from network disconnections, and other interruptions such as system sleep. For example, user disconnects from WiFi or puts laptop to sleep. By using multipart uploads, the PushManager can restart the last part, as opposed to restarting the upload from the very beginning.

    While a multipart upload is in progress, the parts will sit in AWS, in a temporary location. This details the costs associated with such temporary storage.

    Note

    Unfinished uploads are automatically cancelled after a few days, and their storage is deleted.

    Declaration

    Objective-C

    @property (readonly, nonatomic)
        NSDictionary<NSString *, ZDCStorageBill *> *_Nonnull s3_multipartStorage;

    Swift

    var s3_multipartStorage: [String : ZDCStorageBill] { get }
  • Convenience function: returns the SUM of all items in the s3_storage dictionary.

    Declaration

    Objective-C

    @property (readonly, nonatomic) ZDCStorageBill *_Nonnull s3_storage_total;

    Swift

    var s3_storage_total: ZDCStorageBill { get }
  • Convenience function: returns the SUM of all items in the s3_multipartStorage dictionary.

    Declaration

    Objective-C

    @property (readonly, nonatomic)
        ZDCStorageBill *_Nonnull s3_multipartStorage_total;

    Swift

    var s3_multipartStorage_total: ZDCStorageBill { get }
  • The number of push notifications actually sent via AWS SNS to devices.

    For example, if Alice changes a node, that will trigger 1 notification to Alice. The sns_publishCount will be incremented by 1, and the sns_mobilePushCount will be incremented by the number of devices in which Alice is signed in.

    If Alice changes a node that’s shared with Bob, that will trigger 1 notification for Alice & 1 for Bob. The sns_publishCount will be incremented by 2, and the sns_mobilePushCount will be incremented by however many devices Alice & Bob are signed into.

    Note

    If a user signs out on a device (or deletes the app), that device gets pruned from the list of devices.

    Declaration

    Objective-C

    @property (readonly, nonatomic) uint64_t sns_mobilePushCount;

    Swift

    var sns_mobilePushCount: UInt64 { get }
  • The number of push notifications triggered by the user.

    For example, if Alice changes a node, that will trigger 1 notification to Alice. The sns_publishCount will be incremented by 1, and the sns_mobilePushCount will be incremented by the number of devices in which Alice is signed in.

    If Alice changes a node that’s shared with Bob, that will trigger 1 notification for Alice & 1 for Bob. The sns_publishCount will be incremented by 2, and the sns_mobilePushCount will be incremented by however many devices Alice & Bob are signed into.

    Declaration

    Objective-C

    @property (readonly, nonatomic) uint64_t sns_publishCount;

    Swift

    var sns_publishCount: UInt64 { get }
  • The number of milliseconds of CPU time consumed by the user.

    Whenever the user makes a request from the server (e.g. uploads a new node), the server tracks the amount of time required to process the request, and updates this value server-side.

    Declaration

    Objective-C

    @property (readonly, nonatomic) uint64_t lambda_millisCount;

    Swift

    var lambda_millisCount: UInt64 { get }
  • The number of CPU requests consumed by the user.

    This value represents the number of requests, as opposed to the amount of time it took the server to process the request.

    Declaration

    Objective-C

    @property (readonly, nonatomic) uint64_t lambda_requestCount;

    Swift

    var lambda_requestCount: UInt64 { get }
  • The last time these tallies were updated by the server.

    This is specific to the particular app, and may be different from ZDCUserBill.metadata.timestamp. However, this timestamp will always be less-than-or-equal-to that value.

    Declaration

    Objective-C

    @property (readonly, nonatomic) NSDate *_Nonnull timestamp;

    Swift

    var timestamp: Date { get }