FileMessageCreateParams

public final class FileMessageCreateParams: BaseMessageCreateParams

An object contains set of options to create FileMessage.

Since

3.0.90
  • Binary file data. file and fileURL cannot be set together.

    Declaration

    Swift

    public var file: Data?
  • File URL. file and fileURL cannot be set together.

    Declaration

    Swift

    public var fileURL: String?
  • Thumbnail sizes. This parameter is the array of ThumbnailSize instance and works for image file only.

    Declaration

    Swift

    public var thumbnailSizes: [ThumbnailSize]?
  • File name.

    Declaration

    Swift

    public var fileName: String?
  • File MIME type.

    Declaration

    Swift

    public var mimeType: String?
  • File size.

    Declaration

    Swift

    public var fileSize: UInt = 0
  • Initializes an instance of a file message params with binary file.

    Declaration

    Swift

    public init(file: Data)

    Parameters

    file

    A Biniary file to be sent.

    Return Value

    An initialized file message params

  • Initializes an instance of a file message params with file url.

    Declaration

    Swift

    public init(fileURL: String)

    Parameters

    fileURL

    File url to be sent.

    Return Value

    An initialized file message params

  • Default constructor.

    Declaration

    Swift

    public override init()
  • Copies this object

    Declaration

    Swift

    public override func copy(with zone: NSZone? = nil) -> Any

    Parameters

    zone

    optional NSZone

    Return Value

    FileMessageCreateParams instance

  • Encodes this object.

    Declaration

    Swift

    public override func encode(to encoder: Encoder) throws

    Parameters

    encoder

    Encoder instance

  • Default constructor.

    Declaration

    Swift

    public required init(from decoder: Decoder) throws

    Parameters

    decoder

    Decoder instance