import "File" import "Stream" import "HTTP/MediaType" import "JavaBuiltin" as Java importJava "org.glassfish.jersey.media.multipart.MultiPart" where data MultiPart @JavaName "" multiPart :: MediaType -> MultiPart @JavaName bodyPart addBodyPart :: MultiPart -> BodyPart -> MultiPart importJava "org.glassfish.jersey.media.multipart.BodyPart" where data BodyPart @JavaName "" bodyPart :: a -> MediaType -> BodyPart importJava "org.glassfish.jersey.media.multipart.FormDataBodyPart" where data FormDataBodyPart @JavaName "" formDataBodyPart :: String -> a -> MediaType -> BodyPart importJava "org.glassfish.jersey.media.multipart.file.FileDataBodyPart" where data FileDataBodyPart @JavaName "" fileDataBodyPart :: String -> File -> MediaType -> BodyPart importJava "org.glassfish.jersey.media.multipart.file.StreamDataBodyPart" where data StreamDataBodyPart @JavaName "" streamDataBodyPart :: String -> InputStream -> String -> MediaType -> BodyPart multiPartAsBodyPart :: MultiPart -> BodyPart multiPartAsBodyPart mp = Java.unsafeCoerce mp formDataMultiPart :: MultiPart formDataMultiPart = multiPart MULTIPART_FORM_DATA_TYPE