DBACCOUNTPhotoSourceArg

Objective-C

@interface DBACCOUNTPhotoSourceArg : NSObject <DBSerializable, NSCopying>

Swift

class DBACCOUNTPhotoSourceArg : NSObject, DBSerializable, NSCopying

The PhotoSourceArg union.

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) DBACCOUNTPhotoSourceArgTag tag;

    Swift

    var tag: DBACCOUNTPhotoSourceArgTag { get }
  • Image data in base64-encoded bytes. - note: Ensure the isBase64Data method returns true before accessing, otherwise a runtime exception will be raised.

    Declaration

    Objective-C

    @property (nonatomic, copy, readonly) NSString *_Nonnull base64Data;

    Swift

    var base64Data: String { get }

Constructors

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

    Description of the “base64_data” tag state: Image data in base64-encoded bytes.

    Declaration

    Objective-C

    - (nonnull instancetype)initWithBase64Data:(nonnull NSString *)base64Data;

    Swift

    init(base64Data: String)

    Parameters

    base64Data

    Image data in base64-encoded bytes.

    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 “base64_data”.

    Note

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

    Declaration

    Objective-C

    - (BOOL)isBase64Data;

    Swift

    func isBase64Data() -> Bool

    Return Value

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

  • 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.