DBSHARINGSharedLinkMetadata

Objective-C

@interface DBSHARINGSharedLinkMetadata : NSObject <DBSerializable, NSCopying>

Swift

class DBSHARINGSharedLinkMetadata : NSObject, DBSerializable, NSCopying

The SharedLinkMetadata struct.

The metadata of a shared link.

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

Instance fields

  • url

    URL of the shared link.

    Declaration

    Objective-C

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

    Swift

    var url: String { get }
  • id_

    A unique identifier for the linked file.

    Declaration

    Objective-C

    @property (nonatomic, copy, readonly, nullable) NSString *id_;

    Swift

    var id_: String? { get }
  • The linked file name (including extension). This never contains a slash.

    Declaration

    Objective-C

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

    Swift

    var name: String { get }
  • Expiration time, if set. By default the link won’t expire.

    Declaration

    Objective-C

    @property (nonatomic, readonly, nullable) NSDate *expires;

    Swift

    var expires: Date? { get }
  • The lowercased full path in the user’s Dropbox. This always starts with a slash. This field will only be present only if the linked file is in the authenticated user’s dropbox.

    Declaration

    Objective-C

    @property (nonatomic, copy, readonly, nullable) NSString *pathLower;

    Swift

    var pathLower: String? { get }
  • The link’s access permissions.

    Declaration

    Objective-C

    @property (nonatomic, readonly) DBSHARINGLinkPermissions *_Nonnull linkPermissions;

    Swift

    var linkPermissions: DBSHARINGLinkPermissions { get }
  • The team membership information of the link’s owner. This field will only be present if the link’s owner is a team member.

    Declaration

    Objective-C

    @property (nonatomic, readonly, nullable) DBSHARINGTeamMemberInfo *teamMemberInfo;

    Swift

    var teamMemberInfo: DBSHARINGTeamMemberInfo? { get }
  • The team information of the content’s owner. This field will only be present if the content’s owner is a team member and the content’s owner team is different from the link’s owner team.

    Declaration

    Objective-C

    @property (nonatomic, readonly, nullable) DBUSERSTeam *contentOwnerTeamInfo;

    Swift

    var contentOwnerTeamInfo: DBUSERSTeam? { get }

Constructors

  • Full constructor for the struct (exposes all instance variables).

    Declaration

    Objective-C

    - (nonnull instancetype)
                 initWithUrl:(nonnull NSString *)url
                        name:(nonnull NSString *)name
             linkPermissions:(nonnull DBSHARINGLinkPermissions *)linkPermissions
                         id_:(nullable NSString *)id_
                     expires:(nullable NSDate *)expires
                   pathLower:(nullable NSString *)pathLower
              teamMemberInfo:(nullable DBSHARINGTeamMemberInfo *)teamMemberInfo
        contentOwnerTeamInfo:(nullable DBUSERSTeam *)contentOwnerTeamInfo;

    Swift

    init(url: String, name: String, linkPermissions: DBSHARINGLinkPermissions, id_: String?, expires: Date?, pathLower: String?, teamMemberInfo: DBSHARINGTeamMemberInfo?, contentOwnerTeamInfo: DBUSERSTeam?)

    Parameters

    url

    URL of the shared link.

    name

    The linked file name (including extension). This never contains a slash.

    linkPermissions

    The link’s access permissions.

    id_

    A unique identifier for the linked file.

    expires

    Expiration time, if set. By default the link won’t expire.

    pathLower

    The lowercased full path in the user’s Dropbox. This always starts with a slash. This field will only be present only if the linked file is in the authenticated user’s dropbox.

    teamMemberInfo

    The team membership information of the link’s owner. This field will only be present if the link’s owner is a team member.

    contentOwnerTeamInfo

    The team information of the content’s owner. This field will only be present if the content’s owner is a team member and the content’s owner team is different from the link’s owner team.

    Return Value

    An initialized instance.

  • Convenience constructor (exposes only non-nullable instance variables with no default value).

    Declaration

    Objective-C

    - (nonnull instancetype)initWithUrl:(nonnull NSString *)url
                                   name:(nonnull NSString *)name
                        linkPermissions:
                            (nonnull DBSHARINGLinkPermissions *)linkPermissions;

    Swift

    init(url: String, name: String, linkPermissions: DBSHARINGLinkPermissions)

    Parameters

    url

    URL of the shared link.

    name

    The linked file name (including extension). This never contains a slash.

    linkPermissions

    The link’s access permissions.

    Return Value

    An initialized instance.