Class AttachmentsImpl
java.lang.Object
com.eqixiac.equinix.customerportal.client.implementation.AttachmentsImpl
- All Implemented Interfaces:
Attachments
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbyte[]Downloads an attachment's file bytes.Retrieves a specific attachment's metadata by its identifier.list()Lists all attachments for the current account.Lists attachments for the current account filtered to the supplied attachment ids.upload(byte[] fileBytes, String fileName, AttachmentPurpose purpose) Uploads a file as a new attachment.
-
Constructor Details
-
AttachmentsImpl
public AttachmentsImpl()
-
-
Method Details
-
list
Description copied from interface:AttachmentsLists all attachments for the current account.Maps to
GET /v1/attachments(getAttachments).- Specified by:
listin interfaceAttachments- Returns:
- a paginated list of attachments
-
list
Description copied from interface:AttachmentsLists attachments for the current account filtered to the supplied attachment ids.Maps to
GET /v1/attachments(getAttachments) with theattachmentIdsquery parameter.- Specified by:
listin interfaceAttachments- Parameters:
attachmentIds- the attachment ids to filter by, ornull/empty for all- Returns:
- a paginated list of matching attachments
-
getByUuid
Description copied from interface:AttachmentsRetrieves a specific attachment's metadata by its identifier.Maps to
GET /v1/attachments/{attachmentId}(getAttachment).- Specified by:
getByUuidin interfaceAttachments- Parameters:
attachmentId- the identifier of the attachment- Returns:
- the matching attachment
-
download
Description copied from interface:AttachmentsDownloads an attachment's file bytes.Maps to
GET /v1/attachments/{attachmentId}/file(getAttachedFile).- Specified by:
downloadin interfaceAttachments- Parameters:
attachmentId- the identifier of the attachment- Returns:
- the file bytes
-
upload
Description copied from interface:AttachmentsUploads a file as a new attachment.Maps to
POST /v1/attachments/file(createAttachment). The file is sent as amultipart/form-datauploadFilepart and thepurposeis supplied as a query parameter.- Specified by:
uploadin interfaceAttachments- Parameters:
fileBytes- the raw file content (sent as the requireduploadFilepart)fileName- the file name to advertise for the uploaded filepurpose- the purpose of the upload (LOAorPO_DOCUMENT)- Returns:
- the created attachment
-