code: 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();
      }
docs: Create message part based on attachment details.
  
  @return Message part.