DBTEAMUploadApiRateLimitValue

Objective-C

@interface DBTEAMUploadApiRateLimitValue : NSObject <DBSerializable, NSCopying>

Swift

class DBTEAMUploadApiRateLimitValue : NSObject, DBSerializable, NSCopying

The UploadApiRateLimitValue union.

The value for uploadApiRateLimit in DBTEAMFeature.

This class implements the DBSerializable protocol (serialize and deserialize instance methods), which is required for all Obj-C SDK API route objects.

Instance fields

  • tag

    Represents the union’s current tag state.

    Declaration

    Objective-C

    @property (nonatomic, readonly) DBTEAMUploadApiRateLimitValueTag tag;

    Swift

    var tag: DBTEAMUploadApiRateLimitValueTag { get }
  • The number of upload API calls allowed per month. - note: Ensure the isLimit method returns true before accessing, otherwise a runtime exception will be raised.

    Declaration

    Objective-C

    @property (nonatomic, readonly) NSNumber *_Nonnull limit;

    Swift

    var limit: NSNumber { get }

Constructors

  • Initializes union class with tag state of “unlimited”.

    Description of the “unlimited” tag state: This team has unlimited upload API quota. So far both server version account and legacy account type have unlimited monthly upload api quota.

    Declaration

    Objective-C

    - (nonnull instancetype)initWithUnlimited;

    Swift

    init(unlimited: ())

    Return Value

    An initialized instance.

  • Initializes union class with tag state of “limit”.

    Description of the “limit” tag state: The number of upload API calls allowed per month.

    Declaration

    Objective-C

    - (nonnull instancetype)initWithLimit:(nonnull NSNumber *)limit;

    Swift

    init(limit: NSNumber)

    Parameters

    limit

    The number of upload API calls allowed per month.

    Return Value

    An initialized instance.

  • Initializes union class with tag state of “other”.

    Declaration

    Objective-C

    - (nonnull instancetype)initWithOther;

    Swift

    init(other: ())

    Return Value

    An initialized instance.

Tag state methods

  • Retrieves whether the union’s current tag state has value “unlimited”.

    Declaration

    Objective-C

    - (BOOL)isUnlimited;

    Swift

    func isUnlimited() -> Bool

    Return Value

    Whether the union’s current tag state has value “unlimited”.

  • Retrieves whether the union’s current tag state has value “limit”.

    Note

    Call this method and ensure it returns true before accessing the limit property, otherwise a runtime exception will be thrown.

    Declaration

    Objective-C

    - (BOOL)isLimit;

    Swift

    func isLimit() -> Bool

    Return Value

    Whether the union’s current tag state has value “limit”.

  • Retrieves whether the union’s current tag state has value “other”.

    Declaration

    Objective-C

    - (BOOL)isOther;

    Swift

    func isOther() -> Bool

    Return Value

    Whether the union’s current tag state has value “other”.

  • Retrieves string value of union’s current tag state.

    Declaration

    Objective-C

    - (nonnull NSString *)tagName;

    Swift

    func tagName() -> String

    Return Value

    A human-readable string representing the union’s current tag state.