private Part createPart ( Attachment a ) { return Part . builder ( ) . setName ( a . getName ( ) != null ? a . getName ( ) : a . getId ( ) ) . setSize ( a . getSize ( ) ) . setType ( a . getType ( ) ) . setUrl ( a . getUrl ( ) ) . build ( ) ; }
Create message part based on attachment details .